Hi Jörn, I am not supplying the name in the update chain. I am not sure pysolr supports it yet:
def __init__( self, url, decoder=None, timeout=60, results_cls=Results, search_handler="select", use_qt_param=False, always_commit=False, auth=None, verify=True, ): How can I define it as default? Cheers, Arturas On Tue, Sep 3, 2019 at 1:09 PM Jörn Franke <jornfra...@gmail.com> wrote: > How do you send the request? You need to specify the update.chain > parameter with the name of the Update chain or define it as default > > > Am 03.09.2019 um 12:14 schrieb Arturas Mazeika <maze...@gmail.com>: > > > > Hi Solr Fans, > > > > I am trying to figure out how to use the parse-date processor for pdates. > > > > I am able to insert data with this python code to a solr collection/core: > > > > solr = pysolr.Solr('http://localhost:5555/solr/core1', timeout=10) > > > > solr.add([ > > { > > "t": '2017-08-19T21:00:42.043Z', > > } > > ]) > > solr.commit() > > > > My schema.xml has the following lines: > > > > <fieldType name="pdate" class="solr.DatePointField" docValues="true"/> > > <fieldType name="pdates" class="solr.DatePointField" docValues="true" > > multiValued="true"/> > > <field name="t" type="pdate" indexed="true" stored="true"/> > > > > This makes sense as DatePointField requires a pretty strict date/time > > formatting: > > > http://lucene.apache.org/solr/7_2_1/solr-core/org/apache/solr/schema/DatePointField.html > > > > > > I am trying to figure out how to use the parse-date parser to allow more > > flexible formattings. My solrconfig.xml has the following lines: > > > > <updateProcessor class="solr.ParseDateFieldUpdateProcessorFactory" > > name="parse-date2"> > > <arr name="format"> > > <str>yyyy-MM-dd HH:mm:ss.SSS</str> > > </arr> > > </updateProcessor> > > > > <updateRequestProcessorChain default="true"> > > <processor class="solr.UUIDUpdateProcessorFactory"> > > <str name="fieldName">id</str> > > </processor> > > <processor name="parse-date2"> > > <str name="fieldName">t</str> > > </processor> > > > > <processor class="solr.LogUpdateProcessorFactory" /> > > <processor class="solr.RunUpdateProcessorFactory" /> > > </updateRequestProcessorChain> > > > > How should I automatically invoke the parser for the t field? Currently, > I > > am getting an error: > > > > 2019-09-03 12:11:37 Solr responded with an error (HTTP 400): [Reason: > > ERROR: [doc=c19c7d74-b81f-4575-ac5d-9c6aeeb82496] Error adding field > > 't'='2017-08-19 21:00:42.043' msg=Invalid Date String:'2017-08-19 > > 21:00:42.043'] > > > > if I add the doc with this timestamp: > > > > self.solr.add([ > > { > > > > "t": '2017-08-19 21:00:42.043' > > > > } > > ]) > > self.solr.commit() > > > > Cheers, > > Arturas >