com.atlassian.confluence.search.v2.lucene
Class DelegatingLuceneSearchMapper

java.lang.Object
  extended by com.atlassian.confluence.search.v2.lucene.DelegatingLuceneSearchMapper
All Implemented Interfaces:
LuceneQueryMapper<SearchQuery>, LuceneResultFilterMapper, LuceneSearchFilterMapper<SearchFilter>, LuceneSearchMapper, LuceneSortMapper

public class DelegatingLuceneSearchMapper
extends Object
implements LuceneSearchMapper


Constructor Summary
DelegatingLuceneSearchMapper(LuceneSearchMapperRegistry registry)
           
 
Method Summary
 org.apache.lucene.search.Query convertToLuceneQuery(SearchQuery query)
          Convert a SearchQuery into a lucene query.
 LuceneResultFilter convertToLuceneResultFilter(ResultFilter resultFilter)
           
 org.apache.lucene.search.Filter convertToLuceneSearchFilter(SearchFilter searchFilter)
          Convert a search filter into a lucene search filter.
 org.apache.lucene.search.Sort convertToLuceneSort(SearchSort searchSort)
          Converts a search sort into a lucene sort.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingLuceneSearchMapper

public DelegatingLuceneSearchMapper(LuceneSearchMapperRegistry registry)
Method Detail

convertToLuceneQuery

public org.apache.lucene.search.Query convertToLuceneQuery(SearchQuery query)
Description copied from interface: LuceneQueryMapper
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.

Specified by:
convertToLuceneQuery in interface LuceneQueryMapper<SearchQuery>
Parameters:
query - 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.

convertToLuceneSort

public org.apache.lucene.search.Sort convertToLuceneSort(SearchSort searchSort)
Converts a search sort into a lucene sort. Please check that a mapper is available to do the conversion first via LuceneSearchMapperRegistry.getSortMapper(String).

Specified by:
convertToLuceneSort in interface LuceneSortMapper
Parameters:
searchSort - search sort to be converted
Throws:
LuceneMapperNotFoundException - if no LuceneSortMapper could be found via LuceneSearchMapperRegistry.getSortMapper(String).

convertToLuceneResultFilter

public LuceneResultFilter convertToLuceneResultFilter(ResultFilter resultFilter)
Specified by:
convertToLuceneResultFilter in interface LuceneResultFilterMapper
Parameters:
resultFilter - result filter to be converted
Throws:
LuceneMapperNotFoundException - if no LuceneResultFilterMapper could be found via LuceneSearchMapperRegistry.getResultFilterMapper(String).

convertToLuceneSearchFilter

public org.apache.lucene.search.Filter convertToLuceneSearchFilter(SearchFilter searchFilter)
Description copied from interface: LuceneSearchFilterMapper
Convert a search filter into a lucene search filter.

Specified by:
convertToLuceneSearchFilter in interface LuceneSearchFilterMapper<SearchFilter>
Parameters:
searchFilter - the search filter to convert
Returns:
the lucene search filter corresponding to the search filter


Copyright © 2003–2015 Atlassian. All rights reserved.