You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by dmitri maziuk <dm...@gmail.com> on 2022/11/24 01:39:00 UTC

cache key/lookup with doc update ?

Hi all,

this works in Java DIH:

<entity name="foo" query=... >
     <entity name="foochild" query=... cacheKey="OTHER_ID" 
cacheLookup="foo.OTHER_ID" .... >

This fails with JSON POST: '{ "OTHER_ID" : blah, "foochild" : { "add" : 
bar } }' -- the exception is "Missing mandatory uniqueKey field".

Which is correct: "OTHER_ID" is not defined as either mandatory or 
unique. (It is unique within "foo" dataset but that's not the only 
dataset we're importing in this Solr index.) So we can't actually match 
on OTHER_ID without specifying the link to foo.OTHER_ID like the DIH does.

Question: can that be done with a POST request?

TIA
Dima