خرید بک لینک

Vote count: 0

I am facing a issue with copyFields in SOlr. Here is what i am doing

Schema:

<field name="ID" type="string" indexed="true" stored="true"/> 
   <field name="product" type="string" indexed="true" stored="true"/> 
   <field name="product_copy" type="text" indexed="true" stored="true"/> 
   <copyField source="product" dest="proudct_copy"/>

There is document I have added with

Doc: 
    {"id":"1",
    "product":"prod1",
    "product_copy":[
    "prod1"
    ]
    }

When I update the document prod1 with prod2 the result coming as follows

Doc: 
{"id":"1",
"product":"prod1",
"product_copy":[
"prod1",
"prod2"
]
}

Why product_copy is getting two values even though its a single values. The actual value should be only updated value prod2. Later If I try to update the document it will never update again as I get a exception saying multiple values encountered for a single valued attribute product_copy. My question is First is why its copying same value to destination field when I update the document Secondly why its taking multiple values for a single values attribute?

Any help will be greatly appreciated

asked 50 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 14 مرداد 1395 ساعت: 17:44

صفحه بندی