You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Rob Staveley (Tom)" <rs...@seseit.com> on 2007/01/05 15:18:10 UTC
All readers must have same maxDoc: 16651064!=16507074
I'm attempting to delete documents matching a term on a ParallelReader and
got the error message above, presumably while adding directories to the
ParallelReader.
I'm puzzled, because I don't need to have the same maxDoc (and numDoc) in
index directories for a ParallelMultiSearcher, so what's the deal here?
Should I delete serially... one index at a time?
Re: All readers must have same maxDoc: 16651064!=16507074
Posted by "Rob Staveley (Tom)" <rs...@seseit.com>.
Oh I get it now. That was a great explanation. Thanks Doron.
Doron Cohen wrote:
> Rob,
>
> "Rob Staveley (Tom)" <rs...@seseit.com> wrote on 05/01/2007 06:18:10:
>
>> I'm attempting to delete documents matching a term on a ParallelReader
>>
> and
>
>> got the error message above, presumably while adding directories to the
>> ParallelReader.
>>
>
> See the javadocs for ParallelReader -
> http://lucene.apache.org/java/docs/api/org/apache/lucene/index/ParallelReader.html
> -
> -------------------
> An IndexReader which reads multiple, parallel indexes. Each index added
> must have the same number of documents, but typically each contains
> different fields. Each document contains the union of the fields of all
> documents with the same document number. When searching, matches for a
> query term are from the first index added that has the field.
>
> This is useful, e.g., with collections that have large fields which change
> rarely and small fields that change more frequently. The smaller fields may
> be re-indexed in a new index and both indexes may be searched together.
>
> Warning: It is up to you to make sure all indexes are created and modified
> the same way. For example, if you add documents to one index, you need to
> add the same documents in the same order to the other indexes. Failure to
> do so will result in undefined behavior.
> -------------------
>
> In other words, ParallelReader operates under the assumption that you split
> your index to several indexes, [**] by fields [**] , so each index has
> exactly the same number of documents.
>
>
>> I'm puzzled, because I don't need to have the same maxDoc (and numDoc) in
>> index directories for a ParallelMultiSearcher, so what's the deal here?
>> Should I delete serially... one index at a time?
>>
>
> MultiSearcher and ParallelMultiReader are different - they operate against
> a set of Searchables (not a set of Readers) and aggregate results from
> those searchers. They operate under the assumption that you split your
> indexed data [**] by documents [**] , so that there are distinct documents
> in each index.
>
> Hope this helps,
> Doron
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: All readers must have same maxDoc: 16651064!=16507074
Posted by Doron Cohen <DO...@il.ibm.com>.
Rob,
"Rob Staveley (Tom)" <rs...@seseit.com> wrote on 05/01/2007 06:18:10:
> I'm attempting to delete documents matching a term on a ParallelReader
and
> got the error message above, presumably while adding directories to the
> ParallelReader.
See the javadocs for ParallelReader -
http://lucene.apache.org/java/docs/api/org/apache/lucene/index/ParallelReader.html
-
-------------------
An IndexReader which reads multiple, parallel indexes. Each index added
must have the same number of documents, but typically each contains
different fields. Each document contains the union of the fields of all
documents with the same document number. When searching, matches for a
query term are from the first index added that has the field.
This is useful, e.g., with collections that have large fields which change
rarely and small fields that change more frequently. The smaller fields may
be re-indexed in a new index and both indexes may be searched together.
Warning: It is up to you to make sure all indexes are created and modified
the same way. For example, if you add documents to one index, you need to
add the same documents in the same order to the other indexes. Failure to
do so will result in undefined behavior.
-------------------
In other words, ParallelReader operates under the assumption that you split
your index to several indexes, [**] by fields [**] , so each index has
exactly the same number of documents.
>
> I'm puzzled, because I don't need to have the same maxDoc (and numDoc) in
> index directories for a ParallelMultiSearcher, so what's the deal here?
> Should I delete serially... one index at a time?
MultiSearcher and ParallelMultiReader are different - they operate against
a set of Searchables (not a set of Readers) and aggregate results from
those searchers. They operate under the assumption that you split your
indexed data [**] by documents [**] , so that there are distinct documents
in each index.
Hope this helps,
Doron
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org