Hi everyone, is there a way to use a distinct filt...
# community-help
m
Hi everyone, is there a way to use a distinct filter without grouping? As in, I only want to get the first result where a field is duplicated
k
Yes, set
group_limit: 1
m
Thanks Kishore - but I want to avoid grouping where possible, just want to remove duplicates and return distinct items
Adding some context:
I have an event ticketing system where users have "Events" and then each event can have "Sessions"... e.g. "Taylor Swift Tour" is the event, and then "New York Show", "Sydney Show" I want users to be able to search for the session, but return the event and session together.. also linked to their geography... e.g. If the user lives in New York and searches Taylor Swift - they will get Taylor Swift Tour - New York, but if they search Taylor Swift Sydney, the sort naturally brings the New York to the top In the search, I only ever want to return one "Taylor Swift Tour" event at a time
This message contains interactive elements.
This message contains interactive elements.
So I'm flattening the Events and Sessions into one schema "events"
But the group_by field forces the eventId to be a facet, which it really shouldn't be
Where really I just want to return the top performing result for each eventId
Appreciate your help @Kishore Nallan (sorry about the message spam)
k
What you probably need a join like feature here. We are actively working on this and will have something to share in a week or so.
🙌 1
m
Awesome, glad to hear!