Good morning people,
I actually have 2 issues with ElasticSearch queries that I haven't found a
way to solve yet.
Let's says that what I'm indexing is "sharings" of documents, and I have a
field that is the document_id
I want to have a "count" of how many documents that have been shared on
all the sharings that have been found on the query. Is there a way to do it
? Because the count that is returned is the sharings count and not the
document count... basically I want to do a count on distinct document id.
I'm also doing a facet on id_user on those sharing to know how many
sharing each users has on the query response... this one is working, but
it's like slowing down the request by a factor of 5... so the mean query
time is going from 200ms to 1sec. The id_user is a high cardinality field
and I know that ES as some issues with this kind of facetting...
For the point #2, I am increasing the size of the query and doing it
manually... but it's returning an amount of document according to the size
of the query... I can live with that, but let's say I would like to have
the 10 first users with the most document shared... I could do that with
facets ( I think... ) or how could I do that ?
So, is it clear enough and more importantly, is there a way to do/improve