Package | Description |
---|---|
org.apache.lucene.facet |
faceted search
|
org.apache.lucene.index.sorter |
Provides index sorting capablities.
|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.grouping |
This module enables search result grouping with Lucene, where hits
with the same value in the specified single-valued group field are
grouped together.
|
org.apache.lucene.search.grouping.function |
Support for grouping by
ValueSource . |
org.apache.lucene.search.grouping.term |
Support for grouping by indexed terms via
FieldCache . |
org.apache.lucene.search.join |
This modules support index-time and query-time joins.
|
Modifier and Type | Method and Description |
---|---|
DrillSideways.DrillSidewaysResult |
DrillSideways.search(DrillDownQuery query,
Filter filter,
FieldDoc after,
int topN,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Search, sorting by
Sort , and computing
drill down and sideways counts. |
static TopFieldDocs |
FacetsCollector.search(IndexSearcher searcher,
Query q,
Filter filter,
int n,
Sort sort,
boolean doDocScores,
boolean doMaxScore,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
static TopFieldDocs |
FacetsCollector.search(IndexSearcher searcher,
Query q,
Filter filter,
int n,
Sort sort,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
static TopDocs |
FacetsCollector.searchAfter(IndexSearcher searcher,
ScoreDoc after,
Query q,
Filter filter,
int n,
Sort sort,
boolean doDocScores,
boolean doMaxScore,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
static TopDocs |
FacetsCollector.searchAfter(IndexSearcher searcher,
ScoreDoc after,
Query q,
Filter filter,
int n,
Sort sort,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
Modifier and Type | Field and Description |
---|---|
protected Sort |
EarlyTerminatingSortingCollector.sort
Sort used to sort the search results
|
Modifier and Type | Method and Description |
---|---|
static boolean |
SortingMergePolicy.isSorted(AtomicReader reader,
Sort sort)
Returns
true if the given reader is sorted by the specified sort . |
static AtomicReader |
SortingAtomicReader.wrap(AtomicReader reader,
Sort sort)
Return a sorted view of
reader according to the order
defined by sort . |
Constructor and Description |
---|
BlockJoinComparatorSource(Filter parentsFilter,
Sort parentSort)
Create a new BlockJoinComparatorSource, sorting only blocks of documents
with
parentSort and not reordering children with a block. |
BlockJoinComparatorSource(Filter parentsFilter,
Sort parentSort,
Sort childSort)
Create a new BlockJoinComparatorSource, specifying the sort order for both
blocks of documents and children within a block.
|
EarlyTerminatingSortingCollector(Collector in,
Sort sort,
int numDocsToCollect)
Create a new
EarlyTerminatingSortingCollector instance. |
SortingMergePolicy(MergePolicy in,
Sort sort)
Create a new
MergePolicy that sorts documents with the given sort . |
Modifier and Type | Field and Description |
---|---|
static Sort |
Sort.INDEXORDER
Represents sorting by index order.
|
static Sort |
Sort.RELEVANCE
Represents sorting by computed relevance.
|
Modifier and Type | Method and Description |
---|---|
Sort |
Sort.rewrite(IndexSearcher searcher)
Rewrites the SortFields in this Sort, returning a new Sort if any of the fields
changes during their rewriting.
|
Modifier and Type | Method and Description |
---|---|
static TopFieldCollector |
TopFieldCollector.create(Sort sort,
int numHits,
boolean fillFields,
boolean trackDocScores,
boolean trackMaxScore,
boolean docsScoredInOrder)
Creates a new
TopFieldCollector from the given
arguments. |
static TopFieldCollector |
TopFieldCollector.create(Sort sort,
int numHits,
FieldDoc after,
boolean fillFields,
boolean trackDocScores,
boolean trackMaxScore,
boolean docsScoredInOrder)
Creates a new
TopFieldCollector from the given
arguments. |
static TopDocs |
TopDocs.merge(Sort sort,
int start,
int size,
TopDocs[] shardHits)
Same as
TopDocs.merge(Sort, int, TopDocs[]) but also slices the result at the same time based
on the provided start and size. |
static TopDocs |
TopDocs.merge(Sort sort,
int topN,
TopDocs[] shardHits)
Returns a new TopDocs, containing topN results across
the provided TopDocs, sorting by the specified
Sort . |
protected TopFieldDocs |
IndexSearcher.search(List<AtomicReaderContext> leaves,
Weight weight,
FieldDoc after,
int nDocs,
Sort sort,
boolean fillFields,
boolean doDocScores,
boolean doMaxScore)
Just like
IndexSearcher.search(Weight, int, Sort, boolean, boolean) , but you choose
whether or not the fields in the returned FieldDoc instances should
be set by specifying fillFields. |
TopFieldDocs |
IndexSearcher.search(Query query,
Filter filter,
int n,
Sort sort)
Search implementation with arbitrary sorting.
|
TopFieldDocs |
IndexSearcher.search(Query query,
Filter filter,
int n,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Search implementation with arbitrary sorting, plus
control over whether hit scores and max score
should be computed.
|
TopFieldDocs |
IndexSearcher.search(Query query,
int n,
Sort sort)
Search implementation with arbitrary sorting and no filter.
|
protected TopFieldDocs |
IndexSearcher.search(Weight weight,
FieldDoc after,
int nDocs,
Sort sort,
boolean fillFields,
boolean doDocScores,
boolean doMaxScore)
Just like
IndexSearcher.search(Weight, int, Sort, boolean, boolean) , but you choose
whether or not the fields in the returned FieldDoc instances should
be set by specifying fillFields. |
protected TopFieldDocs |
IndexSearcher.search(Weight weight,
int nDocs,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Expert: Low-level search implementation with arbitrary
sorting and control over whether hit scores and max
score should be computed.
|
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
Filter filter,
int n,
Sort sort)
Finds the top
n
hits for query , applying filter if non-null,
where all results are after a previous result (after ). |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
Filter filter,
int n,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Finds the top
n
hits for query where all results are after a previous
result (after ), allowing control over
whether hit scores and max score should be computed. |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int n,
Sort sort)
Finds the top
n
hits for query where all results are after a previous
result (after ). |
Constructor and Description |
---|
SortRescorer(Sort sort)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
TopGroups<?> |
BlockGroupingCollector.getTopGroups(Sort withinGroupSort,
int groupOffset,
int withinGroupOffset,
int maxDocsPerGroup,
boolean fillSortFields)
Returns the grouped results.
|
static <T> Collection<SearchGroup<T>> |
SearchGroup.merge(List<Collection<SearchGroup<T>>> topGroups,
int offset,
int topN,
Sort groupSort)
Merges multiple collections of top groups, for example
obtained from separate index shards.
|
static <T> TopGroups<T> |
TopGroups.merge(TopGroups<T>[] shardGroups,
Sort groupSort,
Sort docSort,
int docOffset,
int docTopN,
TopGroups.ScoreMergeMode scoreMergeMode)
Merges an array of TopGroups, for example obtained
from the second-pass collector across multiple
shards.
|
GroupingSearch |
GroupingSearch.setGroupSort(Sort groupSort)
Specifies how groups are sorted.
|
GroupingSearch |
GroupingSearch.setSortWithinGroup(Sort sortWithinGroup)
Specified how documents inside a group are sorted.
|
Constructor and Description |
---|
AbstractFirstPassGroupingCollector(Sort groupSort,
int topNGroups)
Create the first pass collector.
|
AbstractSecondPassGroupingCollector(Collection<SearchGroup<GROUP_VALUE_TYPE>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields) |
BlockGroupingCollector(Sort groupSort,
int topNGroups,
boolean needsScores,
Filter lastDocPerGroup)
Create the single pass collector.
|
Constructor and Description |
---|
FunctionAllGroupHeadsCollector(ValueSource groupBy,
Map<?,?> vsContext,
Sort sortWithinGroup)
Constructs a
FunctionAllGroupHeadsCollector instance. |
FunctionFirstPassGroupingCollector(ValueSource groupByVS,
Map<?,?> vsContext,
Sort groupSort,
int topNGroups)
Creates a first pass collector.
|
FunctionSecondPassGroupingCollector(Collection<SearchGroup<MutableValue>> searchGroups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields,
ValueSource groupByVS,
Map<?,?> vsContext)
Constructs a
FunctionSecondPassGroupingCollector instance. |
Modifier and Type | Method and Description |
---|---|
static AbstractAllGroupHeadsCollector<?> |
TermAllGroupHeadsCollector.create(String groupField,
Sort sortWithinGroup)
Creates an
AbstractAllGroupHeadsCollector instance based on the supplied arguments. |
static AbstractAllGroupHeadsCollector<?> |
TermAllGroupHeadsCollector.create(String groupField,
Sort sortWithinGroup,
int initialSize)
Creates an
AbstractAllGroupHeadsCollector instance based on the supplied arguments. |
Constructor and Description |
---|
TermFirstPassGroupingCollector(String groupField,
Sort groupSort,
int topNGroups)
Create the first pass collector.
|
TermSecondPassGroupingCollector(String groupField,
Collection<SearchGroup<BytesRef>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields) |
Modifier and Type | Method and Description |
---|---|
TopGroups<Integer> |
ToParentBlockJoinCollector.getTopGroups(ToParentBlockJoinQuery query,
Sort withinGroupSort,
int offset,
int maxDocsPerGroup,
int withinGroupOffset,
boolean fillSortFields)
Returns the TopGroups for the specified
BlockJoinQuery.
|
TopGroups<Integer> |
ToParentBlockJoinCollector.getTopGroupsWithAllChildDocs(ToParentBlockJoinQuery query,
Sort withinGroupSort,
int offset,
int withinGroupOffset,
boolean fillSortFields)
Returns the TopGroups for the specified BlockJoinQuery.
|
Constructor and Description |
---|
ToParentBlockJoinCollector(Sort sort,
int numParentHits,
boolean trackScores,
boolean trackMaxScore)
Creates a ToParentBlockJoinCollector.
|
Copyright © 2000-2016 The Apache Software Foundation. All Rights Reserved.