Searched defs:query (Results 1 - 25 of 185) sorted by relevance

12345678

/lucene-3.6.0/lucene/contrib/demo/src/test/org/apache/lucene/demo/
H A DTestDemo.java29 private void testOneSearch(File indexPath, String query, int expectedHitCount) throws Exception { argument
35 SearchFiles.main(new String[] {"-query", query, "-index", indexPath.getPath()});
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/parser/
H A DSyntaxParser.java28 * @param query
29 * - query data to be parsed
34 public QueryNode parse(CharSequence query, CharSequence field) argument
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/ext/
H A DParserExtension.java28 * query parser requires changes to the JavaCC source file. To enable extending
29 * the standard query parser without changing the JavaCC sources and re-generate
45 * @param query
46 * the extension query
47 * @return a new query instance
49 * if the query can not be parsed.
51 public abstract Query parse(final ExtensionQuery query) throws ParseException; argument
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/surround/query/
H A DDistanceSubQuery.java1 package org.apache.lucene.queryParser.surround.query;
H A DTooManyBasicQueries.java1 package org.apache.lucene.queryParser.surround.query;
H A DAndQuery.java1 package org.apache.lucene.queryParser.surround.query;
H A DBasicQueryFactory.java1 package org.apache.lucene.queryParser.surround.query;
H A DNotQuery.java1 package org.apache.lucene.queryParser.surround.query;
H A DOrQuery.java1 package org.apache.lucene.queryParser.surround.query;
H A DSrndBooleanQuery.java1 package org.apache.lucene.queryParser.surround.query;
H A DSrndTermQuery.java1 package org.apache.lucene.queryParser.surround.query;
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/
H A DScoringRewrite.java31 * query. Note that typically such scores are
63 * query's boost.
72 public Query rewrite(IndexReader reader, MultiTermQuery query) throws IOException {
73 final BooleanQuery bq = SCORING_BOOLEAN_QUERY_REWRITE.rewrite(reader, query);
74 // TODO: if empty boolean query return NullQuery?
79 result.setBoost(query.getBoost());
90 public Q rewrite(final IndexReader reader, final MultiTermQuery query) throws IOException { argument
93 collectTerms(reader, query, new TermCollector() {
95 addClause(result, t, query.getBoost() * boost);
100 query
[all...]
H A DMultiTermQueryWrapperFilter.java44 protected final Q query; field in class:MultiTermQueryWrapperFilter
49 protected MultiTermQueryWrapperFilter(Q query) { argument
50 this.query = query;
55 // query.toString should be ok for the filter, too, if the query boost is 1.0f
56 return query.toString();
65 return this.query.equals( ((MultiTermQueryWrapperFilter)o).query );
72 return query
[all...]
H A DQueryWrapperFilter.java27 * query.
36 private Query query; field in class:QueryWrapperFilter
39 * <code>query</code>.
41 public QueryWrapperFilter(Query query) { argument
42 this.query = query;
47 final Weight weight = new IndexSearcher(reader).createNormalizedWeight(query);
60 return "QueryWrapperFilter(" + query + ")";
67 return this.query.equals(((QueryWrapperFilter)o).query);
[all...]
/lucene-3.6.0/lucene/contrib/demo/src/java/org/apache/lucene/demo/
H A DSearchFiles.java47 "Usage:\tjava org.apache.lucene.demo.SearchFiles [-index dir] [-field f] [-repeat n] [-queries file] [-query string] [-raw] [-paging hitsPerPage]\n\nSee http://lucene.apache.org/java/4_0/demo.html for details.";
71 } else if ("-query".equals(args[i])) {
102 System.out.println("Enter query: ");
116 Query query = parser.parse(line);
117 System.out.println("Searching for: " + query.toString(field));
122 searcher.search(query, null, 100);
128 doPagingSearch(in, searcher, query, hitsPerPage, raw, queries == null && queryString == null);
143 * When the query is executed for the first time, then only enough results are collected
144 * to fill 5 result pages. If the user wants to page beyond this limit, then the query
148 public static void doPagingSearch(BufferedReader in, IndexSearcher searcher, Query query, argument
[all...]
/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/facet/search/
H A DDrillDown.java32 * Creation of drill down term or query.
56 * Return a query for drilling down into all given categories (AND).
58 * @see #query(FacetSearchParams, Query, CategoryPath...)
60 public static final Query query(FacetIndexingParams iParams, CategoryPath... paths) { method in class:DrillDown
62 throw new IllegalArgumentException("Empty category path not allowed for drill down query!");
75 * Return a query for drilling down into all given categories (AND).
77 * @see #query(FacetSearchParams, Query, CategoryPath...)
79 public static final Query query(FacetSearchParams sParams, CategoryPath... paths) { method in class:DrillDown
80 return query(sParams.getFacetIndexingParams(), paths);
84 * Turn a base query int
87 public static final Query query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths) { method in class:DrillDown
98 public static final Query query(FacetSearchParams sParams, Query baseQuery, CategoryPath... paths) { method in class:DrillDown
106 public static final Query query(Query baseQuery, CategoryPath... paths) { method in class:DrillDown
[all...]
/lucene-3.6.0/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/
H A DQueryTermExtractor.java32 * Utility class used to extract the terms used in a query, plus any weights.
34 * so the caller must pass a rewritten query (see Query.rewrite) to obtain a list of
44 * @param query Query to extract term texts from
45 * @return an array of the terms used in a query, plus their weights.
47 public static final WeightedTerm[] getTerms(Query query) argument
49 return getTerms(query,false);
55 * @param query Query to extract term texts from
59 * @return an array of the terms used in a query, plus their weights.
61 public static final WeightedTerm[] getIdfWeightedTerms(Query query, IndexReader reader, String fieldName) argument
63 WeightedTerm[] terms=getTerms(query,fals
94 getTerms(Query query, boolean prohibited, String fieldName) argument
112 getTerms(Query query, boolean prohibited) argument
118 getTerms(Query query, HashSet<WeightedTerm> terms,boolean prohibited, String fieldName) argument
158 getTermsFromBooleanQuery(BooleanQuery query, HashSet<WeightedTerm> terms, boolean prohibited, String fieldName) argument
167 getTermsFromFilteredQuery(FilteredQuery query, HashSet<WeightedTerm> terms, boolean prohibited, String fieldName) argument
[all...]
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/
H A DGroupQueryNode.java30 * real parenthesis on the query string. This class is useful for queries like:
40 * This QueryNode is used to identify parenthesis on the original query string
42 public GroupQueryNode(QueryNode query) { argument
43 if (query == null) {
45 QueryParserMessages.PARAMETER_VALUE_NOT_SUPPORTED, "query", "null"));
50 add(query);
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/
H A DMultiFieldQueryParserWrapper.java30 * query parser interface instead of the old one. <br/>
32 * This class should be used when the new query parser features are needed and
33 * also keep at the same time the old query parser interface. <br/>
36 * used along the transition from the old query parser to the new
47 * It will, when parse(String query) is called, construct a query like this
48 * (assuming the query consists of two terms and you specify the two fields
73 * In other words, all the query's terms must appear, but it doesn't matter in
90 * It will, when parse(String query) is called, construct a query lik
198 parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) argument
[all...]
H A DQueryParserUtil.java27 * This class defines utility methods to (help) parse query strings into
33 * Parses a query which searches on the fields specified.
74 * Parses a query, searching on the fields specified. Use this if you need to
85 * MultiFieldQueryParser.parse(&quot;query&quot;, fields, flags, analyzer);
89 * The code above would construct a query:
93 * (filename:query) +(contents:query) -(description:query)
97 * @param query
109 public static Query parse(String query, Strin argument
[all...]
/lucene-3.6.0/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/surround/query/
H A DExceptionQueryTst.java1 package org.apache.lucene.queryParser.surround.query;
43 System.out.println("Parse exception for query:\n"
H A DSingleFieldTestDb.java1 package org.apache.lucene.queryParser.surround.query;
H A DTest01Exceptions.java1 package org.apache.lucene.queryParser.surround.query;
/lucene-3.6.0/lucene/contrib/remote/src/test/org/apache/lucene/search/
H A DTestRemoteCachingWrapperFilter.java68 private static void search(Query query, Filter filter, int hitNumber, String typeValue) throws Exception { argument
71 ScoreDoc[] result = searcher.search(query,filter, 1000).scoreDocs;
H A DTestRemoteSearchable.java60 private static void search(Query query) throws Exception { argument
64 ScoreDoc[] result = searcher.search(query, null, 1000).scoreDocs;
90 BooleanQuery query = new BooleanQuery();
91 query.add(new TermQuery(new Term("test", "test")), BooleanClause.Occur.MUST);
92 search(query);
97 PhraseQuery query = new PhraseQuery();
98 query.add(new Term("test", "test"));
99 query.add(new Term("test", "text"));
100 search(query);

Completed in 38 milliseconds

12345678