ex_elasticlunr icon indicating copy to clipboard operation
ex_elasticlunr copied to clipboard

Wildcard search?

Open zachdaniel opened this issue 3 years ago • 1 comments

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.

zachdaniel avatar Mar 25 '22 22:03 zachdaniel

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

heywhy avatar Mar 28 '22 11:03 heywhy