You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2008/02/27 02:47:35 UTC

Re: Offsets?

(moved to solr-user)

analysis.jsp doesn't deal with the index, it just applies the appropriate 
analizer to input text to tell you what would be indexed.

from what I gather, you want the "meat" of highlighting, but you dont' 
want any actually highlighting to take place -- you want something that 
just figures out what offsets in the orriginal string the terms to be 
highlighted were, and then return those offset numbers, correct?

I would imagine the easiest way to implement this would be to write a 
highlighter that doesn't markup the orriginal string at all ... just 
returns some easy to parse metadata about the term and the offset where it 
was found in the orriginal string.

if it is implemented as an actual Highlighter, it can be used as a plugin 
(i think .. we have configs for that already, right?) that the existing 
Highlighting component would load, but you are a little limited in the 
structure of hte metadata you can return.  Alternately you can implement 
your own component as ryan mentioned, and then put arbitrary data in the 
response (which will be renderedappropriately by whichever response writer 
you use -- json, xml, whatever)


: Subject: Re: Offsets?
: 
: I appreciate all the help - I think, for now, we'll try and leverage the
: analysis.jsp approach, as it appears that different approaches might be in the
: works, and I don't want to much with any of that just yet :)
: 
: If I get some time, maybe I'll have better news in the future.  Thanks again!
: 
: Steve
: 
: At 02:44 PM 2/26/2008, you wrote:
: 
: > > This is a possibility, but I was thinking if I could get SOLR to return
: > > that information in the initial JSON, then I could save a step and speed
: > > things up immensely.
: > 
: > nothing off the shelf to do it... you may want to look at implementing a
: > "search component" to augment the response with offset information.
: > 
: > ryan
: 



-Hoss


Re: Offsets?

Posted by Steve Suppe <ss...@llnl.gov>.
Chris,

Thanks, you're exactly right.  I think the Search Component may be the 
right way to go.  I will definitely look into this shortly - if it works 
out, is this something that should be 'donated' if at all possible?

Steve

At 05:47 PM 2/26/2008, you wrote:

>(moved to solr-user)
>
>analysis.jsp doesn't deal with the index, it just applies the appropriate
>analizer to input text to tell you what would be indexed.
>
>from what I gather, you want the "meat" of highlighting, but you dont'
>want any actually highlighting to take place -- you want something that
>just figures out what offsets in the orriginal string the terms to be
>highlighted were, and then return those offset numbers, correct?
>
>I would imagine the easiest way to implement this would be to write a
>highlighter that doesn't markup the orriginal string at all ... just
>returns some easy to parse metadata about the term and the offset where it
>was found in the orriginal string.
>
>if it is implemented as an actual Highlighter, it can be used as a plugin
>(i think .. we have configs for that already, right?) that the existing
>Highlighting component would load, but you are a little limited in the
>structure of hte metadata you can return.  Alternately you can implement
>your own component as ryan mentioned, and then put arbitrary data in the
>response (which will be renderedappropriately by whichever response writer
>you use -- json, xml, whatever)
>
>
>: Subject: Re: Offsets?
>:
>: I appreciate all the help - I think, for now, we'll try and leverage the
>: analysis.jsp approach, as it appears that different approaches might be 
>in the
>: works, and I don't want to much with any of that just yet :)
>:
>: If I get some time, maybe I'll have better news in the future.  Thanks 
>again!
>:
>: Steve
>:
>: At 02:44 PM 2/26/2008, you wrote:
>:
>: > > This is a possibility, but I was thinking if I could get SOLR to return
>: > > that information in the initial JSON, then I could save a step and speed
>: > > things up immensely.
>: >
>: > nothing off the shelf to do it... you may want to look at implementing a
>: > "search component" to augment the response with offset information.
>: >
>: > ryan
>:
>
>
>
>-Hoss