Answer the question
In order to leave comments, you need to log in
How to search in elasticsearch with filtering by attributes?
There is an index, it contains a collection with the following mapping:
{
"sitcenter": {
"mappings": {
"periodical": {
"properties": {
"access_index": {
"type": "integer"
},
"category_id": {
"type": "integer"
},
"keywords": {
"type": "text"
},
"keywords_kk": {
"type": "text"
},
"publish_date": {
"type": "date"
}
}
}
}
}
}
{
"size": 50,
"query": {
"bool": {
"should": {
"wildcard": {
"keywords": {
"value": "автобус*",
"boost": 2
}
}
},
"filter": {
"range": {
"access_index": {
"lte": 10
}
}
}
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question