You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by JuliaZhang8 <ju...@gmail.com> on 2016/07/12 18:11:57 UTC

Displaying Search Results from Lucene with new version Lucene (6.0)

down votefavorite
<http://stackoverflow.com/questions/38336080/displaying-search-results-from-lucene-with-new-version-lucene-6-0#>

I am trying to created a servlet that uses Lucene. How would I display the
results from indexSearcher as a list of document names or path names? It
used to be in the older versions, you could just do
searcher.getDocument(scoreDoc) to get a document which you can get then get
names or pathnames from with document.get(string). The new version has
gotten rid of getDocument and I am not really sure how to change scoreDocs
or topDocs into documents so I can fetch relevant information.

Thanks!