Try adding &debug=query to your query. You haven't given us the expansion in your synonyms file so it's really hard to say. I suspect from the very fragmentary problem statement that when you query an a b, you're getting documents that have either a or b in them, which is probably entirely separate from your synonyms...
You might review: http://wiki.apache.org/solr/UsingMailingLists Best Erick On Fri, Feb 8, 2013 at 6:32 AM, soumya vinukonda <soumya.vinuko...@hcl.com>wrote: > Hi All, > > I have a synonyms.txt file where ab should give same result as a b . but > when i search ab it gives 4 results and a b gives 104 results. > > I tried giving a+b but i donno how to give the + throug schema.xml . Please > help. > > I tried giving expand= false and expand =false when doing indexing but it > is the same. > > i have gone through the link > > http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-2c461ac74b4ddd82e453dc68fcfc92da77358d46 > > but it didnt help me > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/unable-to-get-the-same-results-for-ab-and-a-b-due-to-whitespace-in-solr-tp4039212.html > Sent from the Solr - User mailing list archive at Nabble.com. >