Unable to see data in a string field in apache solr 3.6 when importing data from mysql -


all other fields have imported data dont see company_logo field when search results i.e. : , here data config file

    <?xml version="1.0" encoding="utf-8" ?>     <dataconfig>      <datasource type="jdbcdatasource" driver="com.mysql.jdbc.driver"                          url="jdbc:mysql://localhost:3306/demandfire"                              user="root" password=""/>      <document>         <entity name="core4"                query="select company.company_name,demand.id,demand.issue,             demand.suggestion,demand.title,demand.company_id,company.logo              company,demand              demand.company_id = company.id;         ">              <field column="demand.id" name="id"/>              <field column="demand.issue" name="issue"/>             <field column="demand.suggestion" name="suggestion"/>             <field column="demand.title" name="title"/>             <field column="demand.company_id" name="company_id"/>             <field column="company.company_name" name="company_name"/>             <field column="company.logo" name="company_logo"/>           </entity>      </document>     </dataconfig> 

the following schema file, problem comes in field company_logo, have mapped correctly in data-config file, other fields able data field cant, sample entry in this(logo) field of mysql table of type '6bf38f4e-a9af-40b8-af04-2b90d3c93f1f.jpg'

    <schema name="example core one" version="1.1">       <types>        <fieldtype name="string"  class="solr.strfield" sortmissinglast="true" omitnorms="true"/>         <fieldtype name="string_lowercase" class="solr.textfield" sortmissinglast="true" omitnorms="true">         <analyzer type="query">             <tokenizer class="solr.keywordtokenizerfactory"/>             <filter class="solr.lowercasefilterfactory"/>         </analyzer>     </fieldtype>        </types>       <fields>          <!-- general -->        <field name="id" type="string"    indexed="true"  stored="true"  multivalued="false" required="true"/>       <field name="issue" type="string_lowercase"    indexed="true"  stored="true"  multivalued="false" required="true"/>       <field name="suggestion" type="string_lowercase" indexed = "true" stored="true" multivalued="false" required = "true"/>       <field name="title" type="string_lowercase" indexed = "true" stored="true" multivalued="false" required = "true"/>       <field name="company_id" type="string" indexed = "true" stored="true" multivalued="false" required = "true"/>       <field name="company_name" type="string_lowercase" indexed = "true" stored="true" multivalued="false" required = "true"/>       <field name="company_logo" type="string" indexed = "true" stored="true" multivalued="false" required = "false"/>       </fields>         <!-- field use determine , enforce document uniqueness. -->      <uniquekey>id</uniquekey>       <!-- field queryparser use when explicit fieldname absent -->      <defaultsearchfield>title</defaultsearchfield>       <!-- solrqueryparser configuration: defaultoperator="and|or" -->      <solrqueryparser defaultoperator="or"/>     </schema>* 

try remove required= "false" attribute in field (it should default anyway).

try change definition of field this:

<field name="company_logo" type="string" indexed = "true" stored="true" multivalued="false"/> 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -