The location of the file containing the searched word (Solr with ExtractingRequestHandler)

252 Views Asked by At

I'm just starting Solr and using the ExtractingRequestHandler to index PDF files using the curl command:

curl "http://localhost:8983/solr/update/extract?literal.id=doc1&commit=true" -F "[email protected]"

I used Solarium as a Solr client to query and list the results.
But all these steps are still useless as long as the user can't know which file the word he's searching is coming from.
So I just want to show a part of the text where the keyword is located on the file, as well as the link of the file to download it for example.
Any help will be strongly appreciated.

1

There are 1 best solutions below

2
On

You would need to check solr highlighting which would allow you to highlight the matches with the part of text around it.