Home » vue » Elasticsearch, Vue and Innersearch.vue — Search won't recognize inputs with spaces in them

Elasticsearch, Vue and Innersearch.vue — Search won't recognize inputs with spaces in them

Posted by: admin November 26, 2021 Leave a comment

Questions:

I’ve been tinkering with Innersearch for a project. I really like Vue and this app, but this might be a deal breaker.

I have it connected to my Elasticsearch instance. It pulls and display the data, but when I use the search box, it will not search on any phrase that has a space in it. It looks like the “:function” prop controls the query types. When I change it from “match” to “match_all”, I notice the behavior of the search changes.

With that, it appears the prop starts after whether you can declare “bool => should”, for example. I’ve been reading up and down in Elasticsearch’s JS documentation and nothing is really helpful to this issue. I’m more familiar with the php-elasticsearch client.

I’ve read in other places that I would have to reindex my data, but the mapping is already set at “keyword” for the data I have. And, besides that, when I was using the php-elasticsearch client, I didn’t need to change the mapping.

So, I’m kind of at a loss. I can’t tell if I’m missing something in the Elasticsearch JS syntax, or if Innersearch has left off the ability to do this. If anyone has any experience with this, I’d appreciate it.

Answers: