Refining Solr searches, getting exact matches?
Posted
by thebluefox
on Stack Overflow
See other posts from Stack Overflow
or by thebluefox
Published on 2010-04-30T16:07:34Z
Indexed on
2010/04/30
16:47 UTC
Read the original article
Hit count: 235
Afternoon chaps,
Right, I'm constructing a fairly complex (to me anyway) search system for a website using Solr, although this question is quite simple I think...
I have two search criteria, location and type. I want to return results that are exact matches to type (letter to letter, no exceptions), and like location.
My current search query is as follows
../select/?q=location:N1 type:blue&rows=100&fl=*,score&debugQuery=true
This firstly returns all the type blue's that match N1, but then returns any type that matches N1, which is opposite to what I'm after. Both fields are set as textgen in the Solr schema.
Any pointers?
Cheers gang
© Stack Overflow or respective owner