Add new search engine that supports logical expressions (and, or, not) (#1198)

* parser implementation

* add support for quoted strings

* add support for tags

* ignore empty tags

* implicit and

* prepare query conversion by disabling tests

* convert query logic

* fix nested combined tag searches

* simplify query logic

* Add special keyword support to parser

* Add special keyword support to query builder

* Handle invalid queries in query builder

* Notify user about invalid queries

* Add helper to strip tags from search query

* Make tag cloud show all tags from search query

* Use new method for extracting tags

* Add query for getting tags from search query

* Get selected tags through specific context

* Properly remove selected tags from complex queries

* cleanup

* Clarify bundle search terms

* Add documentation draft

* Improve adding tags to search query

* Add option to switch back to the old search
This commit is contained in:
Sascha Ißbrücker
2025-10-05 12:51:08 +02:00
committed by GitHub
parent 229d3b511f
commit 051bd39256
22 changed files with 2831 additions and 127 deletions

View File

@@ -49,6 +49,7 @@ class SettingsGeneralViewTestCase(TestCase, BookmarkFactoryMixin):
"sticky_pagination": False,
"collapse_side_panel": False,
"hide_bundles": False,
"legacy_search": False,
}
return {**form_data, **overrides}
@@ -122,6 +123,7 @@ class SettingsGeneralViewTestCase(TestCase, BookmarkFactoryMixin):
"sticky_pagination": True,
"collapse_side_panel": True,
"hide_bundles": True,
"legacy_search": True,
}
response = self.client.post(
reverse("linkding:settings.update"), form_data, follow=True
@@ -206,6 +208,7 @@ class SettingsGeneralViewTestCase(TestCase, BookmarkFactoryMixin):
self.user.profile.collapse_side_panel, form_data["collapse_side_panel"]
)
self.assertEqual(self.user.profile.hide_bundles, form_data["hide_bundles"])
self.assertEqual(self.user.profile.legacy_search, form_data["legacy_search"])
self.assertSuccessMessage(html, "Profile updated")