Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ppodolsky committed Dec 24, 2024
1 parent 277ac47 commit a3222f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion summa-core/src/components/query_parser/summa_ql.pest
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ range = ${ "[" ~ WHITE_SPACE* ~ boundary_word ~ WHITE_SPACE+ ~ ^"to" ~ WHITE_SPA

field_name = @{ ASCII_ALPHA ~ (ASCII_ALPHANUMERIC | "_" | ".")* }
word = @{ wrapped_doi | ((LETTER | NUMBER) ~ (LETTER | NUMBER | "_" | "+" | "#" | "-" | "–" | "'")*) }
signed_word = ${ "-"? ~ word }

boundary_word = _{ star | ("-"? ~ word) }
boundary_word = _{ star | signed_word }
phrase_internals = { (!PEEK ~ ANY)* }
phrase = ${ PUSH(quote) ~ phrase_internals? ~ (POP | EOI) ~ ("~" ~ slop)? }
regex_internals = ${ (!PEEK ~ ANY)* }
Expand Down
2 changes: 1 addition & 1 deletion summa-core/src/components/query_parser/summa_ql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ impl QueryParser {
fn parse_boundary_word(&self, field: Field, boundary_word: Pair<Rule>) -> Result<Bound<Term>, QueryParserError> {
Ok(match boundary_word.as_rule() {
Rule::star => Unbounded,
Rule::word => Included(self.compute_boundary_term(field, boundary_word.as_str())?),
Rule::signed_word => Included(self.compute_boundary_term(field, boundary_word.as_str())?),
_ => unreachable!(),
})
}
Expand Down

0 comments on commit a3222f5

Please sign in to comment.