1

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 "myfile=@file.pdf"

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.

Nadjib Mami
  • 5,736
  • 9
  • 37
  • 49
  • 1
    Well, one solution found is to pass the file name to the literal attribute. I've hundreds of files. I need to loop through all the files and, for each iteration, I get the file name and pass it to the curl command. I think I should do this in a bash file, anyone can help me with that, since I've no knowledge yet about it. – Nadjib Mami Oct 09 '12 at 11:58
  • yup you would need to iterate and upload the files as individual documents. These then can be highlighted. – Jayendra Oct 09 '12 at 17:06

1 Answers1

1

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

Jayendra
  • 52,349
  • 4
  • 80
  • 90