#6952 - feat(issue search): query string for boolean operators and phrase search - forgejo/forgejo - Codeberg.org
forgejo
forgejo
Fork
You've already forked forgejo
737
Code
Issues
1.3k
Pull requests
154
Projects
Releases
100
Packages
Activity
Actions
86
feat(issue search): query string for boolean operators and phrase search
#6952
Merged
earl-warren
merged 1 commit from
snematoda/qstr-issue
into
forgejo
2025-02-23 09:35:40 +01:00
AGit
Conversation
14
Commits
Files changed
19
+450
-191
snematoda
commented
2025-02-15 15:32:46 +01:00
Member
Copy link
closes
#6909
related to
forgejo/design#14
Description
Adds the following boolean operators for issues when using an indexer (with minor caveats)
+term
term
MUST be present for any result
-term
: negation; exclude results that contain
term
"this is a term"
: matches the exact phrase
this is a term
In all cases the special characters may be escaped by the prefix
Release notes
Features
PR
: feat(issue search): query string for boolean operators and phrase search
closes #6909

related to forgejo/design#14

# Description

Adds the following boolean operators for issues when using an indexer (with minor caveats)

- `+term`: `term` MUST be present for any result
- `-term`: negation; exclude results that contain `term`
- `"this is a term"`: matches the exact phrase `this is a term`

In all cases the special characters may be escaped by the prefix `\`

## Release notes

- Features
- [PR](https://codeberg.org/forgejo/forgejo/pulls/6952): feat(issue search): query string for boolean operators and phrase search

snematoda
2025-02-15 15:32:55 +01:00
added the
test
present
label
requested review from
Gusted
snematoda
force-pushed snematoda/qstr-issue from
52240827c5
Some checks failed
testing / frontend-checks (pull_request)
Successful in 1m20s
Details
testing / backend-checks (pull_request)
Failing after 1m49s
Details
testing / test-unit (pull_request)
Has been skipped
Details
testing / test-e2e (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Has been skipped
Details
testing / test-pgsql (pull_request)
Has been skipped
Details
testing / test-sqlite (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / security-check (pull_request)
Has been skipped
Details
issue-labels / cascade (pull_request_target)
Has been skipped
Details
requirements / merge-conditions (pull_request)
Successful in 3s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
to
9b81153331
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / backporting (pull_request_target)
Has been skipped
Details
issue-labels / cascade (pull_request_target)
Has been skipped
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m59s
Details
testing / backend-checks (pull_request)
Successful in 4m8s
Details
testing / test-e2e (pull_request)
Successful in 2m59s
Details
testing / test-unit (pull_request)
Failing after 6m48s
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Successful in 22m59s
Details
testing / test-sqlite (pull_request)
Successful in 25m9s
Details
testing / test-pgsql (pull_request)
Successful in 29m35s
Details
testing / security-check (pull_request)
Has been skipped
Details
2025-02-15 16:03:27 +01:00
Compare
snematoda
added the
enhancement/feature
label
2025-02-15 16:05:37 +01:00
snematoda
force-pushed snematoda/qstr-issue from
9b81153331
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / backporting (pull_request_target)
Has been skipped
Details
issue-labels / cascade (pull_request_target)
Has been skipped
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m59s
Details
testing / backend-checks (pull_request)
Successful in 4m8s
Details
testing / test-e2e (pull_request)
Successful in 2m59s
Details
testing / test-unit (pull_request)
Failing after 6m48s
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Successful in 22m59s
Details
testing / test-sqlite (pull_request)
Successful in 25m9s
Details
testing / test-pgsql (pull_request)
Successful in 29m35s
Details
testing / security-check (pull_request)
Has been skipped
Details
to
6a2ae70dcd
Some checks failed
testing / frontend-checks (pull_request)
Successful in 1m22s
Details
testing / backend-checks (pull_request)
Successful in 3m34s
Details
testing / test-e2e (pull_request)
Successful in 3m4s
Details
testing / test-unit (pull_request)
Failing after 7m18s
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Successful in 26m34s
Details
testing / test-sqlite (pull_request)
Successful in 27m32s
Details
testing / test-pgsql (pull_request)
Successful in 32m13s
Details
testing / security-check (pull_request)
Has been skipped
Details
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
2025-02-15 16:36:19 +01:00
Compare
snematoda
changed title from
feat(issue search): query string for boolean operators and phrase search
to
WIP: feat(issue search): query string for boolean operators and phrase search
2025-02-15 19:26:55 +01:00
snematoda
force-pushed snematoda/qstr-issue from
6a2ae70dcd
Some checks failed
testing / frontend-checks (pull_request)
Successful in 1m22s
Details
testing / backend-checks (pull_request)
Successful in 3m34s
Details
testing / test-e2e (pull_request)
Successful in 3m4s
Details
testing / test-unit (pull_request)
Failing after 7m18s
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Successful in 26m34s
Details
testing / test-sqlite (pull_request)
Successful in 27m32s
Details
testing / test-pgsql (pull_request)
Successful in 32m13s
Details
testing / security-check (pull_request)
Has been skipped
Details
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
to
e92afd9f54
Some checks failed
testing / frontend-checks (pull_request)
Successful in 58s
Details
testing / backend-checks (pull_request)
Successful in 3m8s
Details
testing / test-e2e (pull_request)
Successful in 2m27s
Details
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / test-unit (pull_request)
Failing after 4m59s
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Successful in 17m43s
Details
testing / test-sqlite (pull_request)
Successful in 19m42s
Details
testing / test-pgsql (pull_request)
Successful in 22m23s
Details
testing / security-check (pull_request)
Has been skipped
Details
2025-02-16 12:08:37 +01:00
Compare
snematoda
changed title from
WIP: feat(issue search): query string for boolean operators and phrase search
to
feat(issue search): query string for boolean operators and phrase search
2025-02-16 12:11:06 +01:00
0ko
reviewed
2025-02-16 14:42:42 +01:00
modules/indexer/issues/internal/qstring.go
@ -0,0 +1,112 @@
// Copyright 2024 The Forgejo Authors. All rights reserved.
0ko
commented
2025-02-16 14:42:42 +01:00
Owner
Copy link
snematoda
commented
2025-02-16 16:00:06 +01:00
Author
Member
Copy link
my bad
...i forgot we were in 2025 already ..will change :)
my bad 🙈 ...i forgot we were in 2025 already ..will change :)
snematoda
marked this conversation as resolved
0ko
approved these changes
2025-02-16 14:42:46 +01:00
0ko
commented
2025-02-16 14:43:25 +01:00
Owner
Copy link
Although the unit test doesn't actually like the changes yet.
Although the unit test doesn't actually like the changes yet.
snematoda
commented
2025-02-16 16:01:06 +01:00
Author
Member
Copy link
@0ko
wrote in
#6952 (comment)
Although the unit test doesn't actually like the changes yet.
yes, i would like to fix the test ... please don't merge just yet :)
The elastic test should be fixed now
@0ko wrote in https://codeberg.org/forgejo/forgejo/pulls/6952#issuecomment-2832038:

> Although the unit test doesn't actually like the changes yet.

~yes, i would like to fix the test ... please don't merge just yet :)~

The elastic test should be fixed now
snematoda
force-pushed snematoda/qstr-issue from
e92afd9f54
Some checks failed
testing / frontend-checks (pull_request)
Successful in 58s
Details
testing / backend-checks (pull_request)
Successful in 3m8s
Details
testing / test-e2e (pull_request)
Successful in 2m27s
Details
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / test-unit (pull_request)
Failing after 4m59s
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Successful in 17m43s
Details
testing / test-sqlite (pull_request)
Successful in 19m42s
Details
testing / test-pgsql (pull_request)
Successful in 22m23s
Details
testing / security-check (pull_request)
Has been skipped
Details
to
42de9a33ef
All checks were successful
requirements / merge-conditions (pull_request)
Successful in 1s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m10s
Details
testing / backend-checks (pull_request)
Successful in 3m1s
Details
testing / test-e2e (pull_request)
Successful in 3m11s
Details
testing / test-unit (pull_request)
Successful in 6m32s
Details
testing / test-remote-cacher (redis) (pull_request)
Successful in 2m48s
Details
testing / test-remote-cacher (valkey) (pull_request)
Successful in 2m39s
Details
testing / test-remote-cacher (garnet) (pull_request)
Successful in 2m0s
Details
testing / test-remote-cacher (redict) (pull_request)
Successful in 2m3s
Details
testing / test-mysql (pull_request)
Successful in 24m0s
Details
testing / test-sqlite (pull_request)
Successful in 25m43s
Details
testing / test-pgsql (pull_request)
Successful in 29m2s
Details
testing / security-check (pull_request)
Successful in 1m3s
Details
2025-02-16 16:02:26 +01:00
Compare
snematoda
force-pushed snematoda/qstr-issue from
42de9a33ef
All checks were successful
requirements / merge-conditions (pull_request)
Successful in 1s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m10s
Details
testing / backend-checks (pull_request)
Successful in 3m1s
Details
testing / test-e2e (pull_request)
Successful in 3m11s
Details
testing / test-unit (pull_request)
Successful in 6m32s
Details
testing / test-remote-cacher (redis) (pull_request)
Successful in 2m48s
Details
testing / test-remote-cacher (valkey) (pull_request)
Successful in 2m39s
Details
testing / test-remote-cacher (garnet) (pull_request)
Successful in 2m0s
Details
testing / test-remote-cacher (redict) (pull_request)
Successful in 2m3s
Details
testing / test-mysql (pull_request)
Successful in 24m0s
Details
testing / test-sqlite (pull_request)
Successful in 25m43s
Details
testing / test-pgsql (pull_request)
Successful in 29m2s
Details
testing / security-check (pull_request)
Successful in 1m3s
Details
to
84ec90a73b
All checks were successful
testing / frontend-checks (pull_request)
Successful in 2m23s
Details
testing / backend-checks (pull_request)
Successful in 5m16s
Details
testing / test-e2e (pull_request)
Successful in 3m27s
Details
testing / test-unit (pull_request)
Successful in 6m29s
Details
testing / test-remote-cacher (redis) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (valkey) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (garnet) (pull_request)
Successful in 1m53s
Details
testing / test-remote-cacher (redict) (pull_request)
Successful in 1m53s
Details
testing / test-mysql (pull_request)
Successful in 22m32s
Details
testing / test-sqlite (pull_request)
Successful in 23m58s
Details
testing / test-pgsql (pull_request)
Successful in 28m24s
Details
testing / security-check (pull_request)
Successful in 1m6s
Details
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
2025-02-16 16:05:54 +01:00
Compare
Gusted
requested review from
fnetX
2025-02-16 22:12:03 +01:00
fnetX
approved these changes
2025-02-17 09:12:13 +01:00
fnetX
left a comment
Copy link
I think this is great, thank you.
Technically, does this allow removing the fuzzy/exact type switch?
I think this is great, thank you.

Technically, does this allow removing the fuzzy/exact type switch?
❤️
snematoda
commented
2025-02-17 13:41:29 +01:00
Author
Member
Copy link
Technically, does this allow removing the fuzzy/exact type switch?
not yet :)
"fuzziness" for bleve and elastic is considered as the edit distance,
For example, consider a query of
-buggy
When used with fuzzy search the results exclude results that not only contain
bug
but
biggy
budgy
or any other term within a maximum edit distance of 2.
However, a match search exclude exactly
buggy
For phrase on the other hand, elastic does not support fuzziness with a phrase query, however bleve does...
> Technically, does this allow removing the fuzzy/exact type switch?

not yet :)

"fuzziness" for bleve and elastic is considered as the edit distance,

For example, consider a query of `-buggy`,

When used with fuzzy search the results exclude results that not only contain `bug` but `biggy`, `budgy` or any other term within a maximum edit distance of 2.

However, a match search exclude exactly `buggy`

For phrase on the other hand, elastic does not support fuzziness with a phrase query, however bleve does...
fnetX
commented
2025-02-17 14:28:17 +01:00
Owner
Copy link
Would it be possible to do
-"buggy"
in this case?
Just to clarify, the search strings
Fuzzy mode:
"buggy"
Exact mode:
buggy
would in theory bring up identical results?
Would it be possible to do `-"buggy"` in this case?

Just to clarify, the search strings

- Fuzzy mode: `"buggy"`
- Exact mode: `buggy`

would in theory bring up identical results?
snematoda
commented
2025-02-17 17:07:47 +01:00
Author
Member
Copy link
Would it be possible to do
-"buggy"
in this case?
Yes,
+"this is a phrase"
should work fine too
Relevant tests for the syntax parser
84ec90a73b/modules/indexer/issues/internal/qstring_test.go (L109-L110)
Just to clarify, the search strings
Fuzzy mode:
"buggy"
Exact mode:
buggy
would in theory bring up identical results?
not unless limited by the indexer (all except bleve),
"buggy"
and
buggy
are expected to synonyms, however
"buggy code"
and
buggy code
differ, the first performs a match for the exact phrase, while the second a union of
buggy
and
code
Perhaps in a subsequent PR the fuzzy dropdown could be removed in favor of treating a phrase as non-fuzzy...
EDIT: in retrospect it might be for the best to change to remove the dropdown within this PR...
> Would it be possible to do `-"buggy"` in this case?

Yes, `+"this is a phrase"` should work fine too
Relevant tests for the syntax parser

> Just to clarify, the search strings
> * Fuzzy mode: `"buggy"`
> * Exact mode: `buggy`
> would in theory bring up identical results?

not unless limited by the indexer (all except bleve), `"buggy"` and `buggy` are expected to synonyms, however `"buggy code"` and `buggy code` differ, the first performs a match for the exact phrase, while the second a union of `buggy` and `code`

~Perhaps in a subsequent PR the fuzzy dropdown could be removed in favor of treating a phrase as non-fuzzy...~

EDIT: in retrospect it might be for the best to change to remove the dropdown within this PR...
snematoda
changed title from
feat(issue search): query string for boolean operators and phrase search
to
WIP: feat(issue search): query string for boolean operators and phrase search
2025-02-17 17:13:08 +01:00
fnetX
commented
2025-02-17 21:32:01 +01:00
Owner
Copy link
@snematoda
I do not have a strong opinion on the dropdown, I just tried to understand it better.
It would of course be great to slowly start supporting a powerful query language. If you want, I can come up with some further suggestions, but they do not need to block this PR.
@snematoda I do not have a strong opinion on the dropdown, I just tried to understand it better.

It would of course be great to slowly start supporting a powerful query language. If you want, I can come up with some further suggestions, but they do not need to block this PR.
snematoda
force-pushed snematoda/qstr-issue from
84ec90a73b
All checks were successful
testing / frontend-checks (pull_request)
Successful in 2m23s
Details
testing / backend-checks (pull_request)
Successful in 5m16s
Details
testing / test-e2e (pull_request)
Successful in 3m27s
Details
testing / test-unit (pull_request)
Successful in 6m29s
Details
testing / test-remote-cacher (redis) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (valkey) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (garnet) (pull_request)
Successful in 1m53s
Details
testing / test-remote-cacher (redict) (pull_request)
Successful in 1m53s
Details
testing / test-mysql (pull_request)
Successful in 22m32s
Details
testing / test-sqlite (pull_request)
Successful in 23m58s
Details
testing / test-pgsql (pull_request)
Successful in 28m24s
Details
testing / security-check (pull_request)
Successful in 1m6s
Details
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
to
73f36a383a
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 54s
Details
testing / backend-checks (pull_request)
Failing after 2m7s
Details
testing / test-unit (pull_request)
Has been skipped
Details
testing / test-e2e (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Has been skipped
Details
testing / test-pgsql (pull_request)
Has been skipped
Details
testing / test-sqlite (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / security-check (pull_request)
Has been skipped
Details
Integration tests for the release process / release-simulation (pull_request)
Successful in 4m39s
Details
2025-02-18 14:37:03 +01:00
Compare
snematoda
force-pushed snematoda/qstr-issue from
73f36a383a
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 54s
Details
testing / backend-checks (pull_request)
Failing after 2m7s
Details
testing / test-unit (pull_request)
Has been skipped
Details
testing / test-e2e (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Has been skipped
Details
testing / test-pgsql (pull_request)
Has been skipped
Details
testing / test-sqlite (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / security-check (pull_request)
Has been skipped
Details
Integration tests for the release process / release-simulation (pull_request)
Successful in 4m39s
Details
to
effe41f43d
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m1s
Details
testing / backend-checks (pull_request)
Failing after 3m9s
Details
testing / test-unit (pull_request)
Has been skipped
Details
testing / test-e2e (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Has been skipped
Details
testing / test-pgsql (pull_request)
Has been skipped
Details
testing / test-sqlite (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / security-check (pull_request)
Has been skipped
Details
Integration tests for the release process / release-simulation (pull_request)
Successful in 4m43s
Details
2025-02-18 15:08:28 +01:00
Compare
snematoda
commented
2025-02-18 15:17:08 +01:00
Author
Member
Copy link
I do not have a strong opinion on the dropdown, I just tried to understand it better.
after reconsidering, i did feel that having a fragmented implementation might sadly be a bit confusing... :)
It would of course be great to slowly start supporting a powerful query language
Eventually, it might be possible to have a much more advanced query string syntax... but i'm afraid that might require a proper lexer and parser...
If you want, I can come up with some further suggestions, but they do not need to block this PR
sure! the current implementation does have a lot to be improved upon =)
> I do not have a strong opinion on the dropdown, I just tried to understand it better.

after reconsidering, i did feel that having a fragmented implementation might sadly be a bit confusing... :)

> It would of course be great to slowly start supporting a powerful query language

Eventually, it might be possible to have a much more advanced query string syntax... but i'm afraid that might require a proper lexer and parser...

> If you want, I can come up with some further suggestions, but they do not need to block this PR

sure! the current implementation does have a lot to be improved upon =)
snematoda
force-pushed snematoda/qstr-issue from
effe41f43d
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m1s
Details
testing / backend-checks (pull_request)
Failing after 3m9s
Details
testing / test-unit (pull_request)
Has been skipped
Details
testing / test-e2e (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Has been skipped
Details
testing / test-pgsql (pull_request)
Has been skipped
Details
testing / test-sqlite (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / security-check (pull_request)
Has been skipped
Details
Integration tests for the release process / release-simulation (pull_request)
Successful in 4m43s
Details
to
7aefd4929b
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m2s
Details
testing / backend-checks (pull_request)
Successful in 3m33s
Details
Integration tests for the release process / release-simulation (pull_request)
Successful in 5m22s
Details
testing / test-e2e (pull_request)
Successful in 4m13s
Details
testing / test-unit (pull_request)
Failing after 5m16s
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Failing after 18m0s
Details
testing / test-sqlite (pull_request)
Failing after 20m33s
Details
testing / test-pgsql (pull_request)
Failing after 23m37s
Details
testing / security-check (pull_request)
Has been skipped
Details
2025-02-18 15:18:58 +01:00
Compare
snematoda
force-pushed snematoda/qstr-issue from
7aefd4929b
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m2s
Details
testing / backend-checks (pull_request)
Successful in 3m33s
Details
Integration tests for the release process / release-simulation (pull_request)
Successful in 5m22s
Details
testing / test-e2e (pull_request)
Successful in 4m13s
Details
testing / test-unit (pull_request)
Failing after 5m16s
Details
testing / test-remote-cacher (redis) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (valkey) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (garnet) (pull_request)
Has been skipped
Details
testing / test-remote-cacher (redict) (pull_request)
Has been skipped
Details
testing / test-mysql (pull_request)
Failing after 18m0s
Details
testing / test-sqlite (pull_request)
Failing after 20m33s
Details
testing / test-pgsql (pull_request)
Failing after 23m37s
Details
testing / security-check (pull_request)
Has been skipped
Details
to
d7c1659e29
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m12s
Details
testing / backend-checks (pull_request)
Successful in 4m16s
Details
Integration tests for the release process / release-simulation (pull_request)
Successful in 5m15s
Details
testing / test-e2e (pull_request)
Successful in 4m25s
Details
testing / test-unit (pull_request)
Successful in 5m36s
Details
testing / test-remote-cacher (redis) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (valkey) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (garnet) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (redict) (pull_request)
Successful in 1m50s
Details
testing / test-mysql (pull_request)
Failing after 18m40s
Details
testing / test-sqlite (pull_request)
Failing after 21m20s
Details
testing / test-pgsql (pull_request)
Failing after 24m22s
Details
testing / security-check (pull_request)
Has been skipped
Details
2025-02-18 16:10:53 +01:00
Compare
sclu1034
commented
2025-02-20 10:23:27 +01:00
Member
Copy link
@fnetX
wrote in
#6952 (comment)
It would of course be great to slowly start supporting a powerful query language
As mentioned in
#5245
, another possibility would be to just expose the active backend's query language. Bleve and Elasticseach both have functions that are intended to be fed with user input directly, and Meilisearch doesn't support much that could be leveraged by a custom syntax.
@fnetX wrote in https://codeberg.org/forgejo/forgejo/pulls/6952#issuecomment-2838786:

> It would of course be great to slowly start supporting a powerful query language

As mentioned in #5245, another possibility would be to just expose the active backend's query language. Bleve and Elasticseach both have functions that are intended to be fed with user input directly, and Meilisearch doesn't support much that could be leveraged by a custom syntax.
snematoda
commented
2025-02-20 13:58:56 +01:00
Author
Member
Copy link
another possibility would be to just expose the active backend's query language
the possibility was brought up at
forgejo/design#14 (comment)
, while it's certainly a compelling option it does bring certain limitations, most notably, the absence of a standardized syntax. Which is unfortunately further worsened by the lack of any indication for the user on which indexer is currently being used... that being said, i do agree that it is a very compelling option...
> another possibility would be to just expose the active backend's query language

the possibility was brought up at https://codeberg.org/forgejo/design/issues/14#issuecomment-2175628, while it's certainly a compelling option it does bring certain limitations, most notably, the absence of a standardized syntax. Which is unfortunately further worsened by the lack of any indication for the user on which indexer is currently being used... that being said, i do agree that it is a very compelling option...
snematoda
force-pushed snematoda/qstr-issue from
d7c1659e29
Some checks failed
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Has been skipped
Details
testing / frontend-checks (pull_request)
Successful in 1m12s
Details
testing / backend-checks (pull_request)
Successful in 4m16s
Details
Integration tests for the release process / release-simulation (pull_request)
Successful in 5m15s
Details
testing / test-e2e (pull_request)
Successful in 4m25s
Details
testing / test-unit (pull_request)
Successful in 5m36s
Details
testing / test-remote-cacher (redis) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (valkey) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (garnet) (pull_request)
Successful in 1m50s
Details
testing / test-remote-cacher (redict) (pull_request)
Successful in 1m50s
Details
testing / test-mysql (pull_request)
Failing after 18m40s
Details
testing / test-sqlite (pull_request)
Failing after 21m20s
Details
testing / test-pgsql (pull_request)
Failing after 24m22s
Details
testing / security-check (pull_request)
Has been skipped
Details
to
f9059ea064
All checks were successful
testing / frontend-checks (pull_request)
Successful in 54s
Details
testing / backend-checks (pull_request)
Successful in 3m45s
Details
Integration tests for the release process / release-simulation (pull_request)
Successful in 4m55s
Details
testing / test-e2e (pull_request)
Successful in 4m13s
Details
testing / test-unit (pull_request)
Successful in 5m25s
Details
testing / test-remote-cacher (redis) (pull_request)
Successful in 1m40s
Details
testing / test-remote-cacher (valkey) (pull_request)
Successful in 1m40s
Details
testing / test-remote-cacher (garnet) (pull_request)
Successful in 1m40s
Details
testing / test-remote-cacher (redict) (pull_request)
Successful in 1m40s
Details
testing / test-mysql (pull_request)
Successful in 18m26s
Details
testing / test-sqlite (pull_request)
Successful in 20m55s
Details
testing / test-pgsql (pull_request)
Successful in 24m17s
Details
testing / security-check (pull_request)
Successful in 1m29s
Details
milestone / set (pull_request_target)
Successful in 8s
Details
issue-labels / backporting (pull_request_target)
Has been skipped
Details
issue-labels / cascade (pull_request_target)
Has been skipped
Details
requirements / merge-conditions (pull_request)
Successful in 2s
Details
issue-labels / release-notes (pull_request_target)
Successful in 40s
Details
2025-02-20 15:23:42 +01:00
Compare
sclu1034
commented
2025-02-20 16:38:49 +01:00
Member
Copy link
@snematoda
wrote in
#6952 (comment)
lack of any indication for the user on which indexer is currently being used
As I mentioned in
#5245
, an indicator should be part of that change.
And because of Meilisearch (and the SQL backend in its current state), any kind of advanced syntax would already be limited to a subset of backends, requiring such an indicator anyways.
Additionally, designing, implementing and documenting a new syntax, then abstracting four search backends to that sounds like a lot of work. Or from a user's perspective, like a long wait.
Forwarding to the backend would a very quick gain of a lot of functionality, and you could still work on an abstraction later on if/when users find it confusing.
@snematoda wrote in https://codeberg.org/forgejo/forgejo/pulls/6952#issuecomment-2847896:

> lack of any indication for the user on which indexer is currently being used

As I mentioned in #5245, an indicator should be part of that change.
And because of Meilisearch (and the SQL backend in its current state), any kind of advanced syntax would already be limited to a subset of backends, requiring such an indicator anyways.

Additionally, designing, implementing and documenting a new syntax, then abstracting four search backends to that sounds like a lot of work. Or from a user's perspective, like a long wait.
Forwarding to the backend would a very quick gain of a lot of functionality, and you could still work on an abstraction later on if/when users find it confusing.
fnetX
commented
2025-02-20 17:32:10 +01:00
Owner
Copy link
In this case, let's merge this PR and we can try to find a follow-up that allows providing users hints on the search syntax. Maybe it could even be made dependent on the used indexer.
Let's move the other ideas to
forgejo/design#14
In this case, let's merge this PR and we can try to find a follow-up that allows providing users hints on the search syntax. Maybe it could even be made dependent on the used indexer.

Let's move the other ideas to https://codeberg.org/forgejo/design/issues/14
snematoda
referenced this pull request
2025-02-21 13:39:56 +01:00
feat(code search): replace fuzzy search with union search for indexer
#6947
snematoda
changed title from
WIP: feat(issue search): query string for boolean operators and phrase search
to
feat(issue search): query string for boolean operators and phrase search
2025-02-21 13:42:18 +01:00
snematoda
requested reviews from
caesar
crystal
2025-02-21 13:42:19 +01:00
earl-warren
referenced this pull request from a commit
2025-02-23 09:35:39 +01:00
feat(issue search): query string for boolean operators and phrase search (#6952)
earl-warren
merged commit
cddf608cb9
into
forgejo
2025-02-23 09:35:40 +01:00
forgejo-release-notes-assistant
added this to the
Forgejo v11.0.0
milestone
2025-02-23 09:35:52 +01:00
snematoda
referenced this pull request
2025-03-15 09:33:00 +01:00
[gitea] week 2025-12 cherry pick (gitea/main -> forgejo)
#7220
snematoda
referenced this pull request from forgejo/docs
2025-03-23 09:05:20 +01:00
Add documentation for Issue Search
#1111
earl-warren
referenced this pull request from a commit
2025-03-23 10:21:13 +01:00
Add documentation for Issue Search (#1111)
earl-warren
added the
worth a release-note
label
2025-04-05 10:35:17 +02:00
davrot
referenced this pull request from a commit
2025-06-02 14:13:49 +02:00
feat(issue search): query string for boolean operators and phrase search (#6952)
0ko
referenced this pull request
2025-08-29 16:40:39 +02:00
fix(ui): restore code search types
#9053
forgejo-actions
referenced this pull request from forgejo/website
2025-11-27 18:11:38 +01:00
Dead links report
#529
forgejo-actions
referenced this pull request from forgejo/website
2025-12-08 18:03:53 +01:00
Dead links report
#529
alberic89
referenced this pull request from a commit
2026-02-23 18:42:19 +01:00
feat(issue search): query string for boolean operators and phrase search (#6952)
to join this conversation.
Reviewers
No reviewers
Gusted
0ko
fnetX
caesar
crystal
Labels
Clear labels
arch
riscv64
Archived
backport/v1.19
Scheduled for backport to Forgejo v1.19
Archived
backport/v1.20
Scheduled for backport to Forgejo v1.20
Archived
backport/v1.21/forgejo
Scheduled for backport to Forgejo v1.21
Archived
backport/v10.0/forgejo
Automated backport to v10.0
Archived
backport/v11.0/forgejo
Automated backport to v11.0
backport/v12.0/forgejo
Automated backport to v12.0
Archived
backport/v13.0/forgejo
Automated backport to v13.0
Archived
backport/v14.0/forgejo
Automated backport to v14.0
backport/v15.0/forgejo
Automated backport to v15.0
backport/v7.0/forgejo
Scheduled for backport to Forgejo v7.0
Archived
backport/v8.0/forgejo
Scheduled for backport to Forgejo v8.0
Archived
backport/v9.0/forgejo
Scheduled for backport to Forgejo v9.0
Archived
breaking
The release containing this change is not backward compatible
bug
Something is not working
Archived
bug
confirmed
it can be reproduced
bug
duplicate
bug has already been reported in the Forgejo tracker
bug
needs-more-info
the information provided does not contain enough details
bug
new-report
bug has just been reported and need triage (default label on issue creation)
bug
reported-upstream
bug cannot be fixed within Forgejo easily, it has been reported upstream
code/actions
Forgejo Actions feature
code/api
API
code/auth
Forgejo Authentication
code/auth/faidp
Forgejo as Identity Provider (in OAuth/OIDC flow)
code/auth/farp
Forgejo as Relying Party / Client (in OAuth/OIDC flow)
code/email
Everything related to email in Forgejo
code/federation
Federation
code/git
Related to the Git backend in Forgejo
code/migrations
Migration between Git forges (i.e. for GitHub, GitLab, Gitea, Forgejo, etc.). NOT for database migrations.
code/packages
Forgejo package and container registry
code/wiki
database
MySQL
database
PostgreSQL
database
SQLite
dependency-upgrade
dependency
Chi
Archived
dependency
Chroma
Archived
dependency
F3
dependency
ForgeFed
dependency
garage
dependency
Gitea
Archived
dependency
Golang
Discussion
duplicate
This issue or pull request already exists
enhancement/feature
New feature
forgejo/accessibility
Accessibility (a11y)
forgejo/branding
Branding (logo, name, tagline etc.)
forgejo/ci
Forgejo Actions CI configuration
forgejo/commit-graph
The commit graph feature and page.
forgejo/documentation
forgejo/furnace cleanup
Keeping Forgejo in sync with its dependencies and contributing back to them
Archived
forgejo/i18n
t9n/translation, l10n/localization, and i18n/internationalization of Forgejo
forgejo/interop
Interoperability with other services: Webhooks, bridges, integrations
forgejo/moderation
Moderation
forgejo/privacy
Privacy first
forgejo/release
Release management
forgejo/scaling
Performance and scaling
forgejo/security
Security (please disclose responsibly)
forgejo/ui
User interface
Gain
High
User research provides indicators that this would be good to have, interested contributors are encouraged to pick this.
Gain
Nice to have
This is likely worth having, but the assumption is not backed by user research data (it might benefit a small amount of users only.) Unlikely to receive much attention, but feel free to pick.
Gain
Undefined
Not enough information to assess the request's benefits. This issue may be closed if no gain is established: You can help by giving us more input.
Gain
Very High
User research indicates that this is an important improvement for Forgejo users. Contributions very welcome!
good first issue
Optimal for first-timers! Make sure to look for further explanations and ask for help if needed. If you want, you can consider the person who added this label as a point of contact.
i18n/backport-stable
This PR needs to be backported to stable branch of Forgejo safely and manually, using a migration script.
impact
large
Large impact: Potential data loss, many users affected, major degradation in UX.
impact
medium
Medium impact: Several users affected, degradation in UX, workarounds might be available but inconvenient.
impact
small
Small impact: No data loss, workarounds might be available, affects few users.
impact
unknown
Report was not yet triaged to assess impact.
Incompatible license
This pull request contains changes that are not (yet) compatible with the current Forgejo license
issue
closed
The issue was resolved in the repository of the dependency
issue
do-not-exist-yet
An issue should be created in the respository of the dependency
issue
open
An open issue exists in the upstream repository of the dependency
manual test
Pull requests that have been merged with a manual test
Archived
Manually tested during feature freeze
The manual test instructions were followed
OS
FreeBSD
Specific to the FreeBSD Operating System
OS
Linux
Specific to (GNU/)Linux Operating Systems
OS
macOS
Specific to the MacOS Operating System
OS
Windows
Specific to the Windows Operating System
problem
A user report about a problem. Needs to be triaged to find potential solutions.
QA
regression
found in the version of the milestone and not before
release blocker
Issues that must be fixed before the release can be published
Release Cycle
Feature Freeze
Only bug fixes with automated tests (except for CSS/JavaScript)
release-blocker
v7.0
Issues that must be fixed before Forgejo v7.0 can be released 17 April 2024
Archived
release-blocker
v7.0.1
Issues that must be fixed before Forgejo v7.0.1 can be released
Archived
release-blocker
v7.0.2
Issues that must be fixed before Forgejo v7.0.2 can be released
Archived
release-blocker
v7.0.3
Issues that must be fixed before Forgejo v7.0.3 can be released
Archived
release-blocker
v7.0.4
Issues that must be fixed before Forgejo v7.0.4 can be released
Archived
release-blocker
v8.0.0
Issues that must be fixed before Forgejo v8.0.0 can be released
Archived
release-blocker/v9.0.0
Issues that must be fixed before Forgejo v9.0.0 can be released
Archived
run-all-playwright-tests
Add this label to a PR to run all playwright tests manually.
run-end-to-end-tests
Trigger additional tests on the PR when it is ready to be merged
test
manual
manual testing has been documented
test
needed
test should be added
test
needs-help
help needed to add a test
test
not-needed
no additional test is needed
test
present
test has been added
untested
Pull requests that have been merged with no test and submitted as is to the dependency where they belong
Archived
User research - time-tracker
Time tracking feature for issues and the JS stopwatch.
valuable code
This PR was closed because the implementation is incomplete
worth a release-note
Add this PR to the release notes
User research - Accessibility
Requires input about accessibility features, likely involves user testing.
User research - Blocked
Do not pick as-is! We are happy if you can help, but please coordinate with ongoing redesign in this area.
User research - Community
Community features, such as discovering other people's work or otherwise feeling welcome on a Forgejo instance.
User research - Config (instance)
Instance-wide configuration, authentication and other admin-only needs.
User research - Errors
How to deal with errors in the application and write helpful error messages.
User research - Filters
How filter and search is being worked with.
User research - Future backlog
The issue might be inspiring for future design work.
User research - Git workflow
AGit, fork-based and new Git workflow, PR creation etc
User research - Labels
Active research about Labels
User research - Moderation
Moderation Featuers for Admins are undergoing active User Research
User research - Needs input
Use this label to let the User Research team know their input is requested.
User research - Notifications/Dashboard
Research on how users should know what to do next.
User research - Rendering
Text rendering, markup languages etc
User research - Repo creation
Active research about the New Repo dialog.
User research - Repo units
The repo sections, disabling them and the "Add more" button.
User research - Security
User research - Settings (in-app)
How to structure in-app settings in the future?
No labels
arch
riscv64
backport/v1.19
backport/v1.20
backport/v1.21/forgejo
backport/v10.0/forgejo
backport/v11.0/forgejo
backport/v12.0/forgejo
backport/v13.0/forgejo
backport/v14.0/forgejo
backport/v15.0/forgejo
backport/v7.0/forgejo
backport/v8.0/forgejo
backport/v9.0/forgejo
breaking
bug
bug
confirmed
bug
duplicate
bug
needs-more-info
bug
new-report
bug
reported-upstream
code/actions
code/api
code/auth
code/auth/faidp
code/auth/farp
code/email
code/federation
code/git
code/migrations
code/packages
code/wiki
database
MySQL
database
PostgreSQL
database
SQLite
dependency-upgrade
dependency
Chi
dependency
Chroma
dependency
F3
dependency
ForgeFed
dependency
garage
dependency
Gitea
dependency
Golang
Discussion
duplicate
enhancement/feature
forgejo/accessibility
forgejo/branding
forgejo/ci
forgejo/commit-graph
forgejo/documentation
forgejo/furnace cleanup
forgejo/i18n
forgejo/interop
forgejo/moderation
forgejo/privacy
forgejo/release
forgejo/scaling
forgejo/security
forgejo/ui
Gain
High
Gain
Nice to have
Gain
Undefined
Gain
Very High
good first issue
i18n/backport-stable
impact
large
impact
medium
impact
small
impact
unknown
Incompatible license
issue
closed
issue
do-not-exist-yet
issue
open
manual test
Manually tested during feature freeze
OS
FreeBSD
OS
Linux
OS
macOS
OS
Windows
problem
QA
regression
release blocker
Release Cycle
Feature Freeze
release-blocker
v7.0
release-blocker
v7.0.1
release-blocker
v7.0.2
release-blocker
v7.0.3
release-blocker
v7.0.4
release-blocker
v8.0.0
release-blocker/v9.0.0
run-all-playwright-tests
run-end-to-end-tests
test
manual
test
needed
test
needs-help
test
not-needed
test
present
untested
User research - time-tracker
valuable code
worth a release-note
User research - Accessibility
User research - Blocked
User research - Community
User research - Config (instance)
User research - Errors
User research - Filters
User research - Future backlog
User research - Git workflow
User research - Labels
User research - Moderation
User research - Needs input
User research - Notifications/Dashboard
User research - Rendering
User research - Repo creation
User research - Repo units
User research - Security
User research - Settings (in-app)
Milestone
Clear milestone
No items
No milestone
Forgejo v11.0.0
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/forgejo!6952
Reference in a new issue
No description provided.
Delete branch "snematoda/qstr-issue"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?