public class SearchTokenizer extends Object
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: For a searchPhrase the percent encoding is not supported by the
SearchTokenizer.org.apache.olingo.server.core.uri.parser.Parser
already handles in his parseUri method each query as percent decoded strings (see
line 177ff (for (RawUri.QueryOption option : uri.queryOptionListDecoded)).| Constructor and Description |
|---|
SearchTokenizer() |
| Modifier and Type | Method and Description |
|---|---|
List<SearchQueryToken> |
tokenize(String searchQuery)
Take the search query and split into according SearchQueryToken.
|
public List<SearchQueryToken> tokenize(String searchQuery) throws SearchTokenizerException
searchQuery - search query to be tokenizedSearchTokenizerException - if something in query is not valid
(based on OData search query ABNF)Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.