Opening a file at a page where I encounter a hit

2011-05-16 Thread Vignesh Raj
Hi,

I am using ASP.Net MVC and solrnet for my search tool. The files I index
include pdf files, word docs, excel etc...

I am able to search and retrieve all the docs with a hit. Now the problem
lies in opening the files with a hit.

When I open the file, it should open at the location where the hit is
encountered. 

How do i manage this? It will be even more helpful if I can highlight the
hit inside the opened document?

 

Please help me in this regard.

 

Regards

Vignesh



Re: Opening a file at a page where I encounter a hit

2011-05-16 Thread Gora Mohanty
On Mon, May 16, 2011 at 12:00 PM, Vignesh Raj
vignesh...@greatminds.co.in wrote:
 Hi,

 I am using ASP.Net MVC and solrnet for my search tool. The files I index
 include pdf files, word docs, excel etc...

 I am able to search and retrieve all the docs with a hit. Now the problem
 lies in opening the files with a hit.

 When I open the file, it should open at the location where the hit is
 encountered.

 How do i manage this? It will be even more helpful if I can highlight the
 hit inside the opened document?

One way to display the document text is to also store it in Solr.
There are two issues with this:
* The Solr index will grow considerably. However, the performance
   limits are still acceptable to us, with a ~60GB index size.
* You will probably lose formatting from the documents. One
   can manage to retain much of the original formatting by pre-
   processing the text to format it before indexing into Solr.
   However, this is not perfect.

The other way is to retain in Solr a path to the original document
that you can then serve from the filesystem:
* How to do this depends on how you are indexing into Solr.
* Highlighting query terms, and opening the document at the
  right place has to be done by external programs (note that
  one document can have multiple matches, so that there is
  no a priori right place to open the document).

Regards,
Gora