I think you can achieve what you are asking by having a field for every
possible combination of pairs of input and output. Obviously this would
explode the size of your index, so it's not ideal.
Another alternative would be indexing all variants into a single field,
using different analyzers for d
Hi,
I am upgrading my project from Lucene 4 to 7.
FieldCache is removed in lucene 7, DocValue is replacement?
But seems DocValue doesn't support random access.
I need random access to get some specified field value quickly.
So how to solve it?
Hello,
Doc values should be used instead of the field cache indeed. Note that this
require to add them to your documents at index time, eg. with a
NumericDocValuesField.
Regarding random access, maybe you can use the advanceExact API, which
exists on all doc-value iterators. Just make sure to nev
I ran into a problem parsing queries like "cat -tiger" with this setup:
SimpleQueryParser configured with NOT_OPERATOR and *without*
WHITESPACE_OPERATOR
In this case, the whole string "cat -tiger" is passed to the analyzer which
generates tokens "cat" and "tiger", so the negation gets dropped.
I
My case is when I get some docs from lucene, I need also get some field
value of the retrieved docs.
For example in lucene 4, I use FieldCache like this.
FieldCache.DEFAULT.getTerms(reader, name, false).get(locDocId).utf8ToString();
FieldCache.DEFAULT.getInts(reader, name, false).get(locDocId);