Hey guys, does Typesense return max, min, and aver...
# community-help
a
Hey guys, does Typesense return max, min, and average values only for integer fields while faceting, and not for float fields?
k
Yes it will be returned for float also
a
Hi @Kishore Nallan It’s not working on my end! My schema is like
Copy code
{
  "fields": [
    ...
    {
      "facet": true,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "price",
      "optional": true,
      "sort": true,
      "stem": false,
      "store": true,
      "type": "float"
    }
    ...
  ]
}
My query is like
Copy code
[
    {
      "collection": "testing-2-index-1",
      "q": "*",
      "facet_by": "brand,color,gender,price",
      "page": 1,
      "per_page": 10,
      "query_by": "additionalCategories,title,brand"
    },
    {
      "collection": "testing-2-index-1",
      "q": "*",
      "facet_by": "brand",
      "page": 1,
      "per_page": 10,
      "query_by": "additionalCategories,title,brand"
    },
    {
      "collection": "testing-2-index-1",
      "q": "*",
      "facet_by": "color",
      "page": 1,
      "per_page": 10,
      "query_by": "additionalCategories,title,brand"
    },
    {
      "collection": "testing-2-index-1",
      "q": "*",
      "facet_by": "gender",
      "page": 1,
      "per_page": 10,
      "query_by": "additionalCategories,title,brand"
    },
    {
      "collection": "testing-2-index-1",
      "q": "*",
      "facet_by": "price",
      "page": 1,
      "per_page": 10,
      "query_by": "additionalCategories,title,brand"
    }

  ]
Hi @Kishore Nallan Can you take a look at this one, please?
k
It definitely works, and I just tried with a simple example as well. Please provide a reproducible example like this: https://gist.github.com/jasonbosco/7c3432713216c378472f13e72246f46b
a
@Kishore Nallan It’s working.Thank you.