IndexOptions & LongPoints

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

IndexOptions & LongPoints

Seth Utecht
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
Reply | Threaded
Open this post in threaded view
|

Re: IndexOptions & LongPoints

Robert Muir
On Tue, Sep 18, 2018 at 7:00 AM, Seth Utecht <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: IndexOptions & LongPoints

Seth Utecht
Makes sense; thanks for the quick reply.

On Tue, Sep 18, 2018 at 2:53 PM Robert Muir <[hidden email]> wrote:

> On Tue, Sep 18, 2018 at 7:00 AM, Seth Utecht <[hidden email]>
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>