jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius" <dbros...@mebigfatguy.com>
Subject Exception in lucene search when index maintains a deleted document
Date Thu, 14 Aug 2008 19:03:59 GMT
Greetings, occasionally i get exceptions doing searches caused ostensibly by deleted documents
(at least that is what the stack trace says). Below is one such stack trace:

in org.apache.jackrabbit.core.query.lucene.CachingIndexReader.getParent(int n, Bitset deleted)

it does

if (parent == null) {
  Document doc = document(n, FieldSelectors.UUID_AND_PARENT);

which is failing

I'm wondering, if adding a check for

isDeleted(n) before calling document, and handling appropriately would help the problem.



java.lang.IllegalArgumentException: attempt to access a deleted document
        at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:331
)
        at org.apache.lucene.index.FilterIndexReader.document(FilterIndexReader.
java:130)
        at org.apache.jackrabbit.core.query.lucene.CachingIndexReader.getParent(
CachingIndexReader.java:107)
        at org.apache.jackrabbit.core.query.lucene.SharedIndexReader.getParent(S
haredIndexReader.java:78)
        at org.apache.jackrabbit.core.query.lucene.ReadOnlyIndexReader.getParent
(ReadOnlyIndexReader.java:141)
        at org.apache.jackrabbit.core.query.lucene.CachingMultiIndexReader.getPa
rentDocId(CachingMultiIndexReader.java:112)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex$CombinedIndexRead
er.getParent(SearchIndex.java:1233)
        at org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$Desce
ndantSelfAxisScorer.isValid(DescendantSelfAxisQuery.java:347)
        at org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$Desce
ndantSelfAxisScorer.next(DescendantSelfAxisQuery.java:261)
        at org.apache.lucene.search.Scorer.score(Scorer.java:48)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:146)

        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:124)

        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:74)
        at org.apache.lucene.search.Hits.<init>(Hits.java:61)
        at org.apache.lucene.search.Searcher.search(Searcher.java:55)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(Sear
chIndex.java:689)
        at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.executeQuery(
QueryResultImpl.java:242)
        at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.getResults(Qu
eryResultImpl.java:290)
        at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.<init>(QueryR
esultImpl.java:192)
        at org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.j
ava:138)
        at org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:176
)


Mime
View raw message