Package org.apache.solr.request

Examples of org.apache.solr.request.DefaultSolrParams


  public static void setDefaults(SolrQueryRequest req, SolrParams defaults,
                                 SolrParams appends, SolrParams invariants) {
   
      SolrParams p = req.getParams();
      if (defaults != null) {
        p = new DefaultSolrParams(p,defaults);
      }
      if (appends != null) {
        p = new AppendedSolrParams(p,appends);
      }
      if (invariants != null) {
        p = new DefaultSolrParams(invariants,p);
      }
      req.setParams(p);
  }
View Full Code Here


  public static void setDefaults(SolrQueryRequest req, SolrParams defaults,
                                 SolrParams appends, SolrParams invariants) {
   
      SolrParams p = req.getParams();
      if (defaults != null) {
        p = new DefaultSolrParams(p,defaults);
      }
      if (appends != null) {
        p = new AppendedSolrParams(p,appends);
      }
      if (invariants != null) {
        p = new DefaultSolrParams(invariants,p);
      }
      req.setParams(p);
  }
View Full Code Here

    // these are not defined in params
    dmap.put( "dstr"               , "default"   );
    dmap.put( "dint"               , "123"       );
    // these are defined in params
    dmap.put( "int"                , "456"       );
    SolrParams defaults = new DefaultSolrParams( params, new MapSolrParams( dmap ) );
 
    // in params, not in default
    assertEquals( pstr                  , defaults.get( "str"      ) );
    // in default, not in params
    assertEquals( "default"             , defaults.get( "dstr"      ) );
    assertEquals( new Integer(123)      , defaults.getInt"dint"     ) );
    // in params, overriding defaults
    assertEquals( pint                  , defaults.getInt(   "int"      ) );
    // in neither params nor defaults
    assertNull( defaults.get( "asagdsaga" ) );
  }
View Full Code Here

TOP

Related Classes of org.apache.solr.request.DefaultSolrParams

Copyright © 2018 www.massapicom. 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.