-
Notifications
You must be signed in to change notification settings - Fork 380
Open
Description
I am using search scopes and want to apply weights to associations. I have seen #132 and #40 but the syntax presented in them doesn’t seem to work.
pg_search_scope :full_search,
against: {
title: "A",
introduction: "B",
hashtag: "C"
},
associated_against: {
content_rows: [
{ text_1: "D" },
{ text_2: "E" },
{ image_caption_1: "F" },
{ image_caption_2: "G" }
]
}
Gives the error PG::UndefinedColumn: ERROR: column content_rows.{:text_1=>"D"} does not exist LINE 1: ...IN (SELECT "content_pages"."id" AS id, string_agg("content_r... ^
And
pg_search_scope :full_search,
against: {
title: "A",
introduction: "B",
hashtag: "C"
},
associated_against: {
content_rows: {
text_1: "D",
text_2: "E",
image_caption_1: "F",
image_caption_2: "G"
}
}
gives PG::InternalError: ERROR: unrecognized weight: 69 .
Is there a way to do this?
Metadata
Metadata
Assignees
Labels
No labels