Skip to content

Commit

Permalink
fix search (#40)
Browse files Browse the repository at this point in the history
fix search

Reviewed-by: Tino Schr
  • Loading branch information
SebastianGode authored Jun 3, 2024
1 parent 1532efd commit 29fa31f
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions components/SearchModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,38 @@ async function searchRequest(queryText, locale) {

// Default request without filtering
const request_query = {
"from" : 0,
"size" : 10,
"from": 0,
"size": 10,
"_source": ["highlight", "_id", "attributes.overview_headline"],
"query": {
"multi_match": {
"query": queryText
}
"bool": {
"should": [
{
"multi_match": {
"query": queryText,
"type": "phrase_prefix",
"slop": 4
}
}
]
}
},
"highlight": {
"number_of_fragments": 1,
"fragment_size": 100,
"fields": {
"*": {}
},
"require_field_match" : false,
"require_field_match": false,
"pre_tags": [
"<span style='color: var(--telekom-color-text-and-icon-primary-standard)'>"
"<span style='color: var(--telekom-color-text-and-icon-primary-standard)'>"
],
"post_tags": [
"</span>"
"</span>"
]
}
};



let url = `https://opensearch.eco.tsi-dev.otc-service.com/cpn-*-${locale}/_search`
Expand Down

0 comments on commit 29fa31f

Please sign in to comment.