lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Williams (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-561) ParallelReader fails on deletes and on seeks of previously unused fields
Date Tue, 02 May 2006 07:10:48 GMT
     [ http://issues.apache.org/jira/browse/LUCENE-561?page=all ]

Chuck Williams updated LUCENE-561:
----------------------------------

    Attachment: ParallelReaderBugs.patch

This new version of the patch provides a more general solution for the unknown field NPE problem
(the solution for the delete problem is the same and is included in the new patch file).

For the NPE problem, the new patch handles the case of an unknown field explicitly in all
ParallelReader API's for which it is relevant.  This is quite a few of them, but I think I
got them all.

The first solution of specifying the field list for each reader was expedient in my applicaiton
since all fields are pre-configured and validated on index operations.  However, for Lucene
in general such field processing is not required.  E.g., with ParallelReader as it is in Lucene
now and with the first version of the patch, a user-entered misspelled field name passed in
a Query to search() generates an NPE instead of zero results.  With the new version of the
patch, zero resutls are returned properly.


> ParallelReader fails on deletes and on seeks of previously unused fields
> ------------------------------------------------------------------------
>
>          Key: LUCENE-561
>          URL: http://issues.apache.org/jira/browse/LUCENE-561
>      Project: Lucene - Java
>         Type: Bug

>   Components: Index
>     Versions: 2.0
>  Environment: All
>     Reporter: Chuck Williams
>  Attachments: ParallelReaderBugs.patch, ParallelReaderBugs.patch
>
> In using ParallelReader I've hit two bugs:
> 1.  ParallelReader.doDelete() and doUndeleteAll() call doDelete() and doUndeleteAll()
on the subreaders, but these methods do not set hasChanges.  Thus the changes are lost when
the readers are closed.  The fix is to call deleteDocument() and undeleteAll() on the subreaders
instead.
> 2.  ParallelReader discovers the fields in each subindex by using IndexReader.getFieldNames()
which only finds fields that have occurred on at least one document.  In general a parallel
index is designed with assignments of fields to sub-indexes and term seeks (including searches)
may be done on any of those fields, even if no documents in a particular state of the index
have yet had an assigned field.  Seeks/searches on fields that have not yet been indexed generated
an NPE in ParallelReader's various inner class seek() and next() methods because fieldToReader.get()
returns null on the unseen field.  The fix is to extend the add() methods to supply the correct
list of fields for each subindex.
> Patch that corrects both of these issues attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message