You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implemented this a while ago, and it appears it's not a good idea.
If buffering is necessary it should be done outside of this method.
Case where it causes trouble:
varsolr=require('solr-client');varclient1=solr.createClient({host : 'localhost',port : 8983});varclient2=solr.createClient({host: '12.67.78.98',port : 8983});vardocs=[{id : 3938,title: 'blalbkjj'},{id :78783,title : 'broubrou'}];client1.add(docs,function(err,obj){});client2.add(docs,function(err,obj){});// Well, I'm sorry for you client2 but your array of docs is empty
The quick fix, without breaking the buffering feature in the add method would be to clean the array of docs only if this.updateEach !=1 and so add a condition where the splice is done if(this.updateEach != 1){ this.adds.splice(0,this.adds.length); // Remove every elements}
I will remove the buffering feature and so this.adds, and the method flushAdd in the next minor release but for now I will just add this condition above.
The text was updated successfully, but these errors were encountered:
I implemented this a while ago, and it appears it's not a good idea.
If buffering is necessary it should be done outside of this method.
Case where it causes trouble:
The quick fix, without breaking the buffering feature in the
add
method would be to clean the array of docs only ifthis.updateEach !=1
and so add a condition where the splice is doneif(this.updateEach != 1){ this.adds.splice(0,this.adds.length); // Remove every elements}
I will remove the buffering feature and so
this.adds
, and the methodflushAdd
in the next minor release but for now I will just add this condition above.The text was updated successfully, but these errors were encountered: