Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ogc 508 replace elastic search by postgres v2 #1357

Draft
wants to merge 49 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ef937bc
Resolve merge conflict
Tschuppi81 Jun 3, 2024
2fdd50e
Adds view and templates for search views
Tschuppi81 Jun 4, 2024
d90e85a
Revert type wrong type annotations
Tschuppi81 Jun 5, 2024
22932f0
Sort search results after score, timestamp
Tschuppi81 Jun 5, 2024
0507b46
Adds a simple ranking
Tschuppi81 Jun 5, 2024
e6b510e
Merge branch 'master' into feature/ogc-508-replace-elastic-search-by-…
Tschuppi81 Jun 6, 2024
b8f3b76
Resolve merge conflicts
Tschuppi81 Jul 12, 2024
3beab01
Person title and user title and userprofile are now hybrid properties
Tschuppi81 Jul 16, 2024
da09357
Rework ranking
Tschuppi81 Jul 16, 2024
db8ae9b
Cleanup
Tschuppi81 Jul 18, 2024
f9ba776
Make tickets searchable
Tschuppi81 Jul 18, 2024
5718732
Make tickets searchable
Tschuppi81 Jul 18, 2024
737fb14
makes directory entries searchable
Tschuppi81 Jul 18, 2024
7846539
Revert "makes directory entries searchable"
Tschuppi81 Jul 18, 2024
cfcd6af
Resolve merge conflict
Tschuppi81 Jul 19, 2024
904a32c
Make mypy almost happy
Tschuppi81 Jul 19, 2024
956befa
Add fixme's as ranking does not work with extra localized text for su…
Tschuppi81 Jul 19, 2024
d1f8037
Merge branch 'master' into feature/ogc-508-replace-elastic-search-by-…
Tschuppi81 Aug 23, 2024
b25a51d
Make a generic class
Tschuppi81 Aug 23, 2024
007d8cb
Fix search results for tickets as not each ticket provides the values
Tschuppi81 Aug 26, 2024
57f1ea4
Transform directory_entry.keywords to hybrid property
Tschuppi81 Aug 27, 2024
abbf86c
Adds weighted vector to search query
Tschuppi81 Sep 9, 2024
4d04f5d
Resove merge conflicts
Tschuppi81 Sep 9, 2024
ac18d16
Fix extra localized text for tickets in search results
Tschuppi81 Sep 9, 2024
45eb359
Adds future events on top of search results (in case of hit)
Tschuppi81 Sep 9, 2024
d7a560a
Make load bach result a cached property
Tschuppi81 Sep 9, 2024
85eff7e
Make mypy happy
Tschuppi81 Sep 9, 2024
6114dad
Adds default implementation for extra localized text
Tschuppi81 Sep 9, 2024
71e61b6
Fixing org search template
Tschuppi81 Sep 9, 2024
bb16507
Adjust and add search template for org
Tschuppi81 Oct 3, 2024
1c86775
Exclude documents according their access level
Tschuppi81 Oct 3, 2024
b0a3fa5
Unaccent data while indexing and also for querying
Tschuppi81 Oct 4, 2024
35cac54
Convert es_public and access to hybrid properties; fix psql search fo…
Tschuppi81 Oct 7, 2024
f4a4d33
Fix: unaccent is only needed during index creation but not while quer…
Tschuppi81 Oct 7, 2024
ce27112
Fix condition and improvements
Tschuppi81 Oct 7, 2024
7c1142c
Fix agency memberships psql expression
Tschuppi81 Oct 8, 2024
59bfda0
Ensure suggestions are tuple of strings
Tschuppi81 Oct 9, 2024
7e93291
Extend and fix a few tests
Tschuppi81 Oct 14, 2024
0167dd6
More hybrid properties and fixes for such
Tschuppi81 Oct 15, 2024
045f8ad
Extend and fix tests for landsgemeinde
Tschuppi81 Oct 18, 2024
0b026c9
Adds sql expression for GeneralFile property access
Tschuppi81 Oct 19, 2024
d05926c
Extend tests
Tschuppi81 Oct 21, 2024
6f93953
Extend tests
Tschuppi81 Oct 21, 2024
14ff52f
Fix mypy complaints
Tschuppi81 Oct 22, 2024
6bdaa97
Performance: use scalar instead of count
Tschuppi81 Oct 22, 2024
68b311c
Adds missing sql expressions and fixes one
Tschuppi81 Oct 22, 2024
bc8e1f4
Cleanup
Tschuppi81 Oct 22, 2024
d5c5b5e
Resolves merge conflicts
Tschuppi81 Oct 22, 2024
1b0e741
Fix import
Tschuppi81 Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Sort search results after score, timestamp
Tschuppi81 committed Jun 5, 2024

Verified

This commit was signed with the committer’s verified signature.
vEnhance Evan Chen
commit 22932f0dd8c6c30c8102cb664998e7d0d966e8a9
3 changes: 2 additions & 1 deletion src/onegov/org/models/search.py
Original file line number Diff line number Diff line change
@@ -283,7 +283,8 @@ def generic_search(self):

self.nbr_of_docs = doc_count
self.nbr_of_results = len(results)
results.sort(key=attrgetter('ts_score'), reverse=False)
results.sort(key=attrgetter('ts_score', 'modified', 'created'),
reverse=False)
return results

def hashtag_search(self):