I am trying to setup a DataImportHandler and upon trying to do a full import I get this error:
SEVERE: Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: SolrEntityProcessor: parameter 'url' is required Processing Document # 1
I see in the example data-config.xml that come with solr sometimes Entity has the url parameter and sometimes it doesn't. If it is required why do some of the examples not have it?
What URL is it looking for?
The documentation actually doesn't show "url" as a required parameter for SqlEntityProcessor
For SqlEntityProcessor the entity attributes are :
query (required) : The sql string using which to query the db
deltaQuery : Only used in delta-import
parentDeltaQuery : Only used in delta-import
deletedPkQuery : Only used in delta-import
deltaImportQuery : (Only used in delta-import) . If this is not present , DIH tries to construct the import query by(after identifying the delta) modifying the 'query' (this is error prone). There is a namespace ${dataimporter.delta.} which can be used in this query. e.g: select * from tbl where id=${dataimporter.delta.id} Solr1.4.
It depends on the specific EntityProcessor
implementation you use. Every EntityProcessor
has its own entity attributes. SQLEntityProcessor
doesn't need an url parameter because it relies on the dataSource
element to get the information needed to connect to the database, while for example the SolrEntityProcessor
doesn't need the dataSource
element but relies on the url
attribute to get the url of the Solr instance from which import data.
There are different DataSource
implementations as well, if you look at JdbcDataSource
you'll see it requires the url parameter itself.