lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] Commented: (LUCENE-2016) replace invalid U+FFFF character during indexing
Date Thu, 29 Oct 2009 17:51:59 GMT


Robert Muir commented on LUCENE-2016:

Mike, I disagree.

Here is my reasoning: Lucene Java happens to use U+FFFF as an internal identifier for processing.
However, this is your choice, you  could have just as easily used U+FFFE, or some other codepoint
even outside the BMP for this purpose. The standard gives you several options, perhaps you
might need multiple process-internal characters to accomplish what you want to do internally.

Its my understanding Lucene indexes should be portable to different programming languages:
perhaps my implementation in C/perl/python decides to use a different process-internal character,
this is allowed by Unicode and I think we should adhere to it, I don't think its being anal.

Finally, I completely disagree with the nontrivial performance comment. The trick is to make
sure the execution branch / checks for the process-internal characters outside the bmp, only
occurs for surrogate pairs. They are statistically very rare and if done right, it will not
affect performance of BMP content.

> replace invalid U+FFFF character during indexing
> ------------------------------------------------
>                 Key: LUCENE-2016
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.4, 2.4.1, 2.9
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 2.9.1, 3.0
>         Attachments: LUCENE-2016.patch
> If the invalid U+FFFF character is embedded in a token, it actually causes indexing to
silently corrupt the index by writing duplicate terms into the terms dict.  CheckIndex will
catch the error, and merging will hit exceptions (I think).
> We already replace invalid surrogate pairs with the replacement character U+FFFD, so
I'll just do the same with U+FFFF.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message