If I need to find counts of user's posts, comments, etc... and each
such item is a separate type with userId field, can I get such
information using just one query?
Because currently, I need to run several requests for each type
(posts, comments, etc.).
Something like this:
If I need to find counts of user's posts, comments, etc... and each
such item is a separate type with userId field, can I get such
information using just one query?
Because currently, I need to run several requests for each type
(posts, comments, etc.).
Something like this:
What are you after? Counts of type per userId? You can use a match all query, and have global scoped facets of type filter that would return counts per filter you have (which can use term filter _type, term filter on userId, or a bool filter on both).
On Friday, February 3, 2012 at 11:00 PM, Eugene Strokin wrote:
If I need to find counts of user's posts, comments, etc... and each
such item is a separate type with userId field, can I get such
information using just one query?
Because currently, I need to run several requests for each type
(posts, comments, etc.).
Something like this:
@kimchy : I have similar problem, in one of my projects, I have a field
called 'userId' in three index types, I need to write a facet query for
getting counts of a particular userId in specific index type. Can you give
an example
for the query you are suggesting?
On Sunday, February 5, 2012 10:05:08 PM UTC+5:30, kimchy wrote:
What are you after? Counts of type per userId? You can use a match all
query, and have global scoped facets of type filter that would return
counts per filter you have (which can use term filter _type, term filter on
userId, or a bool filter on both).
On Friday, February 3, 2012 at 11:00 PM, Eugene Strokin wrote:
If I need to find counts of user's posts, comments, etc... and each
such item is a separate type with userId field, can I get such
information using just one query?
Because currently, I need to run several requests for each type
(posts, comments, etc.).
Something like this:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.