lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] [Resolved] (LUCENE-4633) DirectoryTaxonomyWriter.replaceTaxonomy should refresh the reader
Date Sun, 16 Dec 2012 10:18:13 GMT


Shai Erera resolved LUCENE-4633.

    Resolution: Fixed

Committed to 4x and trunk
> DirectoryTaxonomyWriter.replaceTaxonomy should refresh the reader
> -----------------------------------------------------------------
>                 Key: LUCENE-4633
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/facet
>    Affects Versions: 4.0
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>             Fix For: 4.1, 5.0
>         Attachments: LUCENE-4633.patch
> While migrating code to Lucene 4.0 I tripped it. If you call replaceTaxonomy() with e.g.
a taxonomy index that contains category "a", and then you try to add category "a" to the new
taxonomy, it receives a new ordinal!
> The reason is that replaceTaxo doesn't refresh the internal IndexReader, but does clear
the cache (as it should). This causes the next addCategory to not find category "a" in the
cache, and not in the reader instance at hand.
> Simple fix, I'll attach a patch with it and a test exposing the bug.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message