I'm using Lucene.Net to implement a search website (to search PDFs). Once the keyword is entered, I display the results, and when one of the result items is clicked, I want to take the user to a "details" page, where I want to display snippets from that PDF document everywhere the keyword is found.
So my question is, what's the best way to gather these snippets from that document?
Do I just take the selected item id, re-query on just that document, and let Lucene's highlighter give me the collection of snippets?
Or, since I already have the text content for each result record, would it be better to manually process the snippets using C# string manipulation?
If it is 1., could you please point me to an example of how to write a query to search a single document in Lucene?
Thanks.