Could someone give suggestions for this issue?
Praveen Kumar Jayaram wrote: > > Hi > > I am trying to have a complex POJO type in Solr 1.3 > i.e Object inside object. > > Below is a sample Field created, > > public class TestType extends FieldType{ > @Field > private String requestorID_s_i_s_nm; > > @Field > private String partNumber; > > @Field > private String requestorName_s_i_s_nm; > > @Field > private InnerType innerType; > } > > Where InnerType is another custom Java type. > > public class InnerType extends FieldType{ > private String name_s_i_s_nm; > } > > > The schema configuration is as shown below, > > .... > <fieldType name="TestType" class="com.abc.lucene.TestType" > sortMissingLast="true" omitNorms="true"/> > <fieldType name="InnerType" class="com.abc.lucene.InnerType" > sortMissingLast="true" omitNorms="true"/> > .... > .... > > When I try to add an TestType POJO using below code, am getting unkown > field "innerType" error, > > String url = "http://localhost:8983/solr"; > SolrServer server = new CommonsHttpSolrServer( url ); > > InnerType inner = new InnerType(); > inner.setName_s_i_s_nm("Test"); > > TestType praveen = new TestType(); > praveen.setPartNumber("000001-0001"); > praveen.setRequestorID_s_i_s_nm("1111"); > praveen.setRequestorName_s_i_s_nm("Praveen Kumar Jayaram"); > praveen.setInnerType(inner); > > server.addBean(praveen); > UpdateRequest req = new UpdateRequest(); > req.setAction( UpdateRequest.ACTION.COMMIT, false, false ); > UpdateResponse res = req.process(server); > > Initially POJO was getting added when it was not composite POJO. > After trying to have composite POJO things are not working. > What is that I am doing wrong?? > > Any help will be appreciated. > > > ----- Regards, Praveen -- View this message in context: http://www.nabble.com/Composite-POJO-support-tp22841854p22845799.html Sent from the Solr - User mailing list archive at Nabble.com.