Yes, denormalizing the index into separate (name,town) pairs is the common design for this problem.
2010/7/8 "Alex J. G. Burzyński" <mailing-s...@ajgb.net>: > Hi, > > Is it possible to remove from search results the multivalued fields that > don't pass the search criteria? > > My schema is defined as: > > <!-- course_id --> > <field name="id" type="string" indexed="true" stored="true" > required="true" /> > <!-- course_name --> > <field name="name" type="string" indexed="true" stored="true"/> > <!-- events.event_town --> > <field name="town" type="string" indexed="true" stored="true" > multiValued="true"/> > <!-- events.event_date --> > <field name="date" type="tdate" indexed="true" stored="true" > multiValued="true"/> > > And example docs are: > > +----+----------------------+------------+------------+ > | id | name | town | date | > +----+----------------------+------------+------------+ > | 1 | Microsoft Excel | London | 2010-08-20 | > | | | Glasgow | 2010-08-24 | > | | | Leeds | 2010-08-28 | > | 2 | Microsoft Word | Aberdeen | 2010-08-21 | > | | | Reading | 2010-08-25 | > | | | London | 2010-08-29 | > | 2 | Microsoft Powerpoint | Birmingham | 2010-08-22 | > | | | Leeds | 2010-08-26 | > +----+----------------------+------------+------------+ > > so the query for q=name:Microsoft town:Leeds returns docs 1 & 3. > > How would I remove London/Glasgow from doc 1 and Birmingham from doc 3? > > Or is it that I should create separate doc for each name-event? > > Thanks, > Alex > -- Lance Norskog goks...@gmail.com