Hi!
I created a FTS with city field as keyword:
But when I try to get info abouts facets, it doesn´t get facet info.
Docs schema:
[
{
"_class": "XXXX.SchoolDocument",
"address": "C/VIRGEN DEL MAR",
"address_number": 2,
"city": "ALMERIA",
"collective": "HIJAS CARIDAD ANDALUCIA",
"email": "XXX@HOTMAIL.COM",
"index": "XXX_es",
"latitude": 36.83756,
"longitude": -2.46483,
"name": "NTRA. SRA. DEL MILAGRO",
"province": "ALMERIA",
"school_id": 439007,
"telephone": 95000000,
"zip_code": 4002
},
(...)
This is my query (N1QL):
select s.*
from `XXX-local` s
WHERE SEARCH(s,
{"query": {
"must": {
"conjuncts": [
{"field":"_class", "match": "XXXX.SchoolDocument"},
{"field":"province", "wildcard": "*ALM*"}
]
}
},
"facets": {
"cities": {
"size": 5000,
"field": "city"
}
},
"fields": ["*"],
"sort": ["-_id"],
"size": 100, "from": 0
}
)
;
Result by query, same as document saved (no facets section):
[
{
"_class": "XXXX.SchoolDocument",
"address": "C/VIRGEN DEL MAR",
"address_number": 2,
"city": "ALMERIA",
"collective": "HIJAS CARIDAD ANDALUCIA",
"email": "XXX@HOTMAIL.COM",
"index": "XXX_es",
"latitude": 36.83756,
"longitude": -2.46483,
"name": "NTRA. SRA. DEL MILAGRO",
"province": "ALMERIA",
"school_id": 439007,
"telephone": 950000000,
"zip_code": 4002
},
(...)
What am I doing wrong?
Thanks in advance.