mongoose-elasticsearch-xp
mongoose-elasticsearch-xp copied to clipboard
How to chane the size of search reponse? By default its giving only 10 search results.
trafficstars
We can use size parameter in searchOptions when querying the data.
Example:
let query = {
'query': {
'bool': {
'filter': [
// Do some query
]}
}
}
let searchOptions = {
size: 25, // Here we use size
hydrate: true
}
ModelName.esSearch(query, searchOptions, function (error, results) {
// Do something with results
})
Hi, Are search options working with Lucene syntax? I still get 10 results with size option set to 20.
Hi,
I've checked the esSearch source code and I don't see any support for es pagination (https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html) I've tried with the size option, this doesn't have any effect. Any plans on supporting this?
Kind regards, Yannick