public class QueryHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
buildOrFilter(String field,
String[] values)
Builds a query that requires one of the parsed terms by using a normal solr
OR query.
|
static String |
buildTermsQuery(String field,
String[] values)
Builds a query that requires one of the parsed terms by using the Solr terms
query parser.
|
static String |
cleanTextQuery(String s)
Escapes Lucene
query parser syntax not allowed in the
ChatpalParams.PARAM_TEXT parameter
Allowed are
* for prefix/infix
" for phrase queries
- for negation and + for MUST
white spaces are also not escaped
|
public static String buildTermsQuery(String field, String[] values)
field - the field. MUST NOT be null nor blankvalues - the valuesIllegalArgumentException - if null or blank is parsed as fieldpublic static String buildOrFilter(String field, String[] values)
field - the field-name of the or queryvalues - the values to query for (OR)OR operatorpublic static String cleanTextQuery(String s)
ChatpalParams.PARAM_TEXT parameter
Allowed are * for prefix/infix
" for phrase queries
- for negation and + for MUST
Copyright © 2018–2019 Redlink GmbH. All rights reserved.