lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prafful Nagpal <praffulnag...@hotmail.com>
Subject Need to know how to read from solr index from update processor <script processor>
Date Wed, 23 Nov 2016 11:51:11 GMT
Hi All


I have developed a script through which I am able to search on single core of solr cloud setup

What i want to know is there a way through which i can search the entire collection ( all
cores and shards ) with unique key and get a field of that document .


  var Term = Java.type("org.apache.lucene.index.Term");
        previousDocId= req.getSearcher().getFirstMatch(new Term("id","unique id"));
        previousDoc=req.getSearcher().doc(previousDocId);
        previousData= previousDoc.getField("data_ws").stringValue();
        doc.setField("data_ws",previousData+currData);



Sent from Outlook<http://aka.ms/weboutlook>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message