Dage 21: Vespa Search Engine - Testing setup + Search Implementation#188
Dage 21: Vespa Search Engine - Testing setup + Search Implementation#188Intrinsical-AI wants to merge 7 commits into
Conversation
…solr-init previous approach. Added compose + docker + vespa_init.sh + test_vespa.py + cheetsheet + Makefile (make ci for git / fast testing). Added vespa setup + schemas into vespa-init/app (services, news.d)..
nicolo-rinaldi
left a comment
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
maybe we can log.debug this
| "presentation.format": "json" | ||
| } | ||
| print("Payload:", payload) | ||
| # response = requests.post(search_url, headers=self.HEADERS, json=payload) |
There was a problem hiding this comment.
I'd remove this comment
|
|
||
| def fetch_for_evaluation( | ||
| self, | ||
| query_template: str, # e.g. "select * from doc where userQuery()" |
There was a problem hiding this comment.
remember that the template is #$query##
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
So, in this case, you decided put the test in the integration directory without doing a unit test with mocks. Why is that?
There was a problem hiding this comment.
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| docker exec -it vespa bash -c "vespa deploy --wait 300 ./app" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
| # } | ||
| # ] | ||
| # } | ||
| # } No newline at end of file |
| $(PYTEST) | ||
|
|
||
| down: | ||
| $(VESPA_COMPOSE) down -v No newline at end of file |
| @@ -0,0 +1,9 @@ | |||
| FROM python:3.10-slim | |||
There was a problem hiding this comment.
why do we need a python image?
There was a problem hiding this comment.
To exec the loading tests.
Anw:
https://sease.atlassian.net/browse/DAGE-21?focusedCommentId=16642
|
Closed PR. See: Realized naming / conventions missaligments shortly after push |
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:
cd /tests/integration/vespa-initand execmake ciDescription
make ci functionality it’s supported by:
Additions
cd rre-dataset-generator/tests/integration/vespa-init/make ci