-field_name:[ * TO 384] +field_name:[385 TO 386] -field_name:[387 TO *]
On Thu, Oct 20, 2011 at 10:51 AM, Ellery Leung <elleryle...@be-o.com> wrote: > Hi all > > > > I am using Solr 3.4 on Windows 7. > > > > Here is the example of a multivalue field: > > > > <doc> > > <arr name="field_name"> > > <str>387</str> > > <str>386</str> > > </arr> > > </doc> > > > > <doc> > > <arr name=" field_name "> > > <str>387</str> > > <str>386</str> > > </arr> > > </doc> > > > > <doc> > > <arr name=" field_name"> > > <str>387</str> > > <str>386</str> > > <str>385</str> > > <str>382</str> > > <str>312</str> > > <str>311</str> > > </arr> > > </doc> > > > > I am doing a search on "field_name" and JUST want to return record that IS > 387 and 386 (the first and second record). > > > > Here is the query: > > > > field_name: (387 AND 386) > > > > But this query return all 3 records, which is wrong. > > > > I have tried using filter: field_name: (387 AND 386) but it still doesn't > work. > > > > Therefore I would like to ask, are there any way to change this query so > that it will ONLY return first and second record? > > > > Thank you in advance for any help. > >