Last active
December 1, 2022 01:28
-
-
Save mkhludnev/6406734 to your computer and use it in GitHub Desktop.
sample nested documents to demonstrate block join indexing and searching in Solr 4.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id,_version_,BRAND_s,_root_,type_s,COLOR_s,SIZE_s | |
12,,,10,,Blue,XL | |
11,,,10,,Red,XL | |
10,1445176108735528960,Nike,10,parent,, | |
22,,,20,,Blue,XL | |
21,,,20,,Red,M | |
20,1445176108738674688,Nike,20,parent,, | |
32,,,30,,Blue,M | |
31,,,30,,Red,XL | |
30,1445176108740771840,Puma,30,parent,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<field name="_root_" type="int" indexed="true" stored="true" multiValued="false" required="false"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cache name="perSegFilter" class="solr.search.LRUCache" | |
size="10" initialSize="0" autowarmCount="10" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<update> | |
<delete><query>*:*</query></delete> | |
<add> | |
<doc> | |
<field name="id">10</field> | |
<field name="type_s">parent</field> | |
<field name="BRAND_s">Nike</field> | |
<doc> | |
<field name="id">11</field> | |
<field name="COLOR_s">Red</field> | |
<field name="SIZE_s">XL</field> | |
</doc> | |
<doc> | |
<field name="id">12</field> | |
<field name="COLOR_s">Blue</field> | |
<field name="SIZE_s">XL</field> | |
</doc> | |
</doc> | |
<doc> | |
<field name="id">20</field> | |
<field name="type_s">parent</field> | |
<field name="BRAND_s">Nike</field> | |
<doc> | |
<field name="id">21</field> | |
<field name="COLOR_s">Red</field> | |
<field name="SIZE_s">M</field> | |
</doc> | |
<doc> | |
<field name="id">22</field> | |
<field name="COLOR_s">Blue</field> | |
<field name="SIZE_s">XL</field> | |
</doc> | |
</doc> | |
<doc> | |
<field name="id">30</field> | |
<field name="type_s">parent</field> | |
<field name="BRAND_s">Puma</field> | |
<doc> | |
<field name="id">31</field> | |
<field name="COLOR_s">Red</field> | |
<field name="SIZE_s">XL</field> | |
</doc> | |
<doc> | |
<field name="id">32</field> | |
<field name="COLOR_s">Blue</field> | |
<field name="SIZE_s">M</field> | |
</doc> | |
</doc> | |
</add> | |
<commit/> | |
</update> |
rambabu,
I can't catch the problem. note DIH was recently extended to support block nesting https://issues.apache.org/jira/browse/SOLR-5147 child=true
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you please provide the sample example like how to import data from DB for nested docs.
my data-config.xml
My schema.xml
JSON response is:"docs": [
{
"personid": "8",
"name": "ram",
"age": "25",
"version": 1468822660646436900
}
}
but I AM EXPECTING the following response:
"docs": [
{
"personid": "8",
"name": "ram",
"age": "25",
"address":{
"addr1":"test",
"addr2":"test",
"pincode":"test",
}
"version": 1468822660646436900
}
}
Can you please suggest how to get above response?
Am i doing any thing wrong in schema.xml file.