hi All, I'm trying to store a 2 dimensional array in SOLR [version 4.0]. 
Basically I've the following data: 
[[20121108, 1],[20121110, 7],[20121111, 2],[20121112, 2]] ...

The inner array being used to keep some count say X for that particular day. 
Currently, I'm using the following field to store this data: 
<field name="dataX" type="string" indexed="true" stored="true" 
multiValued="true"/>
and I'm using python library pySolr to store the data. Currently the data that 
gets stored looks like this(its array of strings)
<arr name="dataX"><str>[20121108, 1]</str><str>[20121110, 
7]</str><str>[20121111, 2]</str><str>[20121112, 2]</str><str>[20121113, 
2]</str><str>[20121116, 1]</str></arr>
Is there a way, i can store the 2 dimensional array and the inner array can 
contain int values, like the one shown in the beginning example, such that the 
the final/stored data in SOLR looks something like: <arr name="dataX">
<arr name=index><int>20121108</int> <int> 7 </int> </arr>
<arr name=index><int> 20121110</int><int> 12 </int></arr>
<arr name=index><int> 20121110</int><int> 12 </int></arr>
</arr>
Just a guess, I think for this case, we need to add one more field[the index 
for instance], for each inner array which will again be multivalued (which will 
store int values only)? How do I add the actual 2 dimensional array, how to 
pass the inner arrays and how to store the full doc that contains this 2 
dimensional array. Please help me out sort this issue.
Please share your views and point me in the right direction. Any help would be 
highly appreciated. 
I found similar things on the web, but not the one I'm looking for: 
http://lucene.472066.n3.nabble.com/Two-dimensional-array-in-Solr-schema-td4003309.html
Thanks                                    

Reply via email to