SOLR: No SolrCores Protocol Violation Reported

I am very new to SOLR.

I added the following to the relevant xml files. But when I try to open my server page http://localhost:8080/solr/#/

on my machine, I get a message stating that " There are no SolrCores running.Using the Solr Admin UI currently requires at least one SolrCore.

".

solarconfig.xml: [request handler]

 <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
       <lst name="defaults">
        <str name="config">C:/Solr/collection1/conf/data-config.xml</str>
    </lst>
  </requestHandler>

      

config.xml data

<dataConfig>
  <dataSource type="JdbcDataSource" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://127.0.0.1:8080;databaseName=myDB" user="xxx" password="xxx" />
    <document>
      <entity name="sep" processor="SolrEntityProcessor" url="http://127.0.0.1:8080/solr/#/collection1" query="*:*"/>
      <entity name="Data" query="select id, firstname, lastname from tblPlayers">
        <field column="DocumentId" name="DocumentId" />
        <field column="Data" name="Data" />
      </entity>
    </document>
</dataConfig>

      

I think it requestHandler

just points to data-config.xml

, so there is something wrong with my data-config.xml.

And this is the port that I will specify in the data-config.xml file related to the DB.

Thanks in advance.

+3


source to share


1 answer


The error message has nothing to do with dataimport. it tells you that you need to have at least one core. I think you are using solr 4.x. If so, you can find the correct configuration in the boot kit (the kernel is named "collection1"). There's also a multi-core example.



As far as dataimport is concerned, looking at the file it is not clear to me what you want to know with your question about the database port ... if you are wondering where to put the database connection data well, the answer is the "url" attribute of the data item datasource ... you must provide a valid jdbc url, which must contain at least the database address, port, and / or alias.

+1


source







All Articles