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

ya-procachal-tvoi-search-chyvak #73

Merged
merged 13 commits into from
Dec 28, 2023
Merged

Conversation

tikitko
Copy link
Member

@tikitko tikitko commented Dec 26, 2023

No description provided.

@tikitko tikitko linked an issue Dec 26, 2023 that may be closed by this pull request
@YoshkiMatryoshki
Copy link
Member

Any Searches comparisons? Is new version really more optimal?

@YoshkiMatryoshki
Copy link
Member

How existing post will be updated?

Copy link
Member

@YoshkiMatryoshki YoshkiMatryoshki left a comment

Choose a reason for hiding this comment

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

migration. Old posts content will be excluded from search until thay manually updated?

@tikitko
Copy link
Member Author

tikitko commented Dec 26, 2023

Any Searches comparisons? Is new version really more optimal?

https://www.postgresql.org/docs/10/textsearch-intro.html

Textual search operators have existed in databases for years. PostgreSQL has ~, ~*, LIKE, and ILIKE operators for textual data types, but they lack many essential properties required by modern information systems:

There is no linguistic support, even for English. Regular expressions are not sufficient because they cannot easily handle derived words, e.g., satisfies and satisfy. You might miss documents that contain satisfies, although you probably would like to find them when searching for satisfy. It is possible to use OR to search for multiple derived forms, but this is tedious and error-prone (some words can have several thousand derivatives).

They provide no ordering (ranking) of search results, which makes them ineffective when thousands of matching documents are found.

They tend to be slow because there is no index support, so they must process all documents for every search.

as for beginning, should be enough.

@tikitko
Copy link
Member Author

tikitko commented Dec 26, 2023

How existing post will be updated?

migration. Old posts content will be excluded from search until thay manually updated?

not a lot of posts now, can be updated manually.

blog-server-api/src/main.rs Outdated Show resolved Hide resolved
blog-server-api/src/main.rs Outdated Show resolved Hide resolved
Copy link

@Bugord Bugord left a comment

Choose a reason for hiding this comment

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

Change pull request name

@tikitko
Copy link
Member Author

tikitko commented Dec 27, 2023

Change pull request name

image

table_pg.sql Show resolved Hide resolved
blog-server-api/src/migrations/content.rs Outdated Show resolved Hide resolved
@tikitko tikitko merged commit 17cd0be into main Dec 28, 2023
1 check passed
@tikitko tikitko deleted the ya-procachal-tvoi-search-chyvak branch December 28, 2023 09:36
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.

[server] refactor search logic
3 participants