Class SearchTokenizer
java.lang.Object
com.sap.cds.adapter.odata.v2.search.SearchTokenizer
searchExpr = ( OPEN BWS searchExpr BWS CLOSE / searchTerm )
[ searchOrExpr / searchAndExpr ]
searchOrExpr = RWS 'OR' RWS searchExpr
searchAndExpr = RWS [ 'AND' RWS ] searchExpr
searchTerm = [ 'NOT' RWS ] ( searchPhrase / searchWord )
searchPhrase = quotation-mark 1*qchar-no-AMP-DQUOTE quotation-mark
searchWord = 1*ALPHA ; Actually: any character from the Unicode categories L or Nl,
but not the words AND, OR, and NOT
ATTENTION: This class does not support a percent-encoded
searchPhrase because the URI parser percent decodes
each query before calling parsers of query options.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTakes the search query and splits it into a list of correspondingSearchQueryTokens.
-
Constructor Details
-
SearchTokenizer
public SearchTokenizer()
-
-
Method Details
-
tokenize
Takes the search query and splits it into a list of correspondingSearchQueryTokens. Before splitting it into tokens, leading and trailing whitespace in the given search query string is removed.- Parameters:
searchQuery- search query to be tokenized- Returns:
- list of tokens
-