lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Hornberger" <charles.hornber...@gmail.com>
Subject question about batches in new solr.py (SOLR-216)
Date Fri, 09 Nov 2007 21:09:56 GMT
I'm experimenting with the new solr.py from
http://issues.apache.org/jira/browse/SOLR-216 think perhaps I'm
confused about how batching is are supposed to work.

I wrote this test script:

  import solr
  client = solr.SolrConnection('http://localhost:8080/solr')
  client.begin_batch()
  client.add(id=9999998)
  client.add(id=9999999)
  client.end_batch()
  client.commit()
  response = client.query(q="id:9999998 OR id:9999999", fields=['id'])
  assert len(response.results) == 2

and it fails; only the first document is returned. I would expect to get both.

The Solr logfiles show no errors, but suggest that only the first <add
/> was processed:

Nov 9, 2007 1:07:21 PM org.apache.solr.handler.XmlUpdateRequestHandler update
INFO: added id={9999998} in 2ms
Nov 9, 2007 1:07:21 PM org.apache.solr.core.SolrCore execute
INFO: /update  0 2

Am I misunderstanding something?

Thanks,
Charlie

Mime
View raw message