Schema Parsing Failed in Solr
I am getting Schema Parsing Failed when I start solr. I am trying to import data from mysql using DIH. The data-config.xml and changes in schema.xml are below (and also [on PasteBin here][1]).
data-config.xml:
?xml version="1.0" encoding="UTF-8" ?>
<dataConfig>
<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/abcd" user开发者_如何转开发="root" password="admin"/>
<document name="products">
<entity name="tbl_tweet_data_2011_03_14" query="select * from tbl_tweet_data_2011_03_14"
deltaImportQuery="SELECT * FROM tbl_tweet_data_2011_03_14 WHERE TweetData='${dataimporter.delta.TweetData}'"
deltaQuery="SELECT TweetData,Polarity,TweetID,Retweet,TweetCreatedAt,Reply_tweet_ID,Reply_userID,UserID,UserName,CreatedAt FROM item WHERE CreatedAt > '${dataimporter.last_index_time}'">
<field column="TweetData" name="TweetData" />
<field column="Polarity" name="Polarity" />
<field column="TweetID" name="TweetID" />
<field column="Retweet" name="Retweet" />
<field column="TweetCreatedAt" name="TweetCreatedAt" />
<field column="Reply_tweet_ID" name="Reply_tweet_ID" />
<field column="Reply_userID" name="Reply_userID" />
<field column="UserID" name="UserID" />
<field column="UserName" name="UserName" />
<field column="CreatedAt" name="CreatedAt" />
</entity>
</document>
</dataConfig>
Schema.XML: http://pastebin.com/4rxEEQJk
Error Message: http://pastebin.com/sDxncb6R
As the schema.xml and Error message can't fit in the body, so they have been provided in pastebin
You have a custom unique id field <uniqueKey>TweetID</uniqueKey>
but there seems to be a reference to the default unique id field id
hanging around somewhere. I looked over your code but couldn't find anything.
Did you change the unique id field just recently? Does it work when you change the name of the field back to id
?
What version of Solr are you using?
In version 5 the schema.xml comments it says
Do NOT change the type and apply index-time analysis to the as it will likely make routing in SolrCloud and document replacement in general fail.
The original id is of type 'int', could you change the TweetID type to 'int'?
精彩评论