Class LuceneQueryOptions
Lucene.NET specific query options
public class LuceneQueryOptions : QueryOptions
- Inheritance
-
LuceneQueryOptions
- Inherited Members
Constructors
LuceneQueryOptions(int, int, SearchAfterOptions?, bool, bool, int, bool, LuceneFacetSamplingQueryOptions?)
Constructor
public LuceneQueryOptions(int skip, int take = 100, SearchAfterOptions? searchAfter = null, bool trackDocumentScores = false, bool trackDocumentMaxScore = false, int skipTakeMaxResults = 10000, bool autoCalculateSkipTakeMaxResults = false, LuceneFacetSamplingQueryOptions? facetSampling = null)
Parameters
skipintNumber of result documents to skip.
takeintOptional number of result documents to take.
searchAfterSearchAfterOptionsOptionally skip to results after the results from the previous search execution. Used for efficent deep paging.
trackDocumentScoresboolWhether to Track Document Scores. For best performance, if not needed, leave false.
trackDocumentMaxScoreboolWhether to track the maximum document score. For best performance, if not needed, leave false.
skipTakeMaxResultsintWhen using Skip/Take (not SearchAfter) this will be the maximum data set size that can be paged.
autoCalculateSkipTakeMaxResultsboolIf enabled, this will pre-calculate the document count in the index to use for SkipTakeMaxResults.
facetSamplingLuceneFacetSamplingQueryOptionsWhether to apply Facet sampling to improve performance. If not required, leave null.
LuceneQueryOptions(int, int?, SearchAfterOptions?, bool, bool, int, bool)
Constructor
[Obsolete("To remove in Examine 5.0")]
public LuceneQueryOptions(int skip, int? take = null, SearchAfterOptions? searchAfter = null, bool trackDocumentScores = false, bool trackDocumentMaxScore = false, int skipTakeMaxResults = 10000, bool autoCalculateSkipTakeMaxResults = false)
Parameters
skipintNumber of result documents to skip.
takeint?Optional number of result documents to take.
searchAfterSearchAfterOptionsOptionally skip to results after the results from the previous search execution. Used for efficent deep paging.
trackDocumentScoresboolWhether to Track Document Scores. For best performance, if not needed, leave false.
trackDocumentMaxScoreboolWhether to track the maximum document score. For best performance, if not needed, leave false.
skipTakeMaxResultsintWhen using Skip/Take (not SearchAfter) this will be the maximum data set size that can be paged.
autoCalculateSkipTakeMaxResultsboolIf enabled, this will pre-calculate the document count in the index to use for SkipTakeMaxResults.
Properties
AutoCalculateSkipTakeMaxResults
If enabled, this will pre-calculate the document count in the index to use for SkipTakeMaxResults.
public bool AutoCalculateSkipTakeMaxResults { get; }
Property Value
Remarks
This will incur a performance hit on each search execution since there will be a query to get the total document count.
FacetRandomSampling
Options for Lucene Facet Sampling. If not set, no Facet Sampling is applied.
public LuceneFacetSamplingQueryOptions? FacetRandomSampling { get; }
Property Value
Remarks
Performance optimization for large result sets.
SearchAfter
Options for Searching After. Used for efficient deep paging.
public SearchAfterOptions? SearchAfter { get; }
Property Value
SkipTakeMaxResults
When using Skip/Take (not SearchAfter) this will be the maximum data set size that can be paged.
public int SkipTakeMaxResults { get; }
Property Value
Remarks
For performance reasons, this should be low. The default is 10k and if larger datasets are required to be paged, this value can be increased but it is recommended to use the SearchAfter feature instead.
TrackDocumentMaxScore
Whether to track the maximum document score. For best performance, if not needed, leave false.
public bool TrackDocumentMaxScore { get; }
Property Value
TrackDocumentScores
Whether to Track Document Scores. For best performance, if not needed, leave false.
public bool TrackDocumentScores { get; }