[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to