Package org.apache.lucene.monitor
Class QueryIndex
java.lang.Object
org.apache.lucene.monitor.QueryIndex
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface(package private) static final class(package private) static final classprivate static class(package private) static final classA Collector that decodes the stored query for each document hit.(package private) static interface(package private) static interface(package private) static classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Objectprivate final QueryDecomposerprivate static final BytesRefprivate final SearcherManagerprivate final Presearcherprivate Map<String, QueryCacheEntry> private final ReadWriteLockprivate ConcurrentMap<String, QueryCacheEntry> private final MonitorQuerySerializer(package private) final Map<IndexReader.CacheKey, QueryIndex.QueryTermFilter> private final IndexWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate List<QueryIndex.Indexable> buildIndexables(List<MonitorQuery> updates) (package private) int(package private) voidclear()voidclose()(package private) voidcommit(List<MonitorQuery> updates) (package private) voiddeleteQueries(Iterable<String> ids) (package private) MonitorQuery(package private) intnumDocs()private voidpopulateQueryCache(MonitorQuerySerializer serializer, QueryDecomposer decomposer) (package private) voidprivate voidpurgeCache(QueryIndex.CachePopulator populator) Remove unused queries from the query cache.(package private) voidscan(QueryIndex.QueryCollector matcher) (package private) longsearch(QueryIndex.QueryBuilder queryBuilder, QueryIndex.QueryCollector matcher) (package private) longsearch(Query query, QueryIndex.QueryCollector matcher)
-
Field Details
-
writer
-
manager
-
decomposer
-
serializer
-
presearcher
-
purgeCache
-
purgeLock
-
commitLock
-
queries
-
termFilters
-
EMPTY
-
-
Constructor Details
-
QueryIndex
QueryIndex(MonitorConfiguration config, Presearcher presearcher) throws IOException - Throws:
IOException
-
-
Method Details
-
populateQueryCache
private void populateQueryCache(MonitorQuerySerializer serializer, QueryDecomposer decomposer) throws IOException - Throws:
IOException
-
commit
- Throws:
IOException
-
buildIndexables
-
getQuery
- Throws:
IOException
-
scan
- Throws:
IOException
-
search
- Throws:
IOException
-
search
long search(QueryIndex.QueryBuilder queryBuilder, QueryIndex.QueryCollector matcher) throws IOException - Throws:
IOException
-
purgeCache
- Throws:
IOException
-
purgeCache
Remove unused queries from the query cache.This is normally called from a background thread at a rate set by configurePurgeFrequency().
- Throws:
IOException- on IO errors
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
numDocs
int numDocs() -
cacheSize
int cacheSize() -
deleteQueries
- Throws:
IOException
-
clear
- Throws:
IOException
-