Interface LuceneQueryParserAdaptor<Q,S,E extends Throwable>
-
- Type Parameters:
Q- the query type used by the query engine implementationS- the sort type used by the query engine implementationE- the exception it throws
public interface LuceneQueryParserAdaptor<Q,S,E extends Throwable>Adaptor class principally to wrap lucene parser implementations and encapsulate changes between lucene versions of query building.- Author:
- Andy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SbuildSort(List<Ordering> list, FunctionEvaluationContext functionContext)StringgetDatetimeSortField(String field, PropertyDefinition propertyDef)LuceneQueryParserExpressionAdaptor<Q,E>getExpressionAdaptor()Utility to build conjunctions, disjunctions and negationStringgetField()Get the default fieldQgetFieldQuery(String field, String value)QgetFieldQuery(String luceneFieldName, String term, AnalysisMode analysisMode, Integer slop, LuceneFunction luceneFunction)QgetFieldQuery(String field, String queryText, AnalysisMode analysisMode, LuceneFunction luceneFunction)QgetFuzzyQuery(String luceneFieldName, String term, Float minSimilarity)QgetIdentifieLikeQuery(String field, String stringValue, AnalysisMode analysisMode)Wrap generating a potentially complex id + version queryQgetIdentifierQuery(String field, String stringValue, AnalysisMode analysisMode, LuceneFunction luceneFunction)Wrap generating a potentially complex id + version queryQgetLikeQuery(String field, String sqlLikeClause, AnalysisMode analysisMode)QgetMatchAllNodesQuery()A query that matches all alfresco nodes (not extra stuff that may be in the underlying index)QgetMatchAllQuery()A query that matches all docsQgetMatchNoneQuery()A query that matches no docs.QgetNegatedQuery(Q query)Invert a query - add a mandatory must not match anything query alnogsideintgetPhraseSlop()Get the default phrase slopQgetPrefixQuery(String luceneFieldName, String term, AnalysisMode analysisMode)QgetRangeQuery(String field, String lower, String upper, boolean includeLower, boolean includeUpper, AnalysisMode analysisMode, LuceneFunction luceneFunction)SearchParametersgetSearchParameters()StringgetSortField(String field)QgetSpanQuery(String luceneFieldName, String first, String last, int slop, boolean inOrder)QgetWildcardQuery(String luceneFieldName, String term, AnalysisMode mode)booleansortFieldExists(String noLocalField)
-
-
-
Method Detail
-
getFieldQuery
Q getFieldQuery(String field, String queryText, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws E extends Throwable
-
getRangeQuery
Q getRangeQuery(String field, String lower, String upper, boolean includeLower, boolean includeUpper, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws E extends Throwable
-
getLikeQuery
Q getLikeQuery(String field, String sqlLikeClause, AnalysisMode analysisMode) throws E extends Throwable
-
getSearchParameters
SearchParameters getSearchParameters()
- Returns:
- SearchParameters
-
getIdentifierQuery
Q getIdentifierQuery(String field, String stringValue, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws E extends Throwable
Wrap generating a potentially complex id + version query
-
getIdentifieLikeQuery
Q getIdentifieLikeQuery(String field, String stringValue, AnalysisMode analysisMode) throws E extends Throwable
Wrap generating a potentially complex id + version query
-
sortFieldExists
boolean sortFieldExists(String noLocalField)
- Parameters:
noLocalField- String- Returns:
- boolean
-
buildSort
S buildSort(List<Ordering> list, FunctionEvaluationContext functionContext) throws E extends Throwable
-
getFuzzyQuery
Q getFuzzyQuery(String luceneFieldName, String term, Float minSimilarity) throws E extends Throwable
-
getField
String getField()
Get the default field- Returns:
- String
-
getPhraseSlop
int getPhraseSlop()
Get the default phrase slop- Returns:
- int
-
getFieldQuery
Q getFieldQuery(String luceneFieldName, String term, AnalysisMode analysisMode, Integer slop, LuceneFunction luceneFunction) throws E extends Throwable
-
getPrefixQuery
Q getPrefixQuery(String luceneFieldName, String term, AnalysisMode analysisMode) throws E extends Throwable
-
getSpanQuery
Q getSpanQuery(String luceneFieldName, String first, String last, int slop, boolean inOrder) throws E extends Throwable
-
getWildcardQuery
Q getWildcardQuery(String luceneFieldName, String term, AnalysisMode mode) throws E extends Throwable
-
getNegatedQuery
Q getNegatedQuery(Q query) throws E extends Throwable
Invert a query - add a mandatory must not match anything query alnogside
-
getExpressionAdaptor
LuceneQueryParserExpressionAdaptor<Q,E> getExpressionAdaptor()
Utility to build conjunctions, disjunctions and negation- Returns:
- LuceneQueryParserExpressionAdaptor
-
getMatchAllNodesQuery
Q getMatchAllNodesQuery()
A query that matches all alfresco nodes (not extra stuff that may be in the underlying index)- Returns:
- Q
-
getDatetimeSortField
String getDatetimeSortField(String field, PropertyDefinition propertyDef)
- Parameters:
field- StringpropertyDef- PropertyDefinition- Returns:
- String
-
-