@Internal public class LuceneSearchIndexAccessor extends Object implements SearchIndexAccessor
| Constructor and Description |
|---|
LuceneSearchIndexAccessor(com.atlassian.bonnie.LuceneAccessor luceneAccessor,
LuceneFieldVisitor luceneFieldVisitor,
LuceneQueryMapper<SearchQuery> luceneQueryMapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(SearchIndexAction action)
Executes a SearchIndexAction on the underlying search index.
|
long |
scan(SearchQuery searchQuery,
Set<String> requestedFields,
Consumer<Map<String,String[]>> consumer)
Scans the index for documents that match the provided searchQuery.
|
public LuceneSearchIndexAccessor(com.atlassian.bonnie.LuceneAccessor luceneAccessor,
LuceneFieldVisitor luceneFieldVisitor,
LuceneQueryMapper<SearchQuery> luceneQueryMapper)
public long scan(SearchQuery searchQuery, Set<String> requestedFields, Consumer<Map<String,String[]>> consumer)
SearchIndexAccessorscan in interface SearchIndexAccessorsearchQuery - SearchQuery to scan the index for.requestedFields - Set of field names that are requested from the index.
Any fields provided here that is not on the document will return an empty String[]
When providing an empty set, the consumer will only get empty maps to consume.consumer - Consumer that handles each found document.public void execute(SearchIndexAction action)
SearchIndexAccessorexecute in interface SearchIndexAccessoraction - SearchIndexActionCopyright © 2003–2021 Atlassian. All rights reserved.