Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd and update data to Solr-4.3.0 using node module solr-client
    primarykey
    data
    text
    <p>Let me take an example to explain the scenario. Suppose i have data indexed to Solr as :</p> <pre><code>{ "id" : "872919092", "filename" : "science_book", "path" : "/local/abc/" } </code></pre> <p>Now i want to modify the data already indexed to Solr with <code>id : 872919092</code>. I need to change the <code>filename : science_book</code> with <code>filename : history_book</code> and add new attribute <code>topic : mughal</code> to the same indexed data keeping <code>path</code> unchanged. I do not want to pass the <code>path</code> again as there is no change in that and already indexed to Solr. According to the documentation of <a href="http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22field.22" rel="nofollow">Solr</a> this is possible. How do i do that using nodejs solr-client <a href="http://lbdremy.github.io/solr-node-client/code/solr.js.html" rel="nofollow">update</a> method? I want to achieve the below scene :</p> <ol> <li>If the attribute does not exist in the Solr indexed data with particular id, add that to the already indexed data keeping the previously indexed data unchanged.</li> <li>If the attribute already exists in the Solr indexed data with particular id, change the value of the previously indexed attribute keeping the other indexed data unchanged.</li> </ol> <p>I am passing the data to add in Solr as a hash which is a combination of only the new attributes to be added to already indexed data in Solr and changes in the value of the previously indexed data to Solr.</p> <p><strong>Note :</strong> I am using <strong>Solr-4.3.0</strong> and node module <strong>solr-client</strong> for adding data to Solr.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload