fix: elasticsearch partial match (#1882)
Improved full text search in elastic provider
This commit is contained in:
parent
d0cd340d7e
commit
66e725f426
@ -92,8 +92,26 @@ module.exports = {
|
||||
index: this.config.indexName,
|
||||
body: {
|
||||
query: {
|
||||
simple_query_string: {
|
||||
query: q
|
||||
bool: {
|
||||
filter: [
|
||||
{
|
||||
bool: {
|
||||
should: [
|
||||
{
|
||||
simple_query_string: {
|
||||
query: q
|
||||
}
|
||||
},
|
||||
{
|
||||
query_string: {
|
||||
query: "*" + q + "*"
|
||||
}
|
||||
}
|
||||
],
|
||||
minimum_should_match: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
from: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user