[
https://issues.apache.org/jira/browse/LUCENE-3573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149684#comment-13149684
]
Doron Cohen commented on LUCENE-3573:
-------------------------------------
I agree about keeping the same notions as IR.
bq. returns null (no changes, or the taxonomy wasn't recreated)
In fact I was thinking of a different "contract".
So we have two approaches here for the returned value:
* Option A:
## *new TR* - if the taxonomy was recreated.
## *null* - if the taxonomy was either not modified or just grew.
* Option B:
## *new TR* - if the taxonomy was modified (either recreated or just grew)
## *null* - if the taxonomy was not modified.
Option A is simpler to implement, but I think it has two drawbacks:
* it is confusingly different from that of IR
* the fact that the TR was refreshed is hidden from the caller.
Option B is a bit more involved to implement:
* would need to copy arrays' data from old TR to new one in case the taxonomy
only grew
I started to implement option B but now rethinking this...
bq. Was there any reason to add it to TestTaxonomyCombined?
Good point, should probably move this to TestDirectoryTaxonomyReader.
> 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]