Table of Contents

Method Phrase

Namespace
TantivyDotNet
Assembly
TantivyDotNet.dll

Phrase(string, string, int)

Matches documents where the words of text appear in order in field. The text is analyzed with the field's tokenizer.

public static PhraseQuery Phrase(string field, string text, int slop = 0)

Parameters

field string

A text field indexed with positions (all text fields created by SchemaBuilder are).

text string

The phrase. A single word becomes a term query; text with no words matches nothing.

slop int

How many positions words may be moved in total and still match. 0 means the exact phrase; "a b" with slop 1 matches "a x b", and swapping two words costs 2.

Returns

PhraseQuery