mirror of https://github.com/apache/lucene.git
SOLR-3649: fix bug in JavabinLoader that caused deleteById(List<String> ids) to not work in SolrJ
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1372346 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d72080551a
commit
1d27c0364b
|
@ -51,6 +51,9 @@ Bug Fixes
|
|||
* SOLR-3725: Fixed package-local-src-tgz target to not bring in unnecessary jars
|
||||
and binary contents. (Michael Dodsworth via rmuir)
|
||||
|
||||
* SOLR-3649: Fixed bug in JavabinLoader that caused deleteById(List<String> ids)
|
||||
to not work in SolrJ (siren)
|
||||
|
||||
================== 4.0.0-BETA ===================
|
||||
|
||||
|
||||
|
|
|
@ -122,8 +122,8 @@ public class JavabinLoader extends ContentStreamLoader {
|
|||
for (String s : update.getDeleteById()) {
|
||||
delcmd.id = s;
|
||||
processor.processDelete(delcmd);
|
||||
delcmd.clear();
|
||||
}
|
||||
delcmd.id = null;
|
||||
}
|
||||
|
||||
if(update.getDeleteQuery() != null) {
|
||||
|
|
|
@ -711,16 +711,11 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
|
|||
assertNumFound( "*:*", 3 ); // make sure it got in
|
||||
|
||||
// should be able to handle multiple delete commands in a single go
|
||||
StringWriter xml = new StringWriter();
|
||||
xml.append( "<delete>" );
|
||||
List<String> ids = new ArrayList<String>();
|
||||
for( SolrInputDocument d : doc ) {
|
||||
xml.append( "<id>" );
|
||||
XML.escapeCharData( (String)d.getField( "id" ).getFirstValue(), xml );
|
||||
xml.append( "</id>" );
|
||||
ids.add(d.getFieldValue("id").toString());
|
||||
}
|
||||
xml.append( "</delete>" );
|
||||
DirectXmlRequest up = new DirectXmlRequest( "/update", xml.toString() );
|
||||
server.request( up );
|
||||
server.deleteById(ids);
|
||||
server.commit();
|
||||
assertNumFound( "*:*", 0 ); // make sure it got out
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue