Searched defs:slop (Results 1 - 23 of 23) sorted by relevance

/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/spans/
H A DSpanNearQuery.java34 /** Matches spans which are near one another. One can specify <i>slop</i>, the
39 protected int slop; field in class:SpanNearQuery
46 * clause, with up to <code>slop</code> total unmatched positions between
50 * @param slop The slop value
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
71 this.slop = slop;
[all...]
H A DNearSpansUnordered.java41 private int slop; // from query field in class:NearSpansUnordered
137 this.slop = query.getSlop();
316 && ((max.end() - min().start() - totalLength) <= slop);
/lucene-3.6.0/lucene/contrib/queries/src/test/org/apache/lucene/search/regex/
H A DTestRegexQuery.java72 private int spanRegexQueryNrHits(String regex1, String regex2, int slop, boolean ordered) throws Exception { argument
75 SpanNearQuery query = new SpanNearQuery( new SpanQuery[]{srq1, srq2}, slop, ordered);
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/queryParser/
H A DMultiFieldQueryParser.java100 protected Query getFieldQuery(String field, String queryText, int slop) throws ParseException { argument
114 applySlop(q,slop);
123 applySlop(q,slop);
127 private void applySlop(Query q, int slop) { argument
129 ((PhraseQuery) q).setSlop(slop);
131 ((MultiPhraseQuery) q).setSlop(slop);
H A DQueryParser.java296 * Sets the default slop for phrases. If zero, then exact phrase matches
304 * Gets the default slop for phrases.
750 protected Query getFieldQuery(String field, String queryText, int slop) argument
755 ((PhraseQuery) query).setSlop(slop);
758 ((MultiPhraseQuery) query).setSlop(slop);
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/spans/
H A DTestNearSpansOrdered.java76 int slop, boolean inOrder) {
82 slop,
75 makeQuery(String s1, String s2, String s3, int slop, boolean inOrder) argument
H A DTestSpans.java99 int slop,
102 SpanNearQuery snq = new SpanNearQuery( new SpanQuery[]{q1,q2,q3}, slop, ordered);
106 public void orderedSlopTest3(int slop, int[] expectedDocs) throws IOException { argument
111 slop,
115 public void orderedSlopTest3Equal(int slop, int[] expectedDocs) throws IOException { argument
120 slop,
124 public void orderedSlopTest1Equal(int slop, int[] expectedDocs) throws IOException { argument
129 slop,
191 int slop = 1;
197 slop,
95 orderedSlopTest3SQ( SpanQuery q1, SpanQuery q2, SpanQuery q3, int slop, int[] expectedDocs) argument
452 createSpan(int slop, boolean ordered, SpanQuery[] clauses) argument
457 createSpan(int slop, boolean ordered, String term1, String term2) argument
[all...]
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/search/spans/
H A DTestNearSpansOrdered.java76 int slop, boolean inOrder) {
82 slop,
75 makeQuery(String s1, String s2, String s3, int slop, boolean inOrder) argument
H A DTestSpans.java98 int slop,
101 SpanNearQuery snq = new SpanNearQuery( new SpanQuery[]{q1,q2,q3}, slop, ordered);
105 public void orderedSlopTest3(int slop, int[] expectedDocs) throws IOException { argument
110 slop,
114 public void orderedSlopTest3Equal(int slop, int[] expectedDocs) throws IOException { argument
119 slop,
123 public void orderedSlopTest1Equal(int slop, int[] expectedDocs) throws IOException { argument
128 slop,
190 int slop = 1;
196 slop,
94 orderedSlopTest3SQ( SpanQuery q1, SpanQuery q2, SpanQuery q3, int slop, int[] expectedDocs) argument
451 createSpan(int slop, boolean ordered, SpanQuery[] clauses) argument
456 createSpan(int slop, boolean ordered, String term1, String term2) argument
[all...]
/lucene-3.6.0/solr/core/src/java/org/apache/solr/highlight/
H A DRegexFragmenter.java40 * <li><code>hl.regex.slop</code>: how far the fragmenter can stray from the ideal fragment size.
41 A slop of 0.2 means that the fragmenter can go over or under by 20%.</li>
73 float slop = params.getFieldFloat( fieldName, HighlightParams.SLOP, LuceneRegexFragmenter.DEFAULT_SLOP );
83 return new LuceneRegexFragmenter( fragsize, increment, slop, maxchars, p );
137 protected float slop; field in class:LuceneRegexFragmenter
177 float slop,
179 this(targetFragChars, incrementGapThreshold, slop, maxAnalyzedChars,
186 float slop,
191 this.slop = slop;
175 LuceneRegexFragmenter(int targetFragChars, int incrementGapThreshold, float slop, int maxAnalyzedChars ) argument
184 LuceneRegexFragmenter(int targetFragChars, int incrementGapThreshold, float slop, int maxAnalyzedChars, Pattern targetPattern) argument
[all...]
/lucene-3.6.0/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/
H A DFieldQuery.java185 private void checkOverlap( Collection<Query> expandQueries, Term[] src, Term[] dest, int slop, float boost ){ argument
204 pq.setSlop( slop );
344 int slop; // valid if terminal == true and phraseHighlight == true field in class:FieldQuery.QueryPhraseMap
395 private void markTerminal( int slop, float boost ){ argument
397 this.slop = slop;
407 return slop;
435 // compare position-gaps between terms to slop
439 if( Math.abs( nextPos - pos - 1 ) > slop ) return false;
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/complexPhrase/
H A DComplexPhraseQueryParser.java76 protected Query getFieldQuery(String field, String queryText, int slop) { argument
77 ComplexPhraseQuery cpq = new ComplexPhraseQuery(field, queryText, slop);
303 // need to increase slop factor based on gaps introduced by
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/
H A DMultiPhraseQuery.java46 private int slop = 0; field in class:MultiPhraseQuery
48 /** Sets the phrase slop for this query.
51 public void setSlop(int s) { slop = s; }
53 /** Sets the phrase slop for this query.
56 public int getSlop() { return slop; }
204 if (slop == 0) {
208 if (slop == 0) {
218 slop, reader.norms(field));
357 if (slop != 0) {
359 buffer.append(slop);
[all...]
H A DPhraseQuery.java42 private int slop = 0; field in class:PhraseQuery
51 <p>The slop is in fact an edit-distance, where the units correspond to
54 atop one another), so to permit re-orderings of phrases, the slop must be
60 <p>The slop is zero by default, requiring exact matches.*/
61 public void setSlop(int s) { slop = s; }
62 /** Returns the slop. See setSlop(). */
63 public int getSlop() { return slop; }
246 if (slop == 0) {
250 if (slop == 0) { // optimize exact case
260 new SloppyPhraseScorer(this, postingsFreqs, similarity, slop,
[all...]
H A DSloppyPhraseScorer.java33 private final int slop; field in class:SloppyPhraseScorer
46 int slop, byte[] norms) throws IOException {
48 this.slop = slop;
54 * Score a candidate doc for all slop-valid position-combinations (matches)
85 if (matchLength <= slop) {
99 if (matchLength <= slop) {
45 SloppyPhraseScorer(Weight weight, PhraseQuery.PostingsAndFreq[] postings, Similarity similarity, int slop, byte[] norms) argument
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/payloads/
H A DPayloadNearQuery.java57 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);
81 PayloadNearQuery boostingNearQuery = new PayloadNearQuery(newClauses, slop,
100 buffer.append(slop);
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/
H A DTestExplanations.java187 public SpanNearQuery snear(String s, String e, int slop, boolean inOrder) { argument
188 return snear(st(s), st(e), slop, inOrder);
192 int slop, boolean inOrder) {
193 return new SpanNearQuery(new SpanQuery[] { s, e }, slop, inOrder);
199 int slop, boolean inOrder) {
200 return snear(st(s), st(m), st(e), slop, inOrder);
204 int slop, boolean inOrder) {
205 return new SpanNearQuery(new SpanQuery[] { s, m, e }, slop, inOrder);
191 snear(SpanQuery s, SpanQuery e, int slop, boolean inOrder) argument
198 snear(String s, String m, String e, int slop, boolean inOrder) argument
203 snear(SpanQuery s, SpanQuery m, SpanQuery e, int slop, boolean inOrder) argument
H A DTestSloppyPhraseQuery.java58 * QUERY_4 has a fuzzy (len=1) match to DOC_4, so all slop values > 0 should succeed.
62 for (int slop=0; slop<30; slop++) {
63 int numResultsExpected = slop<1 ? 0 : 1;
64 checkPhraseQuery(DOC_4, QUERY_4, slop, numResultsExpected);
70 * QUERY_1 has an exact match to DOC_1, so all slop values should succeed.
71 * Before LUCENE-1310, a slop value of 1 did not succeed.
74 for (int slop=0; slop<3
137 checkPhraseQuery(Document doc, PhraseQuery query, int slop, int expectedNumResults) argument
[all...]
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/search/
H A DTestExplanations.java187 public SpanNearQuery snear(String s, String e, int slop, boolean inOrder) { argument
188 return snear(st(s), st(e), slop, inOrder);
192 int slop, boolean inOrder) {
193 return new SpanNearQuery(new SpanQuery[] { s, e }, slop, inOrder);
199 int slop, boolean inOrder) {
200 return snear(st(s), st(m), st(e), slop, inOrder);
204 int slop, boolean inOrder) {
205 return new SpanNearQuery(new SpanQuery[] { s, m, e }, slop, inOrder);
191 snear(SpanQuery s, SpanQuery e, int slop, boolean inOrder) argument
198 snear(String s, String m, String e, int slop, boolean inOrder) argument
203 snear(SpanQuery s, SpanQuery m, SpanQuery e, int slop, boolean inOrder) argument
H A DTestSloppyPhraseQuery.java58 * QUERY_4 has a fuzzy (len=1) match to DOC_4, so all slop values > 0 should succeed.
62 for (int slop=0; slop<30; slop++) {
63 int numResultsExpected = slop<1 ? 0 : 1;
64 checkPhraseQuery(DOC_4, QUERY_4, slop, numResultsExpected);
70 * QUERY_1 has an exact match to DOC_1, so all slop values should succeed.
71 * Before LUCENE-1310, a slop value of 1 did not succeed.
74 for (int slop=0; slop<3
137 checkPhraseQuery(Document doc, PhraseQuery query, int slop, int expectedNumResults) argument
[all...]
/lucene-3.6.0/lucene/contrib/highlighter/src/test/org/apache/lucene/search/vectorhighlight/
H A DAbstractTestCase.java134 protected Query pqF( float boost, int slop, String... texts ){ argument
135 return pq( boost, slop, F, texts );
146 protected Query pq( float boost, int slop, String field, String... texts ){ argument
152 query.setSlop( slop );
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/
H A DQueryParserWrapper.java436 protected Query getFieldQuery(String field, String queryText, int slop) argument
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/
H A DExtendedDismaxQParserPlugin.java183 up.setPhraseSlop(qslop); // slop for explicit user phrase queries
442 * @param slop slop value for the constructed phrases
449 final int slop)
476 pp.setPhraseSlop(slop);
953 int slop; field in class:ExtendedDismaxQParser.ExtendedSolrQueryParser
960 this.slop = getPhraseSlop(); // unspecified
965 protected Query getFieldQuery(String field, String val, int slop) throws ParseException { argument
969 this.slop = slop;
444 addShingledPhraseQueries(final BooleanQuery mainQuery, final List<Clause> clauses, final Map<String,Float> fields, int shingleSize, final float tiebreaker, final int slop) argument
[all...]

Completed in 51 milliseconds