lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joris De Smedt <joris.desm...@chapoo.com>
Subject Updating a single field using Solrj ContentStreamUpdateRequest
Date Thu, 01 Feb 2018 10:54:26 GMT
Hi

I'd like to update a single field of an existing document with the content
of a file.
My current setup looks like this:

   final File file = new File("path to file");
   ContentStreamUpdateRequest req = new
ContentStreamUpdateRequest("/update/extract");
   req.addContentStream(new ContentStreamBase.FileStream(file));
   req.setParam("literal.id", id);
   req.setParam("uprefix","ignored_");
   req.setParam("fmap.content", "content");
   req.setParam("captureAttr","true");
   req.setParam("lowernames","true");
   solrClient.request(req, "collection");
   solrClient.commit("collection");

The problem with it is that it overwrites the existing file instead of
adding a content field.
Is there a way to solve this?
-- 
Joris De Smedt

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