Interface LuceneQueryMapper<T extends SearchQuery>
-
- All Known Subinterfaces:
LuceneSearchMapper
- All Known Implementing Classes:
AbstractTextFieldQueryMapper
,AbstractUserQueryMapper
,AllQueryMapper
,BaseConstantScoreQueryMapper
,BooleanQueryMapper
,ConstantScoreQueryMapper
,ContentPermissionsQueryMapper
,CreatorQueryMapper
,DelegatingLuceneSearchMapper
,DoubleRangeQueryMapper
,FieldExistsQueryMapper
,FunctionScoreQueryMapper
,IntegerRangeQueryMapper
,LongRangeQueryMapper
,MacroStorageVersionQueryMapper
,MatchNoDocsQueryMapper
,PhraseQueryMapper
,PrefixQueryMapper
,QueryStringQueryMapper
,SiteSearchPermissionsQueryMapper
,SiteTextSearchQueryMapper
,SpacePermissionQueryMapper
,SpanNearQueryMapper
,TermQueryMapper
,TermRangeQueryMapper
,TermSetQueryMapper
,TextFieldQueryMapper
,TextSearchQueryMapper
,UserInfoQueryMapper
,UserTextQueryMapper
,WildcardTextFieldQueryMapper
public interface LuceneQueryMapper<T extends SearchQuery>
A lucene query mapper represents an object that is able to map from a ConfluenceSearchQuery
to a LuceneQuery
. EverySearchPrimitive
query must have a corresponding mapper.Implementations of this class will be autowired automatically.
Implementations of this class must use setter injection instead of constructor injector, as only the former is supported at the moment.
Since 7.0, if a Query can be decomposed into multiple primitive queries, it is recommended to use
SearchQuery.expand()
instead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.lucene.search.Query
convertToLuceneQuery(T searchQuery)
Convert a SearchQuery into a lucene query.
-
-
-
Method Detail
-
convertToLuceneQuery
org.apache.lucene.search.Query convertToLuceneQuery(T searchQuery)
Convert a SearchQuery into a lucene query. So a query that represents a search for any value in a particular index field should map to null.- Parameters:
searchQuery
- the query to convert- Returns:
- the lucene query corresponding to the search query. null can be returned and signifies that no mapped query is necessary for the mapped query.
- Throws:
IllegalArgumentException
- if the search query is null or invalid
-
-