question: public String splitKeywords ( String contents ) { if ( contents == null ) { return Values . EMPTYSTRING ; } StringBuilder indexContents = new StringBuilder ( ) ; contents = contents . replaceAll ( "[^a-zA-Z0-9]" , " " ) ; if ( contents . length ( ) > this . MAXSPLITLENGTH ) { contents = contents . substring ( 0 , MAXSPLITLENGTH ) + "AAA" ; } for ( String splitContents : contents . split ( " " ) ) { if ( splitContents . length ( ) >= 7 ) { Matcher m = MULTIPLEUPPERCASE . matcher ( splitContents ) ; if ( ! m . find ( ) ) { String [ ] splitStrings = splitContents . split ( "(?=\\p{Upper})" ) ; if ( splitStrings . length > 1 ) { indexContents . append ( " " ) ; indexContents . append ( StringUtils . join ( splitStrings , " " ) ) ; } } } } return indexContents . toString ( ) ; }
target:  Split "intelligently" on anything over 7 characters long if it only contains [a-zA-Z] split based on uppercase String[] r = s.split("(?=\\p{Upper})"); add those as additional words to index on so that things like RegexIndexer becomes Regex Indexer split the string by spaces look for anything over 7 characters long if its only [a-zA-Z] split by uppercase