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 Jarek Zgoda <ja...@redefine.pl> on 2009/01/27 13:09:29 UTC

Highlighting does not work?

Solr 1.3

I'm trying to get highlighting working, with no luck so far.

Query with params q=cyrus&fl=*,score&qt=standard&hl=true&hl.fl=title 
+description finds 182 documents in my index. All of the top 10 hits  
contain the word "cyrus", but the highlights list is empty. The fields  
"title" and "description" are stored but not indexed. If I specify "*"  
as hl.fl value I get the same results.

Do I need to add some special configuration to enable highlighting  
feature?

-- 
We read Knuth so you don't have to. - Tim Peters

Jarek Zgoda, R&D, Redefine
jarek.zgoda@redefine.pl


Re: Highlighting does not work?

Posted by Mike Klaas <mi...@gmail.com>.
Thanks, Jarek.

-Mike

On 29-Jan-09, at 12:20 AM, Jarek Zgoda wrote:

> Added appriopriate amendment to FAQ, but I'd consider reorganizing  
> information in the whole wiki, like creating a section titled  
> "Common Tasks". Bit of redundancy does not hurt if it comes to  
> documentation.
>
> Wiadomość napisana w dniu 2009-01-28, o godz. 20:01, przez Mike Klaas:
>
>> Well, both pages I listed are in the search results :).  But I  
>> agree that it isn't obvious to find, and that it should be  
>> improved.  (The Wiki is a community-created site which anyone can  
>> contribute to, incidentally.)
>>
>> cheers,
>> -Mike
>>
>> On 28-Jan-09, at 1:11 AM, Jarek Zgoda wrote:
>>
>>> I swear I was looking this information in Solr wiki. See for  
>>> yourself if this is accessible at all:
>>>
>>> http://wiki.apache.org/solr/?action=fullsearch&context=180&value=highlight&fullsearch=Text
>>>
>>> Wiadomość napisana w dniu 2009-01-28, o godz. 00:58, przez Mike  
>>> Klaas:
>>>
>>>> They are documented in http://wiki.apache.org/solr/FieldOptionsByUseCase 
>>>>  and in the FAQ , but I agree that it could be more readily  
>>>> accessible.
>>>>
>>>> -Mike
>>>>
>>>> On 27-Jan-09, at 5:26 AM, Jarek Zgoda wrote:
>>>>
>>>>> Finally found that the fields have to have an analyzer to be  
>>>>> highlighted. Neat.
>>>>>
>>>>> Can I ask somebody to document these all requirements?
>>>>>
>>>>> Wiadomość napisana w dniu 2009-01-27, o godz. 13:49, przez Jarek  
>>>>> Zgoda:
>>>>>
>>>>>> I turned these fields to indexed + stored but the results are  
>>>>>> exactly the same, no matter if I search in these fields or  
>>>>>> elsewhere.
>>>>>>
>>>>>> Wiadomość napisana w dniu 2009-01-27, o godz. 13:09, przez  
>>>>>> Jarek Zgoda:
>>>>>>
>>>>>>> Solr 1.3
>>>>>>>
>>>>>>> I'm trying to get highlighting working, with no luck so far.
>>>>>>>
>>>>>>> Query with params  
>>>>>>> q=cyrus&fl=*,score&qt=standard&hl=true&hl.fl=title+description  
>>>>>>> finds 182 documents in my index. All of the top 10 hits  
>>>>>>> contain the word "cyrus", but the highlights list is empty.  
>>>>>>> The fields "title" and "description" are stored but not  
>>>>>>> indexed. If I specify "*" as hl.fl value I get the same results.
>>>>>>>
>>>>>>> Do I need to add some special configuration to enable  
>>>>>>> highlighting feature?
>>>>>>>
>>>>>>> -- 
>>>>>>> We read Knuth so you don't have to. - Tim Peters
>>>>>>>
>>>>>>> Jarek Zgoda, R&D, Redefine
>>>>>>> jarek.zgoda@redefine.pl
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> We read Knuth so you don't have to. - Tim Peters
>>>>>>
>>>>>> Jarek Zgoda, R&D, Redefine
>>>>>> jarek.zgoda@redefine.pl
>>>>>>
>>>>>
>>>>> -- 
>>>>> We read Knuth so you don't have to. - Tim Peters
>>>>>
>>>>> Jarek Zgoda, R&D, Redefine
>>>>> jarek.zgoda@redefine.pl
>>>>>
>>>>
>>>
>>> -- 
>>> We read Knuth so you don't have to. - Tim Peters
>>>
>>> Jarek Zgoda, R&D, Redefine
>>> jarek.zgoda@redefine.pl
>>>
>>
>
> -- 
> We read Knuth so you don't have to. - Tim Peters
>
> Jarek Zgoda, R&D, Redefine
> jarek.zgoda@redefine.pl
>


Re: Highlighting does not work?

Posted by Jarek Zgoda <ja...@redefine.pl>.
Added appriopriate amendment to FAQ, but I'd consider reorganizing  
information in the whole wiki, like creating a section titled "Common  
Tasks". Bit of redundancy does not hurt if it comes to documentation.

Wiadomość napisana w dniu 2009-01-28, o godz. 20:01, przez Mike Klaas:

> Well, both pages I listed are in the search results :).  But I agree  
> that it isn't obvious to find, and that it should be improved.  (The  
> Wiki is a community-created site which anyone can contribute to,  
> incidentally.)
>
> cheers,
> -Mike
>
> On 28-Jan-09, at 1:11 AM, Jarek Zgoda wrote:
>
>> I swear I was looking this information in Solr wiki. See for  
>> yourself if this is accessible at all:
>>
>> http://wiki.apache.org/solr/?action=fullsearch&context=180&value=highlight&fullsearch=Text
>>
>> Wiadomość napisana w dniu 2009-01-28, o godz. 00:58, przez Mike  
>> Klaas:
>>
>>> They are documented in http://wiki.apache.org/solr/FieldOptionsByUseCase 
>>>  and in the FAQ , but I agree that it could be more readily  
>>> accessible.
>>>
>>> -Mike
>>>
>>> On 27-Jan-09, at 5:26 AM, Jarek Zgoda wrote:
>>>
>>>> Finally found that the fields have to have an analyzer to be  
>>>> highlighted. Neat.
>>>>
>>>> Can I ask somebody to document these all requirements?
>>>>
>>>> Wiadomość napisana w dniu 2009-01-27, o godz. 13:49, przez Jarek  
>>>> Zgoda:
>>>>
>>>>> I turned these fields to indexed + stored but the results are  
>>>>> exactly the same, no matter if I search in these fields or  
>>>>> elsewhere.
>>>>>
>>>>> Wiadomość napisana w dniu 2009-01-27, o godz. 13:09, przez Jarek  
>>>>> Zgoda:
>>>>>
>>>>>> Solr 1.3
>>>>>>
>>>>>> I'm trying to get highlighting working, with no luck so far.
>>>>>>
>>>>>> Query with params  
>>>>>> q=cyrus&fl=*,score&qt=standard&hl=true&hl.fl=title+description  
>>>>>> finds 182 documents in my index. All of the top 10 hits contain  
>>>>>> the word "cyrus", but the highlights list is empty. The fields  
>>>>>> "title" and "description" are stored but not indexed. If I  
>>>>>> specify "*" as hl.fl value I get the same results.
>>>>>>
>>>>>> Do I need to add some special configuration to enable  
>>>>>> highlighting feature?
>>>>>>
>>>>>> -- 
>>>>>> We read Knuth so you don't have to. - Tim Peters
>>>>>>
>>>>>> Jarek Zgoda, R&D, Redefine
>>>>>> jarek.zgoda@redefine.pl
>>>>>>
>>>>>
>>>>> -- 
>>>>> We read Knuth so you don't have to. - Tim Peters
>>>>>
>>>>> Jarek Zgoda, R&D, Redefine
>>>>> jarek.zgoda@redefine.pl
>>>>>
>>>>
>>>> -- 
>>>> We read Knuth so you don't have to. - Tim Peters
>>>>
>>>> Jarek Zgoda, R&D, Redefine
>>>> jarek.zgoda@redefine.pl
>>>>
>>>
>>
>> -- 
>> We read Knuth so you don't have to. - Tim Peters
>>
>> Jarek Zgoda, R&D, Redefine
>> jarek.zgoda@redefine.pl
>>
>

-- 
We read Knuth so you don't have to. - Tim Peters

Jarek Zgoda, R&D, Redefine
jarek.zgoda@redefine.pl


Re: Highlighting does not work?

Posted by Mike Klaas <mi...@gmail.com>.
Well, both pages I listed are in the search results :).  But I agree  
that it isn't obvious to find, and that it should be improved.  (The  
Wiki is a community-created site which anyone can contribute to,  
incidentally.)

cheers,
-Mike

On 28-Jan-09, at 1:11 AM, Jarek Zgoda wrote:

> I swear I was looking this information in Solr wiki. See for  
> yourself if this is accessible at all:
>
> http://wiki.apache.org/solr/?action=fullsearch&context=180&value=highlight&fullsearch=Text
>
> Wiadomość napisana w dniu 2009-01-28, o godz. 00:58, przez Mike Klaas:
>
>> They are documented in http://wiki.apache.org/solr/FieldOptionsByUseCase 
>>  and in the FAQ , but I agree that it could be more readily  
>> accessible.
>>
>> -Mike
>>
>> On 27-Jan-09, at 5:26 AM, Jarek Zgoda wrote:
>>
>>> Finally found that the fields have to have an analyzer to be  
>>> highlighted. Neat.
>>>
>>> Can I ask somebody to document these all requirements?
>>>
>>> Wiadomość napisana w dniu 2009-01-27, o godz. 13:49, przez Jarek  
>>> Zgoda:
>>>
>>>> I turned these fields to indexed + stored but the results are  
>>>> exactly the same, no matter if I search in these fields or  
>>>> elsewhere.
>>>>
>>>> Wiadomość napisana w dniu 2009-01-27, o godz. 13:09, przez Jarek  
>>>> Zgoda:
>>>>
>>>>> Solr 1.3
>>>>>
>>>>> I'm trying to get highlighting working, with no luck so far.
>>>>>
>>>>> Query with params  
>>>>> q=cyrus&fl=*,score&qt=standard&hl=true&hl.fl=title+description  
>>>>> finds 182 documents in my index. All of the top 10 hits contain  
>>>>> the word "cyrus", but the highlights list is empty. The fields  
>>>>> "title" and "description" are stored but not indexed. If I  
>>>>> specify "*" as hl.fl value I get the same results.
>>>>>
>>>>> Do I need to add some special configuration to enable  
>>>>> highlighting feature?
>>>>>
>>>>> -- 
>>>>> We read Knuth so you don't have to. - Tim Peters
>>>>>
>>>>> Jarek Zgoda, R&D, Redefine
>>>>> jarek.zgoda@redefine.pl
>>>>>
>>>>
>>>> -- 
>>>> We read Knuth so you don't have to. - Tim Peters
>>>>
>>>> Jarek Zgoda, R&D, Redefine
>>>> jarek.zgoda@redefine.pl
>>>>
>>>
>>> -- 
>>> We read Knuth so you don't have to. - Tim Peters
>>>
>>> Jarek Zgoda, R&D, Redefine
>>> jarek.zgoda@redefine.pl
>>>
>>
>
> -- 
> We read Knuth so you don't have to. - Tim Peters
>
> Jarek Zgoda, R&D, Redefine
> jarek.zgoda@redefine.pl
>


Re: Highlighting does not work?

Posted by Jarek Zgoda <ja...@redefine.pl>.
I swear I was looking this information in Solr wiki. See for yourself  
if this is accessible at all:

http://wiki.apache.org/solr/?action=fullsearch&context=180&value=highlight&fullsearch=Text

Wiadomość napisana w dniu 2009-01-28, o godz. 00:58, przez Mike Klaas:

> They are documented in http://wiki.apache.org/solr/FieldOptionsByUseCase 
>  and in the FAQ , but I agree that it could be more readily  
> accessible.
>
> -Mike
>
> On 27-Jan-09, at 5:26 AM, Jarek Zgoda wrote:
>
>> Finally found that the fields have to have an analyzer to be  
>> highlighted. Neat.
>>
>> Can I ask somebody to document these all requirements?
>>
>> Wiadomość napisana w dniu 2009-01-27, o godz. 13:49, przez Jarek  
>> Zgoda:
>>
>>> I turned these fields to indexed + stored but the results are  
>>> exactly the same, no matter if I search in these fields or  
>>> elsewhere.
>>>
>>> Wiadomość napisana w dniu 2009-01-27, o godz. 13:09, przez Jarek  
>>> Zgoda:
>>>
>>>> Solr 1.3
>>>>
>>>> I'm trying to get highlighting working, with no luck so far.
>>>>
>>>> Query with params  
>>>> q=cyrus&fl=*,score&qt=standard&hl=true&hl.fl=title+description  
>>>> finds 182 documents in my index. All of the top 10 hits contain  
>>>> the word "cyrus", but the highlights list is empty. The fields  
>>>> "title" and "description" are stored but not indexed. If I  
>>>> specify "*" as hl.fl value I get the same results.
>>>>
>>>> Do I need to add some special configuration to enable  
>>>> highlighting feature?
>>>>
>>>> -- 
>>>> We read Knuth so you don't have to. - Tim Peters
>>>>
>>>> Jarek Zgoda, R&D, Redefine
>>>> jarek.zgoda@redefine.pl
>>>>
>>>
>>> -- 
>>> We read Knuth so you don't have to. - Tim Peters
>>>
>>> Jarek Zgoda, R&D, Redefine
>>> jarek.zgoda@redefine.pl
>>>
>>
>> -- 
>> We read Knuth so you don't have to. - Tim Peters
>>
>> Jarek Zgoda, R&D, Redefine
>> jarek.zgoda@redefine.pl
>>
>

-- 
We read Knuth so you don't have to. - Tim Peters

Jarek Zgoda, R&D, Redefine
jarek.zgoda@redefine.pl


Re: Highlighting does not work?

Posted by Mike Klaas <mi...@gmail.com>.
They are documented in http://wiki.apache.org/solr/ 
FieldOptionsByUseCase and in the FAQ , but I agree that it could be  
more readily accessible.

-Mike

On 27-Jan-09, at 5:26 AM, Jarek Zgoda wrote:

> Finally found that the fields have to have an analyzer to be  
> highlighted. Neat.
>
> Can I ask somebody to document these all requirements?
>
> Wiadomość napisana w dniu 2009-01-27, o godz. 13:49, przez Jarek  
> Zgoda:
>
>> I turned these fields to indexed + stored but the results are  
>> exactly the same, no matter if I search in these fields or elsewhere.
>>
>> Wiadomość napisana w dniu 2009-01-27, o godz. 13:09, przez Jarek  
>> Zgoda:
>>
>>> Solr 1.3
>>>
>>> I'm trying to get highlighting working, with no luck so far.
>>>
>>> Query with params  
>>> q=cyrus&fl=*,score&qt=standard&hl=true&hl.fl=title+description  
>>> finds 182 documents in my index. All of the top 10 hits contain  
>>> the word "cyrus", but the highlights list is empty. The fields  
>>> "title" and "description" are stored but not indexed. If I specify  
>>> "*" as hl.fl value I get the same results.
>>>
>>> Do I need to add some special configuration to enable highlighting  
>>> feature?
>>>
>>> -- 
>>> We read Knuth so you don't have to. - Tim Peters
>>>
>>> Jarek Zgoda, R&D, Redefine
>>> jarek.zgoda@redefine.pl
>>>
>>
>> -- 
>> We read Knuth so you don't have to. - Tim Peters
>>
>> Jarek Zgoda, R&D, Redefine
>> jarek.zgoda@redefine.pl
>>
>
> -- 
> We read Knuth so you don't have to. - Tim Peters
>
> Jarek Zgoda, R&D, Redefine
> jarek.zgoda@redefine.pl
>


Re: Highlighting does not work?

Posted by Jarek Zgoda <ja...@redefine.pl>.
Finally found that the fields have to have an analyzer to be  
highlighted. Neat.

Can I ask somebody to document these all requirements?

Wiadomość napisana w dniu 2009-01-27, o godz. 13:49, przez Jarek Zgoda:

> I turned these fields to indexed + stored but the results are  
> exactly the same, no matter if I search in these fields or elsewhere.
>
> Wiadomość napisana w dniu 2009-01-27, o godz. 13:09, przez Jarek  
> Zgoda:
>
>> Solr 1.3
>>
>> I'm trying to get highlighting working, with no luck so far.
>>
>> Query with params q=cyrus&fl=*,score&qt=standard&hl=true&hl.fl=title 
>> +description finds 182 documents in my index. All of the top 10  
>> hits contain the word "cyrus", but the highlights list is empty.  
>> The fields "title" and "description" are stored but not indexed. If  
>> I specify "*" as hl.fl value I get the same results.
>>
>> Do I need to add some special configuration to enable highlighting  
>> feature?
>>
>> -- 
>> We read Knuth so you don't have to. - Tim Peters
>>
>> Jarek Zgoda, R&D, Redefine
>> jarek.zgoda@redefine.pl
>>
>
> -- 
> We read Knuth so you don't have to. - Tim Peters
>
> Jarek Zgoda, R&D, Redefine
> jarek.zgoda@redefine.pl
>

-- 
We read Knuth so you don't have to. - Tim Peters

Jarek Zgoda, R&D, Redefine
jarek.zgoda@redefine.pl


Re: Highlighting does not work?

Posted by Jarek Zgoda <ja...@redefine.pl>.
I turned these fields to indexed + stored but the results are exactly  
the same, no matter if I search in these fields or elsewhere.

Wiadomość napisana w dniu 2009-01-27, o godz. 13:09, przez Jarek Zgoda:

> Solr 1.3
>
> I'm trying to get highlighting working, with no luck so far.
>
> Query with params q=cyrus&fl=*,score&qt=standard&hl=true&hl.fl=title 
> +description finds 182 documents in my index. All of the top 10 hits  
> contain the word "cyrus", but the highlights list is empty. The  
> fields "title" and "description" are stored but not indexed. If I  
> specify "*" as hl.fl value I get the same results.
>
> Do I need to add some special configuration to enable highlighting  
> feature?
>
> -- 
> We read Knuth so you don't have to. - Tim Peters
>
> Jarek Zgoda, R&D, Redefine
> jarek.zgoda@redefine.pl
>

-- 
We read Knuth so you don't have to. - Tim Peters

Jarek Zgoda, R&D, Redefine
jarek.zgoda@redefine.pl