java.lang.Object
org.apache.lucene.monitor.QueryIndex
org.apache.lucene.monitor.WritableQueryIndex
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class(package private) static final classA Collector that decodes the stored query for each document hit.Nested classes/interfaces inherited from class org.apache.lucene.monitor.QueryIndex
QueryIndex.CachePopulator, QueryIndex.DataValues, QueryIndex.FIELDS, QueryIndex.QueryBuilder, QueryIndex.QueryCollector, QueryIndex.QueryTermFilter -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Objectprivate static final BytesRefprotected longprivate final Presearcherprivate Map<String, QueryCacheEntry> private final ScheduledExecutorServiceprivate final ReadWriteLockprotected ConcurrentMap<String, QueryCacheEntry> private final IndexWriterFields inherited from class org.apache.lucene.monitor.QueryIndex
decomposer, listeners, manager, serializer, termFilters -
Constructor Summary
ConstructorsConstructorDescriptionWritableQueryIndex(MonitorConfiguration configuration, Presearcher presearcher) -
Method Summary
Modifier and TypeMethodDescriptionprivate List<WritableQueryIndex.Indexable> buildIndexables(List<MonitorQuery> updates) intvoidclear()voidclose()voidcommit(List<MonitorQuery> updates) private voidcommitWithoutNotify(List<MonitorQuery> updates) voiddeleteQueries(List<String> ids) longintnumDocs()private voidpopulateQueryCache(MonitorQuerySerializer serializer, QueryDecomposer decomposer) void(package private) voidpurgeCache(QueryIndex.CachePopulator populator) longsearch(QueryIndex.QueryBuilder queryBuilder, QueryIndex.QueryCollector matcher) Methods inherited from class org.apache.lucene.monitor.QueryIndex
addListener, getQuery, scan, search
-
Field Details
-
writer
-
presearcher
-
purgeCache
-
purgeLock
-
commitLock
-
purgeExecutor
-
queries
-
lastPurged
protected long lastPurged -
EMPTY
-
-
Constructor Details
-
WritableQueryIndex
WritableQueryIndex(MonitorConfiguration configuration, Presearcher presearcher) throws IOException - Throws:
IOException
-
-
Method Details
-
commit
- Specified by:
commitin classQueryIndex- Throws:
IOException
-
commitWithoutNotify
- Throws:
IOException
-
populateQueryCache
private void populateQueryCache(MonitorQuerySerializer serializer, QueryDecomposer decomposer) throws IOException - Throws:
IOException
-
buildIndexables
-
search
public long search(QueryIndex.QueryBuilder queryBuilder, QueryIndex.QueryCollector matcher) throws IOException - Specified by:
searchin classQueryIndex- Throws:
IOException
-
purgeCache
- Specified by:
purgeCachein classQueryIndex- Throws:
IOException
-
purgeCache
- Specified by:
purgeCachein classQueryIndex- Throws:
IOException
-
close
- Throws:
IOException
-
numDocs
- Specified by:
numDocsin classQueryIndex- Throws:
IOException
-
cacheSize
public int cacheSize()- Specified by:
cacheSizein classQueryIndex
-
deleteQueries
- Specified by:
deleteQueriesin classQueryIndex- Throws:
IOException
-
clear
- Specified by:
clearin classQueryIndex- Throws:
IOException
-
getLastPurged
public long getLastPurged()- Specified by:
getLastPurgedin classQueryIndex
-