lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] [Commented] (SOLR-2530) Remove Noggit CharArr from FieldType
Date Thu, 19 May 2011 14:29:47 GMT


Yonik Seeley commented on SOLR-2530:

There are some efficiency losses here:
- A reusable CharArr allows one to avoid extra object creation.  See TermsComponent which
can update a CharArr and then compare it against a pattern w/o having to create a String object.
- We should not replace the previous toString with BytesRef.utf8String... it's much slower,
esp for small strings like will be common here.

So rather than just removing ByteUtils.UTF8toUTF16, how about moving it to BytesRef and use
it in BytesRTef.utf8String?

> Remove Noggit CharArr from FieldType
> ------------------------------------
>                 Key: SOLR-2530
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>            Priority: Minor
>              Labels: api-change
>             Fix For: 4.0
>         Attachments: SOLR-2530.patch
> FieldType#indexedToReadable(BytesRef, CharArr) uses a noggit dependency that also spreads
into ByteUtils. The uses of this method area all convert to String which makes this extra
reference and the dependency unnecessary. I refactored it to simply return string and removed
ByteUtils entirely. The only leftover from BytesUtils is a constant, i moved that one to Lucenes
UnicodeUtils. I will upload a patch in a second

This message is automatically generated by JIRA.
For more information on JIRA, see:

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

View raw message