From 99532a5a2e5922170dc68cd8778d80e3feac0271 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Fri, 15 Nov 2024 14:06:57 +0000 Subject: [PATCH 1/3] change application packages to use same id for content clusters --- .../101/ch1/ecommerce/services.xml | 2 +- .../101/ch2/ecommerce/services.xml | 2 +- .../101/ch3/part-purchase/.gitignore | 1 + .../101/ch3/part-purchase/.vespaignore | 6 +++ .../101/ch3/part-purchase/schemas/purchase.sd | 37 +++++++++++++++++++ .../101/ch3/part-purchase/services.xml | 24 ++++++++++++ .../101/ch5/embedder_rrf_rag/services.xml | 2 +- 7 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 examples/training-artifacts/101/ch3/part-purchase/.gitignore create mode 100644 examples/training-artifacts/101/ch3/part-purchase/.vespaignore create mode 100644 examples/training-artifacts/101/ch3/part-purchase/schemas/purchase.sd create mode 100644 examples/training-artifacts/101/ch3/part-purchase/services.xml diff --git a/examples/training-artifacts/101/ch1/ecommerce/services.xml b/examples/training-artifacts/101/ch1/ecommerce/services.xml index 2e3349a71..b6f30cb91 100644 --- a/examples/training-artifacts/101/ch1/ecommerce/services.xml +++ b/examples/training-artifacts/101/ch1/ecommerce/services.xml @@ -71,7 +71,7 @@ See: - Reference: https://docs.vespa.ai/en/reference/services-content.html --> - + 2 diff --git a/examples/training-artifacts/101/ch2/ecommerce/services.xml b/examples/training-artifacts/101/ch2/ecommerce/services.xml index 2e3349a71..b6f30cb91 100644 --- a/examples/training-artifacts/101/ch2/ecommerce/services.xml +++ b/examples/training-artifacts/101/ch2/ecommerce/services.xml @@ -71,7 +71,7 @@ See: - Reference: https://docs.vespa.ai/en/reference/services-content.html --> - + 2 diff --git a/examples/training-artifacts/101/ch3/part-purchase/.gitignore b/examples/training-artifacts/101/ch3/part-purchase/.gitignore new file mode 100644 index 000000000..655dab964 --- /dev/null +++ b/examples/training-artifacts/101/ch3/part-purchase/.gitignore @@ -0,0 +1 @@ +purchase.json diff --git a/examples/training-artifacts/101/ch3/part-purchase/.vespaignore b/examples/training-artifacts/101/ch3/part-purchase/.vespaignore new file mode 100644 index 000000000..8c403c052 --- /dev/null +++ b/examples/training-artifacts/101/ch3/part-purchase/.vespaignore @@ -0,0 +1,6 @@ +# This file excludes unnecessary files from the application package. See +# https://docs.vespa.ai/en/reference/vespaignore.html for more information. +.DS_Store +.gitignore +README.md +ext/ diff --git a/examples/training-artifacts/101/ch3/part-purchase/schemas/purchase.sd b/examples/training-artifacts/101/ch3/part-purchase/schemas/purchase.sd new file mode 100644 index 000000000..1915e0249 --- /dev/null +++ b/examples/training-artifacts/101/ch3/part-purchase/schemas/purchase.sd @@ -0,0 +1,37 @@ +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +schema purchase { + + document purchase { + + field date type long { + indexing: summary | attribute + } + + field price type int { + indexing: summary | attribute + } + + field tax type double { + indexing: summary | attribute + } + + field item type string { + indexing: summary | attribute + } + + field customer type string { + indexing: summary | attribute + } + + } + + rank-profile song inherits default { + + first-phase { + expression:nativeRank(price,item) + } + + } + +} diff --git a/examples/training-artifacts/101/ch3/part-purchase/services.xml b/examples/training-artifacts/101/ch3/part-purchase/services.xml new file mode 100644 index 000000000..04c7ec4b7 --- /dev/null +++ b/examples/training-artifacts/101/ch3/part-purchase/services.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + 2 + + + + + + + + + + diff --git a/examples/training-artifacts/101/ch5/embedder_rrf_rag/services.xml b/examples/training-artifacts/101/ch5/embedder_rrf_rag/services.xml index 14897d8f3..e28110670 100644 --- a/examples/training-artifacts/101/ch5/embedder_rrf_rag/services.xml +++ b/examples/training-artifacts/101/ch5/embedder_rrf_rag/services.xml @@ -57,7 +57,7 @@ - + 2 From d35a733fb2f26224fa3ffbbef7f95dbea7d5e8dc Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Fri, 15 Nov 2024 14:08:10 +0000 Subject: [PATCH 2/3] disable tokenClient which makes an extra endpoint --- examples/training-artifacts/101/ch1/ecommerce/services.xml | 2 +- examples/training-artifacts/101/ch2/ecommerce/services.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/training-artifacts/101/ch1/ecommerce/services.xml b/examples/training-artifacts/101/ch1/ecommerce/services.xml index b6f30cb91..0470bcaa6 100644 --- a/examples/training-artifacts/101/ch1/ecommerce/services.xml +++ b/examples/training-artifacts/101/ch1/ecommerce/services.xml @@ -26,10 +26,10 @@ The below sets up a client with read permissions. Note that the "myToken" token must be created in the console before deploying. - --> + --> + -->