Skip to content

Dage 21: Vespa Search Engine - Testing setup + Search Implementation#188

Closed
Intrinsical-AI wants to merge 7 commits into
dataset-generatorfrom
DAGE-21/Vespa-Search-Integration
Closed

Dage 21: Vespa Search Engine - Testing setup + Search Implementation#188
Intrinsical-AI wants to merge 7 commits into
dataset-generatorfrom
DAGE-21/Vespa-Search-Integration

Conversation

@Intrinsical-AI

@Intrinsical-AI Intrinsical-AI commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator

Task:

https://sease.atlassian.net/jira/software/projects/DAGE/boards/84?selectedIssue=DAGE-21

How to test it?

The setup and testing are not yet polished:

  • Now you should go to
    cd /tests/integration/vespa-init and exec make ci

That will bring up Vespa Container, index the dataset/dataset.json into the Container, and make a simple query to check it works.

Description

make ci functionality it’s supported by:

  • vespa-init/vespa-init.sh script
  • vespa-init/test_vespa.py script

Additions

  • Added docs, scripts and setup into tests/integrations/vespa-init
  • Followed the solr-init style
  • Added a pytests, but since it doesnt include pytest-docker yet, the correct way to exhaustive test:
    cd rre-dataset-generator/tests/integration/vespa-init/
    make ci

@nicolo-rinaldi nicolo-rinaldi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are making a mess with folders. Here the docker compose is inside vespa-init folder. In the others search engine adaptation it is outside. We should pick a go-to way of doing things

"hits": doc_number,
"presentation.format": "json"
}
print("Payload:", payload)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can log.debug this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yess

"presentation.format": "json"
}
print("Payload:", payload)
# response = requests.post(search_url, headers=self.HEADERS, json=payload)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove this comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok


def fetch_for_evaluation(
self,
query_template: str, # e.g. "select * from doc where userQuery()"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remember that the template is #$query##

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand, you have to update me with that. Vespa requires where, and so for the syntax. Or what you were refering to?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one doc?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I'd need to script all the way to transform all the docs, to the vespa required format.

"{
"put": "id:news:news::1"," -> Required, difference with Solr / Elastic

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, in this case, you decided put the test in the integration directory without doing a unit test with mocks. Why is that?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#!/usr/bin/env bash
set -euo pipefail

docker exec -it vespa bash -c "vespa deploy --wait 300 ./app"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if the deploy fails for some reason? In the other implementations (solr, elastic, opensearch) we have 30 sec to start the engine, otherwise it crashes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# }
# ]
# }
# } No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

$(PYTEST)

down:
$(VESPA_COMPOSE) down -v No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line

@@ -0,0 +1,9 @@
FROM python:3.10-slim

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a python image?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Intrinsical-AI

Copy link
Copy Markdown
Collaborator Author

Closed PR. See:
https://sease.atlassian.net/browse/DAGE-21?focusedCommentId=16642

Realized naming / conventions missaligments shortly after push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants