[ 
https://issues.apache.org/jira/browse/LUCENE-6561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6561:
----------------------------------
    Attachment: LUCENE-6561.patch

Very rough patch that adds a TermContextCache to IndexSearcher, and moves 
TermContext.build() to IndexSearcher.getTermContext(Term).  There are three 
cache implementations, one no-op (the default), one that caches everything, and 
a dumb LRU implementation that uses LinkedHashMap.  
LuceneTestCase.newSearcher() randomly selects the various implementations.

Needs some proper tests, and probably the concurrency on the LRUCache needs 
more thought.  And benchmarking! (do our benchmark tests re-use queries at 
all?) But I thought I'd put this up to see what people think.

> 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

Reply via email to