How are you looking at the document? You mention using admin,
are you searching?

Because if you're looking at *terms* rather then the document,
you should be aware that deleting a document does NOT remove
the terms from the index, it just marks the doc as deleted.

An optimize will remove the deleted document's terms.

As Lance says, though, if you're displaying the document you
should not be seeing the original values.

Best
Erick

On Tue, Nov 16, 2010 at 11:50 PM, Pramod Goyal <pramod.go...@gmail.com>wrote:

> Hi,
>     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"
> multiValued="true"/>
>   <field name="product_copy" type="text" indexed="true" stored="true"
> multiValued="true"/>
>
>   <copyField source="product" dest="proudct_copy"/>
>
>
> I insert a document with say ID as 100 and product as sampleproduct. When i
> view the document in the solr admin page i see the correct value for
> the product_copy field ( same as the prodcut field ).
> Next i try to update this document and for the field product i give 2
> values
> sampleproduct and testproduct. When i view the document on the solr admin
> now
> it show me 3 values in the copy field i.e. sampleproduct, testproduct and
> sampleproduct ( the initial value in the copy field is retained even on
> update ).
>
> Why is copyFiled retaining the old values when the original field value has
> been updated. If i update the document multiple times all the old values
> are
> still retained in the copyField.
>
> Note that i am using the solrJ api to insert the document. I tried setting
> null values for the copy field when i am updating the document but it didnt
> solve the problem.
>

Reply via email to