[Q&A] How can I specify the field name when using the new pdb.match function?
#3072
What happens?I used to be able to specify the field name used for create index if not exists snippets_bm25_idx on public.snippets using bm25 (id, name, description, content, created_at, modified_at) with (
key_field = 'id',
text_fields = $$
{
"name_ngram": {
"column": "name",
"tokenizer": {
"type": "ngram",
"min_gram": 2,
"max_gram": 3,
"prefix_only": false
}
},
"description_default": {
"column": "description",
"tokenizer": {
"type": "default"
}
},
"content_source_code": {
"column": "content",
"tokenizer": {
"type": "source_code"
}
}
}
$$
);I used to be able to do this: select
public.snippets.id,
public.snippets.name
from
public.snippets
where
public.snippets.id @@@ paradedb.match(
field := 'name_ngram',
value := 'sample query'
)
order by
paradedb.score(public.snippets.id) desc,
public.snippets.modified_at desc
limit
10;So, can I do the same when using To ReproduceN/A OS:Debian GNU/Linux 12 (bookworm) ParadeDB Version (e.g. output of
|
Answered by
abdelfattahradwan
Aug 29, 2025
Replies: 1 comment 1 reply
|
According to this, there is no way to supply a field name to the new |
1 reply
Answer selected by
abdelfattahradwan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to this, there is no way to supply a field name to the new
pdb.*functions, so I will stick with theparadedb.*ones.