You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 >100ORDER BY count DESCLIMIT50
)
ORDER BY journalTitle ASC;
Please send me your rant or rave about the above technique.
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
)Please send me your rant or rave about the above technique.
attn: @tcatapano @teodorgregoriev @mguidoti
cc: @myrmoteras
The text was updated successfully, but these errors were encountered: