I once achieve this by using the highlighting feature, I don't know if there is a more direct way of doing it.
On Wed, Jul 13, 2011 at 1:51 PM, Lucas Miguez <lucas.mig...@gmail.com>wrote: > Hi all, > > I have a multivalued field. I need to make a search in the multivalued > field and get only the values that match with the query. > > Example: > > <doc> > <field name="text">aaa bbb ccc</field> > <field name="text">aaa</field> > <field name="text">ccc</field> > </doc> > > So, if I make a search like "text:aaa" the 3 values are returned, when > only results one and two are the correct. > > I am using the WhitespaceTokenizer in the index and in the query analyzers: > <types> > <fieldtype name="string" class="solr.TextField" > positionIncrementGap="100" autoGeneratePhraseQueries="true"> > <analyzer type="index"> > <tokenizer class="solr.WhitespaceTokenizerFactory"/> > </analyzer> > <analyzer type="query"> > <tokenizer class="solr.WhitespaceTokenizerFactory"/> > </analyzer> > </fieldtype> > </types> > > > How to do that on Apache Solr? > > Thanks! >