1 /* ====================================================================
2 * Licensed under the Apache License, Version 2.0 (the "License");
3 * you may not use this file except in compliance with the License.
4 * You may obtain a copy of the License at
6 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 * ====================================================================
16 package org.apache.pylucene.queryParser;
18 import java.util.List;
20 import org.apache.lucene.analysis.Analyzer;
21 import org.apache.lucene.search.Query;
22 import org.apache.lucene.queryParser.MultiFieldQueryParser;
23 import org.apache.lucene.queryParser.ParseException;
24 import org.apache.lucene.util.Version;
27 public class PythonMultiFieldQueryParser extends MultiFieldQueryParser {
29 private long pythonObject;
31 public PythonMultiFieldQueryParser(Version version, String[] fields,
34 super(version, fields, analyzer);
37 public void pythonExtension(long pythonObject)
39 this.pythonObject = pythonObject;
41 public long pythonExtension()
43 return this.pythonObject;
46 public void finalize()
52 public native void pythonDecRef();
53 public native Query getBooleanQuery(List clauses, boolean disableCoord);
55 public native Query getFuzzyQuery(String field, String termText,
57 public native Query getPrefixQuery(String field, String termText);
58 public native Query getRangeQuery(String field,
59 String part1, String part2,
61 public native Query getWildcardQuery(String field, String termText);
63 public native Query getFieldQuery_quoted(String field, String queryText,
65 public native Query getFieldQuery_slop(String field, String queryText,
68 public Query getFieldQuery_quoted_super(String field, String queryText,
72 return super.getFieldQuery(field, queryText, quoted);
75 public Query getFieldQuery_slop_super(String field, String queryText,
79 return super.getFieldQuery(field, queryText, slop);
82 public Query getFieldQuery(String field, String queryText, boolean quoted)
84 return getFieldQuery_quoted(field, queryText, quoted);
87 public Query getFieldQuery(String field, String queryText, int slop)
89 return getFieldQuery_slop(field, queryText, slop);