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 Frédéric Glorieux <fr...@enc.sorbonne.fr> on 2007/06/07 12:52:18 UTC

highlight and wildcards ?

Hi all,

I'm talking about solr subversion, jetty example, default documents, 
like the tutorial. I tried to highlight queries with wildcard. Documents 
are found like waited, but I haven't seen the terms highlighted. It 
seems to work with fuzzy search, so I thought it was a supposed feature. 
Am I wrong ?


Tests
=====

q=solr
http://localhost:8983/solr/select?indent=on&version=2.2&q=solr&start=0&rows=10&fl=*%2Cscore&qt=standard&wt=standard&explainOther=&hl=on&hl.fl=features

<lst name="highlighting">
  <lst name="SOLR1000">
    <arr name="features">
      <str>Scalability - Efficient Replication to other <em>Solr</em> 
Search Servers</str>
   </arr>
  </lst>
</lst>

q=black~ (fuzzy search)
see <em>black</em> and <em>clocked</em>
http://localhost:8983/solr/select?indent=on&version=2.2&q=solr&start=0&rows=10&fl=*%2Cscore&qt=standard&wt=standard&explainOther=&hl=on&hl.fl=features
<lst name="highlighting">
   <lst name="0579B002">
     <arr name="features">
       <str>Printing speed up to 29ppm <em>black</em>, 19ppm color</str>
     </arr>
   </lst>
   <lst name="MA147LL/A" />
   <lst name="EN7800GTX/2DHTV/256M">
     <arr name="features">
       <str>NVIDIA GeForce 7800 GTX GPU/VPU <em>clocked</em> at 
486MHz</str>
     </arr>
   </lst>
   <lst name="100-435805">
     <arr name="features">
      <str>ATI RADEON X1900 GPU/VPU <em>clocked</em> at 650MHz</str>
     </arr>
   </lst>
</lst>



q=a*
http://localhost:8983/solr/select?indent=on&version=2.2&start=0&rows=100&fl=*%2Cscore&qt=standard&wt=standard&explainOther=&hl=on&hl.fl=features&q=a*
<lst name="highlighting">
   <lst name="SP2514N" />
   <lst name="F8V7067-APL-KIT" />
   <lst name="IW-02" />
   <lst name="MA147LL/A" />
   <lst name="VDBDB1A16" />
   <lst name="3007WFP" />
   <lst name="VA902B" />
   <lst name="0579B002" />
   <lst name="9885A004" />
   <lst name="SOLR1000" />
   <lst name="UTF8TEST" />
   <lst name="EN7800GTX/2DHTV/256M" />
   <lst name="100-435805" />
</lst>


-- 
Frédéric Glorieux
École nationale des chartes
direction des nouvelles technologies et de l'informatique

Re: highlight and wildcards ?

Posted by Kamran Shadkhast <ks...@canwest.com>.
I fixed this problem by returning this"return  super.getPrefixQuery(field,
termStr);"
in  solr.search.SolrQueryParser and it worked for me.

-Kamran

Mike Klaas wrote:
> 
> On 7-Jun-07, at 5:27 PM, Frédéric Glorieux wrote:
> 
>> Hoss,
>>
>> Thanks for all your information and pointers. I know that my  
>> problems are not mainstream.
> 
> Have you tried commenting out getPrefixQuery in  
> solr.search.SolrQueryParser?  It should then revert to a "regular"  
> lucene prefix query.
> 
> -Mike
> 

-- 
View this message in context: http://www.nabble.com/highlight-and-wildcards---tf3883191.html#a13632571
Sent from the Solr - User mailing list archive at Nabble.com.