Hi,
I'm obtaining different results doing a search with Lucene 3.1 from
the results obtained with Luke 3.1.
The query is exactly the same and the number of results is the same,
but the order is different.
Here is the code printing the first 10 results:
Directory directory = FSDirectory.open(new File("C:/data/indexes/
com.test.TestObject"));
IndexReader indexReader = IndexReader.open(directory);
IndexSearcher indexSearcher = new IndexSearcher(indexReader);
TopDocs hits = indexSearcher.search(query, 10);
for (ScoreDoc sd : hits.scoreDocs) {
System.out.println("doc:" + sd.doc + " - score: " + sd.score);
}
indexSearcher.close();
After examining the results I have found that the order obtained with
Luke is the good one. So, I'm interested in
Is there something I'm missing? Maybe some configuration of Lucene?