hi mohanty

I appreciate it but dint get that can you please elaborate?
my dataconfig is like:
 <entity name="catalogsearch_query" query="select query_id,query_text from
catalogsearch_query where num_results!= 0">
       <field column="query_id" name="value_id"/>
       <field column="query_text" name="user_query"/>
    </entity>

<entity name="catalog_product_entity_varchar" query="select
value_id,value,entity_id,attribute_id from catalog_product_entity_varchar
where attribute_id=60">
        <field column="value_id" name="value_id"/>
        <field column="value" name="title"/>
        <field column="entity_id" name="product_id"/>
        <field column="attribute_id" name="attribute"/>
</entity>


my schema is like:
<fields>
   <field name="keyfeatures" type="text_en_splitting" indexed="true"
stored="true" required= "false"/>
   <field name="value_id" type="plong" indexed="true" stored="false"/>
   <field name="product_id" type="plong" indexed="true" stored="true"/>
   <field name="features" type="text_en_splitting_tight" indexed="true"
stored="false" required="false"  multiValued="true"/>
   <!--<field name="f_product_id" type="plong" indexed="true"
stored="true"/>
   <field name="f_value_id" type="plong" indexed="true" stored="true"/> -->
   <field name="attribute" type="plong" indexed="false" stored="false"/>
   <field name="title" type="text_en_splitting" indexed="true"
stored="true" required= "true"/>
   <field name="image" type="text_en_splitting_tight" indexed="false"
stored="false"/>
   <field name="url" type="text_en_splitting_tight" indexed="false"
stored="false"/>
   <field name="brand" type="text_en" indexed="true" stored="true"/>
   <field name="procat" type="text_en" indexed="true" stored="true"/>
   <field name="rootcat" type="text_en" indexed="true" stored="true"/>
   <field name="color" type="text_en" indexed="true" stored="true"/>
   <field name="sku" type="text_en_splitting_tight" indexed="true"
stored="true"/>
   <field name="spell" type="tSpell" indexed="true" stored="true" />
   <field name="query_id" type="plong" indexed="true" stored="true" />
   <field name="user_query" type="text_en_splitting_tight" indexed="true"
stored="true" required="false"/>
</fields>

<uniqueKey>value_id</uniqueKey>

 <!-- <field name="solr_value" type="text" indexed="true" stored="true"/>
-->
 <!-- field for the QueryParser to use when an explicit fieldname is absent
DEPRECATED: specify "df" in your request handler instead. -->

 <defaultSearchField>title</defaultSearchField>


thanks regards
Rohan


On Thu, May 16, 2013 at 5:11 PM, Gora Mohanty <g...@mimirtech.com> wrote:

> On 16 May 2013 16:24, Rohan Thakur <rohan.i...@gmail.com> wrote:
> > hi
> >
> > I got the problem it is with the unique key defined in the schema.xml
> > if i difine it to be query_id then while indexing it says
> > missing mandatory key query_id which is not present in the root
> > entity(data-config.xml) which is indexing the product from the database
> > which has product_id as the unique key and when in schema I set
> product_id
> > as the unique key then it says missing mandatory key product_id which is
> > not present in the root entity(data-config.xml) which is indiexing the
> user
> > query from another table in the database which has user_id as the unique
> > key.
> >
> > how can I fix this thanks I want to index both the tables which are
> > basically unrelated that is does not have any *Common*  fields....
> [...]
>
> Fix it in the SELECT statement:
>   SELECT product_id as id,... for one entity, and
>   SELECT query_id as id,... in the other
> and use id as the uniqueKey for Solr.
>
> Regards,
> Gora
>

Reply via email to