I have this query below but it return 1 result only, now i want it to return multiple one and can be paginate (with or without Kaminari). I'm new to elasticsearch so please help
query: {
bool: {
should: [
{nested: {
path: 'item_info',
query: {
bool: {
should: [{
match: {'item_info.name': {query: params[:item_request][:key_word], fuzziness: 'AUTO'}}
},
{
match: {'item_info.sku': {query: params[:item_request][:key_word], fuzziness: 'AUTO'}}
},]
}
}
}},
{nested: {
path: 'catalog',
query: {
bool: {
should: [{
match: {'catalog.name': {query: params[:item_request][:key_word], fuzziness: 'AUTO'}}
}]
}
}
}},
{nested: {
path: 'companies',
query: {
bool: {
should: [{
match: {'companies.name': {query: params[:item_request][:key_word], fuzziness: 'AUTO'}}
}]
}
}
}}
]
}
}