java.lang.Object
org.elasticsearch.script.ScriptTermStats
Access the term statistics of the children query of a script_score query.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScriptTermStats
(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.index.LeafReaderContext leafReaderContext, IntSupplier docIdSupplier, Set<org.apache.lucene.index.Term> terms) -
Method Summary
Modifier and TypeMethodDescriptiondocFreq()
Collect docFreq (number of documents a term occurs in) for the terms of the query and returns statistics for them.int
Number of terms that are matched im the query.termFreq()
Collect totalFreq (number of occurrence of a term in the current doc for the terms of the query and returns statistics for them.Collect termPositions (positions of a term in the current document) for the terms of the query and returns statistics for them.Collect totalTermFreq (total number of occurrence of a term in the index) for the terms of the query and returns statistics for them.int
Number of unique terms in the query.
-
Field Details
-
TERM_STAT_FEATURE
-
-
Constructor Details
-
ScriptTermStats
public ScriptTermStats(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.index.LeafReaderContext leafReaderContext, IntSupplier docIdSupplier, Set<org.apache.lucene.index.Term> terms)
-
-
Method Details
-
uniqueTermsCount
public int uniqueTermsCount()Number of unique terms in the query.- Returns:
- the number of unique terms
-
matchedTermsCount
public int matchedTermsCount()Number of terms that are matched im the query.- Returns:
- the number of matched terms
-
docFreq
Collect docFreq (number of documents a term occurs in) for the terms of the query and returns statistics for them.- Returns:
- statistics on docFreq for the terms of the query.
-
totalTermFreq
Collect totalTermFreq (total number of occurrence of a term in the index) for the terms of the query and returns statistics for them.- Returns:
- statistics on totalTermFreq for the terms of the query.
-
termFreq
Collect totalFreq (number of occurrence of a term in the current doc for the terms of the query and returns statistics for them.- Returns:
- statistics on totalTermFreq for the terms of the query in the current dac
-
termPositions
Collect termPositions (positions of a term in the current document) for the terms of the query and returns statistics for them.- Returns:
- statistics on termPositions for the terms of the query in the current dac
-