You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Seth Utecht <su...@atlassian.com> on 2018/09/18 11:00:18 UTC

IndexOptions & LongPoints

Hi!
New lucene user here, so my apologies if this turns out to be something
silly or obvious.

I'm working on some legacy code that we've inherited; currently we're in
the process of moving from Lucene3 to Lucene7.

My concern is that it seems like LongPoint's FieldType has an IndexOptions
that is always NONE. It strikes me as odd, because we are in fact indexing
and searching against these LongPoint fields.

Our specific case is the following if-block:

if (field.fieldType().indexOptions() != IndexOptions.NONE) {

//do some stuff

}

Within it, LongPoints never evaluate to true, although the StringFields we
were using before did without any problem.

I'm not sure what I'm missing, and any help would be appreciated.
Thanks!
Seth

Re: IndexOptions & LongPoints

Posted by Seth Utecht <su...@atlassian.com>.
Makes sense; thanks for the quick reply.

On Tue, Sep 18, 2018 at 2:53 PM Robert Muir <rc...@gmail.com> wrote:

> On Tue, Sep 18, 2018 at 7:00 AM, Seth Utecht <su...@atlassian.com>
> wrote:
> >
> > My concern is that it seems like LongPoint's FieldType has an
> IndexOptions
> > that is always NONE. It strikes me as odd, because we are in fact
> indexing
> > and searching against these LongPoint fields.
> >
>
> Points fields don't create an inverted index: so there aren't
> frequencies, positions, payloads, offsets, etc. That's why those
> inverted index options do not apply.
>
> Instead they build structures like kd-trees optimized for
> range/spatial searching and so on.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: IndexOptions & LongPoints

Posted by Robert Muir <rc...@gmail.com>.
On Tue, Sep 18, 2018 at 7:00 AM, Seth Utecht <su...@atlassian.com> wrote:
>
> My concern is that it seems like LongPoint's FieldType has an IndexOptions
> that is always NONE. It strikes me as odd, because we are in fact indexing
> and searching against these LongPoint fields.
>

Points fields don't create an inverted index: so there aren't
frequencies, positions, payloads, offsets, etc. That's why those
inverted index options do not apply.

Instead they build structures like kd-trees optimized for
range/spatial searching and so on.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org