Examples of MapSolrParams


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

  @Test
  public void testSimple() {
    try {
      SolrNLSQParserPlugin solrNLSQParserPlugin = new SolrNLSQParserPlugin();
      LocalSolrQueryRequest request = testHarness.getRequestFactory("standard", 0, 10).makeRequest("q", "\"people working at Google Amsterdam office\"", "debugQuery", "true");
      QParser nlsQParser = solrNLSQParserPlugin.createParser("people working at Google Amsterdam office", new
              MapSolrParams(new HashMap<String, String>()), new MapSolrParams(new HashMap<String, String>()),
              request);
      Query q = nlsQParser.parse();
      assertNotNull(q);
      System.out.println(q.toString());
    } catch (Exception e) {
View Full Code Here

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

  @Override
  protected void init(IndexSchema schema, Map<String, String> args) {
    this.schema = schema;
    //it's not a first class citizen for the IndexSchema
    SolrParams p = new MapSolrParams(args);
    String subFT = p.get(SUB_FIELD_TYPE);
    String subSuffix = p.get(SUB_FIELD_SUFFIX);
    if (subFT != null) {
      args.remove(SUB_FIELD_TYPE);
      subType = schema.getFieldTypeByName(subFT.trim());
      suffix = POLY_FIELD_SEPARATOR + subType.typeName;
    } else if (subSuffix != null) {
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

   * @since Solr 1.4
   */
  public static boolean handleRollback( UpdateRequestProcessor processor, SolrParams params, boolean force ) throws IOException
  {
    if( params == null ) {
      params = new MapSolrParams( new HashMap<String, String>() );
    }
   
    boolean rollback = params.getBool( UpdateParams.ROLLBACK, false );
   
    if( rollback || force ) {
View Full Code Here

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

*/
public class PointType extends CoordinateFieldType implements SpatialQueryable {

  @Override
  protected void init(IndexSchema schema, Map<String, String> args) {
    SolrParams p = new MapSolrParams(args);
    dimension = p.getInt(DIMENSION, DEFAULT_DIMENSION);
    if (dimension < 1) {
      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
              "The dimension must be > 0: " + dimension);
    }
    args.remove(DIMENSION);
View Full Code Here

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

        // use the remainder of the string as the value
        valFollowedParams = true;
        val = qstr.substring(localParamsEnd);
        localMap.put(QueryParsing.V, val);
      }
      localParams = new MapSolrParams(localMap);
    }


    String type;
   
View Full Code Here

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

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

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

  }

  public String request(SolrRequestHandler handler, SolrParams params, String body ) throws Exception {

    if (params == null)
      params = new MapSolrParams( new HashMap<String, String>() );

    // Make a stream for the 'body' content
    List<ContentStream> streams = new ArrayList<ContentStream>( 1 );
    if( body != null && body.length() > 0 ) {
      streams.add( new ContentStreamBase.StringStream( body ) );
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.