public Set < String > extractTerms ( String value ) { try { Set < String > result = new HashSet < String > ( ) ; Set < String > split = Utils . split ( value . toLowerCase ( ) , CommonDefs . MV_SCALAR_SEP_CHAR ) ; for ( String s : split ) { String [ ] tokens = tokenize ( s ) ; for ( String token : tokens ) { if ( token . length ( ) == 0 ) continue ; result . add ( token ) ; } } return result ; } catch ( Exception e ) { // Turn into an IllegalArgumentException throw new IllegalArgumentException ( "Error parsing field value: " + e . getLocalizedMessage ( ) ) ; } }
Analyze the given String value and return the set of terms that should be indexed .