/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/spans/ |
H A D | SpanNearQuery.java | 38 protected List<SpanQuery> clauses; field in class:SpanNearQuery 48 * must be * ordered as in <code>clauses</code>. 49 * @param clauses the clauses to find near each other 53 public SpanNearQuery(SpanQuery[] clauses, int slop, boolean inOrder) { argument 54 this(clauses, slop, inOrder, true); 57 public SpanNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, boolean collectPayloads) { argument 59 // copy clauses array into an ArrayList 60 this.clauses = new ArrayList<SpanQuery>(clauses [all...] |
H A D | SpanOrQuery.java | 34 /** Matches the union of its clauses.*/ 36 private List<SpanQuery> clauses; field in class:SpanOrQuery 39 /** Construct a SpanOrQuery merging the provided clauses. */ 40 public SpanOrQuery(SpanQuery... clauses) { argument 42 // copy clauses array into an ArrayList 43 this.clauses = new ArrayList<SpanQuery>(clauses.length); 44 for (int i = 0; i < clauses.length; i++) { 45 addClause(clauses[i]); 56 this.clauses [all...] |
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/ |
H A D | QueryUtils.java | 36 List<BooleanClause> clauses = bq.clauses(); 37 if (clauses.size()==0) return false; 38 for (BooleanClause clause : clauses) { 67 List<BooleanClause> clauses = bq.clauses(); 68 if (clauses.size()==0) return q; 71 for (BooleanClause clause : clauses) { 75 if (clauses.size()==1) { 77 Query negClause = clauses [all...] |
/lucene-3.6.0/lucene/contrib/queries/src/java/org/apache/lucene/search/ |
H A D | BooleanFilter.java | 40 private final List<FilterClause> clauses = new ArrayList<FilterClause>(); field in class:BooleanFilter 51 for (final FilterClause fc : clauses) { 65 for (final FilterClause fc : clauses) { 79 for (final FilterClause fc : clauses) { 108 clauses.add(filterClause); 116 * Returns the list of clauses 118 public List<FilterClause> clauses() { method in class:BooleanFilter 119 return clauses; 122 /** Returns an iterator on the clauses in this query. It implements the {@link Iterable} interface to 127 return clauses() [all...] |
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/ |
H A D | StandardBooleanQueryNode.java | 42 * @param clauses 44 public StandardBooleanQueryNode(List<QueryNode> clauses, boolean disableCoord) { argument 45 super(clauses);
|
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/ |
H A D | BooleanQuery.java | 37 * #getMaxClauseCount()} clauses. This typically happens if 47 /** Return the maximum number of clauses permitted, 1024 by default. 48 * Attempts to add more than the permitted number of clauses cause {@link 55 * Set the maximum number of clauses permitted per BooleanQuery. 64 private ArrayList<BooleanClause> clauses = new ArrayList<BooleanClause>(); field in class:BooleanQuery 96 * By default no optional clauses are necessary for a match 97 * (unless there are no required clauses). If this method is used, 98 * then the specified number of clauses is required. 102 * any specific clauses are required (or prohibited). This number will 103 * only be compared against the number of matching optional clauses 147 public List<BooleanClause> clauses() { return clauses; } method in class:BooleanQuery [all...] |
H A D | Query.java | 121 * queries and overlapping clauses of boolean OR queries (as generated 131 BooleanClause[] clauses = null; 132 // check if we can split the query into clauses 137 clauses = bq.getClauses(); 138 for (int j = 0; splittable && j < clauses.length; j++) { 139 splittable = (clauses[j].getOccur() == BooleanClause.Occur.SHOULD); 143 for (int j = 0; j < clauses.length; j++) { 144 uniques.add(clauses[j].getQuery()); 174 /** Expert: merges the clauses of a set of BooleanQuery's into a single
|
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ |
H A D | AndQueryNode.java | 33 * @param clauses 36 public AndQueryNode(List<QueryNode> clauses) { argument 37 super(clauses); 38 if ((clauses == null) || (clauses.size() == 0)) {
|
H A D | OrQueryNode.java | 35 * @param clauses 38 public OrQueryNode(List<QueryNode> clauses) { argument 39 super(clauses); 40 if ((clauses == null) || (clauses.size() == 0)) {
|
H A D | QueryNodeImpl.java | 47 private List<QueryNode> clauses = null; field in class:QueryNodeImpl 51 if (this.clauses == null) { 52 this.clauses = new ArrayList<QueryNode>(); 55 this.clauses.clear(); 62 if (isLeaf() || this.clauses == null || child == null) { 67 this.clauses.add(child); 74 if (isLeaf() || this.clauses == null) { 91 if (isLeaf() || this.clauses == null) { 125 if (this.clauses != null) { 127 for (QueryNode clause : this.clauses) { [all...] |
H A D | AnyQueryNode.java | 35 * @param clauses 38 public AnyQueryNode(List<QueryNode> clauses, CharSequence field, argument 40 super(clauses); 44 if (clauses != null) { 46 for (QueryNode clause : clauses) {
|
H A D | BooleanQueryNode.java | 34 * @param clauses 37 public BooleanQueryNode(List<QueryNode> clauses) { argument 40 set(clauses);
|
H A D | ProximityQueryNode.java | 77 * @param clauses 87 * clauses 89 public ProximityQueryNode(List<QueryNode> clauses, CharSequence field, argument 91 super(clauses); 107 clearFields(clauses, field); 111 * @param clauses 119 * clauses 121 public ProximityQueryNode(List<QueryNode> clauses, CharSequence field, argument 123 this(clauses, field, type, -1, inorder);
|
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/queryParser/ |
H A D | MultiFieldQueryParser.java | 102 List<BooleanClause> clauses = new ArrayList<BooleanClause>(); 115 clauses.add(new BooleanClause(q, BooleanClause.Occur.SHOULD)); 118 if (clauses.size() == 0) // happens for stopwords 120 return getBooleanQuery(clauses, true); 139 List<BooleanClause> clauses = new ArrayList<BooleanClause>(); 151 clauses.add(new BooleanClause(q, BooleanClause.Occur.SHOULD)); 154 if (clauses.size() == 0) // happens for stopwords 156 return getBooleanQuery(clauses, true); 167 List<BooleanClause> clauses = new ArrayList<BooleanClause>(); 169 clauses [all...] |
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/spans/ |
H A D | TestPayloadSpans.java | 89 SpanQuery[] clauses = new SpanQuery[2]; 90 clauses[0] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "one")); 91 clauses[1] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "hundred")); 92 match = new SpanNearQuery(clauses, 0, true); 96 match = new SpanNearQuery(clauses, 0, false); 103 SpanQuery[] clauses = new SpanQuery[2]; 104 clauses[0] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "one")); 105 clauses[1] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "three")); 106 SpanQuery spq = new SpanNearQuery(clauses, 5, true); 137 SpanQuery[] clauses [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/search/spans/ |
H A D | TestPayloadSpans.java | 89 SpanQuery[] clauses = new SpanQuery[2]; 90 clauses[0] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "one")); 91 clauses[1] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "hundred")); 92 match = new SpanNearQuery(clauses, 0, true); 96 match = new SpanNearQuery(clauses, 0, false); 103 SpanQuery[] clauses = new SpanQuery[2]; 104 clauses[0] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "one")); 105 clauses[1] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "three")); 106 SpanQuery spq = new SpanNearQuery(clauses, 5, true); 137 SpanQuery[] clauses [all...] |
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/ |
H A D | StandardSyntaxParser.jj | 208 Vector<QueryNode> clauses = null; 216 if (clauses == null) { 217 clauses = new Vector<QueryNode>(); 218 clauses.addElement(first); 220 clauses.addElement(c); 224 if (clauses != null) { 225 return new BooleanQueryNode(clauses); 234 Vector<QueryNode> clauses = null; 241 if (clauses == null) { 242 clauses [all...] |
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/payloads/ |
H A D | TestPayloadNearQuery.java | 104 SpanQuery clauses[] = new SpanQuery[words.length]; 105 for (int i=0;i<clauses.length;i++) { 106 clauses[i] = new SpanTermQuery(new Term(fieldName, words[i])); 108 return new PayloadNearQuery(clauses, 0, inOrder, function); 178 //SpanNearQuery(clauses, 10000, false) 181 SpanQuery[] clauses = new SpanQuery[2]; 182 clauses[0] = q1; 183 clauses[1] = q2; 184 query = new PayloadNearQuery(clauses, 10, false); 258 SpanQuery[] clauses [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/search/payloads/ |
H A D | TestPayloadNearQuery.java | 104 SpanQuery clauses[] = new SpanQuery[words.length]; 105 for (int i=0;i<clauses.length;i++) { 106 clauses[i] = new SpanTermQuery(new Term(fieldName, words[i])); 108 return new PayloadNearQuery(clauses, 0, inOrder, function); 178 //SpanNearQuery(clauses, 10000, false) 181 SpanQuery[] clauses = new SpanQuery[2]; 182 clauses[0] = q1; 183 clauses[1] = q2; 184 query = new PayloadNearQuery(clauses, 10, false); 258 SpanQuery[] clauses [all...] |
/lucene-3.6.0/lucene/contrib/queries/src/test/org/apache/lucene/search/similar/ |
H A D | TestMoreLikeThis.java | 91 List<BooleanClause> clauses = query.clauses(); 93 assertEquals("Expected " + originalValues.size() + " clauses.", 94 originalValues.size(), clauses.size()); 96 for (int i = 0; i < clauses.size(); i++) { 97 BooleanClause clause = clauses.get(i); 120 List<BooleanClause> clauses = query.clauses(); 122 for (int i = 0; i < clauses.size(); i++) { 123 BooleanClause clause = clauses [all...] |
/lucene-3.6.0/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/ |
H A D | SpanOrBuilder.java | 53 SpanQuery[] clauses= clausesList.toArray(new SpanQuery[clausesList.size()]); 54 SpanOrQuery soq = new SpanOrQuery(clauses);
|
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/payloads/ |
H A D | PayloadNearQuery.java | 57 public PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder) { argument 58 this(clauses, slop, inOrder, new AveragePayloadFunction()); 61 public PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, argument 63 super(clauses, slop, inOrder); 64 fieldName = clauses[0].getField(); // all clauses must have same field 75 int sz = clauses.size(); 79 newClauses[i] = (SpanQuery) clauses.get(i).clone(); 91 Iterator<SpanQuery> i = clauses.iterator();
|
/lucene-3.6.0/solr/core/src/test/org/apache/solr/util/ |
H A D | SolrPluginUtilsTest.java | 235 assertEquals(t+" wrong number of clauses", 4, 245 assertEquals(t+" wrong number of clauses", 1, 256 List<BooleanClause> clauses = bq.clauses(); 257 assertEquals(t+" wrong number of clauses", 2, 258 clauses.size()); 259 Query sub = clauses.get(0).getQuery(); 262 assertEquals(t+" first had wrong number of clauses", 4, 264 sub = clauses.get(1).getQuery(); 267 assertEquals(t+" second had wrong number of clauses", 405 calcMSM(int clauses, String spec) argument [all...] |
/lucene-3.6.0/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/ext/ |
H A D | TestExtendableQueryParser.java | 76 BooleanClause[] clauses = bquery.getClauses(); 77 assertEquals(2, clauses.length); 78 BooleanClause booleanClause = clauses[0]; 87 booleanClause = clauses[1];
|
/lucene-3.6.0/solr/core/src/test/org/apache/solr/search/ |
H A D | TestQueryUtils.java | 51 List<BooleanClause> clauses = (q instanceof BooleanQuery) ? ((BooleanQuery)q).clauses() : null; 52 if (clauses != null) { 53 if (clauses.size() != 0) { 259 // zero clauses.
|