lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: Solr Like Statement
Date Tue, 22 Feb 2011 14:25:38 GMT
Just to follow up on this, you can use Solr's built in auto-suggest component for this: see
http://wiki.apache.org/solr/Suggester  Otherwise, have a look at the terms component if you
want to roll your own at a lower level.   

On Feb 1, 2011, at 3:50 AM, riggerthegeek wrote:

> 
> Hi guys
> 
> 
> I'm having some real problems getting Solr to behave.  I'm running jQuery
> autocomplete and want to get Solr to output the data (as there's 90,000+
> records, MySQL will be slower).
> 
> 
> If there was a record with the title "Birmingham City Centre", in MySQL, the
> query I would write would be a simple........
> 
> 
> 
> SELECT * FROM `table` WHERE `title` LIKE 'Birmingham Ci%'
> 
> 
> This would return every record that began "Birmingham Ci".  I've run various
> different queries in Solr, but none get the records I want.
> 
> 
> If I do....
> 
> title:"birmingham ci*"
> 
> I get nothing returned.
> 
> 
> If I do....
> 
> title:birmingham title:ci*
> 
> 
> I get anything containing "Birmingham" and starting "ci".
> 
> 
> Can someone tell me how to do the equivalent of a MySQL LIKE statement in
> Solr/Lucene please?
> 
> 
> Thanks
> 
> 
> S
> 
> -- 
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-Like-Statement-tp2396733p2396733.html
> Sent from the Lucene - General mailing list archive at Nabble.com.

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem docs using Solr/Lucene:
http://www.lucidimagination.com/search


Mime
View raw message