Skip to content

Treat bare slash as query string term#2374

Open
cyphercodes wants to merge 1 commit into
blevesearch:masterfrom
cyphercodes:fix-2362-bare-slash-query
Open

Treat bare slash as query string term#2374
cyphercodes wants to merge 1 commit into
blevesearch:masterfrom
cyphercodes:fix-2362-bare-slash-query

Conversation

@cyphercodes

Copy link
Copy Markdown

Summary

  • Treat a single escaped / query-string term as a match term instead of an empty slash-delimited regexp.
  • Add parser and search coverage for querying a path field with /.

Tests

  • gofmt -w search/query/query_string.y.go search/query/query_string_parser_test.go search_test.go
  • go test ./search/query -run 'TestQuerySyntaxParserValid' -count=1
  • go test . -run 'TestQueryStringSearchEscapedSlashPath|TestQueryStringEmptyConjunctionSearcher' -count=1
  • go test ./search/query . -count=1
  • go vet ./search/query .
  • git diff --check

Fixes #2362

Note: CONTRIBUTING.md says Couchbase CLA applies.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 52.195% (-0.01%) from 52.206% — cyphercodes:fix-2362-bare-slash-query into blevesearch:master

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.

Bare "/" is treated as regex

4 participants