Coder Social home page Coder Social logo

Comments (8)

the-vishal avatar the-vishal commented on May 28, 2024

Hi iridakos can you help me with,

I want to find the common doc counts of aggregation on top authors and top co-authors which are fields inside biblio data field of source in an index.

What I am currently doing is:

1.Calculating Aggregation on top 10 authors.(A,B,C,D.....).

2.Calculating Aggregation on top 10 co-authors (X,Y,Z,....).

3.Calculating doc count of intersection like count of common docs between these pairs :

[(A,X), (B,Y)....]. <-----RESULT

I tried sub-bucket aggregation but it gave me : [A:(top 10 corresponding A), B:(top 10 corresponding B).....].

from iridakos-posts.

iridakos avatar iridakos commented on May 28, 2024

Hi @the-vishal ,

I am not sure I totally understand the case.

Suppose you aggregate on the a field (author) with a terms aggregation. If in that aggregation you add a sub-aggregation for the other field (co-author) then it will bring you just the co-authors of the books that the parent bucket is the author so, yes, you are correct, that doesn't solve your problem.

At the moment, I can't find another solution other than proceeding with two top level terms aggregations on author and on co-author.

If you could post some sample data explaining what you would like to retrieve it would be helpful to understand the case better.

Cheers 🐱

from iridakos-posts.

alis-khadka avatar alis-khadka commented on May 28, 2024

I couldn't find the follow up tutorial on implementing facets in rails. If it's been posted, would you please provide me with its link.

from iridakos-posts.

iridakos avatar iridakos commented on May 28, 2024

@alis-khadka Hi, unfortunately I haven't written one yet. If I find the time to write one I will post an update to this thread as well.

from iridakos-posts.

alis-khadka avatar alis-khadka commented on May 28, 2024

@iridakos eagerly waiting for the follow up. Been a week since i have been stucked on facets

from iridakos-posts.

iridakos avatar iridakos commented on May 28, 2024

@alis-khadka I don't think I'll publish it any time soon because I am very busy this period.

from iridakos-posts.

alis-khadka avatar alis-khadka commented on May 28, 2024

Would you mind, if you provide me with some basic guidelines so that i can have a overview on how to implement facets.

from iridakos-posts.

iridakos avatar iridakos commented on May 28, 2024

@alis-khadka Unfortunately, it's not that simple and I don't have the time to do so. I think you can find tutorials online about this subject.

from iridakos-posts.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.