Removed Vespa project.
This commit is contained in:
parent
025f974d68
commit
2df76d9064
20 changed files with 0 additions and 422 deletions
3
myapp/.gitignore
vendored
3
myapp/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
||||||
application.zip
|
|
||||||
src/main/application/security/
|
|
||||||
.idea/
|
|
|
@ -1,13 +0,0 @@
|
||||||
|
|
||||||
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# 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.
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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 } ] } }}
|
|
3
myapp/myapp/.gitignore
vendored
3
myapp/myapp/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
||||||
application.zip
|
|
||||||
src/main/application/security/
|
|
||||||
.idea/
|
|
|
@ -1,13 +0,0 @@
|
||||||
|
|
||||||
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
# 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.
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -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 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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 } ] } }}
|
|
|
@ -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<float>(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<float>(cat{})
|
|
||||||
}
|
|
||||||
first-phase {
|
|
||||||
expression: bm25(album) + 0.25 * sum(query(user_profile) * attribute(category_scores))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
|
|
||||||
<services version="1.0" xmlns:deploy="vespa" xmlns:preprocess="properties">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
A container cluster handles incoming requests to the application and processes those requests,
|
|
||||||
and their results. The processing to do and the API's to expose can be provides by Vespa
|
|
||||||
or by the application through Java components supplied as part of the application.
|
|
||||||
|
|
||||||
See:
|
|
||||||
- Reference: https://docs.vespa.ai/en/reference/services-container.html
|
|
||||||
-->
|
|
||||||
<container id="default" version="1.0">
|
|
||||||
<!--
|
|
||||||
<document-api> tells the container that it should accept documents for indexing. Through the
|
|
||||||
Document REST API you can PUT new documents, UPDATE existing documents, and DELETE documents
|
|
||||||
already in the cluster.
|
|
||||||
|
|
||||||
Documents sent to the Document REST API will be passed through document processors on the way
|
|
||||||
to the content cluster.
|
|
||||||
|
|
||||||
See:
|
|
||||||
- Reference: https://docs.vespa.ai/en/reference/services-container.html#document-api
|
|
||||||
- Operations: https://docs.vespa.ai/en/document-v1-api-guide.html
|
|
||||||
-->
|
|
||||||
<document-api/>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<search> tells the container to answers queries and serve results for those queries.
|
|
||||||
Inside the <search /> cluster you can configure chains of "searchers" -
|
|
||||||
Java components processing the query and/or result.
|
|
||||||
|
|
||||||
See:
|
|
||||||
- Reference: https://docs.vespa.ai/en/query-api.html
|
|
||||||
- Searchers: https://docs.vespa.ai/en/searcher-development.html
|
|
||||||
-->
|
|
||||||
<search/>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<nodes> specifies the nodes that should run this cluster.
|
|
||||||
-->
|
|
||||||
<nodes>
|
|
||||||
<node hostalias="node1" />
|
|
||||||
</nodes>
|
|
||||||
</container>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<content/> content clusters store application data, maintain indexes and executes the
|
|
||||||
distributed parts of a query.
|
|
||||||
|
|
||||||
See:
|
|
||||||
- Reference: https://docs.vespa.ai/en/reference/services-content.html
|
|
||||||
-->
|
|
||||||
<content id="music" version="1.0">
|
|
||||||
<redundancy>2</redundancy>
|
|
||||||
<documents>
|
|
||||||
<document type="music" mode="index" />
|
|
||||||
</documents>
|
|
||||||
<nodes>
|
|
||||||
<node hostalias="node1" distribution-key="0" />
|
|
||||||
</nodes>
|
|
||||||
</content>
|
|
||||||
|
|
||||||
</services>
|
|
|
@ -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<float>(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<float>(cat{})
|
|
||||||
}
|
|
||||||
first-phase {
|
|
||||||
expression: bm25(album) + 0.25 * sum(query(user_profile) * attribute(category_scores))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
|
|
||||||
<services version="1.0" xmlns:deploy="vespa" xmlns:preprocess="properties">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
A container cluster handles incoming requests to the application and processes those requests,
|
|
||||||
and their results. The processing to do and the API's to expose can be provides by Vespa
|
|
||||||
or by the application through Java components supplied as part of the application.
|
|
||||||
|
|
||||||
See:
|
|
||||||
- Reference: https://docs.vespa.ai/en/reference/services-container.html
|
|
||||||
-->
|
|
||||||
<container id="default" version="1.0">
|
|
||||||
<!--
|
|
||||||
<document-api> tells the container that it should accept documents for indexing. Through the
|
|
||||||
Document REST API you can PUT new documents, UPDATE existing documents, and DELETE documents
|
|
||||||
already in the cluster.
|
|
||||||
|
|
||||||
Documents sent to the Document REST API will be passed through document processors on the way
|
|
||||||
to the content cluster.
|
|
||||||
|
|
||||||
See:
|
|
||||||
- Reference: https://docs.vespa.ai/en/reference/services-container.html#document-api
|
|
||||||
- Operations: https://docs.vespa.ai/en/document-v1-api-guide.html
|
|
||||||
-->
|
|
||||||
<document-api/>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<search> tells the container to answers queries and serve results for those queries.
|
|
||||||
Inside the <search /> cluster you can configure chains of "searchers" -
|
|
||||||
Java components processing the query and/or result.
|
|
||||||
|
|
||||||
See:
|
|
||||||
- Reference: https://docs.vespa.ai/en/query-api.html
|
|
||||||
- Searchers: https://docs.vespa.ai/en/searcher-development.html
|
|
||||||
-->
|
|
||||||
<search/>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<nodes> specifies the nodes that should run this cluster.
|
|
||||||
-->
|
|
||||||
<nodes>
|
|
||||||
<node hostalias="node1" />
|
|
||||||
</nodes>
|
|
||||||
</container>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<content/> content clusters store application data, maintain indexes and executes the
|
|
||||||
distributed parts of a query.
|
|
||||||
|
|
||||||
See:
|
|
||||||
- Reference: https://docs.vespa.ai/en/reference/services-content.html
|
|
||||||
-->
|
|
||||||
<content id="music" version="1.0">
|
|
||||||
<redundancy>2</redundancy>
|
|
||||||
<documents>
|
|
||||||
<document type="music" mode="index" />
|
|
||||||
</documents>
|
|
||||||
<nodes>
|
|
||||||
<node hostalias="node1" distribution-key="0" />
|
|
||||||
</nodes>
|
|
||||||
</content>
|
|
||||||
|
|
||||||
</services>
|
|
Loading…
Add table
Add a link
Reference in a new issue