lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (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 07:29:51 GMT

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

Doron Cohen commented on LUCENE-3573:
-------------------------------------

bq. So in fact, let's not call it openIfChanged, because may not be meaningful.

Yes this bothered me too. 

bq. so maybe refreshIfChanged?

... let's stick to refresh() (but...)

Current refresh impl is efficient in that (1) arrays only grow if needed (2) caches only cleaned
from wrong 'invalid ordinals'. In that, it relies on that the taxonomy can only grow (unless
it is recreated, hence this issue).

So I now think it would be best to modify slightly refresh() - in case it detects that the
taxonomy was created, it will throw a new (checked) exception - telling the application that
this TR cannot be refreshed but the app can open a new TR.

This way there is no 3-way logic - either the TR was refreshed or it was not.

And while we are at this, refresh() is void. I think it would be useful to return boolean,
indicating whether any refresh took place.
                
> 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