You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Pavel Kukačka <pa...@seznam.cz> on 2011/04/29 14:56:42 UTC
Highlighting in fields other than content
Hello,
I've got a (probably trivial) issue I can't resolve with Solr 3.1:
I have a document with common fields (title, keywords, content) and I'm
trying to use highlighting.
With the content field there is no problem; works normally. However,
when I search for a document via its keyword, the document is found, but
the response doesn't have the highlighted snippet - there is only an
empty node - like this:
******************
.
.
.
<lst name="highlighting">
<lst name="2008"/>
</lst>
</response>
************************
As for the highlighting params, I have set:
hl=on
hl.fl=*
If I just substitute the searchterm for something from the content, the
resulting response is fine - like this:
************************************
.
.
.
<lst name="2008">
<arr name="content">
<str>
ustanovení těchto VOP, ZOP, smlouvy či <em
id="highlighting">družstvem</em> na straně jedné a
Klienty na straně druhé
na jiného
</str>
.
.
.
************************************
Does anyone see what I've omitted?
Cheers,
Pavel
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Highlighting in fields other than content
Posted by Tommaso Teofili <to...@gmail.com>.
I think your issue may depend on the keyword field having stored="false" or
the field type not defining a Tokenizer.
You may find the following useful:
http://wiki.apache.org/solr/FieldOptionsByUseCase
My 2 cents,
Tommaso
2011/4/29 Pavel Kukačka <pa...@seznam.cz>
> Hello,
>
> I've got a (probably trivial) issue I can't resolve with Solr 3.1:
> I have a document with common fields (title, keywords, content) and I'm
> trying to use highlighting.
> With the content field there is no problem; works normally. However,
> when I search for a document via its keyword, the document is found, but
> the response doesn't have the highlighted snippet - there is only an
> empty node - like this:
> ******************
> .
> .
> .
> <lst name="highlighting">
> <lst name="2008"/>
> </lst>
> </response>
> ************************
>
> As for the highlighting params, I have set:
> hl=on
> hl.fl=*
>
>
> If I just substitute the searchterm for something from the content, the
> resulting response is fine - like this:
> ************************************
> .
> .
> .
> <lst name="2008">
> <arr name="content">
> <str>
> ustanovení těchto VOP, ZOP, smlouvy či <em
> id="highlighting">družstvem</em> na straně jedné a
> Klienty na straně druhé
> na jiného
> </str>
> .
> .
> .
> ************************************
>
> Does anyone see what I've omitted?
>
> Cheers,
> Pavel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
Re: Highlighting in fields other than content
Posted by Erick Erickson <er...@gmail.com>.
What is your field definition for "keyword"?
In particular, is it stored?
This page might help.
http://wiki.apache.org/solr/FieldOptionsByUseCase?highlight=%28termvector%29|%28retrieve%29|%28contents%29
Best
Erick
On Fri, Apr 29, 2011 at 8:56 AM, Pavel Kukačka <pa...@seznam.cz> wrote:
> Hello,
>
> I've got a (probably trivial) issue I can't resolve with Solr 3.1:
> I have a document with common fields (title, keywords, content) and I'm
> trying to use highlighting.
> With the content field there is no problem; works normally. However,
> when I search for a document via its keyword, the document is found, but
> the response doesn't have the highlighted snippet - there is only an
> empty node - like this:
> ******************
> .
> .
> .
> <lst name="highlighting">
> <lst name="2008"/>
> </lst>
> </response>
> ************************
>
> As for the highlighting params, I have set:
> hl=on
> hl.fl=*
>
>
> If I just substitute the searchterm for something from the content, the
> resulting response is fine - like this:
> ************************************
> .
> .
> .
> <lst name="2008">
> <arr name="content">
> <str>
> ustanovení těchto VOP, ZOP, smlouvy či <em
> id="highlighting">družstvem</em> na straně jedné a
> Klienty na straně druhé
> na jiného
> </str>
> .
> .
> .
> ************************************
>
> Does anyone see what I've omitted?
>
> Cheers,
> Pavel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org