Re: Parent/Child (Nested Document) Faceting

2015-11-12 Thread Alessandro Benedetti
Last addition, in the case of multi-level hierarchy. I think I found what we can not reproduce : *json.facet*={ top_reviewers: { type: terms, field: author_s, facet: { reviewCount: "unique(parent_s)", facet: { type: terms,

Re: Parent/Child (Nested Document) Faceting

2015-11-12 Thread Mikhail Khludnev
Alessandro, > facet: {booksCount:"unique(_root_)"} is a pretty cool finding. it's what literally Elastic does in "reverse-nested-aggregation". it's interesting how much it costs for shards. I'll look deeper. Thanks, Alessandro! Yonik, JSON Facets rocks! On Thu, Nov 12, 2015 at 1:25 PM,

Re: Parent/Child (Nested Document) Faceting

2015-11-12 Thread Alessandro Benedetti
Hi Mikhail, how about this : json.facet={ top_reviewers: { type: terms, field: author_s, sort: "booksCount desc", facet: { booksCount: "unique(_root_)" } } } We query on children ( comments) and we calculate that facets. This should

Re: Parent/Child (Nested Document) Faceting

2015-11-12 Thread Alessandro Benedetti
I was experimenting with multi-level hierarchy of nested objects. the _root_ field will always point to the root parent id. If I model Books - Reviews - Comments , where do I have the reference to the parent ? I think we are getting closer to the understanding of the ES functionality. It should

Re: Parent/Child (Nested Document) Faceting

2015-11-11 Thread Yonik Seeley
On Wed, Nov 11, 2015 at 12:34 PM, Alessandro Benedetti wrote: > Anyway everything seems possible to me trough the ( I love it, can stop to > repeat it) Json Facet Approach. Thanks, the positive feedback definitely gives me motivation to keep improving it! -Yonik

Re: Parent/Child (Nested Document) Faceting

2015-11-11 Thread Alessandro Benedetti
Adding to Yonik response, I think the feature shown by the Elastic Search blog is simply the "Faceting on Parents" one, "A special single bucket aggregation that enables aggregating on parent docs from nested documents. " Indeed it seems to not search on the parents then facets on children and

Re: Parent/Child (Nested Document) Faceting

2015-11-11 Thread Yonik Seeley
On Mon, Nov 9, 2015 at 2:37 PM, Mikhail Khludnev wrote: > Yonik, > > I wonder is there a plan or a vision for something like > https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-reverse-nested-aggregation.html > under JSON

Re: Parent/Child (Nested Document) Faceting

2015-11-11 Thread Mikhail Khludnev
I found that example has not enough data to reproduce this functionality. what if Mary left the same comment to the same book (book2_c4), then we search for th* across comments http://localhost:8983/solr/techproducts/select?q=comment_t%3Ath*=csv=true=author_s,comment_t,id and get

Re: Parent/Child (Nested Document) Faceting

2015-11-09 Thread Mikhail Khludnev
Yonik, I wonder is there a plan or a vision for something like https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-reverse-nested-aggregation.html under JSON facets? Thanks On Sun, Jun 14, 2015 at 4:02 AM, Yonik Seeley wrote: > Hey

Re: Parent/Child (Nested Document) Faceting

2015-09-16 Thread Alessandro Benedetti
and the get the count > of parent document, how should I construct my query? > > E.g, I want to find out the authors who have written reviews on the largest > number of books, as in the example nested document structures . > > > > > > -- > View this message in conte

Re: Parent/Child (Nested Document) Faceting

2015-08-04 Thread dxxd116
in context: http://lucene.472066.n3.nabble.com/Parent-Child-Nested-Document-Faceting-tp4211632p4220894.html Sent from the Solr - User mailing list archive at Nabble.com.

Re: Parent/Child (Nested Document) Faceting

2015-06-15 Thread Yonik Seeley
On Mon, Jun 15, 2015 at 10:24 AM, Alessandro Benedetti benedetti.ale...@gmail.com wrote: So why in both cases we express the parent type ? ( Note that regardless of which direction we are mapping (parents to children or children to parents) we provide a query that defines the complete set of

Re: Parent/Child (Nested Document) Faceting

2015-06-15 Thread Alessandro Benedetti
Hi Yonik, I find the syntax quite expressive, only one question : *1*) $ curl http://localhost:8983/solr/demo/query -d ' q=author_s:yonikfl=id,comment_t json.facet={ genres : { type: terms, field: cat_s, domain: { blockParent : type_s:book } } }' I read this : Give me all the

Parent/Child (Nested Document) Faceting

2015-06-13 Thread Yonik Seeley
Hey Folks, I'd love some feedback on the interface for nested document faceting (or rather switching facet domains to/from parent/child). See the bottom of this blog: http://yonik.com/solr-nested-objects/ Issue #1: How to specify that one should change domains before faceting? I originally