Multiple requests in one query

Hi all,

I was wondering if I can pass multiple queries in single requests. I'm
trying to compute a table using elastic search. I have to execute 100
queries separately to fill up the table. Thats lots of network I/0 instead
I'm wondering If i can pass multiple queries in one request.

Like

{

  • query: {
    • bool: {
      • must: [
        • {
          • term: {
            • type.listA: a
              }
              }
        • {
          • term: {
            • type.listA: b
              }
              }
              ]
      }
      }

},

{

  • query: {
    • bool: {
      • must: [
        • {
          • term: {
            • type.listA: d
              }
              }
        • {
          • term: {
            • type.listA: e
              }
              }
              ]
      }
      }

}

Thanks

--
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.

Have a look at: http://www.elasticsearch.org/guide/reference/api/multi-search/

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 12 avr. 2013 à 20:00, Abhishek Andhavarapu abhishek376@gmail.com a écrit :

Hi all,

I was wondering if I can pass multiple queries in single requests. I'm trying to compute a table using Elasticsearch. I have to execute 100 queries separately to fill up the table. Thats lots of network I/0 instead I'm wondering If i can pass multiple queries in one request.

Like

{
query: {
bool: {
must: [
{
term: {
type.listA: a
}
}
{
term: {
type.listA: b
}
}
]

}
}

},

{
query: {
bool: {
must: [
{
term: {
type.listA: d
}
}
{
term: {
type.listA: e
}
}
]

}
}

}

Thanks

--
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.

Hey,

just a note about your network I/O. It might make sense not to put 100
requests in one multi search request, because the slowest of these queries
will determine the total response time of your request and slow down all
others. Please check out your HTTP connection library if it supports HTTP
Keep Alive, so you can save the overhead of creating new TCP connections
and 'only' have the HTTP overhead per request (which is ok in most cases).
Also, do some performance tests if your HTTP client library maybe slow at
special circumstances and if it makes sense to replace...

--Alex

On Fri, Apr 12, 2013 at 8:01 PM, David Pilato david@pilato.fr wrote:

Have a look at:
http://www.elasticsearch.org/guide/reference/api/multi-search/

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 12 avr. 2013 à 20:00, Abhishek Andhavarapu abhishek376@gmail.com a
écrit :

Hi all,

I was wondering if I can pass multiple queries in single requests. I'm
trying to compute a table using Elasticsearch. I have to execute 100
queries separately to fill up the table. Thats lots of network I/0 instead
I'm wondering If i can pass multiple queries in one request.

Like

{

  • query: {
    • bool: {
      • must: [
        • {
          • term: {
            • type.listA: a
              }
              }
        • {
          • term: {
            • type.listA: b
              }
              }
              ]
      }
      }

},

{

  • query: {
    • bool: {
      • must: [
        • {
          • term: {
            • type.listA: d
              }
              }
        • {
          • term: {
            • type.listA: e
              }
              }
              ]
      }
      }

}

Thanks

--
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.

--
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.