Package org.apache.solr.client.solrj.request

Examples of org.apache.solr.client.solrj.request.UpdateRequest.process()


    // Add to core1
    doc.setField("id", "BBB");
    doc.setField("core1", "yup stopfra stopfrb stopena stopenb");
    doc.removeField("core0");
    up.add(doc);
    up.process(getSolrCore1());

    // You can't add it to core1
    try {
      up.process(getSolrCore0());
      fail("Can't add core1 field to core0!");
View Full Code Here


    up.add(doc);
    up.process(getSolrCore1());

    // You can't add it to core1
    try {
      up.process(getSolrCore0());
      fail("Can't add core1 field to core0!");
    }
    catch (Exception ex) {
    }
View Full Code Here

  public void testMultiCore() throws Exception
  {
    UpdateRequest up = new UpdateRequest();
    up.setAction( ACTION.COMMIT, true, true );
    up.deleteByQuery( "*:*" );
    up.process( getSolrCore0() );
    up.process( getSolrCore1() );
    up.clear();
   
    // Add something to each core
    SolrInputDocument doc = new SolrInputDocument();
View Full Code Here

  {
    UpdateRequest up = new UpdateRequest();
    up.setAction( ACTION.COMMIT, true, true );
    up.deleteByQuery( "*:*" );
    up.process( getSolrCore0() );
    up.process( getSolrCore1() );
    up.clear();
   
    // Add something to each core
    SolrInputDocument doc = new SolrInputDocument();
    doc.setField( "id", "AAA" );
View Full Code Here

    doc.setField( "id", "AAA" );
    doc.setField( "core0", "yup" );
  
    // Add to core0
    up.add( doc );
    up.process( getSolrCore0() );

    // You can't add it to core1
    try {
      up.process( getSolrCore1() );
      fail( "Can't add core0 field to core1!" );
View Full Code Here

    up.add( doc );
    up.process( getSolrCore0() );

    // You can't add it to core1
    try {
      up.process( getSolrCore1() );
      fail( "Can't add core0 field to core1!" );
    }
    catch( Exception ex ) {}

    // Add to core1
View Full Code Here

    // Add to core1
    doc.setField( "id", "BBB" );
    doc.setField( "core1", "yup" );
    doc.removeField( "core0" );
    up.add( doc );
    up.process( getSolrCore1() );

    // You can't add it to core1
    try {
      up.process( getSolrCore0() );
      fail( "Can't add core1 field to core0!" );
View Full Code Here

    up.add( doc );
    up.process( getSolrCore1() );

    // You can't add it to core1
    try {
      up.process( getSolrCore0() );
      fail( "Can't add core1 field to core0!" );
    }
    catch( Exception ex ) {}
   
    // now Make sure AAA is in 0 and BBB in 1
View Full Code Here

  private DocumentObjectBinder binder;

  public UpdateResponse add(Collection<SolrInputDocument> docs ) throws SolrServerException, IOException {
    UpdateRequest req = new UpdateRequest();
    req.add(docs);
    return req.process(this);
  }

  public UpdateResponse addBeans(Collection<?> beans ) throws SolrServerException, IOException {
    DocumentObjectBinder binder = this.getBinder();
    ArrayList<SolrInputDocument> docs =  new ArrayList<SolrInputDocument>(beans.size());
View Full Code Here

  }

  public UpdateResponse add(SolrInputDocument doc ) throws SolrServerException, IOException {
    UpdateRequest req = new UpdateRequest();
    req.add(doc);
    return req.process(this);
  }

  public UpdateResponse addBean(Object obj) throws IOException, SolrServerException {
    return add(getBinder().toSolrInputDocument(obj));
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.