lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alice Wong <airwayw...@gmail.com>
Subject DocValues for multiple indexes
Date Tue, 29 Apr 2014 05:38:07 GMT
Hello,

I have two separate indexes with similar fields. To search them at once I
created a IndexSearcher on top of a MultiReader initialized by two readers
of these two indexes. And it works well.

Since both indexes has a NumericDocValuesField called "id", I used this
field both for sorting and retrieving field values.

However, if I use

NumericDocValues values =
MultiDocValues.getNumericValues(combined_searcher.getIndexReader(), "id");
...
long id = values.get(hit.doc);

I got ArrayIndexOutOfBoundsException.

My question is:

1. Can I retrieve DocValues from MultiReader after using it to search and
get hits?
2. Is anything wrong for the above usage?

Thanks in advance.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message