lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From baris.ka...@oracle.com
Subject MultiPhraseQuery
Date Tue, 18 Sep 2018 20:16:41 GMT
Hi,-

  how does MultiPhraseQuery treat synonyms?

is the following possible?

... (created index with synonyms and indexReader object has the index)

IndexSearcher is = new IndexSearcher(indexReader);

MultiPhraseQuery.Builder builder = new MultiPhraseQuery.Builder();
builder.add(new Term("body", "one"), 0);
builder.add(new Term("body", "two"), 1);
MultiPhraseQuery mpq = builder.build();
TopDocs hits = is.search(mpq, 20);// 20 hits

Best regards


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


Mime
View raw message