Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.search;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.lucene.search.Query;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.StrUtils;
import org.apache.solr.request.SolrQueryRequest;
/**
* Note: This API is experimental and may change in non backward-compatible ways in the future
*
*
*/
public abstract class QParser {
/** @lucene.experimental */
public static final int FLAG_FILTER = 0x01;
protected String qstr;
protected SolrParams params;
protected SolrParams localParams;
protected SolrQueryRequest req;
protected int recurseCount;
/** @lucene.experimental */
protected int flags;
protected Query query;
protected String stringIncludingLocalParams; // the original query string including any local params
protected boolean valFollowedParams; // true if the value "qstr" followed the localParams
protected int localParamsEnd; // the position one past where the localParams ended
/**
* Constructor for the QParser
* @param qstr The part of the query string specific to this parser
* @param localParams The set of parameters that are specific to this QParser. See http://wiki.apache.org/solr/LocalParams
* @param params The rest of the {@link org.apache.solr.common.params.SolrParams}
* @param req The original {@link org.apache.solr.request.SolrQueryRequest}.
*/
public QParser(String qstr, SolrParams localParams, SolrParams params, SolrQueryRequest req) {
this.qstr = qstr;
this.localParams = localParams;
// insert tags into tagmap.
// WARNING: the internal representation of tagged objects in the request context is
// experimental and subject to change!
if (localParams != null) {
String tagStr = localParams.get(CommonParams.TAG);
if (tagStr != null) {
Map