Method Merge
Merge(Sort, Int32, TopDocs[])
Returns a new TopDocs, containing topN
results across
the provided TopDocs, sorting by the specified
Sort. Each of the TopDocs must have been sorted by
the same Sort, and sort field values must have been
filled (ie, fillFields=true
must be
passed to
Create(Sort, Int32, Boolean, Boolean, Boolean, Boolean).
Pass sort
=null to merge sort by score descending.
@lucene.experimental
Declaration
public static TopDocs Merge(Sort sort, int topN, TopDocs[] shardHits)
Parameters
Type | Name | Description |
---|---|---|
Sort | sort | |
System.Int32 | topN | |
TopDocs[] | shardHits |
Returns
Type | Description |
---|---|
TopDocs |
Merge(Sort, Int32, Int32, TopDocs[])
Same as Merge(Sort, Int32, TopDocs[]) but also slices the result at the same time based
on the provided start and size. The return TopDocs
will always have a scoreDocs with length of
at most Count.
Declaration
public static TopDocs Merge(Sort sort, int start, int size, TopDocs[] shardHits)
Parameters
Type | Name | Description |
---|---|---|
Sort | sort | |
System.Int32 | start | |
System.Int32 | size | |
TopDocs[] | shardHits |
Returns
Type | Description |
---|---|
TopDocs |