How can I get N document from each facet

Is there any way to get N document?

What I am doing is

  1. query with "facets"
  2. get facet list
  3. looping and get document

How can I get the data with one query request?

Thanks.

--

What I will probably do is to send 2 calls:
1 - facet computation
2 - multisearch query for each term or a Terms Query with an array of facet terms as parameter.

I can't see a way to do it with only one call.

FYI, I need also to get a list of documents matching a Facet when number of docs is small (less than 10 for example) and I'm still digging into the source code to see if it's possible or not to get it with only one call.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 21 déc. 2012 à 10:39, Chunki Calvin Lee lck7141@widerplanet.com a écrit :

Is there any way to get N document?

What I am doing is

  1. query with "facets"
  2. get facet list
  3. looping and get document

How can I get the data with one query request?

Thanks.

--

Thanks for your answer.

Unfortunately, I am using php so I can not run multi search query.
whenever I use php's curl function, elasticsearch returns first query's
result.

2012년 12월 21일 금요일 오후 7시 36분 8초 UTC+9, David Pilato 님의 말:

What I will probably do is to send 2 calls:
1 - facet computation
2 - multisearch query for each term or a Terms Query with an array of
facet terms as parameter.

I can't see a way to do it with only one call.

FYI, I need also to get a list of documents matching a Facet when number
of docs is small (less than 10 for example) and I'm still digging into the
source code to see if it's possible or not to get it with only one call.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 21 déc. 2012 à 10:39, Chunki Calvin Lee <lck...@widerplanet.com<javascript:>>
a écrit :

Is there any way to get N document?

What I am doing is

  1. query with "facets"
  2. get facet list
  3. looping and get document

How can I get the data with one query request?

Thanks.

--

--