You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Rajesh Vijayakumar (JIRA)" <ji...@apache.org> on 2018/02/23 02:16:00 UTC

[jira] [Created] (SOLR-12022) Solrj SolrServer not converting the Collection of Pojo Objects inside Parent Pojo

Rajesh Vijayakumar created SOLR-12022:
-----------------------------------------

             Summary: Solrj SolrServer not converting the Collection of Pojo Objects inside Parent Pojo
                 Key: SOLR-12022
                 URL: https://issues.apache.org/jira/browse/SOLR-12022
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrJ
    Affects Versions: 4.10.4
            Reporter: Rajesh Vijayakumar


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org