You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2010/09/28 18:04:35 UTC

[jira] Commented: (LUCENE-2674) improve how MTQs interact with the terms dict cache

    [ https://issues.apache.org/jira/browse/LUCENE-2674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915801#action_12915801 ] 

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: http://forums.java.net/jive/thread.jspa?messageID=16538&tstart=0
It even affects arrays too, there is a bug for the array case, but its only fixed in -server: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6195753


> improve how MTQs interact with the terms dict cache
> ---------------------------------------------------
>
>                 Key: LUCENE-2674
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2674
>             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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org