We are using Solrj version 4.10.4 as the java client to add documents into
Solr version 1.4.1

Sample Pojo Object:

@SolrDocument(solrCoreName="customer")
public class Customer
{ private String customerId; private String customerName; private int age;
private List<Address> addresses; //getters and setters }

public class Address
{ private String street; private String city; private String state; private
String country; private Long zip; //getters and setters }

When indexing the customer Document with the below schema

<field name="customerId" type="string" multiValued="false" indexed="true"
required="true" stored="true"/>
<field name="customerName" type="string" multiValued="false" indexed="false"
required="true" stored="true"/>
<field name="age" type="int" multiValued="false" indexed="true"
required="true" stored="true"/>
<field name="addresses" type="String" multiValued="true" indexed="true"
required="true" stored="true"/>

Customer document that gets indexed in Solr is having the Address Object
Memory

<arr><string>Address@spjdspf13</str><str>Address@sdf535</str></arr>

reference as arr of elements instead of individual fields of Address.




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to