Colin: Adding &debug=all to your query is your friend here, the parsed_query.toString will show you exactly what is searched against.
Best, Erick On Fri, Oct 9, 2015 at 2:09 AM, Colin Hunter <greenfi...@gmail.com> wrote: > Ah ha... the copy field... makes sense. > Thank You. > > On Fri, Oct 9, 2015 at 10:04 AM, Upayavira <u...@odoko.co.uk> wrote: > >> >> >> On Fri, Oct 9, 2015, at 09:54 AM, Colin Hunter wrote: >> > Hi >> > >> > I am working on a complex search utility with an index created via data >> > import from an extensive MySQL database. >> > There are many ways in which the index is searched. One of the utility >> > input fields searches only on a Service Name. However, if I target the >> > query as q=ServiceName:"Searched service", this only returns an exact >> > string match. If q=Searched Service, the query still returns results from >> > all indexed data. >> > >> > Is there a way to construct a query to only return results from one field >> > of a doc ? >> > I have tried setting index=false, stored=true on unwanted fields, but >> > these >> > appear to have still been returned in results. >> >> q=ServiceName:(Searched Service) >> >> That'll look in just one field. >> >> Remember changing indexed to false doesn't impact the stuff already in >> your index. And the reason you are likely getting all that stuff is >> because you have a copyField that copies it over into the 'text' field. >> If you'll never want to search on some fields, switch them to >> index=false, make sure you aren't doing a copyField on them, and then >> reindex. >> >> Upayavira >> > > > > -- > www.gfc.uk.net