You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Rajesh <ra...@aspiresys.com> on 2015/07/24 15:24:39 UTC

Re: Nested objects in Solr

You can use nested entities like below.

<document>
<entity name="OuterEntity" pk="id"
		query="SELECT * FROM User"> 
                 <field column="id" name="id" />  
		<field column="name" name="name" />
                   
                <entity name="InnerEntity" child="true"
			query="select * from subject" >
                   </entity>
</entity>
</document>




--
View this message in context: http://lucene.472066.n3.nabble.com/Nested-objects-in-Solr-tp4213212p4219039.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Nested objects in Solr

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Actually, Solr has been supporting Nested Objects for a little while:
https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Index+Handlers#UploadingDatawithIndexHandlers-NestedChildDocuments

The schema represents a union of all possible fields though, so yes,
some care needs to be taken with names and mappings.

Regards,
   Alex.
----
Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 24 July 2015 at 09:52, Bill Au <bi...@gmail.com> wrote:
> What exactly do you mean by nested objects in Solr.  It would help if you
> give an example.  The Solr schema is flat as far as I know.
>
> Bill
>
> On Fri, Jul 24, 2015 at 9:24 AM, Rajesh <ra...@aspiresys.com>
> wrote:
>
>> You can use nested entities like below.
>>
>> <document>
>> <entity name="OuterEntity" pk="id"
>>                 query="SELECT * FROM User">
>>                  <field column="id" name="id" />
>>                 <field column="name" name="name" />
>>
>>                 <entity name="InnerEntity" child="true"
>>                         query="select * from subject" >
>>                    </entity>
>> </entity>
>> </document>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Nested-objects-in-Solr-tp4213212p4219039.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>

Re: Nested objects in Solr

Posted by Bill Au <bi...@gmail.com>.
What exactly do you mean by nested objects in Solr.  It would help if you
give an example.  The Solr schema is flat as far as I know.

Bill

On Fri, Jul 24, 2015 at 9:24 AM, Rajesh <ra...@aspiresys.com>
wrote:

> You can use nested entities like below.
>
> <document>
> <entity name="OuterEntity" pk="id"
>                 query="SELECT * FROM User">
>                  <field column="id" name="id" />
>                 <field column="name" name="name" />
>
>                 <entity name="InnerEntity" child="true"
>                         query="select * from subject" >
>                    </entity>
> </entity>
> </document>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Nested-objects-in-Solr-tp4213212p4219039.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>