lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] Commented: (LUCENE-2674) improve how MTQs interact with the terms dict cache
Date Tue, 28 Sep 2010 16:04:35 GMT


Robert Muir commented on LUCENE-2674:

Patch looks good to me. 

Enabling the caching for seeking in the TermsEnum itself wasnt very good, because some queries
(e.g. Fuzzy) seek to more terms than they will end out "using" in the BooleanQuery. Its much
better to be in the rewrite method. And I like passing docfreq so we the queries are less
fragile and depend on this cache less.

Maybe we should consider the small patch to Standard's terms dict cache in LUCENE-2672? The
issue is that clone() with this hierarchy can be expensive, its new in flex because of the
TermState abstraction i think. This might be important in rewrite methods that are going to
add a lot of these terms (it certainly showed up in my profiler and made a big difference)

Uwe found an excellent explanation of this:
It even affects arrays too, there is a bug for the array case, but its only fixed in -server:

> improve how MTQs interact with the terms dict cache
> ---------------------------------------------------
>                 Key: LUCENE-2674
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 4.0
>         Attachments: LUCENE-2674.patch, LUCENE-2674.patch, LUCENE-2674.patch, LUCENE-2674.patch
> Some small improvements:
>   * Adds a TermsEnum.cacheCurrentTerm "hint" (codec can make this a no-op)
>   * Removes the FTE.useTermsCache
>   * Changes MTQ's TermCollector API to accept the TermsEnum so collectors can eg call
.docFreq directly
>   * Adds expert ctor to TermQuery allowing you to pass in the docFreq

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message