I have 4 rows in MySQL and I'm indexing them into Solr from admin console. The import executes successfully and I get this message "Indexing completed. Added/Updated: 4 documents. Deleted 0 documents. (Duration: 01s)".
Next, when I try to query some text from one of the rows, I do not get any result. I haven't changed any of the parameters for querying. This is entry in the log file:
org.apache.solr.core.SolrCore; [collection1] webapp=/solr path=/select params={indent=true&q=LG&_=1397953906088&wt=json} hits=0 status=0 QTime=1
I've updated the config files as blow:
solrconfig.xml:
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</requestHandler>
dataconfig.xml:
<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/test"
user="root"
password=""/>
<document>
<entity name="id"
query="select id,name,descpt from sample">
</entity>
</document>
</dataConfig>
In schema.xml, I've added the corresponding fields:
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="name" type="text_general" indexed="true" stored="true"/>
<field name="descpt" type="string" indexed="true" stored="true"/>
The corresponding entry in database for id, name, and descpt:
4, Television, LG
Why don't I get any results when I query for LG? I'm new to Solr, so I might be missing something here.
Thanks.