lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: MultiFields#getTerms docs clarification
Date Fri, 12 Aug 2016 13:51:02 GMT
Getting an empty BytesRef back from Terms.getMin() means Lucene thinks you
indexed an empty (zero length) token.  Lucene (unfortunately) allows this.
Is it possible you did that?

If not, can you make a test case showing this?

Mike McCandless

http://blog.mikemccandless.com

On Thu, Aug 11, 2016 at 7:43 PM, Trejkaz <trejkaz@trypticon.org> wrote:

> Hi all.
>
> The docs on MultiFields#getTerms state:
>
> > This method may return null if the field does not exist.
>
> Does this mean:
>
>   (a) The method *will* return null if the field does not exist.
>
>   (b) The method will *not necessarily* return null if the field does not
> exist.
>
> I think we've seen a situation where it somehow returned non-null, but
> them Terms#getMin() returned an empty BytesRef, as if we had asked for
> an absent value. I would expect getMin() not to count absent values as
> the minimum, only because if that were the case, I would have
> reproduced the same error during development.
>
> TX
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message