-
Notifications
You must be signed in to change notification settings - Fork 55
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
RUM Index WITH rum_tsvector_addon_ops does not work for jsonb columns #58
Comments
Sorry, on running this
You get...
|
Hello @ngigiwaithaka , Thank you for the issue! Unfortunately it isn't possible to attach exression's result as a additional information nowadays.
Also it is necessary to pass |
@za-arthur Thanks for prompt reply. Any plans to have this feature included anytime soon? |
There was no such plan until today :) |
:-) my bad.... I have also posting something else I have come across, hope they wouldn't be too many for you today... :-) |
Of course not! You are welcome to create issues. |
This problem occurs not only with jsonb, but also in a simpler case - if you try to index not by the [additional] tsvector field, but by the text field, which is sad, since you actually have to duplicate a huge field, which doubles the size of an already rather big table. And the index for this redundant tsvector field is almost a threefold increase in the table as a result Эта проблема встречается не только с jsonb, но и в более простом случае - если пытаться индексировать не по [дополнительному] полю tsvector, а по текстовому полю, что печально, так как приходится фактически дублировать огромное поле, что увеличивает размер и так немаленькой таблицы вдвое. А ещё индекс по этому избыточному полю tsvector - почти трёхкратное увеличение таблицы в итоге create index on ... using rum (to_tsvector('lang', text_column) rum_tsvector_addon_ops, ts)
with (attach = 'ts', to = 'to_tsvector(''lang'', text_column)'); |
Suppose you have this table
CREATE TABLE articles (id int, object_data JSONB);
If object_data has two fields (article & timeCreatedAsFromServer)
The following returns the error
ERROR: attribute "((object_data -> 'timeCreatedAsFromServer')::bigint)" is not found in table
If you omit the WITH clause, it works as below!
The text was updated successfully, but these errors were encountered: