search - Indexing and searching MySQL with solr -


I have installed a solar and I am trying to index a simple 2 column, in 2 row table (in database MySQL 'test_tb' tabe (first column) unique ID (in mysql type of type) and (second column) some text I'm getting the error:

  Warning : Error creating document: SolrInputDocument [{ID_F = ID_F (1.0) = {1}}] org.apache.solr.common.SolrException: document [null] missing required field: id  

Its What is the meaning? help please.

schema.xml

  & lt; Field & gt; & Lt; Field name = "id_f" type = "string" index = "true" stored = "true" required = "wrong" /> & Lt; Field name = "COLA" type = "string" indexed = "true" stored = "true" required = "false" /> & Lt; / Regions & gt;  

data-config.xml

  & lt; DataConfig & gt; & Lt; Datasource Type = "JDBCData" driver = "com.mysql.jdbc.Driver" url = "jdbc: mysql: // localhost / test_db" user = "root" password = "root_pwd" /> & Lt; Document Name = "Doctor" & gt; & Lt; Unit name = "test_tb" query = "select id_f, cola test_tb" & gt; & Lt; Field column = "ID_F" name = "ID_F" /> & Lt; Field column = "COLA" name = "COLA" /> & Lt; / Unit & gt; & Lt; / Documents & gt; & Lt; / DataConfig & gt; In your schema, you probably define a required field called "id":  

Either you call ID_F for ID & lt; Name the field column = "ID_F" name = "id" /> and or change the value in your schema.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -