On Wed, May 8, 2013 at 4:23 AM, AarKay <ksu.wildc...@gmail.com> wrote:
> I see that Lucene 4.x has FieldInfo.IndexOptions that can be used to tell
> lucene whether to Index Documents/Frequencies/Positions/Offsets.
>
> We are in the process of upgrading from Lucene 2.9 to Lucene 4.x and I was
> wondering if there was a way to tell lucene whether to index
> docs/freqs/pos/offsets or not in the older versions (2.9) or did it always
> index positions and offsets by default?

I believe in 2.9 you could only say "docs"
(omitTermFreqAndPositions=true), or "docs+freqs+positions".  Offsets
are new in 4.x.

> Also I see that Lucene 4.x has FieldType.setStoreTermVectorPositions and
> FieldType.setStoreTermVectorOffsets.
> Can someone please tell me a usecase for storing positions and offsets in
> index?

Storing offsets in the index (postings) lets you use the new
PostingsHighlighter.  It should be faster than the other two
highlighters which rely on term vectors or on re-analysis at search
time.

> Is it necessary to store termvector positions and offsets when using
> IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS?

No.

Term vectors are stored separately from postings (IndexOptions
controls what's put into the postings).

Mike McCandless

http://blog.mikemccandless.com

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

Reply via email to