From 1d9d4b591a27bc29ce09ee7a4df3cc1104ad9541 Mon Sep 17 00:00:00 2001 From: w2 Date: Sat, 5 Mar 2022 23:39:02 +0000 Subject: [PATCH] fix: search column name --- src/crud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crud.py b/src/crud.py index fdd971a..92930d3 100644 --- a/src/crud.py +++ b/src/crud.py @@ -30,7 +30,7 @@ def get_item_by_description(db: Session, needle: str, skip: int = 0, limit: int result = ( db.query(models.Item) .filter( - items_table.c.ts.op("@@")(func.websearch_to_tsquery('"russian"', needle)) + items_table.c.geodata_search_ts.op("@@")(func.websearch_to_tsquery('"russian"', needle)) ) .order_by(items_table.c.id) .offset(skip)