lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3573) TaxonomyReader.refresh() is broken, replace its logic with reopen(), following IR.reopen pattern
Date Tue, 15 Nov 2011 04:15:51 GMT

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

Shai Erera commented on LUCENE-3573:
------------------------------------

I thought about it more, and I really think that we should go with option A. The common case
is that the taxonomy index is not recreated, however it may be updated very frequently. TR.refresh()
denotes exactly that -- it refreshes the internal state of the TaxonomyReader. This method
must be very efficient. I.e., with NRT, people rely on IR.openIfChanged to only open new segments,
which is what DTR.refresh() does (calls IR.openIfChanged).

So putting the name aside, we should have the method X() which either returns null (and updates
or not the internal state) or returns a new TR. Unfortunately refresh() is not a bad name
(reload() sounds more drastic and less efficient), so maybe refreshIfChanged?
                
> TaxonomyReader.refresh() is broken, replace its logic with reopen(), following IR.reopen
pattern
> ------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3573
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3573
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/facet
>            Reporter: Doron Cohen
>            Assignee: Doron Cohen
>            Priority: Minor
>         Attachments: LUCENE-3573.patch
>
>
> When recreating the taxonomy index, TR's assumption that categories are only added does
not hold anymore.
> As result, calling TR.refresh() will be incorrect at best, but usually throw an AIOOBE.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message