Hi Satya,

Coming to your original question, there is one possibility to make Solr 
emit snippets like Google. Solr query syntax goes like,

http://localhost:8080/solr/DefaultInstance/select/?q=java&version=2.2&start=0&rows=10&indent=on&hl=true&hl.snippets=5&hl.fl=Field_Text&fl=Field_Text

Note that, the key thing used here is Highlighting feature provided by 
Solr. Executing above Solr query will result into two main block of 
results. First part would contain normal results, whereas another part 
would contain highlighted snippets, based on the parameters provided in 
query. One should pickup the later part (snippets) and show it in result 
page UI.

Cheers,

Bhavnik Gajjar


On 12/14/2010 8:35 PM, Tanguy Moal wrote:
> To do so, you have several possibilities, I don't know if there is a best one.
>
> It depends pretty much on the format of the input file(s), your
> affinities with a given programing language,some libraries you might
> need and the time you're ready to spend on this task.
>
> Consider having a look at SolrJ  (http://wiki.apache.org/solr/Solrj)
> or at the DataImportHandler
> (http://wiki.apache.org/solr/DataImportHandler) .
>
> Cheers,
>
> --
> Tanguy
>
> 2010/12/14 satya swaroop<satya.yada...@gmail.com>:
>> Hi Tanguy,
>>                  Thanks for ur reply. sorry to ask this type of question.
>> how can we index each chapter of a file as seperate document.As for i know
>> we just give the path of file to solr to index it... Can u provide me any
>> sources for this type... I mean any blogs or wiki's...
>>
>> Regards,
>> satya


The contents of this eMail including the contents of attachment(s) are 
privileged and confidential material of Gateway NINtec Pvt. Ltd. (GNPL) and 
should not be disclosed to, used by or copied in any manner by anyone other 
than the intended addressee(s). If this eMail has been received by error, 
please advise the sender immediately and delete it from your system. The views 
expressed in this eMail message are those of the individual sender, except 
where the sender expressly, and with authority, states them to be the views of 
GNPL. Any unauthorized review, use, disclosure, dissemination, forwarding, 
printing or copying of this eMail or any action taken in reliance on this eMail 
is strictly prohibited and may be unlawful. This eMail may contain viruses. 
GNPL has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this eMail. 
You should carry out your own virus checks before opening the eMail or 
attachment(s). GNPL is neither liable for the proper and complete transmission 
of the information contained in this communication nor for any delay in its 
receipt. GNPL reserves the right to monitor and review the content of all 
messages sent to or from this eMail address and may be stored on the GNPL eMail 
system. In case this eMail has reached you in error, and you  would no longer 
like to receive eMails from us, then please send an eMail to 
d...@gatewaynintec.com

Reply via email to