[support] Index reset for a multi-value field in SOLR

Kamal Palei palei.kamal at gmail.com
Mon Jun 24 13:48:55 UTC 2013


Dear All
I have added a multi value field in schema file (say skillset). In my     *
_apachesolr_index_document_build* hook,   I get all the values of field and
do  add to $document using addField api. With this values are indexed and I
can search, I get the search result perfect.

Just for example purpose, say field name is *skillset* (it's a multi value
field).

Say initially I added, Java, PHP, MySQL, Drupal, C++ as skill sets to
skillset field as separate separate values.

If I search for PHP + MySQL + C++, I get this document. So far so good.

Say after 1 month, user came and removed C++ skill set. Then in index, for
skillset field the corresponding change should happen. That is first all
old values should be removed, next Java, PHP, MySQL, Drupal should added
only.

Today I do not know how to remove a field's old values, Can somebody help
me to find out how do I remove old datas for that particular field
(skillset). Today what is happening, I go and add again. Now the resultant
data for skillset becomes Java, PHP, MySQL, Drupal, C++, ava, PHP, MySQL,
Drupal. Hence if I search c++, I get this document in search which is wrong.

Please somebody help me or give me pointer how to delete the old data for a
field in index.

Please note that in case of single-value field this issue would not arsie.

Thanks
kamal
Net Cloud Systems
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130624/b80d3e2c/attachment.html 


More information about the support mailing list