dih

Delta-import collects the data but don't update the solr Index

为君一笑 提交于 2019-12-11 04:30:07
问题 I've a solr Index that I am doing DIH with a mysql DB. When I run the delta-import command, the 4 inserted rows in DB since last full import is being collected, but the index is not updated! 841705 [qtp108251962-14] INFO org.apache.solr.handler.dataimport.DataImporter – Loading DIH Configuration: db-data-config.xml 841708 [qtp108251962-14] INFO org.apache.solr.handler.dataimport.DataImporter – Data Configuration loaded successfully 841709 [Thread-31] INFO org.apache.solr.handler.dataimport

Solr DIH delta-import with compound primary keys?

倖福魔咒の 提交于 2019-12-09 12:51:54
问题 My Solr data source is a SQL database where the primary key is compound (i.e. it's two fields). This is fine for my main DIH query , I just concatenate the fields and that becomes my Solr primary key. However it's unclear from the documentation how I'd write a delta-import query to support this. The documentation suggests I need two queries - one to find the primary key of the changed rows, and another to then actually retrieve the individual documents corresponding to each of those keys.

Embedded Solr DIH

二次信任 提交于 2019-12-08 11:09:25
问题 Can anyone tell me how to configure Embedded Solr DIH in Solrj? I tried this.. SolrQuery qry = new SolrQuery(); qry.setQueryType("/import"); qry.setParam("command", "full-import"); qry.setParam("clean", false); embeddedSolrServer.query(qry); And it stops at this point. 1437 [main] INFO org.apache.solr.core.CoreContainer - registering core: main 1468 [Thread-1] INFO org.apache.solr.handler.dataimport.DataImporter - Starting Full Import 1468 [main] INFO org.apache.solr.core.SolrCore - [main]

Solr - DIH define & import many-to-many field

妖精的绣舞 提交于 2019-12-08 05:16:01
问题 I've two MySQL tables book and author , they have many-to-many relationship, done via book_author_mapper whose row contain columns book_id / author_id . In Solr, I have a query to get book list, for each book I need to get an array of author_id for the book. Currently, I am thinking about to use a multi-valued field to store book ids. My question is: How to define the field, and how to write the SQL in DIH, it seems need multiple SQL, right? Thx. If I want to get not just the author_id list,

Speed up solr indexing

这一生的挚爱 提交于 2019-12-07 17:48:59
问题 Solr indexing takes too long. I am using mysql with more than 30 million records. I am using two level sub queries. Please suggest me best practices for indexing data, so that i can speed up the process. 回答1: Check out SolrPerformanceFactors with Indexing_Performance and ImproveIndexingSpeed 来源: https://stackoverflow.com/questions/12328969/speed-up-solr-indexing

Solr 4 - missing required field: uuid

房东的猫 提交于 2019-12-07 03:27:30
问题 I'm having issues generating a UUID using the dataImportHandler in Solr4. Im trying to import from an existing MySQL database. My schema.xml contains: <fields> <field name="uuid" type="uuid" indexed="true" stored="true" required="true" /> <field name="id" type="string" indexed="true" stored="true" required="true"/> <field name="address" type="text_general" indexed="true" stored="true"/> <field name="city" type="text_general" indexed="true" stored="true" /> <field name="county" type="string"

Solr DIH regextransformer - processes only one CSV line

主宰稳场 提交于 2019-12-06 14:17:48
问题 Hi I have the following CSV file 132 1536130302256087040 133 1536130302256087041 134 1536130302256087042 the fields are seperated by a tab. Now I have the Dataimporthandler (DIH) for the solr, and I try to import the CSV into solr, but I only get the first line into solr. Thats the result, but the other lines from the CSV are missing: "response": { "numFound": 1, "start": 0, "maxScore": 1, "docs": [ { "string": "1536130302256087040", "id": "132", "_version_": 1536202153221161000 } ] } Here is

Solr: Indexing nested Documents via DIH

霸气de小男生 提交于 2019-12-06 13:00:43
问题 I want to index my document from MySql to Solr via DIH . I have a table structure like this Table User id 1 2 3 name Jay Chakra Rabbit Address id 1 2 3 number 1111111111 2222222222 3333333333 email test@email.com test123@test.co unique@email.com and other associations. I want to index this in a nested document structure but unable to find any resource via which it can be done using DIH. Resources refered: http://yonik.com/solr-nested-objects/ https://cwiki.apache.org/confluence/display/solr

Speed up solr indexing

吃可爱长大的小学妹 提交于 2019-12-05 18:22:56
Solr indexing takes too long. I am using mysql with more than 30 million records. I am using two level sub queries. Please suggest me best practices for indexing data, so that i can speed up the process. Check out SolrPerformanceFactors with Indexing_Performance and ImproveIndexingSpeed 来源: https://stackoverflow.com/questions/12328969/speed-up-solr-indexing

DIH-全量导入总结

两盒软妹~` 提交于 2019-12-05 10:45:46
1、将solr-dataimporthandler-4.10.4.jar(solr自带)、mysql-connector-java-5.1.23.jar拷贝到/WEB-INF/lib/下 2、修改home\solr\collection1\conf\solrconfig.xml、schema.xml,创建data-config.xml solrconfig.xml增加以下内容: <!-- add by sniper 数据导入,全量索引 --> <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">data-config.xml</str> </lst> </requestHandler> schema.xml增加以下内容: id、name使用自带的: <field name="nickName" type="text_ik" indexed="true" stored="true"/> data-config.xml内容如下: <dataConfig> <dataSource name="jdbc" type="JdbcDataSource" driver=