[ https://issues.apache.org/jira/browse/LUCENE-6561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14583963#comment-14583963 ]
Alan Woodward commented on LUCENE-6561: --------------------------------------- Concurrency was one of the things that I was unsure of, and it may be that this is only useful in specific cases (in my case, very large complex queries with lots of redundancy in them being run in series). Would a good compromise be to keep the move of TermContext.build(), so that if anybody does want to implement a cache, they can subclass IndexSearcher? Difficult to implement your own cache when queries are all calling a static method. > Add a TermContextCache to IndexSearcher > --------------------------------------- > > Key: LUCENE-6561 > URL: https://issues.apache.org/jira/browse/LUCENE-6561 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Alan Woodward > Attachments: LUCENE-6561.patch > > > TermContexts can be quite expensive to build, and if you have fairly complex > queries that re-use the same terms you can end up spending a lot of time > re-building the same ones over and over again. It would be nice to be able > to cache them on an IndexSearcher, so that they can be re-used. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org