Basic Usage

Identifies documents containing a phrase followed by a term prefix. The field must be indexed with a record of position.

SELECT * FROM search_idx.search(
	query => paradedb.phrase_prefix(
		field => 'description',
		phrases => ARRAY['har']
	)
);
field
required

Specifies the field within the document to search for the term.

phrases
required

An ARRAY of words that the search is looking to match, followed by a term prefix rather than a complete term.

max_expansion

Limits the number of term variations that the prefix can expand to during the search. This helps in controlling the breadth of the search by setting a cap on how many different terms the prefix can match.