Hi,I have defined my entity as below

<entity name="dataset" query="select dataset_id, identifier,
internalidentifier, title, label, description from dataset">               
     <field column="dataset_id" name="id" />                
     <field column="identifier" name="doi" />             
     <field column="internalidentifier" name="uuid" />                
     
     <entity name="subject" query="select dataset_subject_id,
primarysubject, domain_id, field_id, subfield_id FROM dataset_subject where
dataset_id=${dataset.dataset_id}">                
     </entity>

</entity>

when I queried a dataset which has two subjects I got the following result:

"docs": [ {        
  "title": [  "Q0916 105"],        
  "description": "An single-site monitoring campaign",        
  "uuid": "6213BAAB-E59F-4100-99EF-9DE0706A7E9C",        
  "id": 49,        
  "label": "",        
  "datasetsubjectid": [
     45,
     46
   ],        
   "subfieldid": [          
     269,          
     270        
   ],        
   "fieldid": [          
     19,          
     18        
   ],        
   "primarysubject": true,        
   "domainid": [          
      3,          
      5        
   ],        
   "_version_": 1476520336273965000      
}]


How can I get the result which corresponding fields of the inner entity
(dataset_subject_id, primarysubject, domain_id, field_id, subfield_id) are
grouped together?

Patcharee 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-structure-inner-entity-in-the-query-result-tp4153206.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to