Comments (8)
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.
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.
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.
@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.
@iridakos eagerly waiting for the follow up. Been a week since i have been stucked on facets
from iridakos-posts.
@alis-khadka I don't think I'll publish it any time soon because I am very busy this period.
from iridakos-posts.
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.
@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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iridakos-posts.