I want to output the score of documents. The code I write for this is that:
IndexReader reader = IndexReader.open(FSDirectory.open(indexDir)); IndexSearcher
additional to daulets answere you have to enable the scoring in the indexSearcher:
... searcher.setDefaultFieldSortScoring(true, true); ...
I think thats what you meant remy, but that way it should be clearer :)