paul1
(paul)
November 22, 2013, 10:41am
1
when i query without limit i get 6 result as
tution: 16512
tution: 17632
tution: 17822
tution: 17870
tution: 19683
tution: 19838
when i add limit like in the query below the 1st element is lost , limit
should remove the last element
{
"query": {
"filtered": {
"query": {
"match": {
"programs": "computer science"
}
},
"filter": {
"and": [
{
"limit": {
"value": 5
}
},
{
"range": {
"tution": {
"from": 10000,
"to": 20000
}
}
}
]
}
}
},
"sort": [
{
"tution": {
"order": "asc"
}
}
]
}
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
Ivan
(Ivan Brusic)
November 22, 2013, 7:52pm
2
Have you looked into using the size parameter of the query? Much simpler
solution.
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
I never used the limit filter, but it looks more useful for doing
statistics on a limited subsection of the index.
Cheers,
Ivan
On Fri, Nov 22, 2013 at 2:41 AM, paul avinashpaul85@gmail.com wrote:
when i query without limit i get 6 result as
tution: 16512
tution: 17632
tution: 17822
tution: 17870
tution: 19683
tution: 19838
when i add limit like in the query below the 1st element is lost , limit
should remove the last element
{
"query": {
"filtered": {
"query": {
"match": {
"programs": "computer science"
}
},
"filter": {
"and": [
{
"limit": {
"value": 5
}
},
{
"range": {
"tution": {
"from": 10000,
"to": 20000
}
}
}
]
}
}
},
"sort": [
{
"tution": {
"order": "asc"
}
}
]
}
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .