lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Hoffman <dar...@jnamics.com>
Subject Re: Highlighting search words in full document
Date Mon, 08 Apr 2013 21:15:00 GMT
Thanks, Erick. I'll try that.

Darren

On 2013-04-07 3:25 PM, "Erick Erickson" <erickerickson@gmail.com> wrote:

>Well, at that point you have a doc ID presumably. When you format your
>responses to the initial query, the link you provide for each verse is
>something like
>
>yourserver/solr/collection1/select?q=id:chapter_id&hl=true&hl.fl=fullchapt
>ertext&hl.q=<original
>query>.
>
>So when the user clicks on it, you get a response with a single
>response and the highlighted text...
>
>Best
>Erick
>
>On Sun, Apr 7, 2013 at 12:18 PM, Darren Hoffman <darren@jnamics.com>
>wrote:
>> Thanks for the response, Erick.
>>
>> I have implemented just what you have described. The question I have is
>>how to highlight the searched words in the entire chapter that were
>>highlighted in the selected verse.
>>
>> Thanks!
>>
>> Sent from my iPhone
>>
>> On Apr 7, 2013, at 5:38 AM, Erick Erickson <erickerickson@gmail.com>
>>wrote:
>>
>>> Sounds like what you want to do is
>>> 1> with each verse, store the chapter ID. This could be the ID of
>>> another document. There's no requirement that all docs in an index
>>> have the same structure. In this case, you could have a "type" field
>>> in each doc with values like "verse" and "chapter". For your verse
>>> searches, you specify an fq=type:verse.
>>>
>>> 2> Along with each verse, you store the chapter ID, and when a use
>>> clicks on the chapter you use the doc information to fetch the doc
>>> containing that verse and display the highlighted version.
>>>
>>> Best
>>> Erick
>>>
>>> On Sat, Apr 6, 2013 at 11:57 PM, Darren Hoffman <darren@jnamics.com>
>>>wrote:
>>>> I am creating a Bible search app that indexes each verse of the bible
>>>>as a
>>>> separate document. When a user selects a verse from search results, I
>>>>am
>>>> wanting to show an entire chapter of the Bible with the search words
>>>> highlighted. I'm using theFastVectorHighlighter and would like to
>>>>know the
>>>> best approach to accomplish this. I am also currently with Lucene 3.6
>>>>but am
>>>> looking to upgrade to 4.2.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Darren Hoffman
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-user-help@lucene.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message