Skip to content

Implement soorten filter inside sql query - #150

Open
wandernauta wants to merge 2 commits into
berthubert:mainfrom
wandernauta:soorten
Open

Implement soorten filter inside sql query#150
wandernauta wants to merge 2 commits into
berthubert:mainfrom
wandernauta:soorten

Conversation

@wandernauta

Copy link
Copy Markdown
Contributor

This moves checking the 'soort' of search results inside the search SQL
query, as suggested in #141, so before the SQLite LIMIT rather than
after.

SearchHelper is modified to support the 'soort' parameter. Care is taken
to closely follow the behavior of the existing 'categories' parameter
(for example, default value = empty set = all soorten).

As before, we look in the "meta" database for the value. The advantage
of this is that the index database does not need to change. An
alternative approach would be to add the 'soort' value to the docsearch
table.

This PR also contains the changes from #149.

This moves checking the 'soort' of search results inside the search SQL
query, as suggested in berthubert#141, so before the SQLite LIMIT rather than
after.

SearchHelper is modified to support the 'soort' parameter. Care is taken
to closely follow the behavior of the existing 'categories' parameter
(for example, default value = empty set = all soorten).

As before, we look in the "meta" database for the value. The advantage
of this is that the index database does not need to change. An
alternative approach would be to add the 'soort' value to the docsearch
table.
Comment thread tkserv.cc
categories.insert("Activiteit");
} else if(soorten=="moties") {
categories.insert("Document");
sorts.insert("Motie");

@wandernauta wandernauta Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hier moet misschien ook bij: Motie (gewijzigd/nader). Of anders gedocumenteerd waarom die er niet bij moeten.

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.

1 participant