Hi,
I need some ideas about Lucene MoreLikeThis. I want search the records
conditioning with more that one field name using MoreLikeThis. Right now i
did some codes like
IndexReader indexreader =
IndexReader.open(PropertyManager.getStringProperty("FAW.Lucene.index_path"));
IndexSearcher searcher = new IndexSearcher(indexreader);
MoreLikeThis mlt = new MoreLikeThis(indexreader);
Query query = mlt.like(hits.id(0));
mlt.setMinDocFreq(0);
mlt.setMinTermFreq(0);
mlt.setFieldNames(new String[]{"serviceNumber","env"});
Hits list = searcher.search(query);
Iterator itr1 = list.iterator();
while()....
But its fetching all the records with the matching of "serviceNumber" and
"env". But i need to get the common records of this fields...
Like..
ServiceNumber env Value
1 env1 2
1 env2 3
2 env1 4
1 env1 5
If the data are like this means.. I want fetch
ServiceNumber env Value
1 env1 2
1 env1 5
This is my requirement. Can anyone help for me or if any ideas....Thanks in
advance
--
View this message in context:
http://lucene.472066.n3.nabble.com/Lucene-Search-with-MoreLiktThis-tp2794419p2794419.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]