diff --git a/myapp/.gitignore b/myapp/.gitignore deleted file mode 100644 index 1fab5d88e..000000000 --- a/myapp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -application.zip -src/main/application/security/ -.idea/ diff --git a/myapp/README.md b/myapp/README.md deleted file mode 100644 index 093189d73..000000000 --- a/myapp/README.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -![Vespa logo](https://vespa.ai/assets/vespa-logo-color.png) - -# Vespa sample applications - Album Recommendations - -A simple Vespa application which can be deployed on one node, -and does search and recommendation in music data. - -Follow -[vespa quick start guide](https://docs.vespa.ai/en/vespa-quick-start.html) -to deploy this. diff --git a/myapp/ext/A-Head-Full-of-Dreams.json b/myapp/ext/A-Head-Full-of-Dreams.json deleted file mode 100644 index c67b90664..000000000 --- a/myapp/ext/A-Head-Full-of-Dreams.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "put": "id:mynamespace:music::a-head-full-of-dreams", - "fields": { - "album": "A Head Full of Dreams", - "artist": "Coldplay", - "year": 2015, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 1 }, - { "address" : { "cat" : "rock" }, "value": 0.2 }, - { "address" : { "cat" : "jazz" }, "value": 0 } - ] - } - } -} diff --git a/myapp/ext/Hardwired...To-Self-Destruct.json b/myapp/ext/Hardwired...To-Self-Destruct.json deleted file mode 100644 index 319025e7f..000000000 --- a/myapp/ext/Hardwired...To-Self-Destruct.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "put": "id:mynamespace:music::hardwired-to-self-destruct", - "fields": { - "album": "Hardwired...To Self-Destruct", - "artist": "Metallica", - "year": 2016, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 0 }, - { "address" : { "cat" : "rock" }, "value": 1 }, - { "address" : { "cat" : "jazz" }, "value": 0 } - ] - } - } -} - diff --git a/myapp/ext/Liebe-ist-fur-alle-da.json b/myapp/ext/Liebe-ist-fur-alle-da.json deleted file mode 100644 index 208ce8a01..000000000 --- a/myapp/ext/Liebe-ist-fur-alle-da.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "put": "id:mynamespace:music::liebe-ist-für-alle-da", - "fields": { - "album": "Liebe ist für alle da", - "artist": "Rammstein", - "year": 2009, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 0.1 }, - { "address" : { "cat" : "rock" }, "value": 1.0 }, - { "address" : { "cat" : "jazz" }, "value": 0 } - ] - } - } -} diff --git a/myapp/ext/Love-Is-Here-To-Stay.json b/myapp/ext/Love-Is-Here-To-Stay.json deleted file mode 100644 index bb1c5a4c3..000000000 --- a/myapp/ext/Love-Is-Here-To-Stay.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "put": "id:mynamespace:music::love-is-here-to-stay", - "fields": { - "album": "Love Is Here To Stay", - "artist": "Diana Krall", - "year": 2018, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 0.4 }, - { "address" : { "cat" : "rock" }, "value": 0 }, - { "address" : { "cat" : "jazz" }, "value": 0.8 } - ] - } - } -} - diff --git a/myapp/ext/When-We-All-Fall-Asleep-Where-Do-We-Go.json b/myapp/ext/When-We-All-Fall-Asleep-Where-Do-We-Go.json deleted file mode 100644 index 7d01fb271..000000000 --- a/myapp/ext/When-We-All-Fall-Asleep-Where-Do-We-Go.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "put": "id:mynamespace:music::when-we-all-fall-asleep-where-do-we-go", - "fields": { - "album": "When We All Fall Asleep, Where Do We Go?", - "artist": "Billie Eilish", - "year": 2019, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 1.0 }, - { "address" : { "cat" : "rock" }, "value": 0 }, - { "address" : { "cat" : "jazz" }, "value": 0.1 } - ] - } - } -} diff --git a/myapp/ext/documents.jsonl b/myapp/ext/documents.jsonl deleted file mode 100644 index 779ce399f..000000000 --- a/myapp/ext/documents.jsonl +++ /dev/null @@ -1,5 +0,0 @@ -{ "put": "id:mynamespace:music::a-head-full-of-dreams", "fields": { "album": "A Head Full of Dreams", "artist": "Coldplay", "year": 2015, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 1 }, { "address" : { "cat" : "rock" }, "value": 0.2 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }} -{ "put": "id:mynamespace:music::hardwired-to-self-destruct", "fields": { "album": "Hardwired...To Self-Destruct", "artist": "Metallica", "year": 2016, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0 }, { "address" : { "cat" : "rock" }, "value": 1 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }} -{ "put": "id:mynamespace:music::liebe-ist-für-alle-da", "fields": { "album": "Liebe ist für alle da", "artist": "Rammstein", "year": 2009, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0.1 }, { "address" : { "cat" : "rock" }, "value": 1.0 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }} -{ "put": "id:mynamespace:music::love-is-here-to-stay", "fields": { "album": "Love Is Here To Stay", "artist": "Diana Krall", "year": 2018, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0.4 }, { "address" : { "cat" : "rock" }, "value": 0 }, { "address" : { "cat" : "jazz" }, "value": 0.8 } ] } }} -{ "put": "id:mynamespace:music::when-we-all-fall-asleep-where-do-we-go", "fields": { "album": "When We All Fall Asleep, Where Do We Go?", "artist": "Billie Eilish", "year": 2019, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 1.0 }, { "address" : { "cat" : "rock" }, "value": 0 }, { "address" : { "cat" : "jazz" }, "value": 0.1 } ] } }} diff --git a/myapp/myapp/.gitignore b/myapp/myapp/.gitignore deleted file mode 100644 index 1fab5d88e..000000000 --- a/myapp/myapp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -application.zip -src/main/application/security/ -.idea/ diff --git a/myapp/myapp/README.md b/myapp/myapp/README.md deleted file mode 100644 index 093189d73..000000000 --- a/myapp/myapp/README.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -![Vespa logo](https://vespa.ai/assets/vespa-logo-color.png) - -# Vespa sample applications - Album Recommendations - -A simple Vespa application which can be deployed on one node, -and does search and recommendation in music data. - -Follow -[vespa quick start guide](https://docs.vespa.ai/en/vespa-quick-start.html) -to deploy this. diff --git a/myapp/myapp/ext/A-Head-Full-of-Dreams.json b/myapp/myapp/ext/A-Head-Full-of-Dreams.json deleted file mode 100644 index c67b90664..000000000 --- a/myapp/myapp/ext/A-Head-Full-of-Dreams.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "put": "id:mynamespace:music::a-head-full-of-dreams", - "fields": { - "album": "A Head Full of Dreams", - "artist": "Coldplay", - "year": 2015, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 1 }, - { "address" : { "cat" : "rock" }, "value": 0.2 }, - { "address" : { "cat" : "jazz" }, "value": 0 } - ] - } - } -} diff --git a/myapp/myapp/ext/Hardwired...To-Self-Destruct.json b/myapp/myapp/ext/Hardwired...To-Self-Destruct.json deleted file mode 100644 index 319025e7f..000000000 --- a/myapp/myapp/ext/Hardwired...To-Self-Destruct.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "put": "id:mynamespace:music::hardwired-to-self-destruct", - "fields": { - "album": "Hardwired...To Self-Destruct", - "artist": "Metallica", - "year": 2016, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 0 }, - { "address" : { "cat" : "rock" }, "value": 1 }, - { "address" : { "cat" : "jazz" }, "value": 0 } - ] - } - } -} - diff --git a/myapp/myapp/ext/Liebe-ist-fur-alle-da.json b/myapp/myapp/ext/Liebe-ist-fur-alle-da.json deleted file mode 100644 index 208ce8a01..000000000 --- a/myapp/myapp/ext/Liebe-ist-fur-alle-da.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "put": "id:mynamespace:music::liebe-ist-für-alle-da", - "fields": { - "album": "Liebe ist für alle da", - "artist": "Rammstein", - "year": 2009, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 0.1 }, - { "address" : { "cat" : "rock" }, "value": 1.0 }, - { "address" : { "cat" : "jazz" }, "value": 0 } - ] - } - } -} diff --git a/myapp/myapp/ext/Love-Is-Here-To-Stay.json b/myapp/myapp/ext/Love-Is-Here-To-Stay.json deleted file mode 100644 index bb1c5a4c3..000000000 --- a/myapp/myapp/ext/Love-Is-Here-To-Stay.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "put": "id:mynamespace:music::love-is-here-to-stay", - "fields": { - "album": "Love Is Here To Stay", - "artist": "Diana Krall", - "year": 2018, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 0.4 }, - { "address" : { "cat" : "rock" }, "value": 0 }, - { "address" : { "cat" : "jazz" }, "value": 0.8 } - ] - } - } -} - diff --git a/myapp/myapp/ext/When-We-All-Fall-Asleep-Where-Do-We-Go.json b/myapp/myapp/ext/When-We-All-Fall-Asleep-Where-Do-We-Go.json deleted file mode 100644 index 7d01fb271..000000000 --- a/myapp/myapp/ext/When-We-All-Fall-Asleep-Where-Do-We-Go.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "put": "id:mynamespace:music::when-we-all-fall-asleep-where-do-we-go", - "fields": { - "album": "When We All Fall Asleep, Where Do We Go?", - "artist": "Billie Eilish", - "year": 2019, - "category_scores": { - "cells": [ - { "address" : { "cat" : "pop" }, "value": 1.0 }, - { "address" : { "cat" : "rock" }, "value": 0 }, - { "address" : { "cat" : "jazz" }, "value": 0.1 } - ] - } - } -} diff --git a/myapp/myapp/ext/documents.jsonl b/myapp/myapp/ext/documents.jsonl deleted file mode 100644 index 779ce399f..000000000 --- a/myapp/myapp/ext/documents.jsonl +++ /dev/null @@ -1,5 +0,0 @@ -{ "put": "id:mynamespace:music::a-head-full-of-dreams", "fields": { "album": "A Head Full of Dreams", "artist": "Coldplay", "year": 2015, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 1 }, { "address" : { "cat" : "rock" }, "value": 0.2 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }} -{ "put": "id:mynamespace:music::hardwired-to-self-destruct", "fields": { "album": "Hardwired...To Self-Destruct", "artist": "Metallica", "year": 2016, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0 }, { "address" : { "cat" : "rock" }, "value": 1 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }} -{ "put": "id:mynamespace:music::liebe-ist-für-alle-da", "fields": { "album": "Liebe ist für alle da", "artist": "Rammstein", "year": 2009, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0.1 }, { "address" : { "cat" : "rock" }, "value": 1.0 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }} -{ "put": "id:mynamespace:music::love-is-here-to-stay", "fields": { "album": "Love Is Here To Stay", "artist": "Diana Krall", "year": 2018, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0.4 }, { "address" : { "cat" : "rock" }, "value": 0 }, { "address" : { "cat" : "jazz" }, "value": 0.8 } ] } }} -{ "put": "id:mynamespace:music::when-we-all-fall-asleep-where-do-we-go", "fields": { "album": "When We All Fall Asleep, Where Do We Go?", "artist": "Billie Eilish", "year": 2019, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 1.0 }, { "address" : { "cat" : "rock" }, "value": 0 }, { "address" : { "cat" : "jazz" }, "value": 0.1 } ] } }} diff --git a/myapp/myapp/schemas/music.sd b/myapp/myapp/schemas/music.sd deleted file mode 100644 index fdca5fcfb..000000000 --- a/myapp/myapp/schemas/music.sd +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -# A description of a type of data, how to store and index it, and what to compute over the data elements -# -# See: -# - https://docs.vespa.ai/en/schemas.html -schema music { - - document music { - - field artist type string { - indexing: summary | index - } - - field album type string { - indexing: summary | index - index: enable-bm25 - } - - field year type int { - indexing: summary | attribute - } - - field category_scores type tensor(cat{}) { - indexing: summary | attribute - } - - } - - fieldset default { - fields: artist, album - } - - # Rank profiles defines what to compute over the data, and how to use the computation result to order them - # They can be selected at query time (ranking.profile=[name]), and can be everything from simple handwritten - # expressions as below to references to large machine-learned models. - # - # See - # - https://docs.vespa.ai/en/ranking.html - rank-profile rank_albums inherits default { - inputs { - query(user_profile) tensor(cat{}) - } - first-phase { - expression: bm25(album) + 0.25 * sum(query(user_profile) * attribute(category_scores)) - } - } - -} diff --git a/myapp/myapp/services.xml b/myapp/myapp/services.xml deleted file mode 100644 index 20126161d..000000000 --- a/myapp/myapp/services.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - 2 - - - - - - - - - diff --git a/myapp/schemas/music.sd b/myapp/schemas/music.sd deleted file mode 100644 index fdca5fcfb..000000000 --- a/myapp/schemas/music.sd +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -# A description of a type of data, how to store and index it, and what to compute over the data elements -# -# See: -# - https://docs.vespa.ai/en/schemas.html -schema music { - - document music { - - field artist type string { - indexing: summary | index - } - - field album type string { - indexing: summary | index - index: enable-bm25 - } - - field year type int { - indexing: summary | attribute - } - - field category_scores type tensor(cat{}) { - indexing: summary | attribute - } - - } - - fieldset default { - fields: artist, album - } - - # Rank profiles defines what to compute over the data, and how to use the computation result to order them - # They can be selected at query time (ranking.profile=[name]), and can be everything from simple handwritten - # expressions as below to references to large machine-learned models. - # - # See - # - https://docs.vespa.ai/en/ranking.html - rank-profile rank_albums inherits default { - inputs { - query(user_profile) tensor(cat{}) - } - first-phase { - expression: bm25(album) + 0.25 * sum(query(user_profile) * attribute(category_scores)) - } - } - -} diff --git a/myapp/services.xml b/myapp/services.xml deleted file mode 100644 index 20126161d..000000000 --- a/myapp/services.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - 2 - - - - - - - - -