Re: Offsets?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Offsets?

hossman

(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

Reply | Threaded
Open this post in threaded view
|

Re: Offsets?

Steve Suppe-2
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