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 snbn <sn...@equadriga.in> on 2012/04/27 14:23:38 UTC

get value from DB (using like i.e %value%)

Dear all greetings,

i am newbie in solr. i have an  one issue while fetching records from
DataBase and my scenario is as follows,

For example ,

in our r table we have some values  as  like ,

id name
1  home loan 
2  vehicle loan
3  personal loan

assume that in this case while i am type a name like loan it will show all
the values get from db. 

in generally mysql we query like this select table name where name like
'%loan%' it means it show all the values same as i want to query here in
solr.

Thanks in  much more advance to whom given to clear solution for this.

Thanks and Regards
Simbu

--
View this message in context: http://lucene.472066.n3.nabble.com/get-value-from-DB-using-like-i-e-value-tp3944169p3944169.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: get value from DB (using like i.e %value%)

Posted by Erick Erickson <er...@gmail.com>.
If you're talking about queries rather than autosuggest, you really
need to look over, say, Solr In Action. SQL stores the
entire data string, thus there's no way to search for individual
words unless you do the %word% thing.

Solr indexes _tokens_ individually, so (assuming you've used
a tokenizing analysis chain, try text_en) you can just search
on single words, e.g. loan and you'll get back your matches.

Also, spend some time with the admin/analysis page to see
the effects of various token chains.

Best
Erick

On Fri, Apr 27, 2012 at 8:36 AM, Sohail Aboobaker <sa...@gmail.com> wrote:
> I am new to Solr as well but based on what I have read so far, once you
> have created index in Solr, you should look at ajax-solr. It provides a
> good example to type ahead widget (show list as you type).
>
> Sohail

Re: get value from DB (using like i.e %value%)

Posted by Sohail Aboobaker <sa...@gmail.com>.
I am new to Solr as well but based on what I have read so far, once you
have created index in Solr, you should look at ajax-solr. It provides a
good example to type ahead widget (show list as you type).

Sohail