siddharthteotia commented on a change in pull request #5176: Make text index
query cache a configurable option
URL: https://github.com/apache/incubator-pinot/pull/5176#discussion_r404282234
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/segment/index/readers/text/LuceneTextIndexReader.java
##########
@@ -67,16 +69,20 @@
* @param indexDir segment index directory
* @param numDocs number of documents in the segment
*/
- public LuceneTextIndexReader(String column, File indexDir, int numDocs) {
+ public LuceneTextIndexReader(String column, File indexDir, int numDocs,
+ @Nullable Map<String, String> textIndexProperties) {
_column = column;
try {
File indexFile = getTextIndexFile(indexDir);
_indexDirectory = FSDirectory.open(indexFile.toPath());
_indexReader = DirectoryReader.open(_indexDirectory);
_indexSearcher = new IndexSearcher(_indexReader);
- // Disable Lucene query result cache. While it helps a lot with
performance for
- // repeated queries, on the downside it cause heap issues.
- _indexSearcher.setQueryCache(null);
+ if (textIndexProperties == null ||
textIndexProperties.get(FieldConfig.TEXT_INDEX_ENABLE_QUERY_CACHE) == null
Review comment:
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]