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

Shai Erera commented on LUCENE-4724:
------------------------------------

bq. OK I agree: let's disallow empty string at indexing time.

And {{null}} (for the vararg ctor).

bq. I think this means the CP ctor that takes String... varargs should throw an 
exception if any component is the empty string?

I think that both public ctors should throw IllegalArgException if they 
encounter empty or {{null}} strings.

And you shouldn't worry about what's out there, because previously, CP 
converted all strings to a char[] and I'm sure all these cases were handled. 
And probably TestCategoryPath had tests that covered all that. But in the whole 
cleanup, I must have removed them by mistake...

Would you mind to add a testEmptyNullComponents to TestCP? I'm ok with 
IllegalArgEx for trailing delimiters.
                
> TaxonomyReader drops empty string component from CategoryPath
> -------------------------------------------------------------
>
>                 Key: LUCENE-4724
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4724
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/facet
>            Reporter: Michael McCandless
>             Fix For: 4.2, 5.0
>
>         Attachments: LUCENE-4724.patch, LUCENE-4724.patch
>
>
> I ran the new PrintTaxonomyStats on a Wikipedia facets index, and it hit an 
> AIOOBE because there was a child of the /categories path that had only one 
> component ... this was created because I had added new 
> CategoryPath("categories", "") during indexing.
> I think TaxoReader should preserve and return that empty string from .getPath?

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

Reply via email to