Sets the number of other words permitted between words in query phrase. If zero, then this is an exact phrase search. For larger values this works like a
CopyC#
WITHIN
or
CopyC#
NEAR
operator.

The slop is in fact an edit-distance, where the units correspond to moves of terms in the query phrase out of position. For example, to switch the order of two words requires two moves (the first move places the words atop one another), so to permit re-orderings of phrases, the slop must be at least two.

More exact matches are scored higher than sloppier matches, thus search results are sorted by exactness.

The slop is zero by default, requiring exact matches.

Namespace: Lucene.Net.Search
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public virtual void SetSlop(
	int s
)
Visual Basic
Public Overridable Sub SetSlop ( _
	s As Integer _
)
Visual C++
public:
virtual void SetSlop(
	int s
)

Parameters

s
Type: System..::..Int32

[Missing <param name="s"/> documentation for "M:Lucene.Net.Search.PhraseQuery.SetSlop(System.Int32)"]

See Also