2

I have a multi-valued field (custprc), with an integer (key), an underscore, then a decimal value. The field looks like this:

{1234_11.22, 1235_12.00, 1236_11.44}

I can remove an entry from that field using either the remove or removeregex command with atomic updates with no problem, assuming I use the unique key field (id). However, I'd like to be able to make a similar update either by using a wildcard on the id field, or by not using the id field at all and just using another field (catlgcode).

The following command works just fine: {"id":"20303001123", "custprc":{"removeregex":["1234.[0-9]+.[0-9]+"]}}

I'd like to use something more like this:

{"id":"20*", "custprc":{"removeregex":["1234.[0-9]+.[0-9]+"]}}

or this:

{"catlgcode":"20", "custprc":{"removeregex":["1234.[0-9]+.[0-9]+"]}}

Neither seems to work. SOLR does not return an error, I get a response code of 0, but the records are not touched. I have set the id field to required=false in my schema.xml, and I've tried changing it from string to text_general, with no luck thus far.

I'm updating a large dataset relatively frequently, so instead of 30,000+ atomic updates, I'd rather send 1 request with a wildcard. Am I missing something? Any ideas?

1 Answers1

0
<doc>
 <field name="id">1234</field>
 <field name="test" update="set">new filed 1</field>
 <field name="test" update="set">new field 2</field>
 </doc>
 <commit/>

all old multivalue field replaced.

Daniela
  • 1
  • 1