Skip to content

Hybrid matching strategy #79

Description

@a3kov

I am trying to parse Telegram Bot API using Ecto embedded_schemas and polymorphic_embed. The issue with the API is that it's not possible to match embedded type based on a single strategy:

  • there are "type fields" in some of the models, but they are not always unique within all subtypes of a single type
  • many subtypes have unique sets of fields, but not all of them

I'm thinking of patching this library to allow "hybrid" matching mode: use 1 strategy, and if it yields more than 1 result, use second strategy on top of matched subtypes to get the final match. I'm willing to submit it as a PR to this project, but first I would need to know if you will accept it, and your feedback on the general direction.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions