When you run a full-import, Solr will try to delete old documents
before importing the new ones. If there is several top-level entities,
they step on each other foot.
Use preImportDeleteQuery to avoid that (as per
https://cwiki.apache.org/confluence/display/solr/Uploading+Structured+Data+Store+Data+with+the+Data+Import+Handler
).
You can test that by running an indexer on just table1 entity and
seeing if things get indexed.
Regards,
Alex.
Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/
On 22 October 2015 at 00:25, anurupborah2001 <anurupborah2...@gmail.com> wrote:
> HI,
> I am having difficulty in indexing multiple entity in one
> collection..When i try to index only the entity defined at last gets
> index..Please help to assist as I am getting hard time to solve it.
> The below are the config :
> --
> data-config.xml
> --
>
>
> type="SimplePropertiesWriter" filename="demo.properties" />
>
> zeroDateTimeBehavior="convertToNull"
> name="ds-1"
> driver="com.mysql.jdbc.Driver"
> url="jdbc:mysql://127.0.0.1/demo"
> batchSize="-1"
> user="root"
> autoCommit="true"
> password="password" />
>
> pk="table1_id"
> dataSource="ds-1"
>
> transformer="HTMLStripTransformer,RegexTransformer,TemplateTransformer,DateFormatTransformer,script:GenerateId,LogTransformer"
> logTemplate="The demo is ${table1.table1_id}"
> logLevel="info"
> query="select
> table1_id,table1_desc,table1_flag,DATE_FORMAT(table1_date_updated,'%Y-%m-%dT%TZ')
> from table1 Where table1_flag=1 AND '${dih.request.clean}' != 'false' OR
> table1_date_updated '${dih.table1.last_index_time}'"
> >
>
>
> stripHTML="true"/>
> name="solr_table1_date_updated_dt"
> dateTimeFormat="-MM-dd'T'HH:mm:ss" locale="en" />
>
> pk="table2_id"
> dataSource="ds-1"
>
> transformer="HTMLStripTransformer,RegexTransformer,TemplateTransformer,DateFormatTransformer,script:GenerateId,LogTransformer"
> logTemplate="The table2 is ${table2.table2_id}"
> logLevel="info"
> query="select
> table2_id,table2_name,table2_flag,DATE_FORMAT(table2_date_updated,'%Y-%m-%dT%TZ')
> from table2 Where table2_flag=1 AND '${dih.request.clean}' != 'false' OR
> table2_date_updated '${dih.table2.last_index_time}'"
> >
>
>
>
> pk="table3_id,table3_frid"
>
> transformer="HTMLStripTransformer,RegexTransformer,DateFormatTransformer,script:GenerateId,LogTransformer"
> logTemplate="The table3 is
> ${table3.table3_id}" logLevel="info"
> query="select
> table3_id,table3_frid,table3_name,table3_desc,table3_subdesc,table3_keyword,table3_flag,DATE_FORMAT(table3_date_updated,'%Y-%m-%dT%TZ')
> from table3 Where table3_frid=$table1.table1_id} AND table3_flag=1"
> >
> name="solr_table3_name"/>
> name="solr_table3_desc" stripHTML="true"/>
> name="solr_table3_subdesc"
> stripHTML="true"/>
> name="solr_table3_keyword"/>
> name="solr_table3_date_updated_dt"
> dateTimeFormat="-MM-dd'T'HH:mm:ss" locale="en"/>
>
>
>
>
>
>
>
>
> schema.xml
> ------
> />
>
>
> singlekey
>
>
>
> multiValued="false" />
> stored="true" multiValued="false" />
>
>
>
> multiValued="true" />
> stored="true" multiValued="true" />
> multiValued="true" />
> multiValued="true" />
> multiValued="false" stored="true" />
>
>
>
> Please kindly help me in this...I am not able to index the table 1, instead
> the table 2 and table 3 (which are 1 to many relationship tables) are
> getting indexed but table1 not getting indexed..
>
> Thanks for help in advance
> Regards
> Anurup
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Index-Multiple-entity-in-one-collection-core-tp4235810.html
> Sent from the Solr - User mailing list archive at Nabble.com.