Which version of Solr is it? Because we have not used schema.xml for a
very long time. It has been managed-schema instead.

Also, have you tried using DIH example that uses database and
modifying it just enough to read data from your database. Even if it
has a lot of extra junk, this would test half of the pipeline, which
you can then transfer to the clean setup.

Regards,
   Alex.
On Fri, 9 Nov 2018 at 08:09, Verthosa <geertver...@gmail.com> wrote:
>
> Hello, i managed to set up a connection to my sql server to import data into
> Solr. The idea is to import filetables but for now i first want to get it
> working using regular tables. So i created
>
> *data-config.xml*
> <dataConfig>
>   <dataSource type="JdbcDataSource"
>      driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
>
> url="jdbc:sqlserver://localhost;databaseName=inConnexion_Tenant2;integratedSecurity=true"
> />
>   <document>
>    <entity name="Dashboard" pk="id" query="SELECT Id,PublicId FROM
> foundation.Shops">
>          <field column="Id" name="Id"/>
>      <field column="PublicId" name="PublicId" />
>    </entity>
>   </document>
>   </dataConfig>
>
> *schema.xml*
> i added
> <field name="Id" type="string" indexed="true" stored="true" required="true"
> multiValued="false" />
> <field name="PublicId" type="string" indexed="true" stored="true"
> multiValued="false"/>
>
> and changed uniqueKey entry to
> <uniqueKey>Id</uniqueKey>
>
> When i want to import my data (which is just data like Id: 5, PublicId:
> "test"), i get the following error in the logging.
>
> Error creating document : SolrInputDocument(fields: [PublicId=10065,&#8203;
> Id=117])
>
>
> I tried all sorts of things but can't get it fixed. Is anyone want to give
> me a hand?
>
> thanks in advance!
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to