Skip to content

Feature request: Add RegexPhraseQuery support #27

@CharlesNg35

Description

@CharlesNg35

Hi, thanks for the great work on this library!

I'd like to request bindings for two query types that aren't currently exposed:

RegexPhraseQuery — phrase search where each word can be a regex pattern, with slop support. Really useful for fuzzy phrase matching
(e.g. "apocal.* 10"~25 matching "apocalypse 10" or "apocalyptique 10"). Right now there's no way to combine phrase proximity with pattern
matching using the available APIs.

Rust docs: https://docs.rs/tantivy/latest/tantivy/query/struct.RegexPhraseQuery.html

PhrasePrefixQuery — phrase search where the last word is treated as a prefix. Great for autocomplete (e.g. "apocalypse di" matching
"apocalypse dix" or "apocalypse divine").

Rust docs: https://docs.rs/tantivy/latest/tantivy/query/struct.PhrasePrefixQuery.html

Would love to see these added when you get a chance. Thanks again!

@oxdev03

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions