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 Mark Fenbers <ma...@noaa.gov> on 2015/10/01 13:07:55 UTC

Re: highlighting

Yeah, I thought about using markers, but then I'd have to search the the 
text for the markers to determine the locations.  This is a clunky way 
of getting the results I want, and it would save two steps if Solr 
merely had an option to return a start/length array (of what should be 
highlighted) in the original string rather than returning an altered 
string with tags inserted.

Mark

On 9/29/2015 7:04 AM, Upayavira wrote:
> You can change the strings that are inserted into the text, and could
> place markers that you use to identify the start/end of highlighting
> elements. Does that work?
>
> Upayavira
>
> On Mon, Sep 28, 2015, at 09:55 PM, Mark Fenbers wrote:
>> Greetings!
>>
>> I have highlighting turned on in my Solr searches, but what I get back
>> is <em> tags surrounding the found term.  Since I use a SWT StyledText
>> widget to display my search results, what I really want is the offset
>> and length of each found term, so that I can highlight it in my own way
>> without HTML.  Is there a way to configure Solr to do that?  I couldn't
>> find it.  If not, how do I go about posting this as a feature request?
>>
>> Thanks,
>> Mark


Re: highlighting

Posted by Upayavira <uv...@odoko.co.uk>.
In the end, in most open source projects, people implement that which
they need themselves, and offer it back to the community in the hope
that it will help others too.

If you need this, then I'd encourage you to look at the source
highlighting component and see if you can see how it might be done.

It would then be great to put your thoughts and ideas into a JIRA
ticket.

Upayavira

On Thu, Oct 1, 2015, at 11:31 PM, Teague James wrote:
> Hi everyone!
> 
> Pardon if it's not proper etiquette to chime in, but that feature would
> solve some issues I have with my app for the same reason. We are using
> markers now and it is very clunky - particularly with phrases and certain
> special characters. I would love to see this feature too Mark! For what
> it's worth - up vote. Thanks!
> 
> Cheers!
> 
> -Teague James
> 
> > On Oct 1, 2015, at 6:12 PM, Koji Sekiguchi <ko...@rondhuit.com> wrote:
> > 
> > Hi Mark,
> > 
> > I think I saw similar requirement recently in mailing list. The feature sounds reasonable to me.
> > 
> > > If not, how do I go about posting this as a feature request?
> > 
> > JIRA can be used for the purpose, but there is no guarantee that the feature is implemented. :(
> > 
> > Koji
> > 
> >> On 2015/10/01 20:07, Mark Fenbers wrote:
> >> Yeah, I thought about using markers, but then I'd have to search the the text for the markers to
> >> determine the locations.  This is a clunky way of getting the results I want, and it would save two
> >> steps if Solr merely had an option to return a start/length array (of what should be highlighted) in
> >> the original string rather than returning an altered string with tags inserted.
> >> 
> >> Mark
> >> 
> >>> On 9/29/2015 7:04 AM, Upayavira wrote:
> >>> You can change the strings that are inserted into the text, and could
> >>> place markers that you use to identify the start/end of highlighting
> >>> elements. Does that work?
> >>> 
> >>> Upayavira
> >>> 
> >>>> On Mon, Sep 28, 2015, at 09:55 PM, Mark Fenbers wrote:
> >>>> Greetings!
> >>>> 
> >>>> I have highlighting turned on in my Solr searches, but what I get back
> >>>> is <em> tags surrounding the found term.  Since I use a SWT StyledText
> >>>> widget to display my search results, what I really want is the offset
> >>>> and length of each found term, so that I can highlight it in my own way
> >>>> without HTML.  Is there a way to configure Solr to do that?  I couldn't
> >>>> find it.  If not, how do I go about posting this as a feature request?
> >>>> 
> >>>> Thanks,
> >>>> Mark
> > 

Re: highlighting

Posted by Teague James <te...@insystechinc.com>.
Hi everyone!

Pardon if it's not proper etiquette to chime in, but that feature would solve some issues I have with my app for the same reason. We are using markers now and it is very clunky - particularly with phrases and certain special characters. I would love to see this feature too Mark! For what it's worth - up vote. Thanks!

Cheers!

-Teague James

> On Oct 1, 2015, at 6:12 PM, Koji Sekiguchi <ko...@rondhuit.com> wrote:
> 
> Hi Mark,
> 
> I think I saw similar requirement recently in mailing list. The feature sounds reasonable to me.
> 
> > If not, how do I go about posting this as a feature request?
> 
> JIRA can be used for the purpose, but there is no guarantee that the feature is implemented. :(
> 
> Koji
> 
>> On 2015/10/01 20:07, Mark Fenbers wrote:
>> Yeah, I thought about using markers, but then I'd have to search the the text for the markers to
>> determine the locations.  This is a clunky way of getting the results I want, and it would save two
>> steps if Solr merely had an option to return a start/length array (of what should be highlighted) in
>> the original string rather than returning an altered string with tags inserted.
>> 
>> Mark
>> 
>>> On 9/29/2015 7:04 AM, Upayavira wrote:
>>> You can change the strings that are inserted into the text, and could
>>> place markers that you use to identify the start/end of highlighting
>>> elements. Does that work?
>>> 
>>> Upayavira
>>> 
>>>> On Mon, Sep 28, 2015, at 09:55 PM, Mark Fenbers wrote:
>>>> Greetings!
>>>> 
>>>> I have highlighting turned on in my Solr searches, but what I get back
>>>> is <em> tags surrounding the found term.  Since I use a SWT StyledText
>>>> widget to display my search results, what I really want is the offset
>>>> and length of each found term, so that I can highlight it in my own way
>>>> without HTML.  Is there a way to configure Solr to do that?  I couldn't
>>>> find it.  If not, how do I go about posting this as a feature request?
>>>> 
>>>> Thanks,
>>>> Mark
> 

Re: highlighting

Posted by Koji Sekiguchi <ko...@rondhuit.com>.
Hi Mark,

I think I saw similar requirement recently in mailing list. The feature sounds reasonable to me.

 > If not, how do I go about posting this as a feature request?

JIRA can be used for the purpose, but there is no guarantee that the feature is implemented. :(

Koji

On 2015/10/01 20:07, Mark Fenbers wrote:
> Yeah, I thought about using markers, but then I'd have to search the the text for the markers to
> determine the locations.  This is a clunky way of getting the results I want, and it would save two
> steps if Solr merely had an option to return a start/length array (of what should be highlighted) in
> the original string rather than returning an altered string with tags inserted.
>
> Mark
>
> On 9/29/2015 7:04 AM, Upayavira wrote:
>> You can change the strings that are inserted into the text, and could
>> place markers that you use to identify the start/end of highlighting
>> elements. Does that work?
>>
>> Upayavira
>>
>> On Mon, Sep 28, 2015, at 09:55 PM, Mark Fenbers wrote:
>>> Greetings!
>>>
>>> I have highlighting turned on in my Solr searches, but what I get back
>>> is <em> tags surrounding the found term.  Since I use a SWT StyledText
>>> widget to display my search results, what I really want is the offset
>>> and length of each found term, so that I can highlight it in my own way
>>> without HTML.  Is there a way to configure Solr to do that?  I couldn't
>>> find it.  If not, how do I go about posting this as a feature request?
>>>
>>> Thanks,
>>> Mark
>