Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vespa Log No Response #2295

Merged
merged 3 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions backend/danswer/document_index/vespa/chunk_retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,11 @@ def query_vespa(
if LOG_VESPA_TIMING_INFORMATION
else {},
)

response = requests.post(
SEARCH_ENDPOINT,
json=params,
)
try:
response = requests.post(
SEARCH_ENDPOINT,
json=params,
)
response.raise_for_status()
except requests.HTTPError as e:
request_info = f"Headers: {response.request.headers}\nPayload: {params}"
Expand All @@ -319,6 +318,12 @@ def query_vespa(
logger.debug("Vespa timing info: %s", response_json.get("timing"))
hits = response_json["root"].get("children", [])

if not hits:
logger.warning(
f"No hits found for YQL Query: {query_params.get('yql', 'No YQL Query')}"
)
logger.debug(f"Vespa Response: {response.text}")

for hit in hits:
if hit["fields"].get(CONTENT) is None:
identifier = hit["fields"].get("documentid") or hit["id"]
Expand Down
4 changes: 3 additions & 1 deletion backend/danswer/search/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ def _get_sections(self) -> list[InferenceSection]:
if inference_section is not None:
expanded_inference_sections.append(inference_section)
else:
logger.warning("Skipped creation of section, no chunks found")
logger.warning(
"Skipped creation of section for full docs, no chunks found"
)

self._retrieved_sections = expanded_inference_sections
return expanded_inference_sections
Expand Down
Loading