Examples of MapSolrParams


Examples of org.apache.solr.common.params.MapSolrParams

      path = pathAndParams.substring( 0, idx );
      params = SolrRequestParsers.parseQueryString( pathAndParams.substring(idx+1) );
    }
    else {
      path= pathAndParams;
      params = new MapSolrParams( new HashMap<String, String>() );
    }
   
    // Extract the handler from the path or params
    SolrRequestHandler handler = core.getRequestHandler( path );
    if( handler == null ) {
View Full Code Here

Examples of org.apache.solr.common.params.MapSolrParams

    assertEquals(p.getInt("i").intValue(), 555);
    assertEquals(p.getInt("i",5), 555);
    assertEquals(p.getInt("iii",5), 5);
    assertEquals(p.getFieldParam("field1","i"), "555");

    req.setParams(new DefaultSolrParams(p, new MapSolrParams(m)));
    p = req.getParams();
    assertEquals(req.getOriginalParams().get("s"), "bbb");
    assertEquals(p.get("i"), "555");
    assertEquals(p.getInt("i").intValue(), 555);
    assertEquals(p.getInt("i",5), 555);
View Full Code Here

Examples of org.apache.solr.common.params.MapSolrParams

    assertU(commit());
   
    Map<String,String> args = new HashMap<String, String>();
    args.put( CommonParams.Q, "title:test" );
    args.put( "indent", "true" );
    SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) );
   
   
    assertQ("Make sure they got in", req
            ,"//*[@numFound='3']"
            );
View Full Code Here

Examples of org.apache.solr.common.params.MapSolrParams

      val = val==null ? "" : val;
    } else {
      val = txt.substring(start);
    }
    localParams.put(V,val);
    return new MapSolrParams(localParams);
  }
View Full Code Here

Examples of org.apache.solr.common.params.MapSolrParams

  int compressThreshold;

  private static String CT = "compressThreshold";

  protected void init(IndexSchema schema, Map<String,String> args) {
    SolrParams p = new MapSolrParams(args);
    compressThreshold = p.getInt(CT, DEFAULT_COMPRESS_THRESHOLD);
    args.remove(CT);
    super.init(schema, args);   
  }
View Full Code Here

Examples of org.apache.solr.common.params.MapSolrParams

      SolrCore core = SolrCore.getSolrCore();

      // Old style requests do not choose a custom handler
      UpdateRequestProcessorChain processorFactory = core.getUpdateProcessingChain( null );
     
      SolrParams params = new MapSolrParams( new HashMap<String, String>() );
      SolrQueryRequestBase req = new SolrQueryRequestBase( core, params ) {};
      SolrQueryResponse rsp = new SolrQueryResponse(); // ignored
      XMLStreamReader parser = inputFactory.createXMLStreamReader(input);
      UpdateRequestProcessor processor = processorFactory.createProcessor(req, rsp);
      this.processUpdate( processor, parser );
View Full Code Here

Examples of org.apache.solr.common.params.MapSolrParams

  @Deprecated
  public static boolean handleCommit( SolrQueryRequest req, SolrQueryResponse rsp, boolean force ) throws IOException
  {
    SolrParams params = req.getParams();
    if( params == null ) {
      params = new MapSolrParams( new HashMap<String, String>() );
    }
   
    boolean optimize = params.getBool( UpdateParams.OPTIMIZE, false );
    boolean commit   = params.getBool( UpdateParams.COMMIT,   false );
   
View Full Code Here

Examples of org.apache.solr.common.params.MapSolrParams

   * If it does, it will check parameters for "waitFlush" and "waitSearcher"
   */
  public static boolean handleCommit( UpdateRequestProcessor processor, SolrParams params, boolean force ) throws IOException
  {
    if( params == null ) {
      params = new MapSolrParams( new HashMap<String, String>() );
    }
   
    boolean optimize = params.getBool( UpdateParams.OPTIMIZE, false );
    boolean commit   = params.getBool( UpdateParams.COMMIT,   false );
   
View Full Code Here

Examples of org.apache.solr.common.params.MapSolrParams

      SolrCore core = SolrCore.getSolrCore();

      // Old style requests do not choose a custom handler
      UpdateRequestProcessorChain processorFactory = core.getUpdateProcessingChain(null);

      SolrParams params = new MapSolrParams(new HashMap<String, String>());
      SolrQueryRequestBase req = new SolrQueryRequestBase(core, params) {
      };
      SolrQueryResponse rsp = new SolrQueryResponse(); // ignored
      XMLStreamReader parser = inputFactory.createXMLStreamReader(input);
      UpdateRequestProcessor processor = processorFactory.createProcessor(req, rsp);
View Full Code Here

Examples of org.apache.solr.common.params.MapSolrParams

      val = val==null ? "" : val;
    } else {
      val = txt.substring(start);
    }
    localParams.put(V,val);
    return new MapSolrParams(localParams);
  }
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.