Hi, I'm new here and newbie with Lucene, sorry if this first question looks a little dumb.
In a LeafCollector.collect(doc), I would like to (optionally) perform a query in cascade Actually I have something that looks like : public void collect(int docId) throws IOException { if (searchForJoinedDoc) { String joinQuery = // query involving GlobalOrdinalsQuery or ToParentBlockJoinQuery String id = context.reader().document(docId).getField("id").stringValue(); Query boolQuery = new BooleanQuery.Builder() .add(joinQuery, filter) .add(new TermQuery(new Term("id", id)), filter).build() boolean hasJoinedDoc = new IndexSearcher(leafReaderContext).search(query, 1).totalHits == 1 } } Is there a better way to write this without the TermQuery ? Can I exploit directly the docId in a filter ? Thanks, Franck --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org