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 Patrick Diviacco <pa...@gmail.com> on 2011/04/19 13:40:06 UTC

Question about passing tags to BM25BooleanQuery

I'm using BM25 Okapi Query form here:
http://nlp.uned.es/~jperezi/Lucene-BM25/

I've a quick question. I've a list of tags: "tag1 tag2 tag3" and I'm
currently passing them to the query in this way:

BM25BooleanQuery okapiQuery = new BM25BooleanQuery("tag1 tag2 tag3",
"tags",
new WhitespaceAnalyzer(org.apache.lucene.util.Version.LUCENE_40));

Are them considered individually, or should I concatenate
multiple BM25BooleanQuery into a BooleanQuery ?

thanks.

This is the constructor doc:

public BM25BooleanQuery(java.lang.String query,
                        java.lang.String field,
                        Analyzer analyzer)
                 throws ParseException,
                        java.io.IOException