Discussion:
IndexOptions & LongPoints
Seth Utecht
2018-09-18 11:00:18 UTC
Permalink
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
Robert Muir
2018-09-18 12:53:08 UTC
Permalink
Post by Seth Utecht
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-***@lucene.apache.org
For additional commands, e-mail: java-user-***@lucene.apache.org
Seth Utecht
2018-09-18 13:49:23 UTC
Permalink
Makes sense; thanks for the quick reply.
Post by Seth Utecht
Post by Seth Utecht
My concern is that it seems like LongPoint's FieldType has an
IndexOptions
Post by Seth Utecht
that is always NONE. It strikes me as odd, because we are in fact
indexing
Post by Seth Utecht
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.
---------------------------------------------------------------------
Loading...