You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently added a gin index to dataclips.body, however the search query is treating the body as a string.
In order to use a gin index on a JSONB type, the query should use a json operator (@>, @@, @?...).
So in order to search dataclips as text (and be performant), we need to:
Cast the json as a tsvector
Attention should be paid as to the dictionary choice to ignore JSON syntax.
Store the vector in a new column (body_search_vector?)
Add a GIN index to the new column.
Change the history page query to use the search vector instead of casting the body as a string.
NOTE: re: dictionary choice, we need to make sure that this accommodates a variety of searching patterns - please can we document at least 5 varying json document structure and/or search string variations. With tsvector it's entirely possible that compound words (camelCase) and other "not English words" might be ignored.
The text was updated successfully, but these errors were encountered:
* make key DB options configurable via ENV
* allow the delete query to take 100s
* remove unused jsonb index on dataclips to make insert/delete faster, see #1939
* use envy"
* remove unused
* update changelog
* always set queue target and interval
* disable ddl trans, migration lock; add indexes to steps
* make key DB options configurable via ENV
* use envy
* remove unused
* add tests to lock in current functionality
* fix rejected status
* fix#1794, close#1939
* format
* changelog
We recently added a
gin
index todataclips.body
, however the search query is treating the body as a string.In order to use a gin index on a JSONB type, the query should use a json operator (
@>
,@@
,@?
...).So in order to search dataclips as text (and be performant), we need to:
Attention should be paid as to the dictionary choice to ignore JSON syntax.
body_search_vector
?)NOTE: re: dictionary choice, we need to make sure that this accommodates a variety of searching patterns - please can we document at least 5 varying json document structure and/or search string variations. With tsvector it's entirely possible that compound words (camelCase) and other "not English words" might be ignored.
The text was updated successfully, but these errors were encountered: