b***@oracle.com
2018-09-18 20:16:41 UTC
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-***@lucene.apache.org
For additional commands, e-mail: java-user-***@lucene.apache.org
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-***@lucene.apache.org
For additional commands, e-mail: java-user-***@lucene.apache.org