lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jm (JIRA)" <>
Subject [jira] Created: (LUCENE-556) MatchAllDocsQuery, MultiSearcher and a custom HitCollector throwing exception
Date Wed, 26 Apr 2006 15:38:02 GMT
MatchAllDocsQuery, MultiSearcher and a custom HitCollector throwing exception

         Key: LUCENE-556
     Project: Lucene - Java
        Type: Bug

  Components: Search  
    Versions: 1.9    
 Environment: xp sp2, jdk1.5
    Reporter: jm
    Priority: Minor

I have encountered an issue with lucene1.9.1. It involves MatchAllDocsQuery, MultiSearcher
and a custom HitCollector. The following code throws  java.lang.UnsupportedOperationException.

If I remove the MatchAllDocsQuery  condition (comment whole //1 block), or if I dont use the
custom hitcollector (; instead of, allcoll);) the exception goes
away. By stepping into the source I can see it seems due to MatchAllDocsQuery no implementing

           Searcher searcher = new
           Searchable[] indexes = new IndexSearcher[1];
           indexes[0] = searcher;
           MultiSearcher ms = new MultiSearcher(indexes);

           AllCollector allcoll = new AllCollector(ms);

           BooleanQuery mbq = new BooleanQuery();
           mbq.add(new TermQuery(new Term("body", "value1")),
// 1
           MatchAllDocsQuery alld = new MatchAllDocsQuery();
           mbq.add(alld, BooleanClause.Occur.MUST);

           System.out.println("Query: " + mbq.toString());

           // 2
 , allcoll);

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message