Unverified Commit 66e725f4 authored by kaziu687's avatar kaziu687 Committed by GitHub

fix: elasticsearch partial match (#1882)

Improved full text search in elastic provider
parent d0cd340d
...@@ -92,10 +92,28 @@ module.exports = { ...@@ -92,10 +92,28 @@ module.exports = {
index: this.config.indexName, index: this.config.indexName,
body: { body: {
query: { query: {
bool: {
filter: [
{
bool: {
should: [
{
simple_query_string: { simple_query_string: {
query: q query: q
} }
}, },
{
query_string: {
query: "*" + q + "*"
}
}
],
minimum_should_match: 1
}
}
]
}
},
from: 0, from: 0,
size: 50, size: 50,
_source: ['title', 'description', 'path', 'locale'], _source: ['title', 'description', 'path', 'locale'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment