柯鴻儀
柯鴻儀

Reputation: 623

can solr find all of the terms of a field of a document?

solr uses inverted index to find the document from the indexed "terms". but what I wonder is that -

is there any approach to know all of the terms which refer to a specific documents?

thanks

Upvotes: 1

Views: 701

Answers (2)

alexf
alexf

Reputation: 1301

You can use this Luke tool which allows you to explore Lucene index.

It depends of your Solr version but you can also use Luke request handler with an HTTP request. Here you have the documentation about this handler:

To use the LukeRequestHandler, make sure it is defined in your solrconfig.xml:

<requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler"/>

Assuming you have this handler mapped to "/admin/luke" in solrconfig.xml and are running the example on port localhost:8983, visit:

  • /admin/luke
  • /admin/luke?fl=cat
  • /admin/luke?fl=id&numTerms=50
  • /admin/luke?id=SOLR1000
  • /admin/luke?docId=2

Upvotes: 2

Ramzy
Ramzy

Reputation: 7138

Forward index is what you were asking. here in general. here in solr

Upvotes: 1

Related Questions