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

fix(theses): use Whooshee for full text theses search #117

Merged
merged 6 commits into from
May 24, 2024

Conversation

true-real-michael
Copy link
Contributor

@true-real-michael true-real-michael commented May 20, 2024

Use Flask-Whooshee instead of flask-msearch for full text search

Issue #92 mentions the broken search engine at https://se.math.spbu.ru/theses.html
Issue #74 mentions the deprecated technologies used for full text search.
This PR replaces flask-msearch with Flask-Whooshee, which is more actively maintained and works in this case.

Changes made:

  1. Removed flask-msearch dependency withFlask-Whooshee.
  2. Replaced__searchable__ = [...] attribute with @whooshee.register_model(...) for Users and Thesis models.
  3. Replaced msearch with whooshee initialization.
  4. Replaced msearch(search) with whooshee_search(search) in fetch_theses().
  5. Added indexing when starting the app.

@true-real-michael true-real-michael changed the title fix(theses): use Whooshee for theses full text theses search fix(theses): use Whooshee for full text theses search May 20, 2024
@true-real-michael true-real-michael marked this pull request as draft May 21, 2024 10:36
Copy link
Contributor

@iakov iakov left a comment

Choose a reason for hiding this comment

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

Thank you very much!

@true-real-michael
Copy link
Contributor Author

Reopening this because @iakov has approved the changes.
However, I do not have the resources to extensively test the solution and the potential edge cases.

@true-real-michael true-real-michael marked this pull request as ready for review May 22, 2024 22:36
@iakov iakov merged commit 3ebee0d into spbu-se:current May 24, 2024
12 checks passed
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.

None yet

2 participants