lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: solr nested multivalued fields
Date Tue, 12 Jun 2012 14:51:48 GMT
Maybe "Result Grouping/Field Collapsing" might work for you:
http://wiki.apache.org/solr/FieldCollapsing

Otherwise, multivalued string fields, with first and last name combined into 
one string might be the best you can do.

-- Jack Krupansky

-----Original Message----- 
From: jerome
Sent: Tuesday, June 12, 2012 4:10 AM
To: solr-user@lucene.apache.org
Subject: solr nested multivalued fields



I would like to produce the following result in a Solr search result but not
sure it is possible to do? (Using Solr 3.6)

<doc>
   <arr name="groups">
      <lst>
         <str name="firstName">John</str>
         <str name="lastName">Darby</str>
      </lst>
      <lst>
         <str name="firstName">Sue</str>
         <str name="lastName">Berger</str>
      </lst>
   </arr>
</doc>

However, i cant seem to manage getting this Tree like structre in my
results. At best I can get something to look like the following which is not
even close:

<doc>
   <arr name="groups">
      <str>John</str>
      <str>Darby</str>
      <str>Sue</str>
      <str>Berger</str>
   </arr>
</doc>

There are two problem here. Firstly, I cannot seem to "group" these people
into a meaningful tag structure as per the top example. Second, I cant for
the life of me get the tags to display an attribute name like "lastName" or
"firstName" when inside an array?

In my project I am pulling this data using a DIH and from the example above
one can see that this is a on-to-many relationship between groups and users.

I really would appreciate it is someone has some suggestions or alternative
thoughts.

Any assistance would be greatly appreciated


--
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-nested-multivalued-fields-tp3989114.html
Sent from the Solr - User mailing list archive at Nabble.com. 


Mime
View raw message