This repository has been archived by the owner on Feb 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
pref: add fulltext index for bookmarkEntries.text
#382
Open
hi-ogawa
wants to merge
10
commits into
main
Choose a base branch
from
perf-ngram-fulltext
base: main
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.
Open
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
16f50a9
chore: update README.md
hi-ogawa ccc0cc0
feat: add FULLTEXT KEY
hi-ogawa 8e22db1
chore: skeema lint
hi-ogawa 7db9a64
chore: skeema lint
hi-ogawa 1e2b7e0
feat: use MATCH query
hi-ogawa 64accaf
fix: workaround single character match
hi-ogawa b1e1f5f
feat: add `bookmarkEntries.textCharacters` for single character search
hi-ogawa eb258ff
chore: update knex migrations
hi-ogawa 881ab28
chore: skeema lint
hi-ogawa 234d795
chore: skeema lint
hi-ogawa 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
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
app/db/migrations/20230511032932_bookmarkEntries-text-fulltext-key.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { Knex } from "knex"; | ||
|
||
export async function up(knex: Knex) { | ||
await knex.raw( | ||
"ALTER TABLE `bookmarkEntries` ADD FULLTEXT KEY `text` (`text`) /*!50100 WITH PARSER `ngram` */ ;" | ||
); | ||
} | ||
|
||
export async function down(knex: Knex) { | ||
await knex.raw("ALTER TABLE `bookmarkEntries` DROP KEY `text`;"); | ||
} |
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
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.
skeema put extra trailing space after magic comment.
It's a bit too annoying. Not sure if there's any workaround.