[jira] [Commented] (LUCENE-4633) DirectoryTaxonomyWriter.replaceTaxonomy should refresh the reader

2012-12-16 Thread Commit Tag Bot (JIRA)

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

Commit Tag Bot commented on LUCENE-4633:


[branch_4x commit] Shai Erera
http://svn.apache.org/viewvc?view=revision&revision=1422497

LUCENE-4633: DirectoryTaxonomyWriter.replaceTaxonomy should refresh its reader


> DirectoryTaxonomyWriter.replaceTaxonomy should refresh the reader
> -
>
> Key: LUCENE-4633
> URL: https://issues.apache.org/jira/browse/LUCENE-4633
> 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: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4633) DirectoryTaxonomyWriter.replaceTaxonomy should refresh the reader

2012-12-16 Thread Commit Tag Bot (JIRA)

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

Commit Tag Bot commented on LUCENE-4633:


[trunk commit] Shai Erera
http://svn.apache.org/viewvc?view=revision&revision=1422495

LUCENE-4633: DirectoryTaxonomyWriter.replaceTaxonomy should refresh its reader


> DirectoryTaxonomyWriter.replaceTaxonomy should refresh the reader
> -
>
> Key: LUCENE-4633
> URL: https://issues.apache.org/jira/browse/LUCENE-4633
> 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: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4633) DirectoryTaxonomyWriter.replaceTaxonomy should refresh the reader

2012-12-16 Thread Gilad Barkai (JIRA)

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

Gilad Barkai commented on LUCENE-4633:
--

+1 patch looks good.

> DirectoryTaxonomyWriter.replaceTaxonomy should refresh the reader
> -
>
> Key: LUCENE-4633
> URL: https://issues.apache.org/jira/browse/LUCENE-4633
> 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: http://www.atlassian.com/software/jira

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