-
Notifications
You must be signed in to change notification settings - Fork 62
Description
We have 3 products with the name:
1.защитное стекло для экрана samsung galaxy
2.защитное стекло для экрана apple iphone
3.защитное стекло для экрана xiaomi
• we have a synonym "бронестекло => защитное стекло"
upon request SELECT , COUNT() FROM products WHERE search_products = '@name +бронестекло' I get all 3 items.
But if I add another word, there will be errors:
SELECT , COUNT() FROM products WHERE search_products = '@name +бронестекло +iphone'
I expect to get only the second product, but I get all three.
SELECT , COUNT() FROM products WHERE search_products = '@name +бронестекло +samsung'
I expect to see only the first product, but displays all three products
SELECT , COUNT() FROM products WHERE search_products = '@name +бронестекло +xiaomi'
I expect only the third product, but displays all three.
SELECT , COUNT() FROM products WHERE search_products = '@name +бронестекло +something +not +in +the +title'
I expect a blank search, but all three products are displayed
type Product struct {
Id string reindex:"id" json:"id"
SpaceId string reindex:"space_id" json:"space_id"
Name string reindex:"name,tree" json:"name"
_ struct{} reindex:"name+brand=search_products,text,composite"
_ struct{} reindex:"id+space_id,,composite,pk"
}
products := []Product{
{
Id: "1",
SpaceId: "msk_cl",
Name: "защитное стекло для экрана samsung galaxy",
},
{
Id: "2",
SpaceId: "msk_cl",
Name: "защитное стекло для экрана apple iphone",
},
{
Id: "3",
SpaceId: "msk_cl",
Name: "защитное стекло для экрана xiaomi",
},
}