Class SolrIndexSearcher
- All Implemented Interfaces:
Closeable,AutoCloseable,SolrInfoBean,SolrMetricProducer
IndexSearcher.- Since:
- solr 0.9
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classINTERNAL: The response object fromgetProcessedFilter(List).Nested classes/interfaces inherited from class org.apache.lucene.search.IndexSearcher
org.apache.lucene.search.IndexSearcher.LeafReaderContextPartition, org.apache.lucene.search.IndexSearcher.LeafSlice, org.apache.lucene.search.IndexSearcher.TooManyClauses, org.apache.lucene.search.IndexSearcher.TooManyNestedClausesNested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final AtomicLongstatic final AtomicLongstatic final Stringstatic final Stringstatic final intFields inherited from class org.apache.lucene.search.IndexSearcher
leafContexts, readerContextFields inherited from interface org.apache.solr.metrics.SolrMetricProducer
CATEGORY_ATTR, HANDLER_ATTR, NAME_ATTR, OPERATION_ATTR, PLUGIN_NAME_ATTR, RESULT_ATTR, TYPE_ATTR -
Constructor Summary
ConstructorsConstructorDescriptionSolrIndexSearcher(SolrCore core, String path, IndexSchema schema, String name, org.apache.lucene.index.DirectoryReader r, boolean closeReader, boolean enableCache, boolean reserveDirectory, DirectoryFactory directoryFactory) SolrIndexSearcher(SolrCore core, String path, IndexSchema schema, SolrIndexConfig config, String name, boolean enableCache, DirectoryFactory directoryFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled on the initial searcher for each core, immediately beforefirstSearcherListenersare called for the searcher.voidcacheDocSet(org.apache.lucene.search.Query query, DocSet optionalAnswer, boolean mustCache) Compute and cache the DocSet that matches a query.cacheInsert(String cacheName, Object key, Object val) insert an entry in a generic cachecacheLookup(String cacheName, Object key) lookup an entry in a generic cachevoidclose()Free's resources associated with this searcher.org.apache.lucene.search.CollectionStatisticscollectionStatistics(String field) final intdocFreq(org.apache.lucene.index.Term term) org.apache.lucene.search.Explanationexplain(org.apache.lucene.search.Query query, int doc) return the named generic cacheCategory of this componentgetCore()Simple one or two line descriptiongetDocList(org.apache.lucene.search.Query query, List<org.apache.lucene.search.Query> filterList, org.apache.lucene.search.Sort lsort, int offset, int len, int flags) Deprecated.getDocList(org.apache.lucene.search.Query query, org.apache.lucene.search.Query filter, org.apache.lucene.search.Sort lsort, int offset, int len) Deprecated.getDocList(org.apache.lucene.search.Query query, org.apache.lucene.search.Sort lsort, int offset, int len) Deprecated.getDocListAndSet(org.apache.lucene.search.Query query, List<org.apache.lucene.search.Query> filterList, org.apache.lucene.search.Sort lsort, int offset, int len) Deprecated.getDocListAndSet(org.apache.lucene.search.Query query, List<org.apache.lucene.search.Query> filterList, org.apache.lucene.search.Sort lsort, int offset, int len, int flags) Deprecated.getDocListAndSet(org.apache.lucene.search.Query query, org.apache.lucene.search.Query filter, org.apache.lucene.search.Sort lsort, int offset, int len) Deprecated.getDocListAndSet(org.apache.lucene.search.Query query, org.apache.lucene.search.Query filter, org.apache.lucene.search.Sort lsort, int offset, int len, int flags) Deprecated.getDocListAndSet(org.apache.lucene.search.Query query, org.apache.lucene.search.Sort lsort, int offset, int len) Deprecated.Returns the set of document ids matching all queries.getDocSet(org.apache.lucene.search.Query query) Returns the set of document ids matching both the query.Returns the set of document ids matching both the query and the filter.getDocSet(SolrIndexSearcher.DocsEnumState deState) getDocSetBits(org.apache.lucene.search.Query q) protected DocSetgetDocSetNC(org.apache.lucene.search.Query query, DocSet filter) org.apache.lucene.index.FieldInfosReturns a collection of all field names the index reader knows about.expert: internal API, subject to changeintgetFirstMatch(org.apache.lucene.index.Term t) Returns the first document number containing the termtReturns -1 if no document was found.getIndexFingerprint(long maxVersion) final org.apache.lucene.index.DirectoryReaderorg.apache.lucene.util.BitsReturns an efficient random-accessBitsof the live docs.Returns an efficient random-accessDocSetof the live docs.getName()Simple common usage name, e.g.longgetPath()getProcessedFilter(List<org.apache.lucene.search.Query> queries) INTERNAL: Processes conjunction (AND) of the queries into aSolrIndexSearcher.ProcessedFilterresult.final org.apache.lucene.index.DirectoryReaderRaw reader (no fieldcaches etc).Direct access to the IndexSchema for use with this searcherfinal org.apache.lucene.index.LeafReaderNot recommended to call this method unless there is some particular reason due to internally callingSlowCompositeReaderWrapper.Implementations should return the context used inSolrMetricProducer.initializeMetrics(SolrMetricsContext, Attributes)to ensure proper cleanup of metrics at the end of the life-cycle of this component.longstatic ExecutorServiceCreate anExecutorServiceto be used by the LuceneIndexSearcher.getTaskExecutor().voidinitializeMetrics(SolrMetricsContext solrMetricsContext, io.opentelemetry.api.common.Attributes attributes) Implementation should initialize all metrics to aSolrMetricsContextRegistry/MeterProvider withAttributesas the common set of attributes that will be attached to every metric that is initialized for that class/componentstatic voidinitRegenerators(SolrConfig solrConfig) <T> TAllows interrogation ofdocFetchertemplate (checking field names, etc.) without forcing it to be cloned (as it would be if an instance were retrieved viagetDocFetcher()).booleanintersects(DocSet a, SolrIndexSearcher.DocsEnumState deState) booleanorg.apache.lucene.search.CollectionStatisticslocalCollectionStatistics(String field) org.apache.lucene.search.TermStatisticslocalTermStatistics(org.apache.lucene.index.Term term, int docFreq, long totalTermFreq) longlookupId(org.apache.lucene.util.BytesRef idBytes) lookup the docid by the unique key field, and return the id *within* the leaf reader in the low 32 bits, and the index of the leaf reader in the high 32 bits.final intmaxDoc()final intnumDocs()intnumDocs(org.apache.lucene.search.Query a, org.apache.lucene.search.Query b) Returns the number of documents that match bothaandb.intReturns the number of documents that match bothaandb.intnumDocs(DocSet a, SolrIndexSearcher.DocsEnumState deState) offerLiveDocs(Supplier<DocSet> docSetSupplier, int suppliedSize) If some process external toSolrIndexSearcherhas produced a DocSet whose cardinality matches that of `liveDocs`, this method provides such caller the ability to offer its own DocSet to be cached in the searcher.voidregister()Register sub-objects such as caches and our own metricsvoidsearch(org.apache.lucene.search.Query query, org.apache.lucene.search.Collector collector) search(QueryCommand cmd) Primary entrypoint for searching, using aQueryCommand.search(QueryResult qr, QueryCommand cmd) Deprecated.protected voidsortDocSet(QueryResult qr, QueryCommand cmd) org.apache.lucene.search.TermStatisticstermStatistics(org.apache.lucene.index.Term term, int docFreq, long totalTermFreq) toString()voidwarm(SolrIndexSearcher old) Warm this searcher based on an old one (primarily for auto-cache warming).org.apache.lucene.search.SortweightSort(org.apache.lucene.search.Sort sort) Returns a weighted sort according to this searcherweightSortSpec(SortSpec originalSortSpec, org.apache.lucene.search.Sort nullEquivalent) Returns a weighted sort spec according to this searcherMethods inherited from class org.apache.lucene.search.IndexSearcher
count, createWeight, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getLeafContexts, getMaxClauseCount, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTaskExecutor, getTimeout, getTopReaderContext, rewrite, search, search, search, search, search, searchAfter, searchAfter, searchAfter, searchLeaf, setDefaultQueryCache, setDefaultQueryCachingPolicy, setMaxClauseCount, setQueryCache, setQueryCachingPolicy, setSimilarity, setTimeout, slices, slices, storedFields, timedOut
-
Field Details
-
STATS_SOURCE
- See Also:
-
STATISTICS_KEY
- See Also:
-
numOpens
-
numCloses
-
EXECUTOR_MAX_CPU_THREADS
public static final int EXECUTOR_MAX_CPU_THREADS -
NO_CHECK_QCACHE
public static final int NO_CHECK_QCACHE- See Also:
-
GET_DOCSET
public static final int GET_DOCSET- See Also:
-
TERMINATE_EARLY
public static final int TERMINATE_EARLY- See Also:
-
GET_DOCLIST
public static final int GET_DOCLIST- See Also:
-
GET_SCORES
public static final int GET_SCORES- See Also:
-
-
Constructor Details
-
SolrIndexSearcher
public SolrIndexSearcher(SolrCore core, String path, IndexSchema schema, SolrIndexConfig config, String name, boolean enableCache, DirectoryFactory directoryFactory) throws IOException - Throws:
IOException
-
SolrIndexSearcher
public SolrIndexSearcher(SolrCore core, String path, IndexSchema schema, String name, org.apache.lucene.index.DirectoryReader r, boolean closeReader, boolean enableCache, boolean reserveDirectory, DirectoryFactory directoryFactory) throws IOException - Throws:
IOException
-
-
Method Details
-
initCollectorExecutor
Create anExecutorServiceto be used by the LuceneIndexSearcher.getTaskExecutor(). Shared across the whole node because it's a machine CPU resource. -
getDocFetcher
-
interrogateDocFetcher
Allows interrogation ofdocFetchertemplate (checking field names, etc.) without forcing it to be cloned (as it would be if an instance were retrieved viagetDocFetcher()). -
getStatsCache
-
getFieldInfos
public org.apache.lucene.index.FieldInfos getFieldInfos() -
termStatistics
public org.apache.lucene.search.TermStatistics termStatistics(org.apache.lucene.index.Term term, int docFreq, long totalTermFreq) throws IOException - Overrides:
termStatisticsin classorg.apache.lucene.search.IndexSearcher- Throws:
IOException
-
collectionStatistics
public org.apache.lucene.search.CollectionStatistics collectionStatistics(String field) throws IOException - Overrides:
collectionStatisticsin classorg.apache.lucene.search.IndexSearcher- Throws:
IOException
-
localTermStatistics
public org.apache.lucene.search.TermStatistics localTermStatistics(org.apache.lucene.index.Term term, int docFreq, long totalTermFreq) throws IOException - Throws:
IOException
-
localCollectionStatistics
public org.apache.lucene.search.CollectionStatistics localCollectionStatistics(String field) throws IOException - Throws:
IOException
-
isCachingEnabled
public boolean isCachingEnabled() -
getPath
-
toString
- Overrides:
toStringin classorg.apache.lucene.search.IndexSearcher
-
getCore
-
maxDoc
public final int maxDoc() -
numDocs
public final int numDocs() -
docFreq
- Throws:
IOException
-
getSlowAtomicReader
public final org.apache.lucene.index.LeafReader getSlowAtomicReader()Not recommended to call this method unless there is some particular reason due to internally callingSlowCompositeReaderWrapper. UseIndexSearcher.leafContextsto get the sub readers instead of using this method. -
getRawReader
public final org.apache.lucene.index.DirectoryReader getRawReader()Raw reader (no fieldcaches etc). Useful for operations like addIndexes -
getIndexReader
public final org.apache.lucene.index.DirectoryReader getIndexReader()- Overrides:
getIndexReaderin classorg.apache.lucene.search.IndexSearcher
-
register
public void register()Register sub-objects such as caches and our own metrics -
close
Free's resources associated with this searcher.In particular, the underlying reader and any cache's in use are closed.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSolrMetricProducer- Throws:
IOException
-
getSchema
Direct access to the IndexSchema for use with this searcher -
getFieldNames
Returns a collection of all field names the index reader knows about. -
getFilterCache
-
getFeatureVectorCache
-
initRegenerators
-
search
Primary entrypoint for searching, using aQueryCommand.- Throws:
IOException
-
search
Deprecated.- Throws:
IOException
-
search
public void search(org.apache.lucene.search.Query query, org.apache.lucene.search.Collector collector) throws IOException - Overrides:
searchin classorg.apache.lucene.search.IndexSearcher- Throws:
IOException
-
getFieldValueCache
expert: internal API, subject to change -
weightSort
public org.apache.lucene.search.Sort weightSort(org.apache.lucene.search.Sort sort) throws IOException Returns a weighted sort according to this searcher- Throws:
IOException
-
weightSortSpec
public SortSpec weightSortSpec(SortSpec originalSortSpec, org.apache.lucene.search.Sort nullEquivalent) throws IOException Returns a weighted sort spec according to this searcher- Throws:
IOException
-
getFirstMatch
Returns the first document number containing the termtReturns -1 if no document was found. This method is primarily intended for clients that want to fetch documents using a unique identifier."- Returns:
- the first document number containing the term
- Throws:
IOException
-
lookupId
lookup the docid by the unique key field, and return the id *within* the leaf reader in the low 32 bits, and the index of the leaf reader in the high 32 bits. -1 is returned if not found.- Throws:
IOException- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
cacheDocSet
public void cacheDocSet(org.apache.lucene.search.Query query, DocSet optionalAnswer, boolean mustCache) throws IOException Compute and cache the DocSet that matches a query. The normal usage is expected to be cacheDocSet(myQuery, null,false) meaning that Solr will determine if the Query warrants caching, and if so, will compute the DocSet that matches the Query and cache it. If the answer to the query is already cached, nothing further will be done.If the optionalAnswer DocSet is provided, it should *not* be modified after this call.
- Parameters:
query- the lucene query that will act as the keyoptionalAnswer- the DocSet to be cached - if null, it will be computed.mustCache- if true, a best effort will be made to cache this entry. if false, heuristics may be used to determine if it should be cached.- Throws:
IOException
-
getDocSetBits
- Throws:
IOException
-
getLiveDocSet
Returns an efficient random-accessDocSetof the live docs. It's cached. Never null.- Throws:
IOException- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
- the type of DocSet returned may change in the future
-
getLiveDocsBits
Returns an efficient random-accessBitsof the live docs. It's cached. Null means all docs are live. Use this likeLeafReader.getLiveDocs().- Throws:
IOException- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
offerLiveDocs
If some process external toSolrIndexSearcherhas produced a DocSet whose cardinality matches that of `liveDocs`, this method provides such caller the ability to offer its own DocSet to be cached in the searcher. The caller should then use the returned value (which may or may not be derived from the DocSet instance supplied), allowing more efficient memory use.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
getDocSet
Returns the set of document ids matching all queries. This method is cache-aware and attempts to retrieve the answer from the cache if possible. If the answer was not cached, it may have been inserted into the cache as a result of this call. This method can handle negative queries. A null/empty list results ingetLiveDocSet().The DocSet returned should not be modified.
- Throws:
IOException
-
getProcessedFilter
public SolrIndexSearcher.ProcessedFilter getProcessedFilter(List<org.apache.lucene.search.Query> queries) throws IOException INTERNAL: Processes conjunction (AND) of the queries into aSolrIndexSearcher.ProcessedFilterresult. Queries may be null/empty thus doesn't restrict the matching docs. Queries typically are resolved against the filter cache, and populate it.- Throws:
IOException
-
getDocSet
- Throws:
IOException- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
getDocSetNC
protected DocSet getDocSetNC(org.apache.lucene.search.Query query, DocSet filter) throws IOException - Throws:
IOException
-
getDocSet
Returns the set of document ids matching both the query. This method is cache-aware and attempts to retrieve a DocSet of the query from the cache if possible. If the answer was not cached, it may have been inserted into the cache as a result of this call.- Returns:
- Non-null DocSet meeting the specified criteria. Should not be modified by the caller.
- Throws:
IOException- See Also:
-
getDocSet
Returns the set of document ids matching both the query and the filter. This method is cache-aware and attempts to retrieve a DocSet of the query from the cache if possible. If the answer was not cached, it may have been inserted into the cache as a result of this call.- Parameters:
filter- may be null if none- Returns:
- Non-null DocSet meeting the specified criteria. Should not be modified by the caller.
- Throws:
IOException
-
getDocList
@Deprecated public DocList getDocList(org.apache.lucene.search.Query query, org.apache.lucene.search.Query filter, org.apache.lucene.search.Sort lsort, int offset, int len) throws IOException Deprecated.Returns documents matching bothqueryandfilterand sorted bysort.This method is cache aware and may retrieve
filterfrom the cache or make an insertion into the cache as a result of this call.FUTURE: The returned DocList may be retrieved from a cache.
- Parameters:
filter- may be nulllsort- criteria by which to sort (if null, query relevance is used)offset- offset into the list of documents to returnlen- maximum number of documents to return- Returns:
- DocList meeting the specified criteria, should not be modified by the caller.
- Throws:
IOException- If there is a low-level I/O error.
-
getDocList
@Deprecated public DocList getDocList(org.apache.lucene.search.Query query, List<org.apache.lucene.search.Query> filterList, org.apache.lucene.search.Sort lsort, int offset, int len, int flags) throws IOException Deprecated.Returns documents matching bothqueryand the intersection of thefilterList, sorted bysort.This method is cache aware and may retrieve
filterfrom the cache or make an insertion into the cache as a result of this call.FUTURE: The returned DocList may be retrieved from a cache.
- Parameters:
filterList- may be nulllsort- criteria by which to sort (if null, query relevance is used)offset- offset into the list of documents to returnlen- maximum number of documents to return- Returns:
- DocList meeting the specified criteria, should not be modified by the caller.
- Throws:
IOException- If there is a low-level I/O error.
-
getDocList
@Deprecated public DocList getDocList(org.apache.lucene.search.Query query, org.apache.lucene.search.Sort lsort, int offset, int len) throws IOException Deprecated.Returns documents matchingquery, sorted bysort.FUTURE: The returned DocList may be retrieved from a cache.
- Parameters:
lsort- criteria by which to sort (if null, query relevance is used)offset- offset into the list of documents to returnlen- maximum number of documents to return- Returns:
- DocList meeting the specified criteria, should not be modified by the caller.
- Throws:
IOException- If there is a low-level I/O error.
-
getDocListAndSet
@Deprecated public DocListAndSet getDocListAndSet(org.apache.lucene.search.Query query, org.apache.lucene.search.Query filter, org.apache.lucene.search.Sort lsort, int offset, int len) throws IOException Deprecated.Returns documents matching bothqueryandfilterand sorted bysort. Also returns the complete set of documents matchingqueryandfilter(regardless ofoffsetandlen).This method is cache aware and may retrieve
filterfrom the cache or make an insertion into the cache as a result of this call.FUTURE: The returned DocList may be retrieved from a cache.
The DocList and DocSet returned should not be modified.
- Parameters:
filter- may be nulllsort- criteria by which to sort (if null, query relevance is used)offset- offset into the list of documents to returnlen- maximum number of documents to return- Returns:
- DocListAndSet meeting the specified criteria, should not be modified by the caller.
- Throws:
IOException- If there is a low-level I/O error.
-
getDocListAndSet
@Deprecated public DocListAndSet getDocListAndSet(org.apache.lucene.search.Query query, org.apache.lucene.search.Query filter, org.apache.lucene.search.Sort lsort, int offset, int len, int flags) throws IOException Deprecated.Returns documents matching bothqueryandfilterand sorted bysort. Also returns the compete set of documents matchingqueryandfilter(regardless ofoffsetandlen).This method is cache aware and may retrieve
filterfrom the cache or make an insertion into the cache as a result of this call.FUTURE: The returned DocList may be retrieved from a cache.
The DocList and DocSet returned should not be modified.
- Parameters:
filter- may be nulllsort- criteria by which to sort (if null, query relevance is used)offset- offset into the list of documents to returnlen- maximum number of documents to returnflags- user supplied flags for the result set- Returns:
- DocListAndSet meeting the specified criteria, should not be modified by the caller.
- Throws:
IOException- If there is a low-level I/O error.
-
getDocListAndSet
@Deprecated public DocListAndSet getDocListAndSet(org.apache.lucene.search.Query query, List<org.apache.lucene.search.Query> filterList, org.apache.lucene.search.Sort lsort, int offset, int len) throws IOException Deprecated.Returns documents matching bothqueryand the intersection offilterList, sorted bysort. Also returns the compete set of documents matchingqueryandfilter(regardless ofoffsetandlen).This method is cache aware and may retrieve
filterfrom the cache or make an insertion into the cache as a result of this call.FUTURE: The returned DocList may be retrieved from a cache.
The DocList and DocSet returned should not be modified.
- Parameters:
filterList- may be nulllsort- criteria by which to sort (if null, query relevance is used)offset- offset into the list of documents to returnlen- maximum number of documents to return- Returns:
- DocListAndSet meeting the specified criteria, should not be modified by the caller.
- Throws:
IOException- If there is a low-level I/O error.
-
getDocListAndSet
@Deprecated public DocListAndSet getDocListAndSet(org.apache.lucene.search.Query query, List<org.apache.lucene.search.Query> filterList, org.apache.lucene.search.Sort lsort, int offset, int len, int flags) throws IOException Deprecated.Returns documents matching bothqueryand the intersection offilterList, sorted bysort. Also returns the complete set of documents matchingqueryandfilter(regardless ofoffsetandlen).This method is cache aware and may retrieve filters from the cache or make an insertion into the cache as a result of this call.
FUTURE: The returned DocList may be retrieved from a cache.
The DocList and DocSet returned should not be modified.
- Parameters:
filterList- may be nulllsort- criteria by which to sort (if null, query relevance is used)offset- offset into the list of documents to returnlen- maximum number of documents to returnflags- user supplied flags for the result set- Returns:
- DocListAndSet meeting the specified criteria, should not be modified by the caller.
- Throws:
IOException- If there is a low-level I/O error.
-
getDocListAndSet
@Deprecated public DocListAndSet getDocListAndSet(org.apache.lucene.search.Query query, org.apache.lucene.search.Sort lsort, int offset, int len) throws IOException Deprecated.Returns the top documents matching thequeryand sorted bysort, limited byoffsetandlen. Also returns compete set of matching documents as aDocSet.FUTURE: The returned DocList may be retrieved from a cache.
- Parameters:
lsort- criteria by which to sort (if null, query relevance is used)offset- offset into the list of documents to returnlen- maximum number of documents to return- Returns:
- DocListAndSet meeting the specified criteria, should not be modified by the caller.
- Throws:
IOException- If there is a low-level I/O error.
-
sortDocSet
- Throws:
IOException
-
numDocs
Returns the number of documents that match bothaandb.This method is cache-aware and may check as well as modify the cache.
- Returns:
- the number of documents in the intersection between
aandb. - Throws:
IOException- If there is a low-level I/O error.
-
numDocs
- Throws:
IOException- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
numDocs
public int numDocs(org.apache.lucene.search.Query a, org.apache.lucene.search.Query b) throws IOException Returns the number of documents that match bothaandb.This method is cache-aware and may check as well as modify the cache.
- Returns:
- the number of documents in the intersection between
aandb. - Throws:
IOException- If there is a low-level I/O error.
-
intersects
- Throws:
IOException- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
bootstrapFirstSearcher
public void bootstrapFirstSearcher()Called on the initial searcher for each core, immediately beforefirstSearcherListenersare called for the searcher. This provides the opportunity to perform initialization on the first registered searcher before the searcher begins to see anyfirstSearcher-triggered events. -
warm
Warm this searcher based on an old one (primarily for auto-cache warming). -
getCache
return the named generic cache -
cacheLookup
lookup an entry in a generic cache -
cacheInsert
insert an entry in a generic cache -
getOpenTimeStamp
-
getOpenNanoTime
public long getOpenNanoTime() -
explain
public org.apache.lucene.search.Explanation explain(org.apache.lucene.search.Query query, int doc) throws IOException - Overrides:
explainin classorg.apache.lucene.search.IndexSearcher- Throws:
IOException
-
getIndexFingerprint
- Throws:
IOException- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
- gets a cached version of the IndexFingerprint for this searcher
-
getName
Description copied from interface:SolrInfoBeanSimple common usage name, e.g. BasicQueryHandler, or fully qualified class name.- Specified by:
getNamein interfaceSolrInfoBean
-
getDescription
Description copied from interface:SolrInfoBeanSimple one or two line description- Specified by:
getDescriptionin interfaceSolrInfoBean
-
getCategory
Description copied from interface:SolrInfoBeanCategory of this component- Specified by:
getCategoryin interfaceSolrInfoBean
-
getSolrMetricsContext
Description copied from interface:SolrMetricProducerImplementations should return the context used inSolrMetricProducer.initializeMetrics(SolrMetricsContext, Attributes)to ensure proper cleanup of metrics at the end of the life-cycle of this component. This should be the child context if one was created, or null if the parent context was used.- Specified by:
getSolrMetricsContextin interfaceSolrMetricProducer
-
initializeMetrics
public void initializeMetrics(SolrMetricsContext solrMetricsContext, io.opentelemetry.api.common.Attributes attributes) Description copied from interface:SolrMetricProducerImplementation should initialize all metrics to aSolrMetricsContextRegistry/MeterProvider withAttributesas the common set of attributes that will be attached to every metric that is initialized for that class/component- Specified by:
initializeMetricsin interfaceSolrMetricProducer- Parameters:
solrMetricsContext- The registry that the component will initialize metrics toattributes- Base set of attributes that will be bound to all metrics for that component
-
getWarmupTime
public long getWarmupTime()
-