Filtering by Two Properties within an Object
TLDR Oliver is looking for a way to filter data with complex filters. Jason suggests restructuring the data to allow for easier filtering. Further discussion is needed.
1
Feb 14, 2023 (10 months ago)
Oliver
09:16 PM"contact": "oliver",
"meetings":[
{ revenue: 10, type: "online"},
{ revenue: 50, type: "presential"}
]
filtering by
meetings.revenue :>= 30 && meetings.type: online
would return this contact as long as it’s looking for any
meeting that fulfills each individual filter rather than a particular meeting with both filters.Im aware there’s already an issue for this. However, I’m wondering if there’s any workaround with the introduction of the more complex filters in this release or any other temporal way to achieve this because is highly important for the platform we are currently developing in my team! Thanks in advance 🙌:skin-tone-2:
Jason
09:42 PMA meetings collection that looks like this:
{revenue: 10, type: online, contact: oliver}
{revenue: 50, type: presential, contact: oliver}
Then you’ll be able to do:
revenue :>= 30 && type: online
1
Typesense
Indexed 3011 threads (79% resolved)
Similar Threads
Handling Field Variations in Typesense for Different Clients
Yoshi asked for a solution to handle varying contact_date fields for different clients in typesense. Jason recommended using nested fields for the short-term and mentioned future support for joining data across collections.
Multiple Filters and JSON Requests in Typesense
Manish asked about multiple filter_by arguments, JSON input, and using multisearch. Jason offered typesense documentation links, examples, and how to use JSON formatted requests with multisearch. Ed shared a similar use case.
Query on Filtering Documents between Two Collections
Daniel asked about filtering documents across two collections. Kishore Nallan clarified that feature is currently not available but directed the user to a specific open feature request.