Solr data indexing returns only one field

I am trying to use solr to index data from my database. After I index the data, when I request *. * I only get the id field in the result. not all fields I had in my query.

My data-config.xml

<document name="content">
    <entity name="documen" query="SELECT indexId ,brand_id, category_id, product_name from Production">
        <field column="indexId" name="id" /> 
        <field column="category_id" name="categoryid" />
        <field column="brand_id" name="brandid" />
        <field column="product_name" name="id" />
    </entity>
</document>

      

My schema.xml looks like this:

<field name="id" type="int" indexed="true" stored="true" required="true"/>
<field name="categoryid" type="int" indexed="true" stored="true"/> 
<field name="brandid" type="int" indexed="true" stored="true" />
<field name="productname" type="string" indexed="true" stored="true"/>

      

When I request with *.*

, I get

<doc>
<str name="id">1</str>
<long name="_version_">1426653005792411648</long></doc>
<doc>
<str name="id">2</str>
<long name="_version_">1426653005793460224</long></doc>
<doc>

      

The result is only the "id" field.

Actually, any field in the "uniquekey" tag is returned as a query result

+3


source to share





All Articles