-
Notifications
You must be signed in to change notification settings - Fork 4
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
Tschuppi81
wants to merge
49
commits into
master
Choose a base branch
from
feature/ogc-508-replace-elastic-search-by-postgres-v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,268
−196
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 2fdd50e
Adds view and templates for search views
Tschuppi81 d90e85a
Revert type wrong type annotations
Tschuppi81 22932f0
Sort search results after score, timestamp
Tschuppi81 0507b46
Adds a simple ranking
Tschuppi81 e6b510e
Merge branch 'master' into feature/ogc-508-replace-elastic-search-by-…
Tschuppi81 b8f3b76
Resolve merge conflicts
Tschuppi81 3beab01
Person title and user title and userprofile are now hybrid properties
Tschuppi81 da09357
Rework ranking
Tschuppi81 db8ae9b
Cleanup
Tschuppi81 f9ba776
Make tickets searchable
Tschuppi81 5718732
Make tickets searchable
Tschuppi81 737fb14
makes directory entries searchable
Tschuppi81 7846539
Revert "makes directory entries searchable"
Tschuppi81 cfcd6af
Resolve merge conflict
Tschuppi81 904a32c
Make mypy almost happy
Tschuppi81 956befa
Add fixme's as ranking does not work with extra localized text for su…
Tschuppi81 d1f8037
Merge branch 'master' into feature/ogc-508-replace-elastic-search-by-…
Tschuppi81 b25a51d
Make a generic class
Tschuppi81 007d8cb
Fix search results for tickets as not each ticket provides the values
Tschuppi81 57f1ea4
Transform directory_entry.keywords to hybrid property
Tschuppi81 abbf86c
Adds weighted vector to search query
Tschuppi81 4d04f5d
Resove merge conflicts
Tschuppi81 ac18d16
Fix extra localized text for tickets in search results
Tschuppi81 45eb359
Adds future events on top of search results (in case of hit)
Tschuppi81 d7a560a
Make load bach result a cached property
Tschuppi81 85eff7e
Make mypy happy
Tschuppi81 6114dad
Adds default implementation for extra localized text
Tschuppi81 71e61b6
Fixing org search template
Tschuppi81 bb16507
Adjust and add search template for org
Tschuppi81 1c86775
Exclude documents according their access level
Tschuppi81 b0a3fa5
Unaccent data while indexing and also for querying
Tschuppi81 35cac54
Convert es_public and access to hybrid properties; fix psql search fo…
Tschuppi81 f4a4d33
Fix: unaccent is only needed during index creation but not while quer…
Tschuppi81 ce27112
Fix condition and improvements
Tschuppi81 7c1142c
Fix agency memberships psql expression
Tschuppi81 59bfda0
Ensure suggestions are tuple of strings
Tschuppi81 7e93291
Extend and fix a few tests
Tschuppi81 0167dd6
More hybrid properties and fixes for such
Tschuppi81 045f8ad
Extend and fix tests for landsgemeinde
Tschuppi81 0b026c9
Adds sql expression for GeneralFile property access
Tschuppi81 d05926c
Extend tests
Tschuppi81 6f93953
Extend tests
Tschuppi81 14ff52f
Fix mypy complaints
Tschuppi81 6bdaa97
Performance: use scalar instead of count
Tschuppi81 68b311c
Adds missing sql expressions and fixes one
Tschuppi81 bc8e1f4
Cleanup
Tschuppi81 d5c5b5e
Resolves merge conflicts
Tschuppi81 1b0e741
Fix import
Tschuppi81 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading status checks…
More hybrid properties and fixes for such
commit 0167dd63c0d4d8f0501fb36b62cec58aff5744fe
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I converted
email
to ahybrid_property
the testtest_add_edit_external_attendee
fails withTypeError: 'email' is an invalid keyword argument for CourseAttendee
.If I revert back the test passed but the
search-postgres?q=martin
fails due to the missing hybrid property...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very possible that
setter
has to be defined before theexpression
. Although I'm still not sure if the auto-generated__init__
for SQLAlchemy will contain settable hybrid properties, it might not.But this whole thing seems to be heading in very much the same direction as your first attempt at implementing the indexing. Maybe it would be more robust to store the computed es properties like
es_public
in the database at the same time we store the index.This way we don't have to add all these new potentially subtly incorrect hybrid properties just to use them within a SQL query and are closer to the original elastic search implementation. If we want more of these things to happen online down the road, we can always improve it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the
setter
before theexpression
but it didn't help...