Hi Dima,

Which version of Solr are you using?

I recently ran into an issue with the price field and atomic updates when
nested documents are involved. That happened against Solr 9.0.0 with code
that ran fine against Solr 8.11.2. I'm wondering if it could be related
(although I got a different error).

Thomas


Op do 24 nov. 2022 om 02:03 schreef dmitri maziuk <dmitri.maz...@gmail.com>:

> Hi all,
>
> this one's a bit convoluted and I'm not sure where to look nor how to
> best describe this:
>
> - we have a "master" table with a bunch of values incl. price, and a few
> "detail" tables with other attributes.
>
> - For the price, there is a dynamic field price_c____s. As far as I can
> see it's constructed as dynamic field *_s (string) from dynamic field
> *_c (currency) from copyfield price (float) -> price_c. (And I don't see
> where the other 3 underscores in price_c____s come from.)
>
> For Solr import,
> - when I run the query on the master table, and a subquery on each row,
> then post a document like '{ "id" : foo, "price" : bar, "detail" :
> [blah, bleh] }' it works fine.
>
> - When I run the master query and post documents like '{ "id" : foo,
> "price" : bar }', then run the detail query and post documents like '{
> "id" : foo, "detail" : { "add-distinct" : blah }', I get 'SolrException:
> ERROR: [doc=foo] multiple values encountered for non multiValued field
> price_c____s" [USD, USD]'
>
> (Note that "USD" is the default currency, it is not explicitly added
> anywhere.)
>
> Price is not part of any detail queries so AFAICT they shouldn't be
> triggering the copyfileld/dynamicfield rules involved. Yet it looks like
> the *_s dynamicField rule is trying to run on price_c again? There's
> nowhere else that duplicate "USD" can come from.
>
> Does this ring any bells, anyone?
>
> (Note that this "worked" with the stock Java DIH presumably because it
> had "onerror=continue" -- now that I'm POST'ing docs I get a 404 that I
> can't ignore quite as easily.)
>
> Dima
>

Reply via email to