onegov-cloud icon indicating copy to clipboard operation
onegov-cloud copied to clipboard

Ogc 508 replace elastic search by postgres v3

Open Tschuppi81 opened this issue 1 year ago • 7 comments

Search: Adds postgres search including views /search-postgres?q=test

TYPE: Feature LINK: ogc-508

Checklist

  • [x] I have performed a self-review of my code
  • [x] I considered adding a reviewer
  • [x] I made changes/features for both org and town6, agency, fsi, translator, winterthur, feriennet
  • [x] I have tested my code thoroughly by hand
  • [x] I have added tests for my changes/features

Tschuppi81 avatar Oct 25 '24 09:10 Tschuppi81

Codecov Report

:x: Patch coverage is 82.25806% with 88 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 85.54%. Comparing base (c64c9d7) to head (f613138). :warning: Report is 1 commits behind head on master. :white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/onegov/org/models/search.py 82.75% 25 Missing :warning:
src/onegov/search/indexer.py 83.44% 24 Missing :warning:
src/onegov/search/cli.py 25.00% 18 Missing :warning:
src/onegov/org/views/search.py 68.18% 7 Missing :warning:
src/onegov/search/integration.py 78.57% 6 Missing :warning:
src/onegov/people/models/agency.py 75.00% 3 Missing :warning:
src/onegov/search/search_index.py 93.75% 2 Missing :warning:
src/onegov/fsi/views/search.py 92.85% 1 Missing :warning:
src/onegov/org/request.py 66.66% 1 Missing :warning:
src/onegov/search/utils.py 94.44% 1 Missing :warning:
Additional details and impacted files
Files with missing lines Coverage Δ
src/onegov/agency/models/agency.py 93.67% <100.00%> (+0.24%) :arrow_up:
src/onegov/agency/models/person.py 100.00% <100.00%> (ø)
src/onegov/agency/views/search.py 100.00% <100.00%> (ø)
src/onegov/directory/models/directory_entry.py 96.87% <ø> (ø)
src/onegov/event/collections/events.py 93.71% <100.00%> (+1.23%) :arrow_up:
src/onegov/landsgemeinde/views/search.py 100.00% <100.00%> (ø)
src/onegov/onboarding/app.py 100.00% <100.00%> (ø)
src/onegov/onboarding/models/town_assistant.py 93.54% <100.00%> (ø)
src/onegov/org/app.py 96.45% <100.00%> (ø)
src/onegov/org/cronjobs.py 88.52% <100.00%> (ø)
... and 19 more

... and 9 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c64c9d7...f613138. Read the comment docs.

:rocket: New features to boost your workflow:
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Oct 25 '24 16:10 codecov[bot]

With this approach no additional hybrid_properties are needed.

Tschuppi81 avatar Oct 25 '24 19:10 Tschuppi81

@Daverball Final review for postgres searching on separate views /search-postgres?q=test (not yet productive)

Tschuppi81 avatar Nov 04 '24 20:11 Tschuppi81

@Daverball Could you please check my latest changes?

Tschuppi81 avatar Jan 20 '25 09:01 Tschuppi81

Since I introduced table search_index (class SearchIndex) the tests fail with the following error which I am not able to resolve

   File "/__w/onegov-cloud/onegov-cloud/src/onegov/search/indexer.py", line 25, in <module>
    from onegov.search.search_index import SearchIndex
ImportError: Error importing plugin "tests.shared": No module named 'onegov.search.search_index'

Tschuppi81 avatar Mar 17 '25 08:03 Tschuppi81

Since I introduced table search_index (class SearchIndex) the tests fail with the following error which I am not able to resolve

   File "/__w/onegov-cloud/onegov-cloud/src/onegov/search/indexer.py", line 25, in <module>
    from onegov.search.search_index import SearchIndex
ImportError: Error importing plugin "tests.shared": No module named 'onegov.search.search_index'

You forgot to add this file to your commits, it's not currently part of the pull request.

Daverball avatar Mar 17 '25 09:03 Daverball