Class LuceneSearchProvider
java.lang.Object
com.atlassian.jira.issue.search.providers.LuceneSearchProvider
- All Implemented Interfaces:
SearchProvider
@Deprecated(since="10.4",
forRemoval=true)
public class LuceneSearchProvider
extends Object
implements SearchProvider
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Summary
ConstructorsConstructorDescriptionLuceneSearchProvider(SearchProviderFactory searchProviderFactory, PermissionsFilterGenerator permissionsFilterGenerator, SearchHandlerManager searchHandlerManager, SearchSortUtil searchSortUtil, LuceneQueryBuilder luceneQueryBuilder, JqlAliasManager jqlAliasManager, FeatureManager featureManager, com.atlassian.event.api.EventPublisher eventPublisher, PermissionQueryCache permissionQueryCache, ApplicationProperties applicationProperties, ProjectManager projectManager, PluginIndexConfigurationManager pluginIndexConfigurationManager, FieldRegistry fieldRegistry) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionlonggetHitCount(SearchQuery query) Deprecated, for removal: This API element is subject to removal in a future version.Return the number of documents that match thequerylonggetHitCount(SearchQuery query, Long timeout) Deprecated, for removal: This API element is subject to removal in a future version.Return the number of documents that match thequerysearch(SearchQuery query, PagerFilter pager) Deprecated, for removal: This API element is subject to removal in a future version.Run a search against the Issue index, loading all fields for each document.search(SearchQuery query, PagerFilter pager, Set<String> fieldsToLoad) Deprecated, for removal: This API element is subject to removal in a future version.Run a search against the Issue index, loading only a restricted subset of fields for each document.voidsearch(SearchQuery query, org.apache.lucene.search.Collector collector) Deprecated, for removal: This API element is subject to removal in a future version.Run a search against the Issue index with thecollectorcalled for each document that matches thequery.
-
Constructor Details
-
LuceneSearchProvider
public LuceneSearchProvider(SearchProviderFactory searchProviderFactory, PermissionsFilterGenerator permissionsFilterGenerator, SearchHandlerManager searchHandlerManager, SearchSortUtil searchSortUtil, LuceneQueryBuilder luceneQueryBuilder, JqlAliasManager jqlAliasManager, FeatureManager featureManager, com.atlassian.event.api.EventPublisher eventPublisher, PermissionQueryCache permissionQueryCache, ApplicationProperties applicationProperties, ProjectManager projectManager, PluginIndexConfigurationManager pluginIndexConfigurationManager, FieldRegistry fieldRegistry) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
search
public SearchResults<DocumentWithId> search(SearchQuery query, PagerFilter pager, Set<String> fieldsToLoad) throws SearchException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchProviderRun a search against the Issue index, loading only a restricted subset of fields for each document.Results ordering
Results are sorted according toQuery.getOrderByClause()and Lucene scoring.- Specified by:
searchin interfaceSearchProvider- Parameters:
query- Query to define which Lucene documents should be returned.pager- PagerFilter to restrict the portion of documents matching thequerythat will be returned.fieldsToLoad- Set of fields that should be loaded. Only these fields will be available in the returneddocument. Empty set means onlydocument idwill be loaded.- Returns:
SearchResultswith Lucene documents (and their internal ids) with only specific fields loaded- Throws:
SearchException- See Also:
-
search
public SearchResults<DocumentWithId> search(SearchQuery query, PagerFilter pager) throws SearchException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchProviderRun a search against the Issue index, loading all fields for each document. If possible, use the more performant methodSearchProvider.search(SearchQuery, PagerFilter, Set), loading only a subset of fields.Results ordering
Results are sorted according toQuery.getOrderByClause()and Lucene scoring.- Specified by:
searchin interfaceSearchProvider- Parameters:
query- Query to define which Lucene documents should be returned.pager- PagerFilter to restrict the portion of documents matching thequerythat will be returned.- Returns:
SearchResultswith Lucene documents (and their internal ids) with all fields loaded- Throws:
SearchException- See Also:
-
getHitCount
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchProviderReturn the number of documents that match thequery- Specified by:
getHitCountin interfaceSearchProvider- Parameters:
query- Query to define which Lucene documents should be counted.- Returns:
- Throws:
SearchException
-
getHitCount
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchProviderReturn the number of documents that match thequery- Specified by:
getHitCountin interfaceSearchProvider- Parameters:
query- Query to define which Lucene documents should be counted.timeout- Query timeout in milliseconds- Returns:
- Throws:
SearchException
-
search
public void search(SearchQuery query, org.apache.lucene.search.Collector collector) throws SearchException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SearchProviderRun a search against the Issue index with thecollectorcalled for each document that matches thequery.Results ordering
This method disrespects sorting fromQuery.getOrderByClause(). Thecollectorwill be called according to Lucene's internal index structure. The docIds passed toLeafCollector.collect(int)are in order that is safe to be used withDocValuesIterator.advanceExact(int)method.Performance
This method offers the best performance when processing all data. As opposed toSearchProvider.search(SearchQuery, PagerFilter)andSearchProvider.search(SearchQuery, PagerFilter, Set), it does not load all returned documents into the memory at once. For each result it callsLeafCollector.collect(int)with the document id and leaves it up to theCollectorimplementation to decide what to do: load all or only specific fields, save just the document id, or ignore the given id completely.- Specified by:
searchin interfaceSearchProvider- Throws:
SearchException
-
SearchProvideris removed.