Skip to content

Idea: Enhance piping different actions #18

@brunoocasali

Description

@brunoocasali

Hi! I'm using the library in a personal project, and I kind of missed the ability to use it like this:

 :meili 
    |> Meilisearch.client()
    |> Meilisearch.Index.create(%{uid: @index, primaryKey: "uuid"})
    |> Meilisearch.Settings.update(
      @index,
      %{
        searchableAttributes: ["name", "category", "short_name"],
        displayedAttributes: ["name", "category", "popular", "image", "popular", "price", "uuid"],
        filterableAttributes: ["category"],
        sortableAttributes: ["popular", "name"],
        synonyms: synonyms()
      }
    )
    |> Meilisearch.Document.create_or_replace(@index, data)

Instead, I have to call each action as a different line client + create, client + settings, client + document.

I don't know what I could suggest to make it work, but I just wanted to know if I'm thinking in the right way!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions