Examples of LukeResponse


Examples of org.apache.solr.client.solrj.response.LukeResponse

  /**
   * Return the number of documents currently indexed.
   */
  public int getNumberOfDocuments() throws SolrServerException, IOException {
    final SolrRequest request = new FastLukeRequest();
    final LukeResponse response = (LukeResponse) request.process(this.getServer());
    return response.getNumDocs();
  }
View Full Code Here

Examples of org.apache.solr.client.solrj.response.LukeResponse

  private Map<String, FieldInfo> getFieldInfos() throws SolrServerException,
  IOException {
    if (fieldInfos == null) {
      final LukeRequest request = new FastLukeRequest();
      request.setShowSchema(true);
      final LukeResponse response = request.process(this.getServer());
      fieldInfos = response.getFieldInfo();
    }
    return fieldInfos;
  }
View Full Code Here

Examples of org.apache.solr.client.solrj.response.LukeResponse

    server.commit();
    assertNumFound( "*:*", doc.length ); // make sure it got in
   
    LukeRequest luke = new LukeRequest();
    luke.setShowSchema( false );
    LukeResponse rsp = luke.process( server );
    assertNull( rsp.getFieldTypeInfo() ); // if you don't ask for it, the schema is null
   
    luke.setShowSchema( true );
    rsp = luke.process( server );
    assertNotNull( rsp.getFieldTypeInfo() );
  }
View Full Code Here

Examples of org.apache.solr.client.solrj.response.LukeResponse

    server.commit();
    assertNumFound( "*:*", doc.length ); // make sure it got in
   
    LukeRequest luke = new LukeRequest();
    luke.setShowSchema( false );
    LukeResponse rsp = luke.process( server );
    assertNull( rsp.getFieldTypeInfo() ); // if you don't ask for it, the schema is null
   
    luke.setShowSchema( true );
    rsp = luke.process( server );
    assertNotNull( rsp.getFieldTypeInfo() );
  }
View Full Code Here

Examples of org.apache.solr.client.solrj.response.LukeResponse

    server.commit();
    assertNumFound( "*:*", doc.length ); // make sure it got in
   
    LukeRequest luke = new LukeRequest();
    luke.setShowSchema( false );
    LukeResponse rsp = luke.process( server );
    assertNull( rsp.getFieldTypeInfo() ); // if you don't ask for it, the schema is null
   
    luke.setShowSchema( true );
    rsp = luke.process( server );
    assertNotNull( rsp.getFieldTypeInfo() );
  }
View Full Code Here

Examples of org.apache.solr.client.solrj.response.LukeResponse

  @Override
  public LukeResponse process( SolrServer server ) throws SolrServerException, IOException
  {
    long startTime = System.currentTimeMillis();
    LukeResponse res = new LukeResponse();
    res.setResponse( server.request( this ) );
    res.setElapsedTime( System.currentTimeMillis()-startTime );
    return res;
  }
View Full Code Here

Examples of org.apache.solr.client.solrj.response.LukeResponse

    server.commit();
    assertNumFound( "*:*", doc.length ); // make sure it got in
   
    LukeRequest luke = new LukeRequest();
    luke.setShowSchema( false );
    LukeResponse rsp = luke.process( server );
    assertNull( rsp.getFieldTypeInfo() ); // if you don't ask for it, the schema is null
   
    luke.setShowSchema( true );
    rsp = luke.process( server );
    assertNotNull( rsp.getFieldTypeInfo() );
  }
View Full Code Here

Examples of org.apache.solr.client.solrj.response.LukeResponse

        if (solrAttributes.isEmpty()) {
            solrAttributes = new ArrayList<SolrAttribute>();
            try {
                LukeRequest lq = new LukeRequest();
                lq.setShowSchema(true);
                LukeResponse processSchema = lq.process(solrServer);

                lq = new LukeRequest();
                lq.setShowSchema(false);
                LukeResponse processField = lq.process(solrServer);
                Map<String, FieldInfo> fis = processField.getFieldInfo();
                SortedSet<String> keys = new TreeSet<String>(fis.keySet());
                for (String k : keys) {
                    FieldInfo fieldInfo = fis.get(k);
                    String name = fieldInfo.getName();
                    String type = fieldInfo.getType();
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.