Extracting meaning from user input is notoriously difficult, it's such a short bit of text.
The whole notion of applying some intelligence to parsing the user input and trying to "do the right thing" is, indeed, a common request. The problem is that "the right thing" varies so wildly from problem domain to problem domain that it's really hard to do for a general case. But for your specific example, consider shingles, which uses pairs of words (haven't worked out the details, it's just occurring to me).... Instead of a numeric field, have a text field where you'd store 3 bedroom. Now shingle the input. Or do something similar yourself and have your app pull out "likely" pairs for submission to specific fields (i.e. some rule like "anything with a number followed by a digit, tread specially). Or consider using one of the packages like OpenNLP for for analyzing the input. Often the easiest thing to do if is provide the user with some kind of advanced search that let's you _know_ what the user intends, say where you give them a bunch of separate boxes labeled "bathrooms", "bedrooms" etc. Best Erick On Tue, Sep 18, 2012 at 7:05 AM, Tom Mortimer <tom.m.f...@gmail.com> wrote: > Hi George, > > I don't think this will work. The synonyms will be added after the query is > parsed, so you'll have terms like "bed:3" rather than matching "3" against > the bed field. If I was implementing this I'd try doing some pattern matching > before passing the query to Solr, e.g.: > > "3 bed Surrey" -> q="Surrey" fq=bed:3 > > I guess this kind of thing could also be implemented as a Solr query plug-in. > Don't know if anything like it exists. > > Tom > > > On 18 Sep 2012, at 11:30, george123 <daniel.tarase...@gmail.com> wrote: > >> I guess I could come up with a synonyms.txt file and every instance of >> 3 bed >> I change to >> bed:3 >> it "should" work. >> >> eg >> >> 3 bed => bed:3 >> >> not exactly a synonym or what it was designed for, but it might work? >> >> >> >> -- >> View this message in context: >> http://lucene.472066.n3.nabble.com/Solr4-how-to-make-it-do-this-tp4008574p4008576.html >> Sent from the Solr - User mailing list archive at Nabble.com. >