Quantcast

Elastic search : How to control result set of any search query.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Elastic search : How to control result set of any search query.

mohit.Kumar
hello  folks,

              Is there any way to control the size of  result set of any query in elastic search. 

thanks and regards
Mohit Kumar Yadav

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Elastic search : How to control result set of any search query.

hoong
As I know, you can control the size of result by using size option like sample query below...
{
  "from" : 0,
  "size" : 30,    <--- here, you can get 30 search result.
  "filter" : {
    "or" : {
      "filters" : [ {
        "and" : {
          "filters" : [ {
            "range" : {
              "save_time" : {
                "from" : "20130215195941",
                "to" : "20130215200440",
                "include_lower" : true,
                "include_upper" : true
              }
            }
          }, {
            "range" : {
              "d_port" : {
                "from" : null,
                "to" : 80,
                "include_lower" : true,
                "include_upper" : false
              }
            }
          }, {
            "range" : {
              "d_port" : {
                "from" : -1,
                "to" : null,
                "include_lower" : true,
                "include_upper" : true
              }
            }
          }, {
            "term" : {
              "reason" : "tcp fin"
            }
          }, {
            "term" : {
              "dev_id" : "1"
            }
          } ]
        }
      } ]
    }
  }
}


2013/2/17 Mohit Kumar Yadav <[hidden email]>
hello  folks,

              Is there any way to control the size of  result set of any query in elastic search. 

thanks and regards
Mohit Kumar Yadav

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
_____________________________________

전동규
연세대학교 정보산업공학과
지능 웹 비즈니스 연구실
[hidden email] / 010-4142-4160
_____________________________________

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Elastic search : How to control result set of any search query.

mohit.Kumar
In reply to this post by mohit.Kumar
hi hoong 
    thanks for reply. Is there any way to control size of results set of a particular field.

On Sunday, February 17, 2013 7:55:46 PM UTC+5:30, Mohit Kumar Yadav wrote:
hello  folks,

              Is there any way to control the size of  result set of any query in elastic search. 

thanks and regards
Mohit Kumar Yadav

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Loading...