Hi I am facing the following issue with pinned_hi...
# community-help
a
Hi I am facing the following issue with pinned_hits in v27.1. The issue is not reproducible in docker v28 response includes products in pinned_hits list that violate the filter clauses in the search query. I hope this is fixed in v28. When will v28 be released?
Copy code
// schema
{
    "created_at": 1739191562,
    "default_sorting_field": "",
    "enable_nested_fields": true,
    "fields": [
      {
        "facet": true,
        "index": true,
        "infix": false,
        "locale": "",
        "name": "product_id",
        "optional": false,
        "sort": true,
        "stem": false,
        "store": true,
        "type": "string"
      },
    {
      "facet": false,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "catalogs.Bangalore.name",
      "optional": true,
      "sort": true,
      "stem": false,
      "store": true,
      "type": "string"
    },
    {
        "facet": false,
        "index": true,
        "infix": false,
        "locale": "",
        "name": "catalogs.Bangalore.catalog_name",
        "optional": true,
        "sort": false,
        "stem": false,
        "store": true,
        "type": "string"
      },
      {
        "facet": false,
        "index": true,
        "infix": false,
        "locale": "",
        "name": "catalogs.Bangalore.category_id",
        "optional": true,
        "sort": false,
        "stem": false,
        "store": true,
        "type": "string[]"
      }
    },
],
"name": "Bangalore_products",
"num_documents": 6755,
"symbols_to_index": [],
"token_separators": []
}

// search query

      {
        "searches": [
          {
            "collection": "Bangalore_products",
            "q": "*",
            "query_by": "catalogs.Bangalore.name",
            "filter_by": "catalogs.Bangalore.catalog_name:=Bangalore&& product_id:=[1177]&& (catalogs.Bangalore.category_id:=[229]) ",
            "include_fields": "product_id,catalogs.Bangalore.category_id",
            "pinned_hits": "5132:1",
            "filter_curated_hits": true,
            "page": 1,
            "per_page": 100
          }
        ]
      }


// response includes a product 5132 which is a violation of the filter clauses in the search query ( misses both product_id and category_id)
// this happens only because it is present in the pinned_hits list
// pinned_hits are not filtered by the filter clauses in the search query!
// pinned hits should be defined as a subset of the search results and should not override the search conditions
      {
        "results": [
            {
                "facet_counts": [],
                "found": 1,
                "hits": [
                    {
                        "curated": true,
                        "document": {
                            "catalogs": {
                                "Bangalore": {
                                    "category_id": [
                                        "28",
                                        "49",
                                        "53",
                                        "80",
                                        "116",
                                        "118",
                                        "127",
                                        "130",
                                        "140",
                                        "147",
                                        "164",
                                        "248"
                                    ]
                                }
                            },
                            "product_id": "5132"
                        },
                        "highlight": {},
                        "highlights": []
                    }
                ],
                "out_of": 5216,
                "page": 1,
                "request_params": {
                    "collection_name": "Bangalore_products",
                    "first_q": "*",
                    "per_page": 100,
                    "q": "*"
                },
                "search_cutoff": false,
                "search_time_ms": 2
            }
        ]
    }
k
Looking to release it this week
a
ok thanks..