Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildcard search? #20

Open
zachdaniel opened this issue Mar 25, 2022 · 1 comment
Open

Wildcard search? #20

zachdaniel opened this issue Mar 25, 2022 · 1 comment

Comments

@zachdaniel
Copy link

I'm not familiar with elasticsearch's searching, but I can't seem to find a way to do wildcard searching with ex_elasticlunr. I'm powering a simple type-ahead documentation search field.

@heywhy
Copy link
Owner

heywhy commented Mar 28, 2022

Hello @zachdaniel, to achieve this you can use the below sample:

Index.search(index, %{
  "query" => %{
    "match" => %{
      "field" => %{
        "query" => "user's query",
        "expand" => true
      }
    }
  }
})

Note that improvements are ongoing behind the scene and I'm working to produce a good library that works well. So, if you have any feedback do not hesitate to let me know. And you can refer to this post or the livebook document included in the repository to learn more about the available options for each query type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants