-
Notifications
You must be signed in to change notification settings - Fork 54
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
In a query, ||
does not work when nested in <->
#119
Comments
Please, provide us the test data and the query, which illustrate the
problem.
…On Sat, Sep 23, 2023 at 4:04 AM 1Computer1 ***@***.***> wrote:
The query (A || B) <-> C does not give any results, though it should be
equivalent to (A <-> C) || (B <-> C), which does.
The built in GIN index can handle this case.
There may be other problems with ||, though I haven't looked too deep
into it.
I'm using a rum_tsvector_addon_ops index attaching a float.
Thanks!
—
Reply to this email directly, view it on GitHub
<#119>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQURYXUHZ6NMRV4FD43A3DX3YYRHANCNFSM6AAAAAA5DZ4LYY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
|
Apologies, I couldn't reproduce it with a small set of data so this will be large file: Set up: create extension rum;
create table documents (
en text not null,
score float not null
);
alter table documents
add column textsearch_index_en_col tsvector
generated always as (to_tsvector('english', en)) stored;
copy documents (en, score) from '/data.tsv' csv header delimiter E'\t';
create index textsearch_index_en on documents
using rum (textsearch_index_en_col rum_tsvector_addon_ops, score)
with (attach = 'score', to = 'textsearch_index_en_col'); Queries: select * from documents where textsearch_index_en_col @@ ('pet'::tsquery <-> ('dog'::tsquery || 'cat'::tsquery));
select * from documents where textsearch_index_en_col @@ (('pet'::tsquery <-> 'dog'::tsquery) || ('pet'::tsquery <-> 'cat'::tsquery)); |
On Sat, Sep 23, 2023 at 8:34 AM 1Computer1 ***@***.***> wrote:
Apologies, I couldn't reproduce it with a small set of data so this will
be large file:
data.zip <https://github.com/postgrespro/rum/files/12706430/data.zip>
I could reproduce it with a tiny test set, just replace your COPY command
with:
insert into documents values ('the pet cat is in the shed',56);
Then just do `set enable_seqscan=off;` and run your given query.
I don't know the cause, though.
Message ID: ***@***.***>
… |
1Computer1
added a commit
to 1Computer1/sengenbango
that referenced
this issue
Oct 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The query
(A || B) <-> C
does not give any results, though it should be equivalent to(A <-> C) || (B <-> C)
, which does.The built in GIN index can handle this case.
There may be other problems with
||
, though I haven't looked too deep into it.I'm using a
rum_tsvector_addon_ops
index attaching afloat
.Thanks!
The text was updated successfully, but these errors were encountered: