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 nicksnels1 <ni...@gmail.com> on 2011/05/09 11:17:28 UTC
Solr 1.3 highlighting problem
Hi,
I'm using the "old" 1.3 Solr version on one of my sites and I decided to add
a highlighting feature. Unfortunately I can not get it to work. I'm doing
some testing in the Sorl admin interface without much luck. Below is some
information that describes the problem.
I would like to highlight text in the field text, schema.xml config of text:
<field name="text" type="string" indexed="true" stored="true"/>
Query in the solr admin interface:
http://127.0.0.1:8080/solr/select?indent=on&version=2.2&q=solr&start=0&rows=10&fl=*%2Cscore&qt=standard&wt=standard&explainOther=&hl=on&hl.fl=text
I get back two results, both of the text fields contain the query "solr". In
the highlight tag I get only the IDs:
<lst name="highlighting"><lst name="54807"/><lst name="105235"/></lst>
Any ideas what may be causing this and how I can debug it? Thanks.
Kind regards,
Nick
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-3-highlighting-problem-tp2918089p2918089.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr 1.3 highlighting problem
Posted by nicksnels1 <ni...@gmail.com>.
Hi Markus,
thanks for the tip. I replaced the string field with a tokenizer field and
now it works. Thank you!
Kind regards,
Nick
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-3-highlighting-problem-tp2918089p2922785.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr 1.3 highlighting problem
Posted by Grijesh <pi...@gmail.com>.
Oh!
I did't see the "string"
-----
Thanx:
Grijesh
www.gettinhahead.co.in
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-3-highlighting-problem-tp2918089p2922532.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr 1.3 highlighting problem
Posted by Markus Jelsma <ma...@openindex.io>.
You're using the string fieldType to get highlighting to work but it must be
tokenized. Use a fieldType with a tokenizer.
See also: http://wiki.apache.org/solr/FieldOptionsByUseCase
> Hi,
>
> I'm using the "old" 1.3 Solr version on one of my sites and I decided to
> add a highlighting feature. Unfortunately I can not get it to work. I'm
> doing some testing in the Sorl admin interface without much luck. Below is
> some information that describes the problem.
>
> I would like to highlight text in the field text, schema.xml config of
> text:
>
> <field name="text" type="string" indexed="true" stored="true"/>
>
> Query in the solr admin interface:
>
> http://127.0.0.1:8080/solr/select?indent=on&version=2.2&q=solr&start=0&rows
> =10&fl=*%2Cscore&qt=standard&wt=standard&explainOther=&hl=on&hl.fl=text
>
> I get back two results, both of the text fields contain the query "solr".
> In the highlight tag I get only the IDs:
>
> <lst name="highlighting"><lst name="54807"/><lst name="105235"/></lst>
>
> Any ideas what may be causing this and how I can debug it? Thanks.
>
> Kind regards,
>
> Nick
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-1-3-highlighting-problem-tp2918089
> p2918089.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr 1.3 highlighting problem
Posted by nicksnels1 <ni...@gmail.com>.
I indeed changed the type from unstored to stored. But I did do a reindex
(several times already) and a commit, restarted Tomcat, restarted PC,
nothing works. When I do a search the text field shows up in the results.
But that is the only thing that has changed. <lst name="highlighting"> tag
only shows id's. I have no idea what is wrong?
Kind regards,
Nick
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-3-highlighting-problem-tp2918089p2922482.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr 1.3 highlighting problem
Posted by Grijesh <pi...@gmail.com>.
Have you recently change its type from unstored to stored?
if so you have to reindex .
-----
Thanx:
Grijesh
www.gettinhahead.co.in
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-3-highlighting-problem-tp2918089p2922117.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr 1.3 highlighting problem
Posted by nicksnels1 <ni...@gmail.com>.
Hi Grijesh,
The field text is stored and yet it is not working.
Kind regards,
Nick
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-3-highlighting-problem-tp2918089p2918518.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr 1.3 highlighting problem
Posted by Grijesh <pi...@gmail.com>.
Whether your field text is stored or not? Highlighting works with stored
fields of schema only.
-----
Thanx:
Grijesh
www.gettinhahead.co.in
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-1-3-highlighting-problem-tp2918089p2918299.html
Sent from the Solr - User mailing list archive at Nabble.com.