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

Michael McCandless commented on LUCENE-4511:
--------------------------------------------

bq. Regarding PrefixCodedTerms I don't think this buys us much here since 
usecases are not likely to share prefixes? 

Well I suspect TermsFilter is often used with many terms, at which
point prefix coding will usually reduce memory required.

Do you have a sense of how many terms typical ElasticSearch usage
uses?  Seems like it must be highish since we're compacting terms into
single byte[] in the first place.

It would also be nice to reusing existing same code instead of
inventing yet another way to pack terms into bytes (hrm:
FieldCache/DocValues is yet another place where we do this).

But I agree we don't need to improve that now ... we can refactor
later ... progress not perfection.

Hmm maybe add an explicit test for the "no terms provided" case?
(Maybe I missed it ...).  Also: maybe this should not be IAE but
rather just return a filter accepting nothing?  (I think this is
what current one does today). Ie, just don't add lastTermsAndField
if previousField is null in the ctor).

Otherwise +1 to the new patch.  Thanks Simon!

                
> TermsFilter might return wrong results if a field is not indexed or not 
> present in the index
> --------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4511
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4511
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 4.0, 4.1, 5.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>             Fix For: 4.1, 5.0
>
>         Attachments: LUCENE-4511.patch, LUCENE-4511.patch, LUCENE-4511.patch, 
> LUCENE-4511.patch, LUCENE-4511.patch
>
>
> TermsFilter returns if a term returns null from AIR#terms(term) while it 
> should just continue. I will upload a test & fix shortly

--
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