Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add advanced query language support. #9

Merged
merged 2 commits into from
Aug 31, 2024

Conversation

koculu
Copy link
Owner

@koculu koculu commented Aug 31, 2024

ZoneTree.FullTextSearch Query Language Documentation

Grammar Definition

<query>            ::= <expression>

<expression>       ::= <term> (("AND" | "OR" | "&" | "|") <term>)*

<term>             ::= ("NOT" | "-") <factor>
                    | <factor>
                    | <not_in_expression>
                    | <in_expression>

<factor>           ::= <keyword>
                    | <facet_expressions>
                    | <facet_in_expression>
                    | <facet_not_in_expression>
                    | "(" <expression> ")"

<facet_expressions> ::= <facet_expression> ( <facet_expression> )*

<facet_expression> ::= <single_keyword> ":" <single_keyword>

<keyword>          ::= <phrase> | <word> ( <word> )*

<keyword_list>     ::= "[" <keyword> ("," <keyword>)* "]"

<not_in_expression> ::= "NOT IN" <keyword_list>

<in_expression> ::= "IN" <keyword_list>

<facet_in_expression> ::= <keyword> "IN" <keyword_list>

<facet_not_in_expression> ::= <keyword> "NOT IN" <keyword_list>

<single_keyword>   ::= <word> | <phrase>

<word> ::= <word_char>+

<word_char> ::= [^\s:,()\[\]&|\\-]+
             | "\\" <any_char>

<phrase> ::= "\"" <word> ( <word> )* "\""
          |  "'" <word> ( <word> )* "'"

@koculu koculu linked an issue Aug 31, 2024 that may be closed by this pull request
@koculu koculu merged commit 2bfbaae into main Aug 31, 2024
1 check passed
@koculu koculu deleted the 8-feature-add-logical-and-or-not-search-query-support branch August 31, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add logical AND, OR, NOT search query support.
1 participant