-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
RFCrequest for commentsrequest for comments
Description
I am experimenting with calculating facets, and in a quest to make them more useful as well as the calculation more performant, I have implemented the following – rather than calculating and sending back the entire result set for each facet (the trailing end of which not only likely doesn't get used by the user, it is also likely mostly bogus because of dodgy data), I am retrieving and sending only the top 50 rows of each. You can see the result at http://test.zenodeo.org/v3/treatments?$facets=true
I use SQL something like so (example below for journalTitle)
SELECT journalTitle, count FROM (
SELECT journalTitle, Count(journalTitle) AS count
FROM treatments
WHERE journalTitle != ''
GROUP BY journalTitle
HAVING count > 100
ORDER BY count DESC
LIMIT 50
)
ORDER BY journalTitle ASC;Please send me your rant or rave about the above technique.
attn: @tcatapano @teodorgregoriev @mguidoti
cc: @myrmoteras
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
RFCrequest for commentsrequest for comments