Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@pushrbx
Copy link
Collaborator

@pushrbx pushrbx commented Jun 26, 2023

  • Better typesense 0.24.1 support
  • Exhaustive search disabled by default
  • Added central place for the MAX_RESULTS_PER_PAGE option
    • In the future we should strive for the "options" pattern, where a class represents the configuration options of the app and applies safe defaults in the correct type.
    • Added max_results_per_page() helper function as part of this fix.
  • Added class for getting searchable attributes of models in typesense
  • Added basic search analytics:
    • The default implementation saves the search terms and the first page of hits and hit count in the database, and indexes the search term in Typesense.
    • Indexing the search terms used by users will later help with adding new features. (E.g. search suggestions)
  • Fixed tests
  • Fixed an issue with the /v4/schedules/<dayFilter> request validator.
  • Fixed deprecation logger
  • Fixed bug with ordering through the search engine. E.g. ?q=searchterm&order_by=score would not order by score, rather by the default sort order.
  • Fixed πŸ› Looking up some profiles or user with uppercased username will throw 404Β #411

Exhaustive search disabled means that typesense will eat less system resources, but the number of hits will decrease, but the quality of relevance won't be affected.
I think with earlier versions of typesense we used exhaustive search to have enough hits. However the latest version already returns enough hits with exhaustive search turned off for most of the use cases. Only the drop_tokens_threshold and typo_tokens_threshold needs to be tweaked, and we can get good enough results I think.

Might fixes these issues:

pushrbx added 2 commits June 27, 2023 14:45
- better typesense 0.24.1 support
- exhaustive search disabled by default
- central place for the MAX_RESULTS_PER_PAGE option
- added class for getting searchable attributes of models in typesense
@pushrbx pushrbx force-pushed the search-improvements-3 branch from 78ba97f to eed1a33 Compare June 27, 2023 13:47
@pushrbx pushrbx changed the title Added fixes for searching Added fixes for searching and various things Jun 29, 2023
@pushrbx pushrbx marked this pull request as ready for review June 29, 2023 20:07
@pushrbx pushrbx requested a review from a team as a code owner June 29, 2023 20:07
@Wamy-Dev
Copy link

Wamy-Dev commented Jul 3, 2023

Searching Girls & Panzer doesn't bring up anything, but searching Panzer does.

Girls and Panzer also doesn't work.

@irfan-dahir
Copy link
Contributor

Only the drop_tokens_threshold and typo_tokens_threshold needs to be tweaked, and we can get good enough results I think.

Do you think we should add these to .env.dist?

@pushrbx
Copy link
Collaborator Author

pushrbx commented Jul 7, 2023

Only the drop_tokens_threshold and typo_tokens_threshold needs to be tweaked, and we can get good enough results I think.

Do you think we should add these to .env.dist?

Only if we want to fully support the tweaking of it for not so hardcore users.

@irfan-dahir
Copy link
Contributor

LGTM

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.

πŸ› Looking up some profiles or user with uppercased username will throw 404

3 participants