dih

Solr 4 - missing required field: uuid

对着背影说爱祢 提交于 2019-12-05 08:13:24
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" indexed="true" stored="true" /> <field name="lat" type="text_general" indexed="true" stored="true" />

Solr: Indexing nested Documents via DIH

自闭症网瘾萝莉.ら 提交于 2019-12-04 20:13:52
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/Uploading+Data+with+Index+Handlers Please suggest a way to index it through DIH This feature has been

Solr DIH delta-import with compound primary keys?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 14:40:25
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. There's no example showing this for compound keys though. Ideally I don't want those two separate queries

Configure DIH in multicore solr

白昼怎懂夜的黑 提交于 2019-12-02 17:51:08
问题 I have a multicore implementation of solr. I want to configure DIH / core. I manage to make it work on single core solr. What I assume, I have to make the configurations / core, which means I create the data-import.xml in the core's conf directory and rewrite solrconfig.xml of the core. I also copied in the lib the maching driver for dih, but I get an error message: org.apache.solr.common.SolrException: Error loading class 'org.apache.solr.handler.dataimport.DataImportHandler' at org.apache

Configure DIH in multicore solr

混江龙づ霸主 提交于 2019-12-02 09:32:30
I have a multicore implementation of solr. I want to configure DIH / core. I manage to make it work on single core solr. What I assume, I have to make the configurations / core, which means I create the data-import.xml in the core's conf directory and rewrite solrconfig.xml of the core. I also copied in the lib the maching driver for dih, but I get an error message: org.apache.solr.common.SolrException: Error loading class 'org.apache.solr.handler.dataimport.DataImportHandler' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:389) ....................................

Can Solr DIH do atomic updates?`

≡放荡痞女 提交于 2019-11-30 14:17:03
问题 With Solr 4 came the ability to do atomic (partial) updates on existing documents within the index. I.e. one can match on the document ID and replace the contents of just one field, or add further entries to multivalued fields: http://wiki.apache.org/solr/Atomic_Updates Can atomic updates be done from DataImportHandler (DIH)? 回答1: The answer is "yes" with the ScriptTransformer, I discovered through trial and error. The Solr documentation shows how to add an update attribute to a field node

Can Solr DIH do atomic updates?`

£可爱£侵袭症+ 提交于 2019-11-30 09:59:41
With Solr 4 came the ability to do atomic (partial) updates on existing documents within the index. I.e. one can match on the document ID and replace the contents of just one field, or add further entries to multivalued fields: http://wiki.apache.org/solr/Atomic_Updates Can atomic updates be done from DataImportHandler (DIH)? The answer is "yes" with the ScriptTransformer, I discovered through trial and error. The Solr documentation shows how to add an update attribute to a field node with "set", "add" or "inc". If I create a test XML file with the requisite update attribute, it works fine

Why can't I instantiate DataImportHandler in Solr on JBoss?

岁酱吖の 提交于 2019-11-30 06:02:49
问题 I'm trying to set up Solr 3.5.0 on JBoss 5.1. Everything works quite fine. I copied war into deploy dir, all the dependencies from dist and contrib directories into the lib (or earlier deploy) directory. I can start a server, everything works fine, but whenever I want to activate the DataImportHandler to index data in my DB, I get an error. Basically what I do is I copy is I copy a core from example/example-DIH/solr/db (Or whole example, that doesn't matter), I register the core in solr.xml

DIH(Data Import Handler) for xml files is not working in Solr4

痞子三分冷 提交于 2019-11-29 08:55:07
I have installed and configure Solr4 and tomcat6 on to the server. It works good but when I try to build the DIH(Data Import Handler) it gives me an error and I am not able to resolve. I add the following code to my solrconfig.xml file <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">/path/to/data-config.xml</str> </lst> my data-config.xml file looks like as follow <dataConfig> <dataSource type="FileDataSource" /> <document> <entity name="f" processor="FileListEntityProcessor" baseDir="/path/to

In solr dih import two double in one location

柔情痞子 提交于 2019-11-29 07:12:48
What I have now is the two double filds: <field name="x_geo_x_coordinate" type="double" indexed="true" stored="true" default="0"/> <field name="x_geo_y_coordinate" type="double" indexed="true" stored="true" default="0"/> and what I want: the 2 double value in one location field: <field name="x_geo" type="location" indexed="true" stored="true" default="0.0,0.0"/> What I tried so far and does't work: <copyField source="*_coordinate" dest="x_geo"/> <copyField source="x_geo_str" dest="x_geo"/> Any simple solution? Thanks in advance! Well, you where right @nikhil500. ScriptTransformer is one answer