extends es-client with highlighting
This commit is contained in:
@@ -24,6 +24,7 @@ def search(
|
||||
sort: list = None,
|
||||
body: dict = None,
|
||||
track_total_hits = False,
|
||||
highlight: dict = None,
|
||||
cluster: str = "nes",
|
||||
) -> dict[str, Any]:
|
||||
|
||||
@@ -48,6 +49,8 @@ def search(
|
||||
payload["sort"] = sort
|
||||
if track_total_hits:
|
||||
payload["track_total_hits"] = True
|
||||
if highlight is not None:
|
||||
payload["highlight"] = highlight
|
||||
else:
|
||||
payload = {
|
||||
"query": {
|
||||
|
||||
Reference in New Issue
Block a user