diff --git a/mintlify-docs/README.md b/mintlify-docs/README.md index 055c983adb..54e2e6f91d 100644 --- a/mintlify-docs/README.md +++ b/mintlify-docs/README.md @@ -1,43 +1,178 @@ -# Mintlify Starter Kit + -Use the starter kit to get your docs deployed and ready to customize. + + + + #Vespa + -Click the green **Use this template** button at the top of this repo to copy the Mintlify starter kit. The starter kit contains examples with +[![Vespa Documentation Search Feed](https://github.com/vespa-engine/documentation/actions/workflows/feed.yml/badge.svg)](https://github.com/vespa-engine/documentation/actions/workflows/feed.yml) +[![/documentation link checker](https://cd.screwdriver.cd/pipelines/7021/link-checker-documentation/badge)](https://cd.screwdriver.cd/pipelines/7021/) -- Guide pages -- Navigation -- Customizations -- API reference pages -- Use of popular components +# Creating Vespa documentation -**[Follow the full quickstart guide](https://starter.mintlify.com/quickstart)** +All Vespa features must be documented - this document explains how to add to the documentation. -## Development +## Practical information -Install the [Mintlify CLI](https://www.npmjs.com/package/mint) to preview your documentation changes locally. To install, use the following command: +Vespa documentation is served using [AWS Amplify](https://aws.amazon.com/amplify/) with [Jekyll](https://jekyllrb.com/). +To edit documentation, check out and work off the master branch in this repository. -``` -npm i -g mint -``` +Documentation is written in HTML or Markdown. +Use a single Jekyll template [_layouts/default.html](_layouts/default.html) to add header, footer and layout. -Run the following command at the root of your documentation, where your `docs.json` is located: +You probably need to get the right Ruby version first, with -``` -mint dev -``` + $ brew install rbenv + $ rbenv init + $ source ~/.zprofile + $ rbenv install 3.3.7 + $ rbenv local 3.3.7 -View your local preview at `http://localhost:3000`. +Prepend /opt/homebrew/opt/ruby/bin to your $PATH, e.g. in your .zshrc. -## Publishing changes +Then you should be able to run: -Install our GitHub app from your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app) to propagate changes from your repo to your deployment. Changes are deployed to production automatically after pushing to the default branch. + $ bundle install + $ bundle exec jekyll serve --incremental --drafts --trace -## Need help? +to set up a local server at localhost:4000 to see the pages as they will look when served. -### Troubleshooting +The output will highlight rendering/other problems when starting serving. -- If your dev environment isn't running: Run `mint update` to ensure you have the most recent version of the CLI. -- If a page loads as a 404: Make sure you are running in a folder with a valid `docs.json`. +Alternatively, use the docker image `jekyll/jekyll` to run the local server on +Mac -### Resources -- [Mintlify documentation](https://mintlify.com/docs) + $ docker run -ti --rm --name doc \ + --publish 4000:4000 -e JEKYLL_UID=$UID -v $(pwd):/srv/jekyll \ + jekyll/jekyll jekyll serve --incremental --force_polling + +or RHEL 8 + + $ podman run -it --rm --name doc -p 4000:4000 -e JEKYLL_ROOTLESS=true \ + -v "$PWD":/srv/jekyll:Z docker.io/jekyll/jekyll jekyll serve --incremental --force_polling + +The Jekyll server should normally rebuild HTML files automatically +when a source files changes. If this does not happen, you can use +`jekyll serve --force-polling` as a workaround. + +The layout is written in [denali.design](https://denali.design/), +see [_layouts/default.html](_layouts/default.html) for usage. +Please do not add custom style sheets, as it is harder to maintain. + +## Writing documentation + +This explains the style and considerations to follow before contributing documentation. +See [contribute](https://docs.vespa.ai/en/learn/contributing.html) on the practicalities of +submitting changes. + +### Table of contents + +All documents must be listed in_data/sidebar.yml. + +### Guides and references + +A document cannot be both comprehensive and comprehensible. +Because of this, documentation is split into *guides* and *reference* documents. + +Guides should be easy to understand by only explaining the most important concepts under discussion. +Reference documents on the other hand must be complete but should skip verbiage meant to aid understanding. + +Reference documents are those that are placed in reference/ subdirectory. + +### Categorization + +The documents are categorized in a set of categories which are mostly the same for guides and references. + +The subdirectory and category used in the TOC (sidebar.yml) must always be the same. + +Place new documents in the most suitable category. Most times they can fit multiple ones; such is life. + +Be conscious of the category a document is in when editing it. If you're adding off-category information, +maybe it should be split into another document? + +Be extra careful about what is added to the "basics" documents: They should be a clean, easy to understand +introduction to only the most important concepts of Vespa. + +If you need to move a document, you can; just make sure to add a redirect header from the old location. + +### Applicability + +Some documentation only applies to Vespa Cloud ("cloud"), self-managed instances ("self-managed"), +and/or is only available commercially ("enterprise"). +Such documents *must* be marked by setting the appropriate applies_to tags in the document header. +See https://docs.vespa.ai/en/learn/about-documentation.html for more a more detailed description of the three applicability +types. + +### Maintainability + +Prioritize maintainability higher than usability: + +* Don't include unnecessary details, especially ephemeral ones such as that a feature is "recently added" or how things was before, etc. The guide/reference distinction helps here: Guides are harder to maintain as they contain more verbiage, and they should not unnecessarily repeat information found in a reference doc. **Write such that the document will still be correct in a half decade.** + +* Don't repeat information found in other documents. It is tempting to make life easier for users by writing use-case oriented documentation on how to accomplish specific tasks, but this backfires as it leads to a lot of repetition which we fail to maintain. In the long run it is better to explain the concepts clearly and succinctly and leave it to the users to piece together the information. **Use the same principles for documentation as for code: DRY, refactor for coherency etc.** + +* Be wary of adding code in the documentation. The code will become incorrect over time and should in most cases be placed in git as continuously built code and referenced from the doc. + +### Style + +Documentation is not high prose, and not a podcast. +Users want to consume the information as soon as possible with as little effort as possible and get on with their lives. + +Make the text as short, clear, and easy to read as possible: +* Describe things plainly "as they are". You usually shouldn't worry about explaining why, what you can do with it etc. +* Use short sentences with simple structure. +* Avoid superfluous words such as "very". +* Avoid filler sentences intended to improve the flow of the text - documents are usually browsed, not read anyway. +* Use consistent terminology even when it leads to repetition which would be bad in other kinds of writing. +* Use active form "index the documents", not passive "indexing the documents". + +### Linking + +Use relative internal links. All internal links will work with and without ".html" suffix, ".md" suffix does not work. +Use the ".html" suffix when linking to pages where the source is html, and no suffix when linking to Markdown sources. +That convention is helpful to determine whether a link marked as non-existing in your editor is due to it being a +Markdown file (with suffix .md, which can't be used in the link), or due to it actually not existing. + +Add an *id* attribute to each heading such that it can be linked to: Use the exact same text as the heading as id, +lowercased and with spaces replaced by dashes such that references can be made without checking the source. +Don't change headings/ids unless completely necessary as that breaks links. + +### Link to Javadoc + +* Link to javadoc for an artifact: https://javadoc.io/doc/com.yahoo.vespa/container-search +* Link to javadoc for a package: https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/search/federation/vespa/package-summary.html +* Link to javadoc for a class: https://javadoc.io/doc/com.yahoo.vespa/vespa-feed-client-api/latest/ai/vespa/feed/client/JsonFeeder.html + +## Appendix: Vespa Documentation Search + +See the [Vespa Documentation Search](https://github.com/vespa-cloud/vespa-documentation-search) +sample application for architecture. + +Below is a description of the job for indexing this repository's documentation. +File locations below refer to this repo's root. + +1. Build a Vespa feed from the source in this repo: + 1. Use Jekyll to generate HTML from the content + (some files are in [Markdown](https://daringfireball.net/projects/markdown/)) + 1. Use [Nokogiri](https://nokogiri.org/) to extract text from HTML + 1. Implement HTML-to-text in a Vespa feed file by using a + [Jekyll Generator](https://jekyllrb.com/docs/plugins/generators/), + see [_plugins-vespafeed/vespa_index_generator.rb](/_plugins-vespafeed/vespa_index_generator.rb) + 1. The generated _open_index.json_ can then be + [fed to Vespa](https://docs.vespa.ai/en/reference/document-json-format.html) + +1. Feed changes to https://console.vespa-cloud.com/tenant/vespa-team/application/vespacloud-docsearch + using [feed_to_vespa.py](feed_to_vespa.py): + 1. Visit all content on the Vespa instance to list all IDs + 1. Determine whether or not to remove documents + 1. Feed all content + +1. Automate these steps using GitHub Actions + 1. Store the keys required to feed data as secrets in Github + 1. Find workflow at [.github/workflows/feed.yml](/.github/workflows/feed.yml) + +Local development: + + $ bundle exec jekyll build + $ ./feed_to_vespa.py # put data-plane-private/public-key.pem in this dir in advance diff --git a/mintlify-docs/assets/img/az-multi-cluster.svg b/mintlify-docs/assets/img/az-multi-cluster.svg new file mode 100644 index 0000000000..c2edabcb88 --- /dev/null +++ b/mintlify-docs/assets/img/az-multi-cluster.svg @@ -0,0 +1,17 @@ + + + + prod.aws-us-east-1 + + + use1-az1 + + + use1-az2 + + + Container cluster + + + Content cluster + diff --git a/mintlify-docs/assets/img/az-multi-content.svg b/mintlify-docs/assets/img/az-multi-content.svg new file mode 100644 index 0000000000..2a793267c9 --- /dev/null +++ b/mintlify-docs/assets/img/az-multi-content.svg @@ -0,0 +1,38 @@ + + + + prod.aws-us-east-1 + + + use1-az1 + + + use1-az2 + + + Content cluster + + + Group 0 + + + + + + Group 1 + + + + + + Group 2 + + + + + + Group 3 + + + + diff --git a/mintlify-docs/assets/img/az-single-cluster.svg b/mintlify-docs/assets/img/az-single-cluster.svg new file mode 100644 index 0000000000..fee1bcda71 --- /dev/null +++ b/mintlify-docs/assets/img/az-single-cluster.svg @@ -0,0 +1,14 @@ + + + + prod.aws-us-east-1c + + + use1-az1 + + + Container cluster + + + Content cluster + diff --git a/mintlify-docs/assets/img/az-single-content.svg b/mintlify-docs/assets/img/az-single-content.svg new file mode 100644 index 0000000000..d2ffde48df --- /dev/null +++ b/mintlify-docs/assets/img/az-single-content.svg @@ -0,0 +1,35 @@ + + + + prod.aws-us-east-1c + + + use1-az1 + + + Content cluster + + + Group 0 + + + + + + Group 1 + + + + + + Group 2 + + + + + + Group 3 + + + + diff --git a/mintlify-docs/assets/img/image-list.png b/mintlify-docs/assets/img/image-list.png new file mode 100644 index 0000000000..4ceed80f2c Binary files /dev/null and b/mintlify-docs/assets/img/image-list.png differ diff --git a/mintlify-docs/custom.css b/mintlify-docs/custom.css new file mode 100644 index 0000000000..a00fd38d24 --- /dev/null +++ b/mintlify-docs/custom.css @@ -0,0 +1,284 @@ +:root { + --vespa-lyng: #61d790; + --vespa-berg: #2e2f27; + --vespa-vassdrag: #b7e2f1; + --vespa-sno: #ffffff; + --vespa-skjaer: #c4c5b9; +} + +#navbar { + border-bottom: 1px solid var(--vespa-skjaer); + backdrop-filter: blur(12px); +} + +#topbar-cta-button svg { + width: inherit; + height: inherit; + color: inherit; + stroke: currentColor; + margin-left: 5px; +} + +#topbar-cta-button svg path { + stroke: inherit; + stroke-width: inherit; + stroke-linecap: inherit; + stroke-linejoin: inherit; +} + +.dark #topbar-cta-button > a:hover { + color: var(--vespa-sno) !important; +} + +#sidebar { + margin-top: 1px; +} + +html:not(.dark) #search-bar-entry-mobile svg { + background-color: var(--vespa-berg) !important; +} + +html:not(.dark) #assistant-entry-mobile svg, +html:not(.dark) button[data-component-name="theme-toggle"] svg { + color: var(--vespa-berg) !important; +} + +.dark #search-bar-entry-mobile svg { + background-color: var(--vespa-lyng) !important; +} + +.dark #assistant-entry-mobile svg, +.dark button[data-component-name="theme-toggle"] svg { + color: var(--vespa-lyng) !important; +} + +.dark #theme-preference-menu-content { + background-color: var(--vespa-berg) !important; +} + +mdx-content { + line-height: 1.2; +} + +mdx-content a { + text-underline-offset: 0.18em; +} + +.vespa-table { + display: block; + width: 100%; + max-width: 100%; + overflow-x: auto; + border-collapse: collapse; + border: 1px solid var(--vespa-skjaer); + border-radius: 0.75rem; + font-size: 0.92rem; +} + +.vespa-table th, +.vespa-table td { + min-width: 9rem; + padding: 0.7rem 0.85rem; + vertical-align: top; +} + +.vespa-table th { + color: var(--vespa-berg); + background: var(--vespa-vassdrag); + font-weight: 600; + text-align: left; +} + +.vespa-table tbody tr:last-child, +.vespa-table tbody tr:last-child > td { + border-bottom: 0 !important; +} + +.vespa-table code { + white-space: normal; + overflow-wrap: anywhere; +} + +.vespa-table__cell--center { + text-align: center; +} + +.vespa-table__cell--right { + text-align: right; +} + +.vespa-pipeline-mark { + --mark-color: #796bb3; + position: relative; + display: inline-block; + width: 2rem; + height: 2rem; + box-sizing: border-box; + color: var(--mark-color); + vertical-align: middle; +} + +.vespa-pipeline-mark--square { + background: currentColor; +} + +.vespa-pipeline-mark--square-outline { + border: 2px solid currentColor; +} + +.vespa-pipeline-mark--circle { + border-radius: 50%; + background: currentColor; +} + +.vespa-pipeline-mark--clock { + border: 2px solid currentColor; + border-radius: 50%; +} + +.vespa-pipeline-mark--clock::before, +.vespa-pipeline-mark--clock::after { + position: absolute; + left: 50%; + top: 50%; + display: block; + width: 2px; + background: currentColor; + content: ""; + transform-origin: 50% 0; +} + +.vespa-pipeline-mark--clock::before { + height: 0.55rem; + transform: translate(-1px, -0.55rem); +} + +.vespa-pipeline-mark--clock::after { + height: 0.4rem; + transform: translate(-1px, 0) rotate(125deg); +} + +.vespa-pipeline-mark--running { + --mark-color: #b6aed5; +} + +.vespa-pipeline-mark--failed { + --mark-color: #e97a57; +} + +.vespa-pipeline-mark--unknown { + --mark-color: #c4c5b9; +} + +.vespa-pipeline-mark--pending { + background: currentColor; +} + +.vespa-pipeline-mark--pending::after { + position: absolute; + right: -0.35rem; + bottom: -0.35rem; + display: grid; + width: 1rem; + height: 1rem; + place-items: center; + border-radius: 50%; + color: var(--vespa-berg); + background: var(--vespa-lyng); + content: "+"; + font-size: 0.85rem; + font-weight: 600; + line-height: 1; +} + +.vespa-pipeline-mark--paused { + border-radius: 50%; + background: currentColor; +} + +.vespa-pipeline-mark--paused::before, +.vespa-pipeline-mark--paused::after { + position: absolute; + top: 0.55rem; + width: 0.3rem; + height: 0.9rem; + background: var(--vespa-sno); + content: ""; +} + +.vespa-pipeline-mark--paused::before { + left: 0.55rem; +} + +.vespa-pipeline-mark--paused::after { + right: 0.55rem; +} + +.vespa-pipeline-bars { + display: inline-grid; + width: 2rem; + height: 2rem; + gap: 0.22rem; + vertical-align: middle; +} + +.vespa-pipeline-bars span { + display: block; + background: #796bb3; +} + +.vespa-pipeline-bars--vertical { + grid-template-columns: repeat(3, 1fr); +} + +.vespa-pipeline-bars--horizontal { + grid-template-rows: repeat(3, 1fr); +} + +toc-item { + border-radius: 0.5rem; + justify-content: center; + display: flex; + align-items: center; +} + +.toc-item > svg { + margin-top: 9px; +} + +toc-item[data-active], +toc-item[data-active-deepest] { + color: var(--vespa-berg); + font-weight: 600; +} + +.dark .vespa-table { + border-color: var(--vespa-skjaer); +} + +.dark .vespa-table th, +.dark .vespa-table td { + border-bottom-color: var(--vespa-skjaer); +} + +.dark .vespa-table th { + color: var(--vespa-berg); + background: var(--vespa-lyng); +} + +.dark toc-item[data-active], +.dark toc-item[data-active-deepest] { + color: var(--vespa-lyng); +} + +@media (max-width: 768px) { + .vespa-table { + font-size: 0.86rem; + } + + .vespa-table th, + .vespa-table td { + min-width: 8rem; + padding: 0.6rem 0.7rem; + } +} diff --git a/mintlify-docs/docs.json b/mintlify-docs/docs.json index 0714262745..3b54a91114 100644 --- a/mintlify-docs/docs.json +++ b/mintlify-docs/docs.json @@ -3,341 +3,401 @@ "theme": "linden", "name": "Vespa Documentation", "colors": { - "primary": "#61D790", + "primary": "#2E2F27", "light": "#61D790", - "dark": "#61D790" + "dark": "#7B7D68" + }, + "background": { + "color": { + "light": "#FFFFFF", + "dark": "#2E2F27" + } }, "favicon": "/favicon.png", "appearance": { - "default": "dark" + "default": "light" }, "fonts": { "heading": { "family": "Roobert", - "source": "https://vespa.ai/vespa-content/themes/website-wp-theme/fonts/Roobert-Medium.woff", - "format": "woff" + "source": "https://vespa.ai/vespa-content/themes/website-wp-theme/fonts/Roobert-SemiBold.woff", + "format": "woff", + "weight": 600 }, "body": { "family": "Roobert", "source": "https://vespa.ai/vespa-content/themes/website-wp-theme/fonts/Roobert-Regular.woff", - "format": "woff" + "format": "woff", + "weight": 400 } }, "navigation": { - "tabs": [ - { - "tab": "Home", - "icon": "house", - "pages": ["index"] - }, + "global": { + "anchors": [ + { + "anchor": "Changelog", + "href": "/en/reference/release-notes/vespa9" + }, + { + "anchor": "Vespa 8 release notes", + "href": "/en/reference/release-notes/vespa8" + }, + { + "anchor": "Vespa 7 release notes", + "href": "/en/reference/release-notes/vespa7" + } + ] + }, + "languages": [ { - "tab": "Guides", - "icon": "book-open", - "pages": [ - { - "group": "Vespa Basics", - "pages": [ - "en/basics/deploy-an-application", - "en/basics/applications", - "en/basics/schemas", - "en/basics/writing", - "en/basics/querying", - "en/basics/ranking", - "en/basics/operations", - "en/basics/whats-more" - ] - }, - { - "group": "Learn More", - "pages": [ - "en/learn/overview", - "en/learn/llm-help", - "en/learn/features", - "en/learn/tutorials", - "en/learn/glossary", - "en/learn/releases", - "en/learn/tenant-apps-instances", - "en/learn/migrating-to-cloud", - "en/learn/migrating-from-elastic-search", - "en/learn/about-documentation", - "en/learn/contributing" - ] - }, - { - "group": "Applications & Components", - "pages": [ - "en/applications/developer-guide", - "en/applications/ide-support", - "en/applications/deployment", - "en/applications/vespaignore", - "en/applications/containers", - "en/applications/components", - "en/applications/searchers", - "en/applications/document-processors", - "en/applications/request-handlers", - "en/applications/result-renderers", - "en/applications/dependency-injection", - "en/applications/configuring-components", - "en/applications/chaining", - "en/applications/inspecting-structured-data", - "en/applications/web-services", - "en/applications/unit-testing", - "en/applications/testing", - "en/applications/config-system", - "en/applications/processing", - "en/applications/bundles", - "en/applications/using-zookeeper", - "en/applications/http-servers-and-filters", - "en/applications/pluggable-frameworks", - "en/applications/configapi-dev" - ] - }, - { - "group": "Schemas and documents", - "pages": [ - "en/schemas/documents", - "en/schemas/inheritance-in-schemas", - "en/schemas/concrete-documents", - "en/schemas/parent-child", - "en/schemas/structs", - "en/schemas/predicate-fields", - "en/schemas/exposing-schema-information" - ] - }, - { - "group": "Reading and writing", - "pages": [ - "en/writing/reads-and-writes", - "en/writing/document-v1-api-guide", - "en/writing/indexing", - "en/writing/initial-batch-feed", - "en/writing/visiting", - "en/writing/document-api-guide", - "en/writing/partial-updates", - "en/writing/batch-delete", - "en/writing/feed-block", - "en/writing/document-routing", - "en/writing/indexing-paged-vectors" - ] - }, - { - "group": "Querying", - "pages": [ - "en/querying/query-api", - "en/querying/query-language", - "en/querying/grouping", - "en/querying/federation", - "en/querying/query-profiles", - "en/querying/vector-search-intro", - "en/querying/nearest-neighbor-search", - "en/querying/approximate-nn-hnsw", - "en/querying/nearest-neighbor-search-guide", - "en/querying/text-matching", - "en/querying/searching-multivalue-fields", - "en/querying/geo-search", - "en/querying/document-summaries", - "en/querying/result-diversity", - "en/querying/page-templates" - ] - }, - { - "group": "Ranking and inference", - "pages": [ - "en/ranking/ranking-intro", - "en/ranking/ranking-expressions-features", - "en/ranking/multivalue-query-operators", - "en/ranking/tensor-user-guide", - "en/ranking/tensor-examples", - "en/ranking/phased-ranking", - "en/ranking/tensorflow", - "en/ranking/onnx", - "en/ranking/xgboost", - "en/ranking/lightgbm", - "en/ranking/wand", - "en/ranking/bm25", - "en/ranking/nativerank", - "en/ranking/cross-encoders", - "en/ranking/reranking-in-searcher", - "en/ranking/significance", - "en/ranking/stateless-model-evaluation" - ] - }, + "language": "en", + "default": true, + "tabs": [ { - "group": "RAG and embedding", + "tab": "Home", "pages": [ - "en/rag/rag", - "en/rag/working-with-chunks", - "en/rag/embedding", - "en/rag/binarizing-vectors", - "en/rag/llms-in-vespa", - "en/rag/local-llms", - "en/rag/external-llms", - "en/rag/document-enrichment", - "en/rag/model-hub" + "index" ] }, { - "group": "Linguistics and text processing", + "tab": "Guides", "pages": [ { - "group": "Linguistics", + "group": "Vespa Basics", "pages": [ - "/en/linguistics/linguistics", - "/en/linguistics/linguistics-opennlp", - "/en/linguistics/lucene-linguistics", - "/en/linguistics/linguistics-custom" + "en/basics/deploy-an-application", + "en/basics/applications", + "en/basics/schemas", + "en/basics/writing", + "en/basics/querying", + "en/basics/ranking", + "en/basics/operations", + "en/basics/whats-more" ] }, - "en/linguistics/query-rewriting", - "en/linguistics/troubleshooting-encoding" - ] - }, - { - "group": "content and elasticity", - "pages": [ - "/en/content/proton", - "/en/content/content-nodes", - "/en/content/elasticity", - "/en/content/attributes", - "/en/content/consistency", - "/en/content/idealstate", - "/en/content/buckets" - - ] - }, - { - "group": "Performance", - "pages": [ - "en/performance", - "en/performance/practical-search-performance-guide", - "en/performance/sizing-search", - "en/performance/sizing-feeding", - "en/performance/node-resources", - { - "group": "Instance types", - "pages": [ - "en/performance/instance-types/aws-instance-types", - "en/performance/instance-types/gcp-instance-types", - "en/performance/instance-types/azure-instance-types" - ] - }, - "en/performance/topology-and-resizing", - "en/performance/streaming-search", - "en/performance/benchmarking", - "en/performance/benchmarking-cloud", - "en/performance/memory-visualizer", - "en/performance/profiling", - "en/performance/container-tuning", - "en/performance/rate-limiting-searcher", - "en/performance/graceful-degradation", - "en/performance/caches-in-vespa", - "en/performance/container-http", - "en/performance/http2", - "en/performance/feature-tuning", - "en/performance/valgrind" - ] - }, - { - "group": "Operations", - "pages": [ - "en/cloud/quota", - "en/operations/environments", - "en/operations/zones", - "en/operations/production-deployment", - "en/operations/deployment-variants", - "en/operations/automated-deployments", - "en/operations/autoscaling", - { - "group": "Enclave: Bring your own cloud", - "pages": [ - "en/operations/enclave/enclave", - "en/operations/enclave/aws-getting-started", - "en/operations/enclave/aws-architecture", - "en/operations/enclave/azure-getting-started", - "en/operations/enclave/azure-architecture", - "en/operations/enclave/gcp-getting-started", - "en/operations/enclave/gcp-architecture", - "en/operations/enclave/archive", - "en/operations/enclave/operations" - ] - }, - "en/operations/reindexing", - "en/operations/data-management", - "en/operations/cloning", - "en/operations/monitoring", - "en/operations/metrics", - "en/operations/notifications", - "en/cloud/support", - "en/operations/deployment-patterns", - "en/operations/private-endpoints", - "en/operations/endpoint-routing", - "en/operations/access-logging", - { - "group": "Artifact archive", - "pages": [ - "en/operations/archive/archive-guide", - "en/operations/archive/archive-guide-aws", - "en/operations/archive/archive-guide-gcp" - ] - }, - "en/operations/deleting-applications", - { - "group": "Self-managed", - "pages": [ - "en/operations/self-managed/admin-procedures", - "en/operations/self-managed/multinode-systems", - "en/operations/self-managed/files-processes-and-ports", - "en/operations/self-managed/node-setup", - "en/operations/self-managed/using-kubernetes-with-vespa", - "en/operations/self-managed/build-install", - "en/operations/self-managed/monitoring", - "en/operations/self-managed/content-node-recovery", - "en/operations/self-managed/configuration-server", - "en/operations/self-managed/live-upgrade", - "en/operations/self-managed/config-sentinel", - "en/operations/self-managed/config-proxy", - "en/operations/self-managed/docker-containers", - "en/operations/self-managed/vespa-gpu-container", - "en/operations/self-managed/cpu-support", - "en/operations/self-managed/slobrok", - "en/operations/self-managed/procedure-change-attribute-index", - "en/operations/self-managed/container", - "en/operations/self-managed/sizing-examples", - "en/operations/self-managed/vespa-support" - ] - }, - { - "group": "Kubernetes", - "pages": [ - "en/operations/kubernetes/vespa-on-kubernetes", - "en/operations/kubernetes/architecture", + { + "group": "Learn More", + "pages": [ + "en/learn/overview", + "en/learn/llm-help", + "en/learn/features", + "en/learn/tutorials", + "en/learn/glossary", + "en/learn/releases", + "en/learn/tenant-apps-instances", + "en/learn/migrating-to-cloud", + "en/learn/migrating-from-elastic-search", + "en/learn/about-documentation", + "en/learn/contributing" + ] + }, + { + "group": "Applications & Components", + "pages": [ + "en/applications/developer-guide", + "en/applications/ide-support", + "en/applications/deployment", + "en/applications/vespaignore", + "en/applications/containers", + "en/applications/components", + "en/applications/searchers", + "en/applications/document-processors", + "en/applications/request-handlers", + "en/applications/result-renderers", + "en/applications/dependency-injection", + "en/applications/configuring-components", + "en/applications/chaining", + "en/applications/inspecting-structured-data", + "en/applications/web-services", + "en/applications/unit-testing", + "en/applications/testing", + "en/applications/config-system", + "en/applications/processing", + "en/applications/bundles", + "en/applications/using-zookeeper", + "en/applications/http-servers-and-filters", + "en/applications/pluggable-frameworks", + "en/applications/configapi-dev" + ] + }, + { + "group": "Schemas and documents", + "pages": [ + "en/schemas/documents", + "en/schemas/inheritance-in-schemas", + "en/schemas/concrete-documents", + "en/schemas/parent-child", + "en/schemas/structs", + "en/schemas/predicate-fields", + "en/schemas/exposing-schema-information" + ] + }, + { + "group": "Reading and writing", + "pages": [ + "en/writing/reads-and-writes", + "en/writing/document-v1-api-guide", + "en/writing/indexing", + "en/writing/initial-batch-feed", + "en/writing/visiting", + "en/writing/document-api-guide", + "en/writing/partial-updates", + "en/writing/batch-delete", + "en/writing/feed-block", + "en/writing/document-routing", + "en/writing/indexing-paged-vectors" + ] + }, + { + "group": "Querying", + "pages": [ + "en/querying/query-api", + "en/querying/query-language", + "en/querying/grouping", + "en/querying/federation", + "en/querying/query-profiles", + "en/querying/vector-search-intro", + "en/querying/nearest-neighbor-search", + "en/querying/approximate-nn-hnsw", + "en/querying/nearest-neighbor-search-guide", + "en/querying/text-matching", + "en/querying/searching-multivalue-fields", + "en/querying/geo-search", + "en/querying/document-summaries", + "en/querying/result-diversity", + "en/querying/page-templates" + ] + }, + { + "group": "Ranking and inference", + "pages": [ + "en/ranking/ranking-intro", + "en/ranking/ranking-expressions-features", + "en/ranking/multivalue-query-operators", + "en/ranking/tensor-user-guide", + "en/ranking/tensor-examples", + "en/ranking/phased-ranking", + "en/ranking/tensorflow", + "en/ranking/onnx", + "en/ranking/xgboost", + "en/ranking/lightgbm", + "en/ranking/wand", + "en/ranking/bm25", + "en/ranking/nativerank", + "en/ranking/cross-encoders", + "en/ranking/reranking-in-searcher", + "en/ranking/significance", + "en/ranking/stateless-model-evaluation" + ] + }, + { + "group": "RAG and embedding", + "pages": [ + "en/rag/rag", + "en/rag/working-with-chunks", + "en/rag/embedding", + "en/rag/binarizing-vectors", + "en/rag/llms-in-vespa", + "en/rag/local-llms", + "en/rag/external-llms", + "en/rag/document-enrichment", + "en/rag/model-hub" + ] + }, + { + "group": "Linguistics and text processing", + "pages": [ { - "group": "Deployment", + "group": "Linguistics", "pages": [ - "en/operations/kubernetes/deployment/installation", - "en/operations/kubernetes/deployment/local-deployment", - "en/operations/kubernetes/deployment/ecr-pull-through-cache", - "en/operations/kubernetes/deployment/dev-mode", - "en/operations/kubernetes/deployment/permissions" + "en/linguistics/linguistics", + "en/linguistics/linguistics-opennlp", + "en/linguistics/lucene-linguistics", + "en/linguistics/linguistics-custom" ] }, + "en/linguistics/query-rewriting", + "en/linguistics/troubleshooting-encoding" + ] + }, + { + "group": "content and elasticity", + "pages": [ + "en/content/proton", + "en/content/content-nodes", + "en/content/elasticity", + "en/content/attributes", + "en/content/consistency", + "en/content/idealstate", + "en/content/buckets" + ] + }, + { + "group": "Performance", + "pages": [ + "en/performance", + "en/performance/practical-search-performance-guide", + "en/performance/sizing-search", + "en/performance/sizing-feeding", + "en/performance/node-resources", { - "group": "Operations", + "group": "Instance types", "pages": [ - "en/operations/kubernetes/operations/operations", - "en/operations/kubernetes/operations/upgrades", - "en/operations/kubernetes/operations/delete-vespaset", - "en/operations/kubernetes/operations/monitoring" + "en/performance/instance-types/aws-instance-types", + "en/performance/instance-types/gcp-instance-types", + "en/performance/instance-types/azure-instance-types" + ] + }, + "en/performance/topology-and-resizing", + "en/performance/streaming-search", + "en/performance/benchmarking", + "en/performance/benchmarking-cloud", + "en/performance/memory-visualizer", + "en/performance/profiling", + "en/performance/container-tuning", + "en/performance/rate-limiting-searcher", + "en/performance/graceful-degradation", + "en/performance/caches-in-vespa", + "en/performance/container-http", + "en/performance/http2", + "en/performance/feature-tuning", + "en/performance/valgrind" + ] + }, + { + "group": "Operations", + "pages": [ + "en/cloud/quota", + "en/operations/environments", + "en/operations/zones", + "en/operations/az", + "en/operations/production-deployment", + "en/operations/deployment-variants", + "en/operations/automated-deployments", + "en/operations/autoscaling", + { + "group": "Enclave: Bring your own cloud", + "pages": [ + "en/operations/enclave/enclave", + "en/operations/enclave/aws-getting-started", + "en/operations/enclave/aws-architecture", + "en/operations/enclave/azure-getting-started", + "en/operations/enclave/azure-architecture", + "en/operations/enclave/gcp-getting-started", + "en/operations/enclave/gcp-architecture", + "en/operations/enclave/archive", + "en/operations/enclave/operations" + ] + }, + "en/operations/reindexing", + "en/operations/data-management", + "en/operations/cloning", + "en/operations/monitoring", + "en/operations/metrics", + "en/operations/notifications", + "en/cloud/support", + "en/operations/deployment-patterns", + "en/operations/private-endpoints", + "en/operations/endpoint-routing", + "en/operations/access-logging", + { + "group": "Artifact archive", + "pages": [ + "en/operations/archive/archive-guide", + "en/operations/archive/archive-guide-aws", + "en/operations/archive/archive-guide-gcp" + ] + }, + "en/operations/deleting-applications", + { + "group": "Self-managed", + "pages": [ + "en/operations/self-managed/admin-procedures", + "en/operations/self-managed/multinode-systems", + "en/operations/self-managed/files-processes-and-ports", + "en/operations/self-managed/node-setup", + "en/operations/self-managed/build-install", + "en/operations/self-managed/monitoring", + "en/operations/self-managed/content-node-recovery", + "en/operations/self-managed/configuration-server", + "en/operations/self-managed/live-upgrade", + "en/operations/self-managed/config-sentinel", + "en/operations/self-managed/config-proxy", + "en/operations/self-managed/docker-containers", + "en/operations/self-managed/vespa-gpu-container", + "en/operations/self-managed/cpu-support", + "en/operations/self-managed/slobrok", + "en/operations/self-managed/procedure-change-attribute-index", + "en/operations/self-managed/container", + "en/operations/self-managed/sizing-examples", + "en/operations/self-managed/vespa-support" ] }, { - "group": "Configuration", + "group": "Kubernetes", "pages": [ - "en/operations/kubernetes/configuration/configure-local-storage-type", - "en/operations/kubernetes/logging", - "en/operations/kubernetes/ingress", - "en/operations/kubernetes/custom-overrides-podtemplate", - "en/operations/kubernetes/tls" + "en/operations/kubernetes/vespa-on-kubernetes", + "en/operations/kubernetes/architecture", + { + "group": "Deployment", + "pages": [ + "en/operations/kubernetes/deployment/installation", + "en/operations/kubernetes/deployment/permissions" + ] + }, + { + "group": "Operations", + "pages": [ + "en/operations/kubernetes/operations/operations", + "en/operations/kubernetes/operations/upgrades", + "en/operations/kubernetes/operations/monitoring" + ] + }, + { + "group": "Configuration", + "pages": [ + "en/operations/kubernetes/configuration/configure-local-storage-type", + "en/operations/kubernetes/logging", + "en/operations/kubernetes/ingress", + "en/operations/kubernetes/custom-overrides-podtemplate", + "en/operations/kubernetes/tls" + ] + } + ] + } + ] + }, + { + "group": "Security", + "pages": [ + "en/security/security", + "en/security/guide", + "en/security/host-images", + "en/security/secret-store", + "en/security/cloudflare-workers", + "en/security/whitepaper", + "en/security/securing-your-vespa-installation", + "en/security/mtls" + ] + }, + { + "group": "Clients", + "pages": [ + "en/clients/vespa-cli", + "en/clients/python-client", + "en/clients/vespa-feed-client", + "en/clients/http-best-practices" + ] + }, + { + "group": "Modules", + "pages": [ + { + "group": "E-commerce", + "pages": [ + "en/modules/e-commerce/multi-currency-filtering", + "en/modules/e-commerce/saved-search", + "en/modules/e-commerce/using-features-together" ] } ] @@ -345,35 +405,179 @@ ] }, { - "group": "Security", - "pages": [ - "en/security/security", - "en/security/guide", - "en/security/secret-store", - "en/security/cloudflare-workers", - "en/security/whitepaper", - "en/security/securing-your-vespa-installation", - "en/security/mtls" - ] - }, - { - "group": "Clients", + "tab": "FAQ", "pages": [ - "en/clients/vespa-cli", - "en/clients/python-client", - "en/clients/vespa-feed-client", - "en/clients/http-best-practices" + { + "group": "FAQ", + "pages": [ + "en/learn/faq" + ] + } ] }, { - "group": "Modules", - "pages": [ + "tab": "Reference", + "groups": [ + { + "group": "APIs", + "pages": [ + "en/reference/api/api", + "en/reference/api/query", + "en/reference/api/document-v1", + "en/reference/api/state-v1", + "en/reference/api/deploy-v2", + "en/reference/api/application-v2", + "en/reference/api/config-v2", + "en/reference/api/cluster-v2", + "en/reference/api/metrics-v1", + "en/reference/api/metrics-v2", + "en/reference/api/prometheus-v1" + ] + }, + { + "group": "Applications and components", + "pages": [ + "en/reference/applications/application-packages", + { + "group": "services.xml", + "pages": [ + "en/reference/applications/services/services", + "en/reference/applications/services/admin", + "en/reference/applications/services/container", + "en/reference/applications/services/content", + "en/reference/applications/services/docproc", + "en/reference/applications/services/http", + "en/reference/applications/services/processing", + "en/reference/applications/services/search" + ] + }, + "en/reference/applications/deployment", + "en/reference/applications/hosts", + "en/reference/applications/validation-overrides", + "en/reference/applications/components", + "en/reference/applications/config-files", + "en/reference/applications/testing", + "en/reference/applications/testing-java" + ] + }, + { + "group": "Schemas and documents", + "pages": [ + "en/reference/schemas/schemas", + "en/reference/schemas/document-json-format", + "en/reference/schemas/document-field-path" + ] + }, + { + "group": "Reading and writing", + "pages": [ + "en/reference/writing/indexing-language", + "en/reference/writing/document-selector-language" + ] + }, + { + "group": "Querying", + "pages": [ + "en/reference/querying/yql", + "en/reference/querying/simple-query-language", + "en/reference/querying/json-query-language", + "en/reference/querying/grouping-language", + "en/reference/querying/sorting-language", + "en/reference/querying/query-profiles", + "en/reference/querying/semantic-rules", + "en/reference/querying/default-result-format", + "en/reference/querying/page-result-format", + "en/reference/querying/page-templates" + ] + }, + { + "group": "Ranking and inference", + "pages": [ + "en/reference/ranking/ranking-expressions", + "en/reference/ranking/tensor", + "en/reference/ranking/rank-features", + "en/reference/ranking/nativerank", + "en/reference/ranking/string-segment-match", + "en/reference/ranking/rank-feature-configuration", + "en/reference/ranking/rank-types", + "en/reference/ranking/model-files", + "en/reference/ranking/constant-tensor-json-format" + ] + }, { - "group": "E-commerce", + "group": "RAG and embedding", "pages": [ - "en/modules/e-commerce/multi-currency-filtering", - "en/modules/e-commerce/saved-search", - "en/modules/e-commerce/using-features-together" + "en/reference/rag/chunking", + "en/reference/rag/embedding" + ] + }, + { + "group": "Operations", + "pages": [ + "en/reference/operations/health-checks", + "en/reference/operations/log-files", + "en/reference/operations/tools", + { + "group": "Metrics", + "pages": [ + "en/reference/operations/metrics/metrics", + "en/reference/operations/metrics/default-metric-set", + "en/reference/operations/metrics/vespa-metric-set", + "en/reference/operations/metrics/metric-units", + "en/reference/operations/metrics/container", + "en/reference/operations/metrics/distributor", + "en/reference/operations/metrics/searchnode", + "en/reference/operations/metrics/storage", + "en/reference/operations/metrics/configserver", + "en/reference/operations/metrics/logd", + "en/reference/operations/metrics/nodeadmin", + "en/reference/operations/metrics/slobrok", + "en/reference/operations/metrics/clustercontroller", + "en/reference/operations/metrics/sentinel" + ] + }, + { + "group": "Self-managed", + "pages": [ + "en/reference/operations/self-managed/tools" + ] + } + ] + }, + { + "group": "Security", + "pages": [ + "en/reference/security/mtls" + ] + }, + { + "group": "Clients", + "pages": [ + { + "group": "Vespa CLI", + "pages": [ + "en/reference/clients/vespa-cli/vespa", + "en/reference/clients/vespa-cli/vespa_activate", + "en/reference/clients/vespa-cli/vespa_auth", + "en/reference/clients/vespa-cli/vespa_clone", + "en/reference/clients/vespa-cli/vespa_config", + "en/reference/clients/vespa-cli/vespa_curl", + "en/reference/clients/vespa-cli/vespa_deploy", + "en/reference/clients/vespa-cli/vespa_destroy", + "en/reference/clients/vespa-cli/vespa_document", + "en/reference/clients/vespa-cli/vespa_feed", + "en/reference/clients/vespa-cli/vespa_fetch", + "en/reference/clients/vespa-cli/vespa_inspect", + "en/reference/clients/vespa-cli/vespa_log", + "en/reference/clients/vespa-cli/vespa_prepare", + "en/reference/clients/vespa-cli/vespa_prod", + "en/reference/clients/vespa-cli/vespa_query", + "en/reference/clients/vespa-cli/vespa_status", + "en/reference/clients/vespa-cli/vespa_test", + "en/reference/clients/vespa-cli/vespa_version", + "en/reference/clients/vespa-cli/vespa_visit" + ] + } ] } ] @@ -381,236 +585,585 @@ ] }, { - "tab": "FAQ", - "icon": "circle-question", - "pages": [ - { - "group": "FAQ", - "pages": ["en/learn/faq"] - } - ] - }, - { - "tab": "Reference", - "icon": "code", - "groups": [ - { - "group": "APIs", - "pages": [ - "en/reference/api/api", - "en/reference/api/query", - "en/reference/api/document-v1", - "en/reference/api/state-v1", - "en/reference/api/deploy-v2", - "en/reference/api/application-v2", - "en/reference/api/config-v2", - "en/reference/api/cluster-v2", - "en/reference/api/metrics-v1", - "en/reference/api/metrics-v2", - "en/reference/api/prometheus-v1" - ] - }, - { - "group": "Applications and components", - "pages": [ - "en/reference/applications/application-packages", - { - "group": "services.xml", - "pages": [ - "en/reference/applications/services/services", - "en/reference/applications/services/admin", - "en/reference/applications/services/container", - "en/reference/applications/services/content", - "en/reference/applications/services/docproc", - "en/reference/applications/services/http", - "en/reference/applications/services/processing", - "en/reference/applications/services/search" - ] - }, - "en/reference/applications/deployment", - "en/reference/applications/hosts", - "en/reference/applications/validation-overrides", - "en/reference/applications/components", - "en/reference/applications/config-files", - "en/reference/applications/testing", - "en/reference/applications/testing-java" - ] - }, - { - "group": "Schemas and documents", - "pages": [ - "en/reference/schemas/schemas", - "en/reference/schemas/document-json-format", - "en/reference/schemas/document-field-path" - ] - }, - { - "group": "Reading and writing", - "pages": [ - "en/reference/writing/indexing-language", - "en/reference/writing/document-selector-language" - ] - }, + "language": "ja", + "tabs": [ { - "group": "Querying", + "tab": "ホーム", "pages": [ - "en/reference/querying/yql", - "en/reference/querying/simple-query-language", - "en/reference/querying/json-query-language", - "en/reference/querying/grouping-language", - "en/reference/querying/sorting-language", - "en/reference/querying/query-profiles", - "en/reference/querying/semantic-rules", - "en/reference/querying/default-result-format", - "en/reference/querying/page-result-format", - "en/reference/querying/page-templates" + "ja/index" ] }, { - "group": "Ranking and inference", + "tab": "ガイド", "pages": [ - "en/reference/ranking/ranking-expressions", - "en/reference/ranking/tensor", - "en/reference/ranking/rank-features", - "en/reference/ranking/nativerank", - "en/reference/ranking/string-segment-match", - "en/reference/ranking/rank-feature-configuration", - "en/reference/ranking/rank-types", - "en/reference/ranking/model-files", - "en/reference/ranking/constant-tensor-json-format" + { + "group": "Vespaの基本", + "pages": [ + "ja/basics/deploy-an-application", + "ja/basics/applications", + "ja/basics/schemas", + "ja/basics/writing", + "ja/basics/querying", + "ja/basics/ranking", + "ja/basics/operations", + "ja/basics/whats-more" + ] + }, + { + "group": "さらに学ぶ", + "pages": [ + "ja/learn/overview", + "ja/learn/llm-help", + "ja/learn/features", + "ja/learn/tutorials", + "ja/learn/glossary", + "ja/learn/releases", + "ja/learn/tenant-apps-instances", + "ja/learn/migrating-to-cloud", + "ja/learn/migrating-from-elastic-search", + "ja/learn/about-documentation", + "ja/learn/contributing" + ] + }, + { + "group": "アプリケーションとコンポーネント", + "pages": [ + "ja/applications/developer-guide", + "ja/applications/ide-support", + "ja/applications/deployment", + "ja/applications/vespaignore", + "ja/applications/containers", + "ja/applications/components", + "ja/applications/searchers", + "ja/applications/document-processors", + "ja/applications/request-handlers", + "ja/applications/result-renderers", + "ja/applications/dependency-injection", + "ja/applications/configuring-components", + "ja/applications/chaining", + "ja/applications/inspecting-structured-data", + "ja/applications/web-services", + "ja/applications/unit-testing", + "ja/applications/testing", + "ja/applications/config-system", + "ja/applications/processing", + "ja/applications/bundles", + "ja/applications/using-zookeeper", + "ja/applications/http-servers-and-filters", + "ja/applications/pluggable-frameworks", + "ja/applications/configapi-dev" + ] + }, + { + "group": "スキーマとドキュメント", + "pages": [ + "ja/schemas/documents", + "ja/schemas/inheritance-in-schemas", + "ja/schemas/concrete-documents", + "ja/schemas/parent-child", + "ja/schemas/structs", + "ja/schemas/predicate-fields", + "ja/schemas/exposing-schema-information" + ] + }, + { + "group": "読み取りと書き込み", + "pages": [ + "ja/writing/reads-and-writes", + "ja/writing/document-v1-api-guide", + "ja/writing/indexing", + "ja/writing/initial-batch-feed", + "ja/writing/visiting", + "ja/writing/document-api-guide", + "ja/writing/partial-updates", + "ja/writing/batch-delete", + "ja/writing/feed-block", + "ja/writing/document-routing", + "ja/writing/indexing-paged-vectors" + ] + }, + { + "group": "クエリー", + "pages": [ + "ja/querying/query-api", + "ja/querying/query-language", + "ja/querying/grouping", + "ja/querying/federation", + "ja/querying/query-profiles", + "ja/querying/vector-search-intro", + "ja/querying/nearest-neighbor-search", + "ja/querying/approximate-nn-hnsw", + "ja/querying/nearest-neighbor-search-guide", + "ja/querying/text-matching", + "ja/querying/searching-multivalue-fields", + "ja/querying/geo-search", + "ja/querying/document-summaries", + "ja/querying/result-diversity", + "ja/querying/page-templates" + ] + }, + { + "group": "ランキングと推論", + "pages": [ + "ja/ranking/ranking-intro", + "ja/ranking/ranking-expressions-features", + "ja/ranking/multivalue-query-operators", + "ja/ranking/tensor-user-guide", + "ja/ranking/tensor-examples", + "ja/ranking/phased-ranking", + "ja/ranking/tensorflow", + "ja/ranking/onnx", + "ja/ranking/xgboost", + "ja/ranking/lightgbm", + "ja/ranking/wand", + "ja/ranking/bm25", + "ja/ranking/nativerank", + "ja/ranking/cross-encoders", + "ja/ranking/reranking-in-searcher", + "ja/ranking/significance", + "ja/ranking/stateless-model-evaluation" + ] + }, + { + "group": "RAGと埋め込み", + "pages": [ + "ja/rag/rag", + "ja/rag/working-with-chunks", + "ja/rag/embedding", + "ja/rag/binarizing-vectors", + "ja/rag/llms-in-vespa", + "ja/rag/local-llms", + "ja/rag/external-llms", + "ja/rag/document-enrichment", + "ja/rag/model-hub" + ] + }, + { + "group": "言語処理とテキスト処理", + "pages": [ + { + "group": "言語処理", + "pages": [ + "ja/linguistics/linguistics", + "ja/linguistics/linguistics-opennlp", + "ja/linguistics/lucene-linguistics", + "ja/linguistics/linguistics-custom" + ] + }, + "ja/linguistics/query-rewriting", + "ja/linguistics/troubleshooting-encoding" + ] + }, + { + "group": "コンテントとエラスティシティ", + "pages": [ + "ja/content/proton", + "ja/content/content-nodes", + "ja/content/elasticity", + "ja/content/attributes", + "ja/content/consistency", + "ja/content/idealstate", + "ja/content/buckets" + ] + }, + { + "group": "パフォーマンス", + "pages": [ + "ja/performance", + "ja/performance/practical-search-performance-guide", + "ja/performance/sizing-search", + "ja/performance/sizing-feeding", + "ja/performance/node-resources", + { + "group": "インスタンス・タイプ", + "pages": [ + "ja/performance/instance-types/aws-instance-types", + "ja/performance/instance-types/gcp-instance-types", + "ja/performance/instance-types/azure-instance-types" + ] + }, + "ja/performance/topology-and-resizing", + "ja/performance/streaming-search", + "ja/performance/benchmarking", + "ja/performance/benchmarking-cloud", + "ja/performance/memory-visualizer", + "ja/performance/profiling", + "ja/performance/container-tuning", + "ja/performance/rate-limiting-searcher", + "ja/performance/graceful-degradation", + "ja/performance/caches-in-vespa", + "ja/performance/container-http", + "ja/performance/http2", + "ja/performance/feature-tuning", + "ja/performance/valgrind" + ] + }, + { + "group": "運用", + "pages": [ + "ja/cloud/quota", + "ja/operations/environments", + "ja/operations/zones", + "ja/operations/az", + "ja/operations/production-deployment", + "ja/operations/deployment-variants", + "ja/operations/automated-deployments", + "ja/operations/autoscaling", + { + "group": "Enclave: 自身のクラウドを利用", + "pages": [ + "ja/operations/enclave/enclave", + "ja/operations/enclave/aws-getting-started", + "ja/operations/enclave/aws-architecture", + "ja/operations/enclave/azure-getting-started", + "ja/operations/enclave/azure-architecture", + "ja/operations/enclave/gcp-getting-started", + "ja/operations/enclave/gcp-architecture", + "ja/operations/enclave/archive", + "ja/operations/enclave/operations" + ] + }, + "ja/operations/reindexing", + "ja/operations/data-management", + "ja/operations/cloning", + "ja/operations/monitoring", + "ja/operations/metrics", + "ja/operations/notifications", + "ja/cloud/support", + "ja/operations/deployment-patterns", + "ja/operations/private-endpoints", + "ja/operations/endpoint-routing", + "ja/operations/access-logging", + { + "group": "アーティファクト・アーカイブ", + "pages": [ + "ja/operations/archive/archive-guide", + "ja/operations/archive/archive-guide-aws", + "ja/operations/archive/archive-guide-gcp" + ] + }, + "ja/operations/deleting-applications", + { + "group": "セルフマネージド", + "pages": [ + "ja/operations/self-managed/admin-procedures", + "ja/operations/self-managed/multinode-systems", + "ja/operations/self-managed/files-processes-and-ports", + "ja/operations/self-managed/node-setup", + "ja/operations/self-managed/build-install", + "ja/operations/self-managed/monitoring", + "ja/operations/self-managed/content-node-recovery", + "ja/operations/self-managed/configuration-server", + "ja/operations/self-managed/live-upgrade", + "ja/operations/self-managed/config-sentinel", + "ja/operations/self-managed/config-proxy", + "ja/operations/self-managed/docker-containers", + "ja/operations/self-managed/vespa-gpu-container", + "ja/operations/self-managed/cpu-support", + "ja/operations/self-managed/slobrok", + "ja/operations/self-managed/procedure-change-attribute-index", + "ja/operations/self-managed/container", + "ja/operations/self-managed/sizing-examples", + "ja/operations/self-managed/vespa-support" + ] + }, + { + "group": "Kubernetes", + "pages": [ + "ja/operations/kubernetes/vespa-on-kubernetes", + "ja/operations/kubernetes/architecture", + { + "group": "デプロイメント", + "pages": [ + "ja/operations/kubernetes/deployment/installation", + "ja/operations/kubernetes/deployment/permissions" + ] + }, + { + "group": "運用", + "pages": [ + "ja/operations/kubernetes/operations/operations", + "ja/operations/kubernetes/operations/upgrades", + "ja/operations/kubernetes/operations/monitoring" + ] + }, + { + "group": "設定", + "pages": [ + "ja/operations/kubernetes/configuration/configure-local-storage-type", + "ja/operations/kubernetes/logging", + "ja/operations/kubernetes/ingress", + "ja/operations/kubernetes/custom-overrides-podtemplate", + "ja/operations/kubernetes/tls" + ] + } + ] + } + ] + }, + { + "group": "セキュリティ", + "pages": [ + "ja/security/security", + "ja/security/guide", + "ja/security/host-images", + "ja/security/secret-store", + "ja/security/cloudflare-workers", + "ja/security/whitepaper", + "ja/security/securing-your-vespa-installation", + "ja/security/mtls" + ] + }, + { + "group": "クライアント", + "pages": [ + "ja/clients/vespa-cli", + "ja/clients/python-client", + "ja/clients/vespa-feed-client", + "ja/clients/http-best-practices" + ] + }, + { + "group": "モジュール", + "pages": [ + { + "group": "Eコマース", + "pages": [ + "ja/modules/e-commerce/multi-currency-filtering", + "ja/modules/e-commerce/saved-search", + "ja/modules/e-commerce/using-features-together" + ] + } + ] + } ] }, { - "group": "RAG and embedding", - "pages": ["en/reference/rag/chunking", "en/reference/rag/embedding"] - }, - { - "group": "Operations", + "tab": "FAQ", "pages": [ - "en/reference/operations/health-checks", - "en/reference/operations/log-files", - "en/reference/operations/tools", - { - "group": "Metrics", - "pages": [ - "en/reference/operations/metrics/metrics", - "en/reference/operations/metrics/default-metric-set", - "en/reference/operations/metrics/vespa-metric-set", - "en/reference/operations/metrics/metric-units", - "en/reference/operations/metrics/container", - "en/reference/operations/metrics/distributor", - "en/reference/operations/metrics/searchnode", - "en/reference/operations/metrics/storage", - "en/reference/operations/metrics/configserver", - "en/reference/operations/metrics/logd", - "en/reference/operations/metrics/nodeadmin", - "en/reference/operations/metrics/slobrok", - "en/reference/operations/metrics/clustercontroller", - "en/reference/operations/metrics/sentinel" - ] - }, - { - "group": "Self-managed", - "pages": ["en/reference/operations/self-managed/tools"] + { + "group": "FAQ", + "pages": [ + "ja/learn/faq" + ] } ] }, { - "group": "Security", - "pages": ["en/reference/security/mtls"] - }, - { - "group": "Clients", - "pages": [ + "tab": "リファレンス", + "groups": [ + { + "group": "API", + "pages": [ + "ja/reference/api/api", + "ja/reference/api/query", + "ja/reference/api/document-v1", + "ja/reference/api/state-v1", + "ja/reference/api/deploy-v2", + "ja/reference/api/application-v2", + "ja/reference/api/config-v2", + "ja/reference/api/cluster-v2", + "ja/reference/api/metrics-v1", + "ja/reference/api/metrics-v2", + "ja/reference/api/prometheus-v1" + ] + }, + { + "group": "アプリケーションとコンポーネント", + "pages": [ + "ja/reference/applications/application-packages", + { + "group": "services.xml", + "pages": [ + "ja/reference/applications/services/services", + "ja/reference/applications/services/admin", + "ja/reference/applications/services/container", + "ja/reference/applications/services/content", + "ja/reference/applications/services/docproc", + "ja/reference/applications/services/http", + "ja/reference/applications/services/processing", + "ja/reference/applications/services/search" + ] + }, + "ja/reference/applications/deployment", + "ja/reference/applications/hosts", + "ja/reference/applications/validation-overrides", + "ja/reference/applications/components", + "ja/reference/applications/config-files", + "ja/reference/applications/testing", + "ja/reference/applications/testing-java" + ] + }, + { + "group": "スキーマとドキュメント", + "pages": [ + "ja/reference/schemas/schemas", + "ja/reference/schemas/document-json-format", + "ja/reference/schemas/document-field-path" + ] + }, + { + "group": "読み取りと書き込み", + "pages": [ + "ja/reference/writing/indexing-language", + "ja/reference/writing/document-selector-language" + ] + }, + { + "group": "クエリー", + "pages": [ + "ja/reference/querying/yql", + "ja/reference/querying/simple-query-language", + "ja/reference/querying/json-query-language", + "ja/reference/querying/grouping-language", + "ja/reference/querying/sorting-language", + "ja/reference/querying/query-profiles", + "ja/reference/querying/semantic-rules", + "ja/reference/querying/default-result-format", + "ja/reference/querying/page-result-format", + "ja/reference/querying/page-templates" + ] + }, + { + "group": "ランキングと推論", + "pages": [ + "ja/reference/ranking/ranking-expressions", + "ja/reference/ranking/tensor", + "ja/reference/ranking/rank-features", + "ja/reference/ranking/nativerank", + "ja/reference/ranking/string-segment-match", + "ja/reference/ranking/rank-feature-configuration", + "ja/reference/ranking/rank-types", + "ja/reference/ranking/model-files", + "ja/reference/ranking/constant-tensor-json-format" + ] + }, + { + "group": "RAGと埋め込み", + "pages": [ + "ja/reference/rag/chunking", + "ja/reference/rag/embedding" + ] + }, + { + "group": "運用", + "pages": [ + "ja/reference/operations/health-checks", + "ja/reference/operations/log-files", + "ja/reference/operations/tools", + { + "group": "メトリクス", + "pages": [ + "ja/reference/operations/metrics/metrics", + "ja/reference/operations/metrics/default-metric-set", + "ja/reference/operations/metrics/vespa-metric-set", + "ja/reference/operations/metrics/metric-units", + "ja/reference/operations/metrics/container", + "ja/reference/operations/metrics/distributor", + "ja/reference/operations/metrics/searchnode", + "ja/reference/operations/metrics/storage", + "ja/reference/operations/metrics/configserver", + "ja/reference/operations/metrics/logd", + "ja/reference/operations/metrics/nodeadmin", + "ja/reference/operations/metrics/slobrok", + "ja/reference/operations/metrics/clustercontroller", + "ja/reference/operations/metrics/sentinel" + ] + }, + { + "group": "セルフマネージド", + "pages": [ + "ja/reference/operations/self-managed/tools" + ] + } + ] + }, + { + "group": "セキュリティ", + "pages": [ + "ja/reference/security/mtls" + ] + }, { - "group": "Vespa CLI", - "pages": [ - "en/reference/clients/vespa-cli/vespa", - "en/reference/clients/vespa-cli/vespa_activate", - "en/reference/clients/vespa-cli/vespa_auth", - "en/reference/clients/vespa-cli/vespa_clone", - "en/reference/clients/vespa-cli/vespa_config", - "en/reference/clients/vespa-cli/vespa_curl", - "en/reference/clients/vespa-cli/vespa_deploy", - "en/reference/clients/vespa-cli/vespa_destroy", - "en/reference/clients/vespa-cli/vespa_document", - "en/reference/clients/vespa-cli/vespa_feed", - "en/reference/clients/vespa-cli/vespa_fetch", - "en/reference/clients/vespa-cli/vespa_inspect", - "en/reference/clients/vespa-cli/vespa_log", - "en/reference/clients/vespa-cli/vespa_prepare", - "en/reference/clients/vespa-cli/vespa_prod", - "en/reference/clients/vespa-cli/vespa_query", - "en/reference/clients/vespa-cli/vespa_status", - "en/reference/clients/vespa-cli/vespa_test", - "en/reference/clients/vespa-cli/vespa_version", - "en/reference/clients/vespa-cli/vespa_visit" + "group": "クライアント", + "pages": [ + { + "group": "Vespa CLI", + "pages": [ + "ja/reference/clients/vespa-cli/vespa", + "ja/reference/clients/vespa-cli/vespa_activate", + "ja/reference/clients/vespa-cli/vespa_auth", + "ja/reference/clients/vespa-cli/vespa_clone", + "ja/reference/clients/vespa-cli/vespa_config", + "ja/reference/clients/vespa-cli/vespa_curl", + "ja/reference/clients/vespa-cli/vespa_deploy", + "ja/reference/clients/vespa-cli/vespa_destroy", + "ja/reference/clients/vespa-cli/vespa_document", + "ja/reference/clients/vespa-cli/vespa_feed", + "ja/reference/clients/vespa-cli/vespa_fetch", + "ja/reference/clients/vespa-cli/vespa_inspect", + "ja/reference/clients/vespa-cli/vespa_log", + "ja/reference/clients/vespa-cli/vespa_prepare", + "ja/reference/clients/vespa-cli/vespa_prod", + "ja/reference/clients/vespa-cli/vespa_query", + "ja/reference/clients/vespa-cli/vespa_status", + "ja/reference/clients/vespa-cli/vespa_test", + "ja/reference/clients/vespa-cli/vespa_version", + "ja/reference/clients/vespa-cli/vespa_visit" + ] + } ] } ] } ] - }, - { - "tab": "Changelog", - "icon": "clock-rotate-left", - "pages": [ - "en/reference/release-notes/vespa7", - "en/reference/release-notes/vespa8", - "en/reference/release-notes/vespa9" - ] } - ], - "global": { - "anchors": [ - { - "anchor": "About", - "href": "https://vespa.ai/company/", - "icon": "users" - }, - { - "anchor": "Blog", - "href": "https://blog.vespa.ai/.", - "icon": "newspaper" - } - ] - } + ] }, "logo": { "light": "/logo/light.svg", "dark": "/logo/dark.svg", - "href": "https://vespa.ai" + "href": "/" }, "navbar": { "links": [ { - "label": "Console login", - "href": "https://console.vespa-cloud.com/", - "icon": "user" + "label": "Blog", + "href": "https://blog.vespa.ai/" + }, + { + "label": "vespa.ai", + "href": "https://vespa.ai/" }, { - "label": " ", + "label": "GitHub", "icon": "github", + "iconType": "brands", "href": "https://github.com/vespa-engine/vespa/" } ], "primary": { "type": "button", - "label": "Free trial", - "href": "https://vespa.ai/free-trial/" + "label": "Console login", + "href": "https://console.vespa-cloud.com/auth/login" } }, + "search": { + "prompt": "Search Vespa docs..." + }, "contextual": { "options": [ - "copy", + "assistant", "view", + "copy", "chatgpt", "claude", "perplexity", "mcp", "cursor", "vscode" - ] + ], + "display": "toc" }, "footer": { "socials": { @@ -619,5 +1172,16 @@ "x": "https://x.com/vespaengine", "youtube": "https://www.youtube.com/channel/UCVXw_f6UHff8-V9FA1LMIiw" } + }, + "redirects": [ + { + "source": "/en/operations/self-managed/using-kubernetes-with-vespa", + "destination": "/en/operations/kubernetes/vespa-on-kubernetes" + } + ], + "seo": { + "metatags": { + "robots": "noindex" + } } -} +} \ No newline at end of file diff --git a/mintlify-docs/en/applications/bundles.mdx b/mintlify-docs/en/applications/bundles.mdx index 96de1eece9..5b84657f64 100644 --- a/mintlify-docs/en/applications/bundles.mdx +++ b/mintlify-docs/en/applications/bundles.mdx @@ -292,19 +292,60 @@ The bundle plugin can be configured to tailor the resulting bundle to specific n ``` -| Element | Description | -| :--- | :--- | -| failOnWarnings | If true, the maven build will fail upon warnings for e.g. using Vespa types that are not annotated with [@PublicApi](https://javadoc.io/doc/com.yahoo.vespa/annotations/latest/com/yahoo/api/annotations/PublicApi.html). This should always be set to *true* to ensure that your project will compile successfully on future Vespa releases. Default is *false* | -| allowEmbeddedArtifacts | A comma-separated list of maven artifacts to allow embedding in the bundle, on the format *groupId:artifactId* | -| attachBundleArtifact | Whether to attach the bundle jar artifact to the build. Use this if you want to install and deploy the bundle jar along with the default jar. Default is *false* | -| bundleClassifierName | If *attachBundleArtifact* is true, this will be used as classifier for the bundle jar artifact. Default is *bundle* | -| discApplicationClass | The fully qualified class name of the Application to be started by JDisc | -| discPreInstallBundle | The name of the bundles that jDISC must pre-install | -| bundleVersion | The version of this bundle. Defaults to the Maven project version | -| bundleSymbolicName | The symbolic name of this bundle. Defaults to the Maven artifact ID | -| bundleActivator | The fully qualified class name of the bundle activator | -| configGenVersion | The version of *com.yahoo.vespa.configlib.config-class-plugin* that will be used to generate config classes | -| configModels | List of config models | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementDescription
failOnWarningsIf true, the maven build will fail upon warnings for e.g. using Vespa types that are not annotated with @PublicApi. This should always be set to *true* to ensure that your project will compile successfully on future Vespa releases. Default is *false*
allowEmbeddedArtifactsA comma-separated list of maven artifacts to allow embedding in the bundle, on the format *groupId:artifactId*
attachBundleArtifactWhether to attach the bundle jar artifact to the build. Use this if you want to install and deploy the bundle jar along with the default jar. Default is *false*
bundleClassifierNameIf *attachBundleArtifact* is true, this will be used as classifier for the bundle jar artifact. Default is *bundle*
discApplicationClassThe fully qualified class name of the Application to be started by JDisc
discPreInstallBundleThe name of the bundles that jDISC must pre-install
bundleVersionThe version of this bundle. Defaults to the Maven project version
bundleSymbolicNameThe symbolic name of this bundle. Defaults to the Maven artifact ID
bundleActivatorThe fully qualified class name of the bundle activator
configGenVersionThe version of *com.yahoo.vespa.configlib.config-class-plugin* that will be used to generate config classes
configModelsList of config models
### Bundle Plugin Troubleshooting diff --git a/mintlify-docs/en/applications/configapi-dev.mdx b/mintlify-docs/en/applications/configapi-dev.mdx index eff0900877..2c2863e4d5 100644 --- a/mintlify-docs/en/applications/configapi-dev.mdx +++ b/mintlify-docs/en/applications/configapi-dev.mdx @@ -37,10 +37,24 @@ A schema incompatibility occurs if the config class (for example `MotdConfig` in Let *S* denote a config definition called *motd* which the server is using, and *C* denote a config definition also called *motd* which the client is using, i.e. the one that created `MotdConfig` used when subscribing. The following is the system's behavior: -| | | -| :--- | :--- | -| Compatible Changes | These schema mismatches are handled automatically by the configserver:
- C is missing a config value that S has: The server will omit that value from the response.
- C has an additional config value with a default value: The server will include that value in the response.
- C and S both have a config value, but the default values differ: The server will use C's default value. | -| Incompatible Changes | These schema mismatches are not handled by the config server, and will typically lead to error in the subscription API because of missing values (though in principle some consumers of config may tolerate them):
- C has an additional config value without a default value: The server will not include anything for that value.
- C has the type of a config value changed, for example from string to int: The server will print an error message, and not include anything for that value. The user must use an entirely new name for the config if such a change must be made. | + + + + + + + + + + + + + + + + + +
Compatible ChangesThese schema mismatches are handled automatically by the configserver:
- C is missing a config value that S has: The server will omit that value from the response.
- C has an additional config value with a default value: The server will include that value in the response.
- C and S both have a config value, but the default values differ: The server will use C's default value.
Incompatible ChangesThese schema mismatches are not handled by the config server, and will typically lead to error in the subscription API because of missing values (though in principle some consumers of config may tolerate them):
- C has an additional config value without a default value: The server will not include anything for that value.
- C has the type of a config value changed, for example from string to int: The server will print an error message, and not include anything for that value. The user must use an entirely new name for the config if such a change must be made.
As with any data schema, it is wise to be conservative about changing it if the system will have new versions in the future. For a `def` schema, removing a config value constitutes a semantic change that may lead to problems when an older version of some config subscriber asks for config. In large deployments, the risk associated with this increases, because of the higher cost of a full restart of everything. diff --git a/mintlify-docs/en/applications/developer-guide.mdx b/mintlify-docs/en/applications/developer-guide.mdx index c9f2bd6ba8..a6636af0e5 100644 --- a/mintlify-docs/en/applications/developer-guide.mdx +++ b/mintlify-docs/en/applications/developer-guide.mdx @@ -57,11 +57,28 @@ See [deploy an application having Java components](/en/basics/deploy-an-applicat The development cycle consists of creating the component, deploying the application package to Vespa, writing tests, and iterating. These steps refer to files in [album-recommendation-java](https://github.com/vespa-engine/sample-apps/tree/master/album-recommendation-java): -| | | -| :--- | :--- | -| **Build** | All the Vespa sample applications use the [bundle plugin](/en/applications/bundles#maven-bundle-plugin) to build the components. | -| **Configure** | A key Vespa feature is code and configuration consistency, deployed using an [application package](/en/basics/applications). This ensures that code and configuration is in sync, and loaded atomically when deployed. This is done by generating config classes from config definition files. In Vespa and application code, configuration is therefore accessed through generated config classes. The Maven target `generate-sources` (invoked by `mvn install`) uses [metal-names.def](https://github.com/vespa-engine/sample-apps/blob/master/album-recommendation-java/app/src/main/resources/configdefinitions/metal-names.def) to generate `target/generated-sources/vespa-configgen-plugin/com/mydomain/example/MetalNamesConfig.java`. After generating config classes, they will resolve in tools like [IntelliJ IDEA](https://www.jetbrains.com/idea/download/). | -| **Tests** | Examples unit tests are found in [MetalSearcherTest.java](https://github.com/vespa-engine/sample-apps/blob/master/album-recommendation-java/app/src/test/java/ai/vespa/example/album/MetalSearcherTest.java). `testAddedOrTerm1` and `testAddedOrTerm2` illustrates two ways of doing the same test: The first setting up the minimal search chain for [YQL](/en/querying/query-language) programmatically. The second uses [`com.yahoo.application.Application`](https://javadoc.io/doc/com.yahoo.vespa/application/latest/com/yahoo/application/Application), which sets up the application package and simplifies testing. Read more in [unit testing](/en/applications/unit-testing). | + + + + + + + + + + + + + + + + + + + + + +
**Build**All the Vespa sample applications use the bundle plugin to build the components.
**Configure**A key Vespa feature is code and configuration consistency, deployed using an application package. This ensures that code and configuration is in sync, and loaded atomically when deployed. This is done by generating config classes from config definition files. In Vespa and application code, configuration is therefore accessed through generated config classes. The Maven target {`generate-sources`} (invoked by {`mvn install`}) uses metal-names.def to generate {`target/generated-sources/vespa-configgen-plugin/com/mydomain/example/MetalNamesConfig.java`}. After generating config classes, they will resolve in tools like IntelliJ IDEA.
**Tests**Examples unit tests are found in MetalSearcherTest.java. {`testAddedOrTerm1`} and {`testAddedOrTerm2`} illustrates two ways of doing the same test: The first setting up the minimal search chain for YQL programmatically. The second uses {`com.yahoo.application.Application`}, which sets up the application package and simplifies testing. Read more in unit testing.
## Debugging Components diff --git a/mintlify-docs/en/applications/document-processors.mdx b/mintlify-docs/en/applications/document-processors.mdx index 786c48e606..1b89211216 100644 --- a/mintlify-docs/en/applications/document-processors.mdx +++ b/mintlify-docs/en/applications/document-processors.mdx @@ -94,17 +94,51 @@ return Progress.DONE; } ``` -| Return code | Description | -| :--- | :--- | -| `Progress.DONE` | Returned if a document processor has successfully processed a `Processing`. | -| `Progress.FAILED` | Processing failed and the input message should return a *fatal* failure back to the feeding application, meaning that this application will not try to re-feed this document operation. Return an error message/reason by calling `withReason()`. This result is represented as a `500 Internal Server Error` response in [Document v1](/en/writing/document-v1-api-guide). Example: `if (op instanceof DocumentPut) { return Progress.FAILED.withReason("PUT is not supported"); }` | -| `Progress.INVALID_INPUT` | Available since 8.584. Processing failed due to invalid input, like a malformed document operation. This result is represented as a `400 Bad Request` response in [Document v1](/en/writing/document-v1-api-guide). | -| `Progress.LATER` | See [execution model](#execution-model). The document processor wants to release the calling thread and be called again later. This is useful if e.g. calling an external service with high latency. The document processor may then save its state in the `Processing` and resume when called again later. There are no guarantees as to *when* the processor is called again with this `Processing`; it is simply appended to the back of the input queue. By the use of `Progress.LATER`, this is an asynchronous model, where the processing of a document operation does not need to consume one thread for its entire lifespan. Note, however, that the document processors themselves are shared between all processing operations in a chain, and must thus be implemented [thread-safe](#state). | - -| Exception | Description | -| :--- | :--- | -| `com.yahoo.docproc.TransientFailureException` | Processing failed and the input message should return a *transient* failure back to the feeding application, meaning that this application *may* try to re-feed this document operation. | -| `RuntimeException` | Throwing any other `RuntimeException` means same behavior as for `Progress.FAILED`. | + + + + + + + + + + + + + + + + + + + + + + + + + +
Return codeDescription
{`Progress.DONE`}Returned if a document processor has successfully processed a {`Processing`}.
{`Progress.FAILED`}Processing failed and the input message should return a *fatal* failure back to the feeding application, meaning that this application will not try to re-feed this document operation. Return an error message/reason by calling {`withReason()`}. This result is represented as a {`500 Internal Server Error`} response in Document v1. Example: {`if (op instanceof DocumentPut) { return Progress.FAILED.withReason("PUT is not supported"); }`}
{`Progress.INVALID_INPUT`}Available since 8.584. Processing failed due to invalid input, like a malformed document operation. This result is represented as a {`400 Bad Request`} response in Document v1.
{`Progress.LATER`}See execution model. The document processor wants to release the calling thread and be called again later. This is useful if e.g. calling an external service with high latency. The document processor may then save its state in the {`Processing`} and resume when called again later. There are no guarantees as to *when* the processor is called again with this {`Processing`}; it is simply appended to the back of the input queue. By the use of {`Progress.LATER`}, this is an asynchronous model, where the processing of a document operation does not need to consume one thread for its entire lifespan. Note, however, that the document processors themselves are shared between all processing operations in a chain, and must thus be implemented thread-safe.
+ + + + + + + + + + + + + + + + + + +
ExceptionDescription
{`com.yahoo.docproc.TransientFailureException`}Processing failed and the input message should return a *transient* failure back to the feeding application, meaning that this application *may* try to re-feed this document operation.
{`RuntimeException`}Throwing any other {`RuntimeException`} means same behavior as for {`Progress.FAILED`}.
## Chains diff --git a/mintlify-docs/en/applications/request-handlers.mdx b/mintlify-docs/en/applications/request-handlers.mdx index ca6bbe6381..a04e24ef3b 100644 --- a/mintlify-docs/en/applications/request-handlers.mdx +++ b/mintlify-docs/en/applications/request-handlers.mdx @@ -24,9 +24,20 @@ This utility base class uses a synchronous API and a multithreaded execution mod The [Vespa sample apps](https://github.com/vespa-engine/sample-apps) on GitHub contains a few example request handler implementations: -| Handler | Description | -| :--- | :--- | -| [DemoHandler](https://github.com/vespa-engine/sample-apps/blob/master/examples/http-api-using-request-handlers-and-processors/src/main/java/ai/vespa/examples/DemoHandler.java) | A handler that modifies a request before dispatching it to the `ProcessingHandler`. This handler is also used in the [HTTP API tutorial](/en/learn/tutorials/http-api). Note that since this depends on ProcessingHandler you must add `processing` to your `container` tag to use it. If you want to issue Queries instead, have com.yahoo.search.searchchain.ExecutionFactory injected instead and use it to create executions and call search/fill on them. | + + + + + + + + + + + + + +
HandlerDescription
DemoHandlerA handler that modifies a request before dispatching it to the {`ProcessingHandler`}. This handler is also used in the HTTP API tutorial. Note that since this depends on ProcessingHandler you must add {`processing`} to your {`container`} tag to use it. If you want to issue Queries instead, have com.yahoo.search.searchchain.ExecutionFactory injected instead and use it to create executions and call search/fill on them.
## Deploying a request handler diff --git a/mintlify-docs/en/basics/operations.mdx b/mintlify-docs/en/basics/operations.mdx index 4cb1fadb4d..ab78c68317 100644 --- a/mintlify-docs/en/basics/operations.mdx +++ b/mintlify-docs/en/basics/operations.mdx @@ -3,11 +3,32 @@ title: Operations description: "A deployed Vespa application is a self-contained highly available, distributed stateful system. Operating these at scale is difficult, so Vespa automates this to the extent possible in the deployment environment it is running." --- -| Deployment environment | Automated operations | Suitable for | -| :--- | :--- | :--- | -| Vespa self-managed/open source | Application deployment (single application, single instance), application change (except rolling restarts), data redistribution, failover | Development | -| Vespa Kubernetes Operator | Application deployment (single application, single instance), application change, data redistribution, failover, node provisioning, failed node replacement, node type change, [autoscaling](/en/operations/autoscaling), [endpoint routing](/en/operations/endpoint-routing), encryption | Production in environments outside hyperscalers | -| Vespa Cloud | Application deployment (multiple applications, instances, [regions](/en/operations/zones), clouds), application change, data redistribution, failover, node provisioning, failed node replacement, node type change, [autoscaling](/en/operations/autoscaling), [endpoint routing](/en/operations/endpoint-routing), encryption, Vespa platform and OS upgrades, continuous deployment pipeline with verification, metrics and management console | Development, production on hyperscalers (including in [customer accounts and VPCs](/en/operations/enclave/enclave)) | + + + + + + + + + + + + + + + + + + + + + + + + + +
Deployment environmentAutomated operationsSuitable for
Vespa self-managed/open sourceApplication deployment (single application, single instance), application change (except rolling restarts), data redistribution, failoverDevelopment
Vespa Kubernetes OperatorApplication deployment (single application, single instance), application change, data redistribution, failover, node provisioning, failed node replacement, node type change, autoscaling, endpoint routing, encryptionProduction in environments outside hyperscalers
Vespa CloudApplication deployment (multiple applications, instances, regions, clouds), application change, data redistribution, failover, node provisioning, failed node replacement, node type change, autoscaling, endpoint routing, encryption, Vespa platform and OS upgrades, continuous deployment pipeline with verification, metrics and management consoleDevelopment, production on hyperscalers (including in customer accounts and VPCs)
Vespa is designed to enable applications to evolve in production. This includes these aspects: diff --git a/mintlify-docs/en/basics/schemas.mdx b/mintlify-docs/en/basics/schemas.mdx index 1577338dff..f7c2b0d893 100644 --- a/mintlify-docs/en/basics/schemas.mdx +++ b/mintlify-docs/en/basics/schemas.mdx @@ -101,3 +101,11 @@ What happens if you change the schema of a running application? You can find the details in [modifying schemas](/en/reference/schemas/schemas#modifying-schemas). +### Multiple schemas + +An application package has one or more schemas. There is no hard limit to number of schemas, the largest application have hundreds. + +A schema defines how data is stored in a [content cluster](/en/learn/overview#content-clusters). The most common approach is storing all schemas in a single content cluster. Use more content clusters to isolate load or scale the clusters differently. + +A schema defines a [document type](/en/schemas/documents). One can store documents with the same document type in different content clusters. Use cases are A/B testing and hot/cold variations of data. Vespa will update documents in all content clusters with the same document type, the mapping is set in [services.xml](/en/reference/applications/services/content#document) using *type*. + diff --git a/mintlify-docs/en/cloud/quota.mdx b/mintlify-docs/en/cloud/quota.mdx index 33d1e7bae6..07c9b7385a 100644 --- a/mintlify-docs/en/cloud/quota.mdx +++ b/mintlify-docs/en/cloud/quota.mdx @@ -7,9 +7,23 @@ That means, if you are using [autoscaling](/en/operations/autoscaling), the quot You can see how much quota your applications are using in the Vespa Cloud console. The quota a tenant has depends on the [plan](https://vespa.ai/pricing/) the tenant is on: -| Plan | Quota | -|:-----|:-----| -| Trial | \$2/hour | -| All other plans | \$10/hour | + + + + + + + + + + + + + + + + + +
PlanQuota
Trial\$2/hour
All other plans\$10/hour
Contact [Support](https://vespa.ai/support) to change the quota. \ No newline at end of file diff --git a/mintlify-docs/en/content/attributes.mdx b/mintlify-docs/en/content/attributes.mdx index dd4e15ddf7..6935dc467e 100644 --- a/mintlify-docs/en/content/attributes.mdx +++ b/mintlify-docs/en/content/attributes.mdx @@ -59,11 +59,28 @@ An attribute is an in-memory data structure. Attributes speed up query execution Configuration overview: -| | || -| --- | --- | --- | -| **fast-search** | Also see the [reference](/en/reference/schemas/schemas#attribute). Add an [index structure](#index-structures) to improve query performance: ``` field titles type array { indexing : summary \| attribute attribute: fast-search }``` | -| **fast-access** | For high-throughput updates, all nodes with a replica should have the attribute loaded in memory. Depending on replication factor and other configuration, this is not always the case. Use [fast-access](/en/reference/schemas/schemas#attribute) to increase feed rates by having replicas on all nodes in memory - see the [reference](/en/reference/schemas/schemas#attribute) and [sizing feeding](/en/performance/sizing-feeding). ``` field titles type array { indexing : summary \| attribute attribute: fast-access }``` | -| **distance-metric** | Features like [nearest neighbor search](/en/querying/nearest-neighbor-search) require a [distance-metric](/en/reference/schemas/schemas#distance-metric), and can also have an `hsnw index` to speed up queries. Read more in [approximate nearest neighbor](/en/querying/approximate-nn-hnsw). Pay attention to the field's `index` setting to enable the index: ``` field image_sift_encoding type tensor(x\[128\]) { indexing: summary \| attribute \| index attribute { distance-metric: euclidean } index { hnsw { max-links-per-node: 16 neighbors-to-explore-at-insert: 500 } } }``` | + + + + + + + + + + + + + + + + + + + + + +
**fast-search**Also see the reference. Add an index structure to improve query performance:
{`field titles type array {     indexing : summary | attribute     attribute: fast-search }`}
**fast-access**For high-throughput updates, all nodes with a replica should have the attribute loaded in memory. Depending on replication factor and other configuration, this is not always the case. Use fast-access to increase feed rates by having replicas on all nodes in memory - see the reference and sizing feeding.
{`field titles type array {     indexing : summary | attribute     attribute: fast-access }`}
**distance-metric**Features like nearest neighbor search require a distance-metric, and can also have an {`hsnw index`} to speed up queries. Read more in approximate nearest neighbor. Pay attention to the field's {`index`} setting to enable the index:
{`field image_sift_encoding type tensor(x[128]) {     indexing: summary | attribute | index     attribute {         distance-metric: euclidean     }     index {         hnsw {             max-links-per-node: 16             neighbors-to-explore-at-insert: 500         }     } }`}
The attribute field's data type decides which data structures are used by the attribute to store values for that field across all documents on a content node. For some data types, a combination of data structures is used: @@ -79,13 +96,42 @@ In the following illustration, a row represents a document, while a named column Attributes can be: -| Type | Size | Description | -| :--- | :--- | :--- | -| Single-valued | Fixed | Like the "A" attribute, example `int`. The element size is the size of the type, like 4 bytes for an integer. A memory buffer (indexed by Local ID) holds all values directly. | -| Multi-valued | Fixed | Like the "B" attribute, example `array`. A memory buffer (indexed by Local ID) is holding references (32 bit) to where in the *Multivalue Mapping* the arrays are stored. The *Multivalue Mapping* consists of multiple memory buffers, where arrays of the same size are co-located in the same buffer. | -| Multi-valued | Variable | Like the "B" attribute, example `array`. A memory buffer (indexed by Local ID) is holding references (32 bit) to where in the *Multivalue Mapping* the arrays are stored. The unique strings are stored in the *Enum Store*, and the arrays in the *Multivalue Mapping* stores the references (32 bit) to the strings in the *Enum Store*. The *Enum Store* consists of multiple memory buffers. | -| Single-valued | Variable | Like the "C" attribute, example `string`. A memory buffer (indexed by Local ID) is holding references (32 bit) to where in the *Enum Store* the strings are stored. | -| Tensor | Fixed / Variable | Like the "D" attribute, example `tensor(x{},y[64])`. A memory buffer (indexed by Local ID) is holding references (32 bit) to where in the *Tensor Store* the tensor values are stored. The memory layout in the *Tensor Store* depends on the tensor type. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeSizeDescription
Single-valuedFixedLike the "A" attribute, example {`int`}. The element size is the size of the type, like 4 bytes for an integer. A memory buffer (indexed by Local ID) holds all values directly.
Multi-valuedFixedLike the "B" attribute, example {`array`}. A memory buffer (indexed by Local ID) is holding references (32 bit) to where in the *Multivalue Mapping* the arrays are stored. The *Multivalue Mapping* consists of multiple memory buffers, where arrays of the same size are co-located in the same buffer.
Multi-valuedVariableLike the "B" attribute, example {`array`}. A memory buffer (indexed by Local ID) is holding references (32 bit) to where in the *Multivalue Mapping* the arrays are stored. The unique strings are stored in the *Enum Store*, and the arrays in the *Multivalue Mapping* stores the references (32 bit) to the strings in the *Enum Store*. The *Enum Store* consists of multiple memory buffers.
Single-valuedVariableLike the "C" attribute, example {`string`}. A memory buffer (indexed by Local ID) is holding references (32 bit) to where in the *Enum Store* the strings are stored.
TensorFixed / VariableLike the "D" attribute, example {`tensor(x{},y[64])`}. A memory buffer (indexed by Local ID) is holding references (32 bit) to where in the *Tensor Store* the tensor values are stored. The memory layout in the *Tensor Store* depends on the tensor type.
The "A", "B", "C" and "D" attribute memory buffers have attribute values or references in Local ID (LID) order - see [document meta store](#document-meta-store). @@ -173,42 +219,170 @@ The different field types use various data types for storage, see below, a conse Attribute sizing is not an exact science but rather an approximation. The reason is that they vary in size. Both the number of documents, number of values, and uniqueness of the values are variable. The components of the attributes that occupy memory are: -| Abbreviation | Concept | Comment | -| :--- | :--- | :--- | -| D | Number of documents | Number of documents on the node, or rather the maximum number of local document IDs allocated | -| V | Average number of values per document | Only applicable for arrays and weighted sets | -| U | Number of unique values | Only applies for strings or if [fast-search](/en/reference/schemas/schemas#attribute) is set | -| FW | Fixed data width | sizeof(T) for numerics, 1 byte for strings, 1 bit for boolean | -| WW | Weight width | Width of the weight in a weighted set, 4 bytes. 0 bytes for arrays. | -| EIW | Enum index width | Width of the index into the enum store, 4 bytes. Used by all strings and other attributes if [fast-search](/en/reference/schemas/schemas#attribute) is set | -| VW | Variable data width | strlen(s) for strings, 0 bytes for the rest | -| PW | Posting entry width | Width of a posting list entry, 4 bytes for singlevalue, 8 bytes for array and weighted sets. Only applies if [fast-search](/en/reference/schemas/schemas#attribute) is set. | -| PIW | Posting index width | Width of the index into the store of posting lists; 4 bytes | -| MIW | Multivalue index width | Width of the index into the multivalue mapping; 4 bytes | -| ROF | Resize overhead factor | Default is 6/5. This is the average overhead in any dynamic vector due to resizing strategy. Resize strategy is 50% indicating that structure is 5/6 full on average. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AbbreviationConceptComment
DNumber of documentsNumber of documents on the node, or rather the maximum number of local document IDs allocated
VAverage number of values per documentOnly applicable for arrays and weighted sets
UNumber of unique valuesOnly applies for strings or if fast-search is set
FWFixed data widthsizeof(T) for numerics, 1 byte for strings, 1 bit for boolean
WWWeight widthWidth of the weight in a weighted set, 4 bytes. 0 bytes for arrays.
EIWEnum index widthWidth of the index into the enum store, 4 bytes. Used by all strings and other attributes if fast-search is set
VWVariable data widthstrlen(s) for strings, 0 bytes for the rest
PWPosting entry widthWidth of a posting list entry, 4 bytes for singlevalue, 8 bytes for array and weighted sets. Only applies if fast-search is set.
PIWPosting index widthWidth of the index into the store of posting lists; 4 bytes
MIWMultivalue index widthWidth of the index into the multivalue mapping; 4 bytes
ROFResize overhead factorDefault is 6/5. This is the average overhead in any dynamic vector due to resizing strategy. Resize strategy is 50% indicating that structure is 5/6 full on average.
### Components -| Component | Formula | Approx Factor | Applies to | -| :--- | :--- | :--- | :--- | -| Document vector | D * ((FW or EIW) or MIW) | ROF | FW for singlevalue numeric attributes and MIW for multivalue attributes. EIW for singlevalue string or if the attribute is singlevalue fast-search | -| Multivalue mapping | D * V * ((FW or EIW) + WW) | ROF | Applicable only for array or weighted sets. EIW if string or fast-search | -| Enum store | U * ((FW + VW) + 4 + ((EIW + PIW) or EIW)) | ROF | Applicable for strings or if fast-search is set. (EIW + PIW) if fast-search is set, EIW otherwise. | -| Posting list | D * V * PW | ROF | Applicable if fast-search is set | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentFormulaApprox FactorApplies to
Document vectorD * ((FW or EIW) or MIW)ROFFW for singlevalue numeric attributes and MIW for multivalue attributes. EIW for singlevalue string or if the attribute is singlevalue fast-search
Multivalue mappingD * V * ((FW or EIW) + WW)ROFApplicable only for array or weighted sets. EIW if string or fast-search
Enum storeU * ((FW + VW) + 4 + ((EIW + PIW) or EIW))ROFApplicable for strings or if fast-search is set. (EIW + PIW) if fast-search is set, EIW otherwise.
Posting listD * V * PWROFApplicable if fast-search is set
### Variants -| Type | Components | Formula | -| :--- | :--- | :--- | -| Numeric singlevalue plain | Document vector | D * FW * ROF | -| Numeric multivalue value plain | Document vector, Multivalue mapping | D * MIW * ROF + D * V * (FW+WW) * ROF | -| Numeric singlevalue fast-search | Document vector, Enum store, Posting List | D * EIW * ROF + U * (FW+4+EIW+PIW) * ROF + D * PW * ROF | -| Numeric multivalue value fast-search | Document vector, Multivalue mapping, Enum store, Posting List | D * MIW * ROF + D * V * (EIW+WW) * ROF + U * (FW+4+EIW+PIW) * ROF + D * V * PW * ROF | -| Singlevalue string plain | Document vector, Enum store | D * EIW * ROF + U * (FW+VW+4+EIW) * ROF | -| Singlevalue string fast-search | Document vector, Enum store, Posting List | D * EIW * ROF + U * (FW+VW+4+EIW+PIW) * ROF + D * PW * ROF | -| Multivalue string plain | Document vector, Multivalue mapping, Enum store | D * MIW * ROF + D * V * (EIW+WW) * ROF + U * (FW+VW+4+EIW) * ROF | -| Multivalue string fast-search | Document vector, Multivalue mapping, Enum store, Posting list | D * MIW * ROF + D * V * (EIW+WW) * ROF + U * (FW+VW+4+EIW+PIW) * ROF + D * V * PW * ROF | -| Boolean singlevalue | Document vector | D * FW * ROF | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeComponentsFormula
Numeric singlevalue plainDocument vectorD * FW * ROF
Numeric multivalue value plainDocument vector, Multivalue mappingD * MIW * ROF + D * V * (FW+WW) * ROF
Numeric singlevalue fast-searchDocument vector, Enum store, Posting ListD * EIW * ROF + U * (FW+4+EIW+PIW) * ROF + D * PW * ROF
Numeric multivalue value fast-searchDocument vector, Multivalue mapping, Enum store, Posting ListD * MIW * ROF + D * V * (EIW+WW) * ROF + U * (FW+4+EIW+PIW) * ROF + D * V * PW * ROF
Singlevalue string plainDocument vector, Enum storeD * EIW * ROF + U * (FW+VW+4+EIW) * ROF
Singlevalue string fast-searchDocument vector, Enum store, Posting ListD * EIW * ROF + U * (FW+VW+4+EIW+PIW) * ROF + D * PW * ROF
Multivalue string plainDocument vector, Multivalue mapping, Enum storeD * MIW * ROF + D * V * (EIW+WW) * ROF + U * (FW+VW+4+EIW) * ROF
Multivalue string fast-searchDocument vector, Multivalue mapping, Enum store, Posting listD * MIW * ROF + D * V * (EIW+WW) * ROF + U * (FW+VW+4+EIW+PIW) * ROF + D * V * PW * ROF
Boolean singlevalueDocument vectorD * FW * ROF
## Paged attributes diff --git a/mintlify-docs/en/content/buckets.mdx b/mintlify-docs/en/content/buckets.mdx index beb55d1346..ee539d02ec 100644 --- a/mintlify-docs/en/content/buckets.mdx +++ b/mintlify-docs/en/content/buckets.mdx @@ -44,15 +44,44 @@ The distributors may split the buckets further than the distribution bit count i The content layer defines a set of maintenance operations to keep the cluster balanced. Distributors schedule maintenance operations and issue them to content nodes. Maintenance operations are typically not high priority requests. Scheduling a maintenance operation does not block any external operations. -| | | -| :--- | :--- | -| **Split bucket** | Split a bucket in two, by enforcing the documents within the new buckets to have more location bits in common. Buckets are split either because they have grown too big, or because the cluster wants to use more distribution bits. | -| **Join bucket** | Join two buckets into one. If a bucket has been previously split due to being large, but documents have now been deleted, the bucket can be joined again. | -| **Merge bucket** | If there are multiple replicas of a bucket, but they do not store the same set of versioned documents, _merge_ is used to synchronize the replicas. A special case of a merge is a one-way merge, which may be done if some of the replicas are to be deleted right after the merge. Merging is used not only to fix inconsistent bucket replicas, but also to move buckets between nodes. To move a bucket, an empty replica is created on the target node, a merge is executed, and the source bucket is deleted. | -| **Create bucket** | This operation exist merely for the distributor to notify a content node that it is now to store documents for this bucket too. This allows content nodes to refuse operations towards buckets it does not own. The ability to refuse traffic is a safeguard to avoid inconsistencies. If a client talks to a distributor that is no longer working correctly, we rather want its requests to fail than to alter the content cluster in strange ways. | -| **Delete bucket** | Drop stored state for a bucket and reject further requests for it | -| **(De)activate bucket** | Activate bucket for search results - refer to [bucket management](/en/content/proton#bucket-management) | -| **Garbage collections** | If configured, documents are periodically garbage collected through background maintenance operations. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**Split bucket**Split a bucket in two, by enforcing the documents within the new buckets to have more location bits in common. Buckets are split either because they have grown too big, or because the cluster wants to use more distribution bits.
**Join bucket**Join two buckets into one. If a bucket has been previously split due to being large, but documents have now been deleted, the bucket can be joined again.
**Merge bucket**If there are multiple replicas of a bucket, but they do not store the same set of versioned documents, _merge_ is used to synchronize the replicas. A special case of a merge is a one-way merge, which may be done if some of the replicas are to be deleted right after the merge. Merging is used not only to fix inconsistent bucket replicas, but also to move buckets between nodes. To move a bucket, an empty replica is created on the target node, a merge is executed, and the source bucket is deleted.
**Create bucket**This operation exist merely for the distributor to notify a content node that it is now to store documents for this bucket too. This allows content nodes to refuse operations towards buckets it does not own. The ability to refuse traffic is a safeguard to avoid inconsistencies. If a client talks to a distributor that is no longer working correctly, we rather want its requests to fail than to alter the content cluster in strange ways.
**Delete bucket**Drop stored state for a bucket and reject further requests for it
**(De)activate bucket**Activate bucket for search results - refer to bucket management
**Garbage collections**If configured, documents are periodically garbage collected through background maintenance operations.
### Bucket split size diff --git a/mintlify-docs/en/content/content-nodes.mdx b/mintlify-docs/en/content/content-nodes.mdx index eb6f19741a..1e63e9a630 100644 --- a/mintlify-docs/en/content/content-nodes.mdx +++ b/mintlify-docs/en/content/content-nodes.mdx @@ -29,11 +29,28 @@ If a cluster has so many nodes unavailable that it is considered down, the state The main task of the cluster controller is to maintain the [cluster state](#cluster-state). This is done by *polling* nodes for state, *generating* a cluster state, which is then *broadcast* to all the content nodes in the cluster. Note that clients do not interface with the cluster controller - they get the cluster state from the distributors - [details](#distributor). -| Task | Description | -| :--- | :--- | -| Node state polling | The cluster controller polls nodes, sending the current cluster state. If the cluster state is no longer correct, the node returns correct information immediately. If the state is correct, the request lingers on the node, such that the node can reply to it immediately if its state changes. After a while, the cluster controller will send a new state request to the node, even with one pending. This triggers a reply to the lingering request and makes the new one linger instead. Hence, nodes have a pending state request.
During a controlled node shutdown, it starts the shutdown process by responding to the pending state request that it is now stopping.
**Note:** As controlled restarts or shutdowns are implemented as TERM signals from the config-sentinel, the cluster controller is not able to differ between controlled and other shutdowns. | -| Cluster state generation | The cluster controller translates unit and user states into the generated cluster state | -| Cluster state broadcast | When node unit states are received, a cluster controller internal cluster state is updated. New cluster states are distributed with a minimum interval between. A grace period per unit state too - e.g., distributors and content nodes that are on the same node often stop at the same time.
The version number is incremented, and the new cluster state is broadcast.
If cluster state version is reset, distributors and content node processes may have to be restarted in order for the system to converge to the new state. Nodes will reject lower cluster state versions to prevent race conditions caused by overlapping cluster controller leadership periods. | + + + + + + + + + + + + + + + + + + + + + +
TaskDescription
Node state pollingThe cluster controller polls nodes, sending the current cluster state. If the cluster state is no longer correct, the node returns correct information immediately. If the state is correct, the request lingers on the node, such that the node can reply to it immediately if its state changes. After a while, the cluster controller will send a new state request to the node, even with one pending. This triggers a reply to the lingering request and makes the new one linger instead. Hence, nodes have a pending state request.
During a controlled node shutdown, it starts the shutdown process by responding to the pending state request that it is now stopping.
**Note:** As controlled restarts or shutdowns are implemented as TERM signals from the config-sentinel, the cluster controller is not able to differ between controlled and other shutdowns.
Cluster state generationThe cluster controller translates unit and user states into the generated cluster state
Cluster state broadcastWhen node unit states are received, a cluster controller internal cluster state is updated. New cluster states are distributed with a minimum interval between. A grace period per unit state too - e.g., distributors and content nodes that are on the same node often stop at the same time.
The version number is incremented, and the new cluster state is broadcast.
If cluster state version is reset, distributors and content node processes may have to be restarted in order for the system to converge to the new state. Nodes will reject lower cluster state versions to prevent race conditions caused by overlapping cluster controller leadership periods.
See [cluster controller configuration](/en/operations/self-managed/admin-procedures#cluster-controller-configuration). @@ -111,18 +128,56 @@ When starting, content nodes will start with gathering information on what bucke ## Metrics -| Metric | Description | -| :--- | :--- | -| .idealstate.idealstate_diff | This metric tries to create a single value indicating distance to the ideal state. A value of zero indicates that the cluster is in the ideal state. Graphed values of this metric gives a good indication for how fast the cluster gets back to the ideal state after changes. Note that some issues may hide other issues, so sometimes the graph may appear to stand still or even go a bit up again, as resolving one issue may have detected one or several others. | -| .idealstate.buckets_toofewcopies | Specifically lists how many buckets have too few copies. Compare to the *buckets* metric to see how big a portion of the cluster this is. | -| .idealstate.buckets_toomanycopies | Specifically lists how many buckets have too many copies. Compare to the *buckets* metric to see how big a portion of the cluster this is. | -| .idealstate.buckets | The total number of buckets managed. Used by other metrics reporting bucket counts to know how big a part of the cluster they relate to. | -| .idealstate.buckets_notrusted | Lists how many buckets have no trusted copies. Without trusted buckets operations against the bucket may have poor performance, having to send requests to many copies to try and create consistent replies. | -| .idealstate.delete_bucket.pending | Lists how many buckets that needs to be deleted. | -| .idealstate.merge_bucket.pending | Lists how many buckets there are, where we suspect not all copies store identical document sets. | -| .idealstate.split_bucket.pending | Lists how many buckets are currently being split. | -| .idealstate.join_bucket.pending | Lists how many buckets are currently being joined. | -| .idealstate.set_bucket_state.pending | Lists how many buckets are currently altered for active state. These are high priority requests which should finish fast, so these requests should seldom be seen as pending. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricDescription
.idealstate.idealstate_diffThis metric tries to create a single value indicating distance to the ideal state. A value of zero indicates that the cluster is in the ideal state. Graphed values of this metric gives a good indication for how fast the cluster gets back to the ideal state after changes. Note that some issues may hide other issues, so sometimes the graph may appear to stand still or even go a bit up again, as resolving one issue may have detected one or several others.
.idealstate.buckets_toofewcopiesSpecifically lists how many buckets have too few copies. Compare to the *buckets* metric to see how big a portion of the cluster this is.
.idealstate.buckets_toomanycopiesSpecifically lists how many buckets have too many copies. Compare to the *buckets* metric to see how big a portion of the cluster this is.
.idealstate.bucketsThe total number of buckets managed. Used by other metrics reporting bucket counts to know how big a part of the cluster they relate to.
.idealstate.buckets_notrustedLists how many buckets have no trusted copies. Without trusted buckets operations against the bucket may have poor performance, having to send requests to many copies to try and create consistent replies.
.idealstate.delete_bucket.pendingLists how many buckets that needs to be deleted.
.idealstate.merge_bucket.pendingLists how many buckets there are, where we suspect not all copies store identical document sets.
.idealstate.split_bucket.pendingLists how many buckets are currently being split.
.idealstate.join_bucket.pendingLists how many buckets are currently being joined.
.idealstate.set_bucket_state.pendingLists how many buckets are currently altered for active state. These are high priority requests which should finish fast, so these requests should seldom be seen as pending.
Example, using the [quickstart](/en/basics/deploy-an-application-local) - find the distributor port (look for HTTP): diff --git a/mintlify-docs/en/content/elasticity.mdx b/mintlify-docs/en/content/elasticity.mdx index e6297c22d8..ae4ba33140 100644 --- a/mintlify-docs/en/content/elasticity.mdx +++ b/mintlify-docs/en/content/elasticity.mdx @@ -53,11 +53,28 @@ Nodes in content clusters can be placed in [groups](/en/reference/applications/s This is useful in the cases listed below: -| | | -| :--- | :--- | -| **Cluster upgrade** | With multiple groups it becomes safe to take out a full group for upgrade instead of just one node at a time. [Read more](/en/operations/self-managed/live-upgrade). -| **Query throughput** | Applications with high query rates and/or high static query cost can use groups to scale to higher query rates since Vespa will automatically send a query to just a single group. [Read more](/en/performance/sizing-search) -| **Topology** | By using groups you can control replica placement over network switches or racks to ensure there is redundancy at the switch and rack level. + + + + + + + + + + + + + + + + + + + + + +
**Cluster upgrade**With multiple groups it becomes safe to take out a full group for upgrade instead of just one node at a time. Read more.
**Query throughput**Applications with high query rates and/or high static query cost can use groups to scale to higher query rates since Vespa will automatically send a query to just a single group. Read more
**Topology**By using groups you can control replica placement over network switches or racks to ensure there is redundancy at the switch and rack level.
Tuning group sizes and node resources enables applications to easily find the latency/cost sweet spot, the elasticity operations are automatic and queries and writes work as usual with no downtime. diff --git a/mintlify-docs/en/content/idealstate.mdx b/mintlify-docs/en/content/idealstate.mdx index 8a03c1020c..110e5462cd 100644 --- a/mintlify-docs/en/content/idealstate.mdx +++ b/mintlify-docs/en/content/idealstate.mdx @@ -12,11 +12,28 @@ To enable minimal transfer of buckets when the list of available nodes changes, Desired qualities for the ideal state algorithm: -| | | -| :--- | :--- | -| **Minimal reassignment on cluster state change** | - If a node goes down, only buckets that resided on that node should be reassigned.
- If a node comes up, only buckets that are moved to the new node should relocate.
- Increasing the capacity of a single node should only move buckets to that node.
- Reducing the capacity of a single node should only move buckets away from that node. | -| **No skew in distribution** | - Nodes should get an amount of data relative to their capacity. | -| **Lightweight** | - A simple algorithm that is easy to understand is a plus. Being lightweight to calculate is also a plus, giving more options of how to use it, without needing to cache results. | + + + + + + + + + + + + + + + + + + + + + +
**Minimal reassignment on cluster state change**- If a node goes down, only buckets that resided on that node should be reassigned.
- If a node comes up, only buckets that are moved to the new node should relocate.
- Increasing the capacity of a single node should only move buckets to that node.
- Reducing the capacity of a single node should only move buckets away from that node.
**No skew in distribution**- Nodes should get an amount of data relative to their capacity.
**Lightweight**- A simple algorithm that is easy to understand is a plus. Being lightweight to calculate is also a plus, giving more options of how to use it, without needing to cache results.
## Computational cost @@ -117,78 +134,1164 @@ A value of 1 indicates 100% waste. A value of 0.1 indicates 10% waste. A waste b #### Distribution with redundancy 1: -| Bits \ Nodes | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | -| 1 | 0.0000 | 0.0000 | 0.3333 | 0.5000 | 0.6000 | 0.6667 | 0.7143 | 0.7500 | 0.7778 | 0.8000 | 0.8182 | 0.8333 | 0.8462 | 0.8571 | 0.8667 | -| 2 | 0.0000 | 0.3333 | 0.3333 | 0.5000 | 0.2000 | 0.3333 | 0.4286 | 0.5000 | 0.5556 | 0.6000 | 0.6364 | 0.6667 | 0.6923 | 0.7143 | 0.7333 | -| 3 | 0.0000 | 0.2000 | 0.1111 | 0.3333 | 0.2000 | 0.3333 | 0.6190 | 0.6667 | 0.8222 | 0.8400 | 0.8545 | 0.8333 | 0.6923 | 0.7143 | 0.7333 | -| 4 | 0.0000 | 0.1111 | 0.1111 | 0.3333 | 0.3600 | 0.3333 | 0.4286 | 0.5000 | 0.7778 | 0.8000 | 0.8182 | 0.8095 | 0.6923 | 0.7143 | 0.6444 | -| 5 | - | 0.0588 | 0.1111 | 0.2727 | 0.2889 | 0.4074 | 0.2381 | 0.3333 | 0.8129 | 0.8316 | 0.8469 | 0.8519 | 0.8359 | 0.8367 | 0.8359 | -| 6 | - | 0.0000 | 0.0725 | 0.1579 | 0.1467 | 0.1111 | 0.1688 | 0.3846 | 0.7037 | 0.7217 | 0.7470 | 0.7460 | 0.7265 | 0.6952 | 0.6718 | -| 7 | - | 0.0725 | 0.0519 | 0.0857 | 0.0857 | 0.1111 | 0.2050 | 0.2000 | 0.4530 | 0.4667 | 0.5152 | 0.5152 | 0.4530 | 0.3905 | 0.3436 | -| 8 | - | 0.0000 | 0.0078 | 0.0725 | 0.0857 | 0.0922 | 0.1293 | 0.1351 | 0.1634 | 0.1742 | 0.1688 | 0.2381 | 0.2426 | 0.2967 | 0.3173 | -| 9 | - | 0.0039 | 0.0192 | 0.1467 | 0.1607 | 0.1203 | 0.1080 | 0.1111 | 0.1380 | 0.1322 | 0.1218 | 0.1795 | 0.1962 | 0.2381 | 0.2580 | -| 10 | - | 0.0019 | 0.0275 | 0.0922 | 0.0898 | 0.0623 | 0.0741 | 0.0922 | 0.1111 | 0.1018 | 0.1218 | 0.1203 | 0.1438 | 0.1688 | 0.1675 | -| 11 | - | 0.0019 | 0.0234 | 0.0430 | 0.0385 | 0.0248 | 0.0248 | 0.0483 | 0.0636 | 0.0648 | 0.0737 | 0.0725 | 0.0894 | 0.0800 | 0.0958 | -| 12 | - | - | 0.0121 | 0.0285 | 0.0282 | 0.0121 | 0.0149 | 0.0571 | 0.0577 | 0.0562 | 0.0549 | 0.0412 | 0.0510 | 0.0439 | 0.0616 | -| 13 | - | - | 0.0074 | 0.0019 | 0.0070 | 0.0177 | 0.0304 | 0.0303 | 0.0337 | 0.0189 | 0.0252 | 0.0358 | 0.0409 | 0.0501 | 0.0385 | -| 14 | - | - | 0.0041 | 0.0024 | 0.0037 | 0.0027 | 0.0145 | 0.0073 | 0.0101 | 0.0130 | 0.0220 | 0.0234 | 0.0290 | 0.0248 | 0.0195 | -| 15 | - | - | 0.0019 | 0.0021 | 0.0036 | 0.0083 | 0.0059 | 0.0056 | 0.0101 | 0.0097 | 0.0123 | 0.0163 | 0.0150 | 0.0186 | 0.0173 | -| 16 | - | - | 0.0010 | 0.0007 | 0.0010 | 0.0030 | 0.0049 | 0.0039 | 0.0085 | 0.0072 | 0.0097 | 0.0108 | 0.0135 | 0.0141 | 0.0115 | -| 17 | - | - | - | - | - | 0.0030 | 0.0033 | 0.0024 | 0.0036 | 0.0030 | 0.0055 | 0.0091 | 0.0135 | 0.0156 | 0.0143 | -| 18 | - | - | - | - | - | - | 0.0019 | - | 0.0029 | 0.0027 | 0.0043 | 0.0040 | 0.0066 | 0.0061 | 0.0060 | -| 19 | - | - | - | - | - | - | - | - | 0.0019 | - | 0.0021 | 0.0030 | 0.0023 | 0.0031 | 0.0042 | -| 20 | - | - | - | - | - | - | - | - | - | - | - | 0.0029 | 0.0025 | 0.0037 | 0.0044 | -| 21 | - | - | - | - | - | - | - | - | - | - | - | - | 0.0026 | 0.0035 | 0.0040 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bits \ Nodes123456789101112131415
10.00000.00000.33330.50000.60000.66670.71430.75000.77780.80000.81820.83330.84620.85710.8667
20.00000.33330.33330.50000.20000.33330.42860.50000.55560.60000.63640.66670.69230.71430.7333
30.00000.20000.11110.33330.20000.33330.61900.66670.82220.84000.85450.83330.69230.71430.7333
40.00000.11110.11110.33330.36000.33330.42860.50000.77780.80000.81820.80950.69230.71430.6444
5-0.05880.11110.27270.28890.40740.23810.33330.81290.83160.84690.85190.83590.83670.8359
6-0.00000.07250.15790.14670.11110.16880.38460.70370.72170.74700.74600.72650.69520.6718
7-0.07250.05190.08570.08570.11110.20500.20000.45300.46670.51520.51520.45300.39050.3436
8-0.00000.00780.07250.08570.09220.12930.13510.16340.17420.16880.23810.24260.29670.3173
9-0.00390.01920.14670.16070.12030.10800.11110.13800.13220.12180.17950.19620.23810.2580
10-0.00190.02750.09220.08980.06230.07410.09220.11110.10180.12180.12030.14380.16880.1675
11-0.00190.02340.04300.03850.02480.02480.04830.06360.06480.07370.07250.08940.08000.0958
12--0.01210.02850.02820.01210.01490.05710.05770.05620.05490.04120.05100.04390.0616
13--0.00740.00190.00700.01770.03040.03030.03370.01890.02520.03580.04090.05010.0385
14--0.00410.00240.00370.00270.01450.00730.01010.01300.02200.02340.02900.02480.0195
15--0.00190.00210.00360.00830.00590.00560.01010.00970.01230.01630.01500.01860.0173
16--0.00100.00070.00100.00300.00490.00390.00850.00720.00970.01080.01350.01410.0115
17-----0.00300.00330.00240.00360.00300.00550.00910.01350.01560.0143
18------0.0019-0.00290.00270.00430.00400.00660.00610.0060
19--------0.0019-0.00210.00300.00230.00310.0042
20-----------0.00290.00250.00370.0044
21------------0.00260.00350.0040
#### Distribution with redundancy 2: -| Bits \ Nodes | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | -| 1 | 0.0000 | 0.0000 | 0.3333 | 0.5000 | 0.6000 | 0.6667 | 0.4286 | 0.5000 | 0.5556 | 0.6000 | 0.6364 | 0.6667 | 0.6923 | 0.7143 | 0.7333 | -| 2 | 0.0000 | 0.0000 | 0.3333 | 0.3333 | 0.2000 | 0.3333 | 0.4286 | 0.5000 | 0.5556 | 0.6000 | 0.6364 | 0.6667 | 0.6923 | 0.4286 | 0.4667 | -| 3 | 0.0000 | 0.0000 | 0.1111 | 0.2000 | 0.2000 | 0.3333 | 0.4286 | 0.5000 | 0.7037 | 0.7333 | 0.7576 | 0.7778 | 0.7949 | 0.7714 | 0.7333 | -| 4 | 0.0000 | 0.0000 | 0.1111 | 0.2000 | 0.2000 | 0.3333 | 0.3469 | 0.2000 | 0.7460 | 0.7714 | 0.7762 | 0.7778 | 0.7949 | 0.7714 | 0.7630 | -| 5 | - | - | 0.0725 | 0.1579 | 0.2471 | 0.2381 | 0.2967 | 0.2727 | 0.7265 | 0.7538 | 0.7673 | 0.7778 | 0.7949 | 0.7922 | 0.7968 | -| 6 | - | - | 0.0519 | 0.1111 | 0.1742 | 0.1467 | 0.2050 | 0.2381 | 0.6908 | 0.7023 | 0.7016 | 0.7117 | 0.7265 | 0.7229 | 0.7247 | -| 7 | - | - | 0.0303 | 0.0154 | 0.0340 | 0.0303 | 0.0857 | 0.1111 | 0.4921 | 0.4880 | 0.4828 | 0.4797 | 0.5077 | 0.4622 | 0.4667 | -| 8 | - | - | 0.0078 | 0.0303 | 0.0248 | 0.0623 | 0.0857 | 0.0725 | 0.0970 | 0.1322 | 0.1049 | 0.1293 | 0.1620 | 0.1873 | 0.2242 | -| 9 | - | - | 0.0019 | 0.0266 | 0.0519 | 0.0466 | 0.0682 | 0.0791 | 0.0824 | 0.0519 | 0.0691 | 0.0519 | 0.0623 | 0.0741 | 0.0898 | -| 10 | - | - | 0.0063 | 0.0173 | 0.0154 | 0.0275 | 0.0116 | 0.0340 | 0.0558 | 0.0294 | 0.0452 | 0.0466 | 0.0567 | 0.0501 | 0.0584 | -| 11 | - | - | 0.0078 | 0.0049 | 0.0154 | 0.0177 | 0.0149 | 0.0210 | 0.0275 | 0.0177 | 0.0252 | 0.0303 | 0.0305 | 0.0344 | 0.0317 | -| 12 | - | - | - | 0.0073 | 0.0112 | 0.0192 | 0.0231 | 0.0312 | 0.0296 | 0.0177 | 0.0278 | 0.0358 | 0.0245 | 0.0312 | 0.0385 | -| 13 | - | - | - | 0.0061 | 0.0049 | 0.0096 | 0.0112 | 0.0201 | 0.0218 | 0.0088 | 0.0077 | 0.0199 | 0.0138 | 0.0304 | 0.0317 | -| 14 | - | - | - | 0.0059 | 0.0058 | 0.0058 | 0.0057 | 0.0092 | 0.0128 | 0.0082 | 0.0139 | 0.0081 | 0.0096 | 0.0199 | 0.0213 | -| 15 | - | - | - | - | 0.0014 | 0.0039 | 0.0052 | 0.0034 | 0.0051 | 0.0085 | 0.0044 | 0.0072 | 0.0107 | 0.0101 | 0.0082 | -| 16 | - | - | - | - | 0.0016 | 0.0030 | 0.0026 | 0.0036 | 0.0065 | 0.0051 | 0.0061 | 0.0084 | 0.0065 | 0.0083 | 0.0100 | -| 17 | - | - | - | - | - | - | 0.0010 | 0.0020 | 0.0028 | - | 0.0040 | 0.0049 | 0.0067 | 0.0071 | 0.0062 | -| 18 | - | - | - | - | - | - | - | - | 0.0032 | - | 0.0024 | - | 0.0034 | 0.0056 | 0.0041 | -| 19 | - | - | - | - | - | - | - | - | - | - | - | - | 0.0025 | 0.0018 | - | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bits \ Nodes123456789101112131415
10.00000.00000.33330.50000.60000.66670.42860.50000.55560.60000.63640.66670.69230.71430.7333
20.00000.00000.33330.33330.20000.33330.42860.50000.55560.60000.63640.66670.69230.42860.4667
30.00000.00000.11110.20000.20000.33330.42860.50000.70370.73330.75760.77780.79490.77140.7333
40.00000.00000.11110.20000.20000.33330.34690.20000.74600.77140.77620.77780.79490.77140.7630
5--0.07250.15790.24710.23810.29670.27270.72650.75380.76730.77780.79490.79220.7968
6--0.05190.11110.17420.14670.20500.23810.69080.70230.70160.71170.72650.72290.7247
7--0.03030.01540.03400.03030.08570.11110.49210.48800.48280.47970.50770.46220.4667
8--0.00780.03030.02480.06230.08570.07250.09700.13220.10490.12930.16200.18730.2242
9--0.00190.02660.05190.04660.06820.07910.08240.05190.06910.05190.06230.07410.0898
10--0.00630.01730.01540.02750.01160.03400.05580.02940.04520.04660.05670.05010.0584
11--0.00780.00490.01540.01770.01490.02100.02750.01770.02520.03030.03050.03440.0317
12---0.00730.01120.01920.02310.03120.02960.01770.02780.03580.02450.03120.0385
13---0.00610.00490.00960.01120.02010.02180.00880.00770.01990.01380.03040.0317
14---0.00590.00580.00580.00570.00920.01280.00820.01390.00810.00960.01990.0213
15----0.00140.00390.00520.00340.00510.00850.00440.00720.01070.01010.0082
16----0.00160.00300.00260.00360.00650.00510.00610.00840.00650.00830.0100
17------0.00100.00200.0028-0.00400.00490.00670.00710.0062
18--------0.0032-0.0024-0.00340.00560.0041
19------------0.00250.0018-
#### Distribution with redundancy 2: -| Bits \ Nodes | 16 | 20 | 32 | 48 | 64 | 100 | 128 | 160 | 200 | 256 | 350 | 500 | 800 | 1000 | 5000 | -| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | -| 8 | 0.2000 | 0.3081 | 0.2727 | 0.5152 | 0.5294 | 0.5733 | 0.6364 | 0.7091 | 0.7673 | 0.8000 | 0.8537 | 0.8862 | 0.8933 | 0.8976 | 0.9659 | -| 9 | 0.0725 | 0.2242 | 0.1795 | 0.1795 | 0.3043 | 0.3173 | 0.3846 | 0.5077 | 0.5345 | 0.6364 | 0.7340 | 0.7952 | 0.8400 | 0.8720 | 0.9317 | -| 10 | 0.0725 | 0.1322 | 0.1233 | 0.2099 | 0.1579 | 0.2415 | 0.3333 | 0.5733 | 0.4611 | 0.5789 | 0.6558 | 0.7269 | 0.8293 | 0.8425 | 0.8976 | -| 11 | 0.0340 | 0.0857 | 0.0922 | 0.1111 | 0.1233 | 0.1969 | 0.2558 | 0.5937 | 0.5643 | 0.5897 | 0.5965 | 0.6099 | 0.6587 | 0.7591 | 0.8830 | -| 12 | 0.0448 | 0.0385 | 0.0623 | 0.1065 | 0.0986 | 0.1285 | 0.3725 | 0.3831 | 0.4064 | 0.4074 | 0.4799 | 0.4880 | 0.5124 | 0.8328 | 0.8976 | -| 13 | 0.0340 | 0.0328 | 0.0554 | 0.0699 | 0.0623 | 0.0948 | 0.1049 | 0.2183 | 0.2344 | 0.3191 | 0.3498 | 0.4539 | 0.5733 | 0.6656 | 0.8870 | -| 14 | 0.0140 | 0.0189 | 0.0376 | 0.0452 | 0.0466 | 0.0717 | 0.0986 | 0.1057 | 0.1047 | 0.2242 | 0.2853 | 0.2798 | 0.4064 | 0.4959 | 0.8830 | -| 15 | 0.0094 | 0.0118 | 0.0385 | 0.0268 | 0.0331 | 0.0638 | 0.0708 | 0.0775 | 0.0898 | 0.1322 | 0.2133 | 0.2104 | 0.3550 | 0.4446 | 0.8752 | -| 16 | 0.0097 | 0.0081 | 0.0380 | 0.0303 | 0.0362 | 0.0577 | 0.0501 | 0.0627 | 0.0717 | 0.1033 | 0.1733 | 0.1678 | 0.2586 | 0.3101 | 0.8511 | -| 17 | 0.0075 | 0.0066 | 0.0346 | 0.0293 | 0.0154 | 0.0258 | 0.0466 | 0.0546 | 0.0704 | 0.1041 | 0.1469 | 0.1983 | 0.2702 | 0.2972 | 0.7740 | -| 18 | 0.0053 | 0.0057 | 0.0098 | 0.0098 | 0.0122 | 0.0149 | 0.0238 | 0.0300 | 0.0394 | 0.0353 | 0.0434 | 0.0553 | 0.0611 | 0.1782 | 0.6334 | -| 19 | - | 0.0022 | 0.0050 | 0.0162 | 0.0098 | 0.0133 | 0.0149 | 0.0220 | 0.0242 | 0.0252 | 0.0333 | 0.0398 | 0.0495 | 0.0999 | 0.5145 | -| 20 | - | - | 0.0030 | 0.0107 | 0.0088 | 0.0098 | 0.0144 | 0.0140 | 0.0148 | 0.0203 | 0.0195 | 0.0255 | 0.0348 | 0.1133 | 0.4481 | -| 21 | - | - | 0.0043 | 0.0063 | 0.0051 | 0.0074 | 0.0079 | 0.0085 | 0.0086 | 0.0113 | 0.0147 | 0.0170 | 0.0237 | 0.1068 | 0.4422 | -| 22 | - | - | - | 0.0026 | 0.0035 | 0.0037 | 0.0082 | 0.0061 | 0.0077 | 0.0087 | 0.0101 | 0.0134 | 0.0193 | 0.1140 | 0.4635 | -| 23 | - | - | - | 0.0019 | - | 0.0026 | 0.0080 | 0.0055 | 0.0056 | 0.0057 | 0.0063 | 0.0096 | 0.0155 | 0.1294 | 0.4982 | -| 24 | - | - | - | 0.0013 | - | - | 0.0074 | 0.0060 | 0.0058 | 0.0053 | 0.0049 | 0.0068 | 0.0112 | 0.0471 | 0.3219 | -| 25 | - | - | - | - | - | - | - | - | - | 0.0043 | 0.0043 | 0.0058 | 0.0067 | 0.0512 | 0.2543 | -| 26 | - | - | - | - | - | - | - | - | - | - | 0.0040 | 0.0042 | 0.0043 | 0.0051 | 0.0210 | -| 27 | - | - | - | - | - | - | - | - | - | - | - | - | 0.0028 | 0.0157 | 0.0814 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bits \ Nodes162032486410012816020025635050080010005000
80.20000.30810.27270.51520.52940.57330.63640.70910.76730.80000.85370.88620.89330.89760.9659
90.07250.22420.17950.17950.30430.31730.38460.50770.53450.63640.73400.79520.84000.87200.9317
100.07250.13220.12330.20990.15790.24150.33330.57330.46110.57890.65580.72690.82930.84250.8976
110.03400.08570.09220.11110.12330.19690.25580.59370.56430.58970.59650.60990.65870.75910.8830
120.04480.03850.06230.10650.09860.12850.37250.38310.40640.40740.47990.48800.51240.83280.8976
130.03400.03280.05540.06990.06230.09480.10490.21830.23440.31910.34980.45390.57330.66560.8870
140.01400.01890.03760.04520.04660.07170.09860.10570.10470.22420.28530.27980.40640.49590.8830
150.00940.01180.03850.02680.03310.06380.07080.07750.08980.13220.21330.21040.35500.44460.8752
160.00970.00810.03800.03030.03620.05770.05010.06270.07170.10330.17330.16780.25860.31010.8511
170.00750.00660.03460.02930.01540.02580.04660.05460.07040.10410.14690.19830.27020.29720.7740
180.00530.00570.00980.00980.01220.01490.02380.03000.03940.03530.04340.05530.06110.17820.6334
19-0.00220.00500.01620.00980.01330.01490.02200.02420.02520.03330.03980.04950.09990.5145
20--0.00300.01070.00880.00980.01440.01400.01480.02030.01950.02550.03480.11330.4481
21--0.00430.00630.00510.00740.00790.00850.00860.01130.01470.01700.02370.10680.4422
22---0.00260.00350.00370.00820.00610.00770.00870.01010.01340.01930.11400.4635
23---0.0019-0.00260.00800.00550.00560.00570.00630.00960.01550.12940.4982
24---0.0013--0.00740.00600.00580.00530.00490.00680.01120.04710.3219
25---------0.00430.00430.00580.00670.05120.2543
26----------0.00400.00420.00430.00510.0210
27------------0.00280.01570.0814
### Default number of distribution bits used @@ -202,21 +1305,87 @@ Ideally, the users would be allowed to configure minimal and maximal acceptable The loose mode allows for more waste, allowing the amount of nodes to change considerably without altering the distribution bit counts. -| Node count | 1-4 | 5-199 | 200-> | -| :--- | :--- | :--- | :--- | -| Distribution bit count | 8 | 16 | 24 | -| Max calculated waste *) | 3.03 % | 7.17 % | ? | -| Minimum buckets/node **) | 256 - 64 | 13108 - 329 | 83886 - | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Node count1-45-199200->
Distribution bit count81624
Max calculated waste *)3.03 %7.17 %?
Minimum buckets/node **)256 - 6413108 - 32983886 -
#### Strict mode (not default) The strict mode attempts to keep the waste below 1.0 %. When it needs to increase the bit count it increases the bit count significantly to allow considerable more growth before having to adjust the count again. -| Node count | 1-4 | 5-14 | 15-199 | 200-799 | 800-1499 | 1500-4999 | 5000-> | -| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | -| Distribution bit count | 8 | 16 | 21 | 25 | 28 | 30 | 32 | -| Max calculated waste *) | 3 % | 0.83 % | 0.86 % | 0.67 % | ? | ? | ? | -| Minimum buckets/node **) | 256 - 64 | 13107 - 4681 | 139810 - 10538 | 167772 - 41995 | 335544 - 179076 | 715827 - 214791 | 858993 - | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Node count1-45-1415-199200-799800-14991500-49995000->
Distribution bit count8162125283032
Max calculated waste *)3 %0.83 %0.86 %0.67 %???
Minimum buckets/node **)256 - 6413107 - 4681139810 - 10538167772 - 41995335544 - 179076715827 - 214791858993 -
*) Max calculated waste, given redundancy 2 and the max node count in the given range, as shown in the table above. (Note that this assumes equal sized buckets, and that every possible bucket exist. In a real system there will be random variation). diff --git a/mintlify-docs/en/content/proton.mdx b/mintlify-docs/en/content/proton.mdx index 120c80d6cf..fc20374db3 100644 --- a/mintlify-docs/en/content/proton.mdx +++ b/mintlify-docs/en/content/proton.mdx @@ -62,11 +62,28 @@ There are three types of sub-databases, each with its own [document meta store]( The sub-databases are maintained by the *Maintenance Controller*. The document distribution changes as the system is resized. When the number of nodes in the system changes, the Maintenance Controller will move documents between the Ready and Not Ready sub-databases to reflect the new distribution. When an entry in the Removed sub-database gets old, it is purged. The sub-databases are: -||| -| :--- | :--- | -| **Not Ready** | Holds the redundant documents that are not searchable, i.e. the not ready documents. Documents that are not ready are only stored, not indexed. It takes some processing to move from this state to the ready state. | -| **Ready** | Maintains attributes and indexes of all ready documents and keeps them searchable. One of the ready copies is active while the rest are not active:

**Active**
There should always be exactly one active copy of each document in the system, though intermittently there may be more. These documents produce results when queries are evaluated.

>**Not Active**
The ready copies that are not active are indexed but will not produce results. By being indexed, they are ready to take over immediately if the node holding the active copy becomes unavailable. Read more in searchable-copies. | -|**Removed**|Keeps track of documents that have been removed. The id and timestamp for each document are kept. This information is used when buckets from two nodes are merged. If the removed document exists on another node but with a different timestamp, the most recent entry prevails.| + + + + + + + + + + + + + + + + + + + + + +
**Not Ready**Holds the redundant documents that are not searchable, i.e. the not ready documents. Documents that are not ready are only stored, not indexed. It takes some processing to move from this state to the ready state.
**Ready**Maintains attributes and indexes of all ready documents and keeps them searchable. One of the ready copies is active while the rest are not active:

**Active**
There should always be exactly one active copy of each document in the system, though intermittently there may be more. These documents produce results when queries are evaluated.

>**Not Active**
The ready copies that are not active are indexed but will not produce results. By being indexed, they are ready to take over immediately if the node holding the active copy becomes unavailable. Read more in searchable-copies.
**Removed**Keeps track of documents that have been removed. The id and timestamp for each document are kept. This information is used when buckets from two nodes are merged. If the removed document exists on another node but with a different timestamp, the most recent entry prevails.
## Transaction log @@ -213,67 +230,175 @@ There is only one instance of each job at a time - e.g., attributes are flushed The *temporary* resources used when jobs are executed are described in *CPU*, *Memory* and *Disk*. The memory and disk usage metrics of components that are optimized by the jobs are described in *Metrics* (with *Metric prefix*). For a list of all available Proton metrics, refer to the searchnode metrics in the [Vespa Metric Set](/en/reference/operations/metrics/vespa-metric-set#searchnode-metrics). Metrics are available at the [Metrics API](/en/operations/metrics). -| Job | Description | -| :--- | :--- | -| CPU | Little - one thread flushes to disk | -| Memory | Little - some temporary use | -| Disk | A new file is written too, so 2x the size of an attribute on disk until the old flush file is deleted. | -| Run metric | content.proton.documentdb.job.attribute_flush | -| content.proton.documentdb.[ready|notready].attribute.memory_usage. | -| Metrics | allocated_bytes.average - used_bytes.average - dead_bytes.average - onhold_bytes.average | -| CPU | Little - one thread flushes to disk | -| Memory | Little | -| Disk | Creates a new disk index, size of the memory index. | -| Run metric | content.proton.documentdb.job.memory_index_flush | -| Metric prefix | content.proton.documentdb.index.memory_usage. | -| Metrics | allocated_bytes.average - used_bytes.average - dead_bytes.average - onhold_bytes.average | -| CPU | Multiple threads merge indices, configured as a function of - feeding concurrency - - refer to this for details | -| Memory | Little | -| Disk | Creates a new index while serving from the current: 2x temporary disk usage for the given index. | -| Run metric | content.proton.documentdb.job.disk_index_fusion | -| CPU | Little | -| Memory | Little | -| Disk | Little | -| Run metric | content.proton.documentdb.job.document_store_flush | -| CPU | Little - one thread reads one file, sorts and writes a new file | -| Memory | Holds a document store file in memory plus memory for sorting the file. - Note: This is important on hosts with little memory! - Reduce maxfilesize to increase the number of files and use less temporary memory for compaction. | -| Disk | A new file is written while the current is serving, max temporary usage is 2x. | -| Run metric | content.proton.documentdb.job.document_store_compact | -| Metric prefix | content.proton.documentdb.[ready|notready|removed].document_store. | -| Metrics | disk_usage.average - disk_bloat.average - max_bucket_spread.average - memory_usage.allocated_bytes.average - memory_usage.used_bytes.average - memory_usage.dead_bytes.average - memory_usage.onhold_bytes.average | -| CPU | CPU similar to feeding. - Consumes capacity from the write threads, so has feeding impact | -| Memory | As feeding - e.g., the attribute memory usage and memory index in the ready sub-database will grow | -| Disk | As feeding | -| Run metric | content.proton.documentdb.job.bucket_move | -| CPU | Like feeding - add and remove documents | -| Memory | Little | -| Disk | 0 | -| Run metric | content.proton.documentdb.job.lid_space_compact | -| Metric prefix | content.proton.documentdb.[ready|notready|removed].lid_space. | -| Metrics | lid_limit.last - lid_bloat_factor.average - lid_fragmentation_factor.average | -| CPU | Little | -| Memory | Little | -| Disk | Little | -| Run metric | content.proton.documentdb.job.removed_documents_prune | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
JobDescription
CPULittle - one thread flushes to disk
MemoryLittle - some temporary use
DiskA new file is written too, so 2x the size of an attribute on disk until the old flush file is deleted.
Run metriccontent.proton.documentdb.job.attribute_flush
content.proton.documentdb.[ready|notready].attribute.memory_usage.
Metricsallocated_bytes.average
used_bytes.average
dead_bytes.average
onhold_bytes.average
CPULittle - one thread flushes to disk
MemoryLittle
DiskCreates a new disk index, size of the memory index.
Run metriccontent.proton.documentdb.job.memory_index_flush
Metric prefixcontent.proton.documentdb.index.memory_usage.
Metricsallocated_bytes.average
used_bytes.average
dead_bytes.average
onhold_bytes.average
CPUMultiple threads merge indices, configured as a function of
feeding concurrency -
refer to this for details
MemoryLittle
DiskCreates a new index while serving from the current: 2x temporary disk usage for the given index.
Run metriccontent.proton.documentdb.job.disk_index_fusion
CPULittle
MemoryLittle
DiskLittle
Run metriccontent.proton.documentdb.job.document_store_flush
CPULittle - one thread reads one file, sorts and writes a new file
MemoryHolds a document store file in memory plus memory for sorting the file.
Note: This is important on hosts with little memory!
Reduce maxfilesize to increase the number of files and use less temporary memory for compaction.
DiskA new file is written while the current is serving, max temporary usage is 2x.
Run metriccontent.proton.documentdb.job.document_store_compact
Metric prefixcontent.proton.documentdb.[ready|notready|removed].document_store.
Metricsdisk_usage.average
disk_bloat.average
max_bucket_spread.average
memory_usage.allocated_bytes.average
memory_usage.used_bytes.average
memory_usage.dead_bytes.average
memory_usage.onhold_bytes.average
CPUCPU similar to feeding.
Consumes capacity from the write threads, so has feeding impact
MemoryAs feeding - e.g., the attribute memory usage and memory index in the ready sub-database will grow
DiskAs feeding
Run metriccontent.proton.documentdb.job.bucket_move
CPULike feeding - add and remove documents
MemoryLittle
Disk0
Run metriccontent.proton.documentdb.job.lid_space_compact
Metric prefixcontent.proton.documentdb.[ready|notready|removed].lid_space.
Metricslid_limit.last
lid_bloat_factor.average
lid_fragmentation_factor.average
CPULittle
MemoryLittle
DiskLittle
Run metriccontent.proton.documentdb.job.removed_documents_prune
## Retrieving documents @@ -284,10 +409,24 @@ Retrieving documents is done by specifying an id to *get*, or use a [selection e ![Retrieving documents](/assets/img/elastic-visit-get.svg) -| | | -| :--- | :--- | -| **Get** | When the content node receives a get request, it scans through all the document databases, and for each one, it checks all three sub-databases. Once the document is found, the scan is stopped and the document returned. If the document is found in a Ready sub-database, the document retriever will apply any changes that are stored in the [attributes](/en/content/attributes) before returning the document. | -| **Visit** | A visit request creates an iterator over each candidate bucket. This iterator will retrieve matching documents from all sub-databases of all document databases. As for get, attribute values are applied to document fields in the Ready sub-database. | + + + + + + + + + + + + + + + + + +
**Get**When the content node receives a get request, it scans through all the document databases, and for each one, it checks all three sub-databases. Once the document is found, the scan is stopped and the document returned. If the document is found in a Ready sub-database, the document retriever will apply any changes that are stored in the attributes before returning the document.
**Visit**A visit request creates an iterator over each candidate bucket. This iterator will retrieve matching documents from all sub-databases of all document databases. As for get, attribute values are applied to document fields in the Ready sub-database.
## Queries @@ -300,10 +439,24 @@ Queries have a separate pathway through the system. They do not use the distribu A query enters the system through the *QR-server (query rewrite server)* in the [Vespa Container](/en/applications/containers). The QR-server issues one query per document type to the search nodes: -| | | -| :--- | :--- | -| **Container** | The Container knows all the document types and rewrites queries as a collection of queries, one for each type. Queries may have a [restrict](/en/reference/api/query#model.restrict) parameter, in which case the container will send the query only to the specified document types. It sends the query to content nodes and collects partial results. It pings all content nodes every second to know whether they are alive, and keeps open TCP connections to each one. If a node goes down, the elastic system will make the documents available on other nodes. | -| **Content node matching** | The *match engine* receives queries and routes them to the right document database based on the document type. The query is passed to the *Ready* sub-database, where the searchable documents are. Based on information stored in the document meta store, the query is augmented with a blocklist that ensures only *active* documents are matched. | + + + + + + + + + + + + + + + + + +
**Container**The Container knows all the document types and rewrites queries as a collection of queries, one for each type. Queries may have a restrict parameter, in which case the container will send the query only to the specified document types. It sends the query to content nodes and collects partial results. It pings all content nodes every second to know whether they are alive, and keeps open TCP connections to each one. If a node goes down, the elastic system will make the documents available on other nodes.
**Content node matching**The *match engine* receives queries and routes them to the right document database based on the document type. The query is passed to the *Ready* sub-database, where the searchable documents are. Based on information stored in the document meta store, the query is augmented with a blocklist that ensures only *active* documents are matched.
## /state/v1 API diff --git a/mintlify-docs/en/learn/about-documentation.mdx b/mintlify-docs/en/learn/about-documentation.mdx index 5fb452635e..4d1fd4ebc1 100644 --- a/mintlify-docs/en/learn/about-documentation.mdx +++ b/mintlify-docs/en/learn/about-documentation.mdx @@ -11,11 +11,28 @@ The Vespa platform is open source, and can be deployed in self-managed systems a Documents that describe functionality with such limited applicability are clearly marked by one or more of the following chips: -| | | -| :--- | :--- | -| **Vespa Cloud** | Only applicable to Vespa Cloud deployments. | -| **Self-managed** | Only applicable to self-managed deployments. | -| **Enterprise** | Not open source: Available commercially only (both self-managed and on cloud unless also marked by one of the other chips above). | + + + + + + + + + + + + + + + + + + + + + +
**Vespa Cloud**Only applicable to Vespa Cloud deployments.
**Self-managed**Only applicable to self-managed deployments.
**Enterprise**Not open source: Available commercially only (both self-managed and on cloud unless also marked by one of the other chips above).
For clarity, any document *not* marked with any of these chips describes functionality that is open source and available both on Vespa Cloud and self-managed deployments. diff --git a/mintlify-docs/en/learn/faq.mdx b/mintlify-docs/en/learn/faq.mdx index 6a53f10e4f..4bc879e157 100644 --- a/mintlify-docs/en/learn/faq.mdx +++ b/mintlify-docs/en/learn/faq.mdx @@ -300,7 +300,11 @@ There is no index or attribute data structure that allows efficient _searching_ -The [visiting](/en/writing/visiting#analyzing-field-values) API using document selections supports it, with a linear scan over all documents. If the field is an _attribute_ one can query using grouping to identify Nan Values, see count and list [fields with NaN](/en/querying/grouping#count-fields-with-nan). +The [visiting](/en/writing/visiting#analyzing-field-values) API using document selections supports it, with a linear scan over all documents. If the field is an _attribute_ one can query using grouping to identify NaN values, see count and list [fields with NaN](/en/querying/grouping#count-fields-with-nan). + +To do the opposite - match the documents that _do_ have a value set - use a query filter: +- Numeric fields: an all-encompassing [range](/en/reference/querying/yql#numeric) - `where range(size, -Infinity, Infinity)` matches documents where the field is set. +- String _attributes_: a [regular expression](/en/querying/text-matching#regular-expression-match) - `where album matches "^."` matches documents with a non-empty value. Add [fast-search](/en/reference/schemas/schemas#attribute) to the attribute to make this efficient on a large corpus. diff --git a/mintlify-docs/en/learn/overview.mdx b/mintlify-docs/en/learn/overview.mdx index 164b96bada..c81a4e655b 100644 --- a/mintlify-docs/en/learn/overview.mdx +++ b/mintlify-docs/en/learn/overview.mdx @@ -11,17 +11,25 @@ Vespa allows application developers to create applications that scale to large a ![Vespa Overview](/assets/img/vespa-overview.svg) +### Container clusters + The [stateless **container** clusters](/en/applications/containers) host components which process incoming data and/or queries and their responses. These components provide functionality belonging to the platform like indexing transformations and the global stages of query execution, but can also include the middleware logic of the application. Application developers can configure their Vespa system with a single stateless cluster which performs all such functions, or create different clusters for each kind of task. The container clusters then pass queries and data operations on to the appropriate nodes in the content clusters. If the application uses data it does not own, you can add components to access data from external services as well. +### Content clusters + [**Content** clusters](/en/content/elasticity) in Vespa are responsible for storing data and execute queries and inferences over the data. Queries can range from simple data lookups for content serving to complex conditions for selecting the relevant data, ranking it using machine-learned models, and grouping and aggregating the data across all nodes participating in the query. All the operations provided by Vespa scales to more content, more expensive inference, and higher query volume simply by adding more nodes to the content clusters. When changing the nodes of a content cluster for scaling or on node failure, content clusters automatically re-balance data in the background to maintain a balanced distribution at the configured redundancy level. Faulty nodes are also automatically removed from the serving path to avoid any impact to queries and writes (failover). After intermediate processing in a container cluster, data is written to content clusters. Writes are persistent and visible in all queries after receiving an ack on the write message, after a few milliseconds. Each write is guaranteed to either succeed or provide failure information response within a given time limit, and writes and scale linearly with the available resources, indefinitely. In addition to rewriting and removing entire documents, writes may selectively modify only individual document fields. Writes can be sent directly over HTTP/2, or by using a Java client — refer to the [API documentation](/en/reference/api/api). +Container and content clusters handle all the end user traffic of a Vespa application, but there's also a third type of cluster, the *admin and config clusters*. These set up and manage the other clusters in the application according to configuration, and manages the process of changing the clusters safely without disruption to traffic when the configuration changed. + +### Schema + Each document instance stored in Vespa are of a type defined in a configured [schema](/en/basics/schemas), which defines the document fields and how to store and index them, as well as the ranking and inference profiles that belongs to the document type. Applications can contain any number of schemas for different data types, and configure them to be stored either in the same or multiple content clusters. -Container and content clusters handle all the end user traffic of a Vespa application, but there's also a third type of cluster, the *admin and config clusters*. These set up and manage the other clusters in the application according to configuration, and manages the process of changing the clusters safely without disruption to traffic when the configuration changed. +### Application package A Vespa application is completely specified by an [*application package*](/en/basics/applications), which is a directory structure containing a declaration of the clusters to run as part of the application, the content schemas, any machine-learned models and Java components, and other configuration or data files needed by various features. Application developers create a running application from their application package by *deploying* it to any node in the config cluster. Changes to a running application is made in the same way: By changing the application package and deploying again. Once Vespa is installed and started on a node, it is managed by the config system such that the entire system can be treated as a single unit, and application owners do not need to perform any administration tasks locally on the nodes running the application. It is also possible to configure nodes as *log servers* on Vespa. These will collect logs in real time from all the nodes of the application. By default, the first node in the config server cluster performs this role. diff --git a/mintlify-docs/en/learn/tutorials/news-1-deploy-an-application.mdx b/mintlify-docs/en/learn/tutorials/news-1-deploy-an-application.mdx index d114168a53..a62247ab12 100644 --- a/mintlify-docs/en/learn/tutorials/news-1-deploy-an-application.mdx +++ b/mintlify-docs/en/learn/tutorials/news-1-deploy-an-application.mdx @@ -1,8 +1,8 @@ --- -title: "News search and recommendation tutorial - getting started on Docker" +title: "News search and recommendation tutorial - getting started on Vespa Cloud" --- -Our goal with this series is to set up a Vespa application for personalized news recommendations. We will do this in stages, starting with a simple news search system and gradually adding functionality as we go through the tutorial parts. +Our goal with this series is to set up a Vespa application for personalized news recommendations on Vespa Cloud. We will do this in stages, starting with a simple news search system and gradually adding functionality as we go through the tutorial parts. The parts are: @@ -14,44 +14,25 @@ The parts are: 6. [News recommendation with searchers](/en/learn/tutorials/news-6-recommendation-with-searchers) - custom searchers, doc processors 7. [News recommendation with parent-child](/en/learn/tutorials/news-7-recommendation-with-parent-child) - parent-child, tensor ranking -There are different entry points to this tutorial. This one is describing how to get started using Docker on your local machine. You can also deploy the application we are creating on [Vespa Cloud](https://cloud.vespa.ai). - -In this part, we will start with a minimal Vespa application to get used to some basic operations for running the application on Docker. In the next part of the tutorial, we'll start developing our application. +In this part, we will start with a minimal Vespa application to get used to some basic operations for deploying and running an application on Vespa Cloud. In the next part of the tutorial, we'll start developing our application. **Prerequisites:** -- Linux, macOS or Windows 10 Pro on x86\_64 or arm64, with [Podman Desktop](https://podman.io/) or [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed, with an engine running. - - Alternatively, start the Podman daemon: - - ```bash - $ podman machine init --memory 6000 - $ podman machine start - ``` - - See [Docker Containers](/en/operations/self-managed/docker-containers) for system limits and other settings. -- For CPUs older than Haswell (2013), see [CPU Support](/en/operations/self-managed/cpu-support). -- Memory: Minimum 4 GB RAM dedicated to Docker/Podman. [Memory recommendations](/en/operations/self-managed/node-setup#memory-settings). -- Disk: Avoid `NO_SPACE` - the vespaengine/vespa container image + headroom for data requires disk space. [Read more](/en/writing/feed-block). +- A Vespa Cloud account - create a [tenant](https://console.vespa-cloud.com/) if you do not have one. - [Homebrew](https://brew.sh/) to install the [Vespa CLI](/en/clients/vespa-cli), or download the Vespa CLI from [Github releases](https://github.com/vespa-engine/vespa/releases). - Python3 for converting the dataset to Vespa JSON. -- `curl` to download the dataset and run the Vespa health-checks. +- `curl` to download the dataset. - [Java 17](https://openjdk.org/projects/jdk/17/) in part 6. - [Apache Maven](https://maven.apache.org/install.html) in part 6. - -**Note:** - -4 GB Docker memory is sufficient for the demo dataset in part 2. The full MIND dataset requires more, use 10 GB. - - - In upcoming parts of this series, we will have some additional Python dependencies - we use [PyTorch](https://pytorch.org/) to train vector representations for news and users and train machine learning models for use in ranking. -## Installing vespa-cli +## Installing Vespa CLI This tutorial uses [Vespa-CLI](/en/clients/vespa-cli), Vespa CLI is the official command-line client for Vespa.ai. It is a single binary without any runtime dependencies and is available for Linux, macOS, and Windows. @@ -59,10 +40,10 @@ This tutorial uses [Vespa-CLI](/en/clients/vespa-cli), Vespa CLI is the official $ brew install vespa-cli ``` -For the rest of this tutorial, you will be using localhost, so you need to configure your Vespa CLI to connect to localhost. Run the following to use endpoints on localhost: +In this tutorial it is possible to use either a local or global Vespa CLI configuration mode for configuration variables. Using local configuration mode is generally recommended when working with multiple distinct Vespa applications, but most parts of this tutorial uses the same configuration values which makes it easier to use global configuration mode. The global configuration mode is useful because you don't have to reapply the same Vespa configurations for each part of this tutorial series: ```bash -$ vespa config set target local +$ vespa config set default_config_scope global ``` @@ -90,34 +71,43 @@ In the `news` directory, several pre-configured application packages are availab We will revisit these files in the next part of the tutorial. -## Starting Vespa +## Configuring Vespa CLI for Vespa Cloud + +Configure the Vespa CLI to use Vespa Cloud, and set the application name. Replace `tenant-name` with your tenant name from [console.vespa-cloud.com](https://console.vespa-cloud.com): + +```bash +$ vespa config set target cloud +$ vespa config set application tenant-name.news +``` + +Usually its better to use local configuration for each application, but this tutorial uses global configuration to avoid having to set the configuration values for each part of the tutorial. -This application doesn't contain much at the moment, let's start up the application anyway by starting a Docker container to run it: +Authenticate with Vespa Cloud: ```bash -$ docker pull vespaengine/vespa -$ docker run --detach --name vespa --hostname vespa-tutorial \ - --publish 8080:8080 --publish 19071:19071 --publish 19092:19092 \ - vespaengine/vespa +$ vespa auth login ``` -First, we pull the latest [vespa-image](https://hub.docker.com/r/vespaengine/vespa/) from the Docker hub, then we start it with the name `vespa`. This starts the Docker container and the initial Vespa services to be able to deploy an application. +Follow the browser instructions to complete authentication. -Starting the container can take a short while. Before continuing, make sure that the configuration service is running by using `vespa status`. +Next, add a certificate for [data plane access](/en/security/guide#data-plane) to the application: ```bash -$ vespa status deploy --wait 300 +$ vespa auth cert app-1-getting-started ``` -With the config server up and running, deploy the application using vespa-cli: + +## Deploying to Vespa Cloud + +This application doesn't contain much at the moment, but let's deploy it to Vespa Cloud anyway to get used to the basic operations. The first deployment may take a few minutes while nodes are provisioned: ```bash -$ vespa deploy --wait 300 app-1-getting-started +$ vespa deploy --wait 600 app-1-getting-started ``` -The command uploads the application and verifies the content. If anything is wrong with the application, this step will fail with a failure description; Otherwise, this switches the application to a live status. +The command uploads the application and verifies the content. If anything is wrong with the application, this step will fail with a failure description; otherwise, this switches the application to a live status. -Whenever you have a new version of your application, run the same command to deploy the application. In most cases, there is no need to restart services. Vespa takes care of reconfiguring the system. If a restart of services is required in some rare case, however, the output will notify which services need restart to make the change effective. +Whenever you have a new version of your application, run the same command to deploy the application. In most cases, there is no need to restart services. Vespa takes care of reconfiguring the system. In the upcoming parts of the tutorials, we'll frequently deploy the application changes in this manner. @@ -127,7 +117,7 @@ In the upcoming parts of the tutorials, we'll frequently deploy the application We must index data before we can search for it. This is called "feeding", and we'll get back to that in more detail in the next part of the tutorial. For now, to test that everything is up and running, we'll feed in a single test document: ```bash -$ vespa feed -t http://localhost:8080 doc.json +$ vespa feed doc.json ``` The `-v` option will make vespa-cli print the http request: @@ -179,42 +169,11 @@ $ vespa document -v remove id:news:news::1 Well done! -## Stopping and starting Vespa - -Keep Vespa running to continue with the next steps in this tutorial set (skip the below). - -To stop Vespa, we can run the following commands: - -```bash -$ docker exec vespa vespa-stop-services -$ docker exec vespa vespa-stop-configserver -``` - -Likewise, to start the Vespa services: - -```bash -$ docker exec vespa vespa-start-configserver -$ docker exec vespa vespa-start-services -``` - -If a [restart is required](/en/reference/schemas/schemas#changes-that-require-restart-but-not-re-feed) due to changes in the application package, these two steps are what you need to do. +## Managing the Vespa Cloud application -To wipe the index and restart: - -```bash -$ docker exec vespa sh -c ' \ - vespa-stop-services && \ - vespa-remove-index -force && \ - vespa-start-services' -``` - -You can stop and kill the Vespa container application like this: - -```bash -$ docker stop vespa; docker rm -f vespa -``` +Application instances in the [dev zone](/en/operations/environments#dev) will by default keep running for 14 days after the last deployment. You can control this in the [console](https://console.vespa-cloud.com/). -This will delete the Vespa application, including all data and configuration. See [container tuning for production](/en/operations/self-managed/docker-containers). +The [Vespa Cloud console](https://console.vespa-cloud.com) can also be used to delete the application instance. ## Conclusion diff --git a/mintlify-docs/en/learn/tutorials/news-2-basic-feeding-and-query.mdx b/mintlify-docs/en/learn/tutorials/news-2-basic-feeding-and-query.mdx index 32a2b70b19..db241399d2 100644 --- a/mintlify-docs/en/learn/tutorials/news-2-basic-feeding-and-query.mdx +++ b/mintlify-docs/en/learn/tutorials/news-2-basic-feeding-and-query.mdx @@ -30,7 +30,28 @@ The [MIND dataset description](https://github.com/msnews/msnews.github.io/blob/m We'll start with developing a search application, so we'll focus on the news content at first. We'll use the impression data as we begin building the recommendation system later in this series. -Let's start by downloading the data. The `news` sample app directory will be our starting point. We've included a script to download the data for us: +Let's start by downloading the data. The `news` sample app directory will be our starting point. The MIND dataset is hosted on [Hugging Face](https://huggingface.co/datasets/yjw1029/MIND) and requires a free account and acceptance of the dataset's terms of use. + +### Accept the dataset terms + +1. Log in at [huggingface.co](https://huggingface.co) +2. Go to the [MIND dataset page](https://huggingface.co/datasets/yjw1029/MIND) +3. Click **Agree and access repository** to accept the terms + +### Create a Hugging Face access token + +1. Go to [https://huggingface.co/settings/tokens](https://huggingface.co/settings/tokens) +2. Click **New token**, give it a name, select **Read** role, and copy the token + +### Download the dataset + +Set your token as an environment variable: + +```bash +$ export HF_TOKEN=hf_your_token_here +``` + +Then run the download script from the **news** sample app directory: ```bash $ ./bin/download-mind.sh small @@ -61,8 +82,6 @@ $ mkdir -p my-app/schemas A Vespa [application package](/en/basics/applications) is the set of configuration files and Java plugins that together define the behavior of a Vespa system: what functionality to use, the available document types, how ranking will be done and how data will be processed during feeding and indexing. The schema, e.g., `news.sd`, is a required part of an application package — the other file needed is `services.xml`. -For self-hosted multi-node deployments, a `hosts.xml` file is also needed. For multi-node self-hosted deployments using `hosts.xml`, see the [multinode high availability](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA) sample application. - We mentioned these files in the previous part but didn't really explain them at the time. We'll go through them here, starting with the specification of services. @@ -77,9 +96,7 @@ The [services.xml](/en/reference/applications/services/services) file defines th - - - + @@ -87,9 +104,7 @@ The [services.xml](/en/reference/applications/services/services) file defines th - - - + @@ -100,10 +115,10 @@ Quite a lot is set up here: - `` defines the stateless [container cluster](/en/applications/containers) for document, query and result processing - `` sets up the [query endpoint](/en/querying/query-api). The default port is 8080. - `` sets up the [document endpoint](/en/reference/api/document-v1) for feeding and visiting. -- `` defines the nodes required per service. (See the [reference](/en/reference/applications/services/container) for more on container cluster setup). +- `` defines the number of nodes for the service. (See the [reference](/en/reference/applications/services/container) for more on container cluster setup). - `` The stateful content cluster - `` denotes how many copies to store of each document. -- `` assigns the document types in the *schema* — the content cluster capacity can be increased by adding node elements — see [elasticity](/en/content/elasticity). (See also the [reference](/en/reference/applications/services/content) for more on content cluster setup.) +- `` assigns the document types in the *schema* — the content cluster capacity can be increased by raising the node count — see [elasticity](/en/content/elasticity). (See also the [reference](/en/reference/applications/services/content) for more on content cluster setup.) ### Schema @@ -183,8 +198,29 @@ my-app/ └── services.xml ``` +If not already done from the previous [news tutorial](/en/learn/tutorials/news-1-deploy-an-application), set Vespa configuration variables. Use your tenant name from the [Vespa Cloud console](https://console.vespa-cloud.com/) instead of `tenant-name`: + +```bash +$ vespa config set target cloud +$ vespa config set application tenant-name.news +``` + +Log in to Vespa Cloud: + +```bash +$ vespa auth login +``` + +Add security credentials to the application package for data plane access: + +```bash +$ vespa auth cert my-app -f +``` + +Finally, deploy the application package to Vespa Cloud: + ```bash -$ vespa deploy --wait 300 my-app +$ vespa deploy --wait 600 my-app ``` @@ -199,7 +235,7 @@ $ python3 src/python/convert_to_vespa_format.py mind The argument is where to find the downloaded data above, which was in the `mind` directory. This script creates a new file in that directory called `vespa.json`. This contains all 28603 news articles in the data set. This file can now be fed to Vespa. Use the method described in the previous part: ```bash -$ vespa feed mind/vespa.json --target http://localhost:8080 +$ vespa feed mind/vespa.json ``` `vespa feed` reads a JSON array of document operations, or JSONL with one Vespa document JSON formatted operation per line. Once the feed job finishes, all our 65 238 documents are searchable, let us do a quick query to verify: @@ -242,12 +278,14 @@ Given the above schema, where the fields `title`, `abstract` and `body` are part $ vespa query -v 'yql=select * from news where default contains "music"' ``` -or a POST JSON query (Notice the *Content-Type* header specification): +or a POST JSON query. The values can be found by using the previous `vespa query -v` command. The content type should be changed to `application/json`. It's also possible to use `vespa status` to find the url of your cloud instance: ```bash -$ curl -s -H "Content-Type: application/json" \ - --data '{"yql" : "select * from sources * where default contains \"music\""}' \ - http://localhost:8080/search/ | python3 -m json.tool +$ curl --key /path/to/key \ + --cert /path/to/cert \ + -H 'Content-Type: application/json' \ + --data '{"yql" : "select * from sources * where default contains \"music\""}' \ + 'https://your-vespa-url.vespa-app.cloud/search/' | python3 -m json.tool ``` diff --git a/mintlify-docs/en/learn/tutorials/news-3-searching.mdx b/mintlify-docs/en/learn/tutorials/news-3-searching.mdx index b87b204802..79795f80eb 100644 --- a/mintlify-docs/en/learn/tutorials/news-3-searching.mdx +++ b/mintlify-docs/en/learn/tutorials/news-3-searching.mdx @@ -323,7 +323,7 @@ Deploy the _popularity_ rank profile: ```bash -$ vespa deploy --wait 300 my-app +$ vespa deploy --wait 600 my-app ``` Run a query: diff --git a/mintlify-docs/en/learn/tutorials/news-5-recommendation.mdx b/mintlify-docs/en/learn/tutorials/news-5-recommendation.mdx index 3d790db95e..f46adb25c6 100644 --- a/mintlify-docs/en/learn/tutorials/news-5-recommendation.mdx +++ b/mintlify-docs/en/learn/tutorials/news-5-recommendation.mdx @@ -140,7 +140,7 @@ We also need to let Vespa know we want to use this document type, so we modify ` ``` ```bash -$ vespa deploy --wait 300 my-app +$ vespa deploy --wait 600 my-app ``` ```bash @@ -150,8 +150,8 @@ $ sleep 20 After redeploying with the updated schemas and `services.xml`, feed `mind/vespa_user_embeddings.json` and `mind/vespa_news_embeddings.json`: ```bash -$ vespa feed mind/vespa_user_embeddings.json --target http://localhost:8080 -$ vespa feed mind/vespa_news_embeddings.json --target http://localhost:8080 +$ vespa feed mind/vespa_user_embeddings.json +$ vespa feed mind/vespa_news_embeddings.json ``` Once the feeding jobs finishes, the index is ready to be used, we can verify that we have 65238 news documents and 94057 user documents: @@ -202,7 +202,7 @@ Setting up this query profile type is required when sending a tensor as a query Deploy the updates to query profiles: ```bash -$ vespa deploy --wait 300 my-app +$ vespa deploy --wait 600 my-app ``` @@ -386,21 +386,16 @@ schema news { If you make this change and deploy it, you will get prompted by Vespa that a restart is required so that the index can be built: ```bash -$ vespa deploy --wait 300 my-app +$ vespa deploy --wait 600 my-app ``` -Introducing the HNSW `index` requires a content node restart, in this case we restart all services: - -```bash -$ docker exec vespa /usr/bin/sh -c \ - '/opt/vespa/bin/vespa-stop-services && /opt/vespa/bin/vespa-start-services' -``` +Introducing the HNSW `index` requires a content node restart. On Vespa Cloud, this is handled automatically after deployment — wait for the deployment to complete and the application to become ready: ```bash $ vespa status --wait 300 ``` -After doing this and waiting a bit for Vespa to start, we can query Vespa again: +After the deployment completes, we can query Vespa again: ```bash $ ./src/python/user_search.py U33527 10 diff --git a/mintlify-docs/en/learn/tutorials/news-6-recommendation-with-searchers.mdx b/mintlify-docs/en/learn/tutorials/news-6-recommendation-with-searchers.mdx index 92d87c8fd9..1bdeb5b309 100644 --- a/mintlify-docs/en/learn/tutorials/news-6-recommendation-with-searchers.mdx +++ b/mintlify-docs/en/learn/tutorials/news-6-recommendation-with-searchers.mdx @@ -193,7 +193,7 @@ $ (cd app-6-recommendation-with-searchers && mvn package) [pom.xml](https://github.com/vespa-engine/sample-apps/blob/master/news/app-6-recommendation-with-searchers/pom.xml) is set up to create an artifact called `news-recommendation-searcher`, which is referred to in `services.xml`. When the command finishes, we can see this artifact in `target/application.zip`. This contains the full Vespa application, with Java components - deploy it: ```bash -$ vespa deploy --wait 300 app-6-recommendation-with-searchers +$ vespa deploy --wait 600 app-6-recommendation-with-searchers ``` After the application has been deployed, we are ready to test. Refer to [the Searcher development guide](/en/applications/searchers) for much more on custom Searchers and the Java API. diff --git a/mintlify-docs/en/learn/tutorials/news-7-recommendation-with-parent-child.mdx b/mintlify-docs/en/learn/tutorials/news-7-recommendation-with-parent-child.mdx index ef188a0c59..e2a41c8167 100644 --- a/mintlify-docs/en/learn/tutorials/news-7-recommendation-with-parent-child.mdx +++ b/mintlify-docs/en/learn/tutorials/news-7-recommendation-with-parent-child.mdx @@ -178,7 +178,7 @@ $ (cd app-7-parent-child && mvn package) ``` ```bash -$ vespa deploy --wait 300 app-7-parent-child +$ vespa deploy --wait 600 app-7-parent-child ``` After deploying the application, we are ready to feed a global CTR document. For convenience, we've created [create_category_ctrs.py](https://github.com/vespa-engine/sample-apps/blob/master/news/src/python/create_category_ctrs.py) that reads the MIND content and impression data to calculate CTR scores for each category. This produces two files in the `mind` directory: @@ -197,8 +197,8 @@ $ ./src/python/create_category_ctrs.py mind Feed the created feed files: ```bash -$ vespa feed mind/global_category_ctr.json --target http://localhost:8080 -$ vespa feed mind/news_category_ctr_update.json --target http://localhost:8080 +$ vespa feed mind/global_category_ctr.json +$ vespa feed mind/news_category_ctr_update.json ``` diff --git a/mintlify-docs/en/learn/tutorials/rag-blueprint.mdx b/mintlify-docs/en/learn/tutorials/rag-blueprint.mdx index 618df21bcf..76f311c09a 100644 --- a/mintlify-docs/en/learn/tutorials/rag-blueprint.mdx +++ b/mintlify-docs/en/learn/tutorials/rag-blueprint.mdx @@ -739,18 +739,56 @@ select * from doc where ({targetHits:100}nearestNeighbor(chunk_embeddings, embedding)) ``` -| Metric | Value | -| :--- | :--- | -| Match Recall | 1.0000 | -| Average Recall per Query | 1.0000 | -| Total Relevant Documents | 51 | -| Total Matched Relevant | 51 | -| Average Matched per Query | 100.0000 | -| Total Queries | 20 | -| Search Time Average (s) | 0.0090 | -| Search Time Q50 (s) | 0.0060 | -| Search Time Q90 (s) | 0.0193 | -| Search Time Q95 (s) | 0.0220 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricValue
Match Recall1.0000
Average Recall per Query1.0000
Total Relevant Documents51
Total Matched Relevant51
Average Matched per Query100.0000
Total Queries20
Search Time Average (s)0.0090
Search Time Q50 (s)0.0060
Search Time Q90 (s)0.0193
Search Time Q95 (s)0.0220
#### WeakAnd Query Evaluation @@ -761,18 +799,56 @@ The `userQuery` is just a convenience wrapper for `weakAnd`, see [reference/quer select * from doc where userQuery() ``` -| Metric | Value | -| :--- | :--- | -| Match Recall | 1.0000 | -| Average Recall per Query | 1.0000 | -| Total Relevant Documents | 51 | -| Total Matched Relevant | 51 | -| Average Matched per Query | 88.7000 | -| Total Queries | 20 | -| Search Time Average (s) | 0.0071 | -| Search Time Q50 (s) | 0.0060 | -| Search Time Q90 (s) | 0.0132 | -| Search Time Q95 (s) | 0.0171 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricValue
Match Recall1.0000
Average Recall per Query1.0000
Total Relevant Documents51
Total Matched Relevant51
Average Matched per Query88.7000
Total Queries20
Search Time Average (s)0.0071
Search Time Q50 (s)0.0060
Search Time Q90 (s)0.0132
Search Time Q95 (s)0.0171
#### Hybrid Query Evaluation @@ -784,18 +860,56 @@ select * from doc where userQuery() ``` -| Metric | Value | -| :--- | :--- | -| Match Recall | 1.0000 | -| Average Recall per Query | 1.0000 | -| Total Relevant Documents | 51 | -| Total Matched Relevant | 51 | -| Average Matched per Query | 100.0000 | -| Total Queries | 20 | -| Search Time Average (s) | 0.0076 | -| Search Time Q50 (s) | 0.0055 | -| Search Time Q90 (s) | 0.0150 | -| Search Time Q95 (s) | 0.0201 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricValue
Match Recall1.0000
Average Recall per Query1.0000
Total Relevant Documents51
Total Matched Relevant51
Average Matched per Query100.0000
Total Queries20
Search Time Average (s)0.0076
Search Time Q50 (s)0.0055
Search Time Q90 (s)0.0150
Search Time Q95 (s)0.0201
### Tuning the retrieval phase @@ -955,13 +1069,84 @@ $ python eval/collect_pyvespa.py --collect_matchfeatures Our output file looks like this: -| query_id | doc_id | relevance_label | relevance_score | match_avg_top_3_chunk_sim_scores | match_avg_top_3_chunk_text_scores | match_bm25(chunks) | match_bm25(title) | match_max_chunk_sim_scores | match_max_chunk_text_scores | -| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | -| alex_q_01 | 50 | 1 | 0.660597 | 0.248329 | 8.444725 | 7.717984 | 0. | 0.268457 | 8.444725 | -| alex_q_01 | 82 | 1 | 0.649638 | 0.225300 | 12.327676 | 18.611592 | 2.453409 | 0.258905 | 15.644889 | -| alex_q_01 | 1 | 1 | 0.245849 | 0.358027 | 15.100841 | 23.010389 | 4.333828 | 0.391143 | 20.582403 | -| alex_q_01 | 28 | 0 | 0.988250 | 0.278074 | 0.179929 | 0.197420 | 0. | 0.278074 | 0.179929 | -| alex_q_01 | 23 | 0 | 0.968268 | 0.203709 | 0.182603 | 0.196956 | 0. | 0.203709 | 0.182603 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
query_iddoc_idrelevance_labelrelevance_scorematch_avg_top_3_chunk_sim_scoresmatch_avg_top_3_chunk_text_scoresmatch_bm25(chunks)match_bm25(title)match_max_chunk_sim_scoresmatch_max_chunk_text_scores
alex_q_015010.6605970.2483298.4447257.7179840.0.2684578.444725
alex_q_018210.6496380.22530012.32767618.6115922.4534090.25890515.644889
alex_q_01110.2458490.35802715.10084123.0103894.3338280.39114320.582403
alex_q_012800.9882500.2780740.1799290.1974200.0.2780740.179929
alex_q_012300.9682680.2037090.1826030.1969560.0.2037090.182603
Note that the `relevance_score` in this table is just the random expression we used in the `second-phase` of the `collect-training-data` rank profile, and will be dropped before training the model. @@ -1176,16 +1361,48 @@ Overall CV AUC: 0.9249 • ACC: 0.9216 The trained model reveals which features are most important for ranking quality. For our sample application, the top features include: -| Feature | Importance | -| :--- | :--- | -| nativeProximity | 168.8498 | -| firstPhase | 151.7382 | -| max_chunk_sim_scores | 69.4377 | -| avg_top_3_chunk_text_scores | 56.5079 | -| avg_top_3_chunk_sim_scores | 31.8700 | -| nativeRank | 20.0716 | -| nativeFieldMatch | 15.9914 | -| elementSimilarity(chunks) | 9.7003 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureImportance
nativeProximity168.8498
firstPhase151.7382
max_chunk_sim_scores69.4377
avg_top_3_chunk_text_scores56.5079
avg_top_3_chunk_sim_scores31.8700
nativeRank20.0716
nativeFieldMatch15.9914
elementSimilarity(chunks)9.7003
Key observations: diff --git a/mintlify-docs/en/learn/tutorials/text-search-ml.mdx b/mintlify-docs/en/learn/tutorials/text-search-ml.mdx index fdb451b603..a7a3592a8c 100644 --- a/mintlify-docs/en/learn/tutorials/text-search-ml.mdx +++ b/mintlify-docs/en/learn/tutorials/text-search-ml.mdx @@ -253,11 +253,48 @@ Using `random` as our second-phase ranking function ensures that the top documen Once we have both the relevant and the random documents associated with a given query, we parse the Vespa result and store it in a file with the following format: -| bm25(body) | bm25(title) | nativeRank(body) | nativeRank(title) | docid | qid | relevant | -| --- | --- | --- | --- | --- | --- | --- | -| 25.792076 | 12.117309 | 0.322567 | 0.084239 | D312959 | 3 | 1 | -| 22.191228 | 0.043899 | 0.247145 | 0.017715 | D3162299 | 3 | 0 | -| 13.880625 | 0.098052 | 0.219413 | 0.036826 | D2823827 | 3 | 0 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bm25(body)bm25(title)nativeRank(body)nativeRank(title)docidqidrelevant
25.79207612.1173090.3225670.084239D31295931
22.1912280.0438990.2471450.017715D316229930
13.8806250.0980520.2194130.036826D282382730
where the values in the `relevant` column are equal to 1 if document `docid` is relevant to the query `qid` and zero otherwise. diff --git a/mintlify-docs/en/linguistics/troubleshooting-encoding.mdx b/mintlify-docs/en/linguistics/troubleshooting-encoding.mdx index ab15b9df7d..a59bde60fb 100644 --- a/mintlify-docs/en/linguistics/troubleshooting-encoding.mdx +++ b/mintlify-docs/en/linguistics/troubleshooting-encoding.mdx @@ -19,22 +19,62 @@ def remove_control_characters(s): ## Visual pattern matching of encoding bugs -| Transformation | Result | -| :--- | :--- | -| Input | hôtel | -| Correctly URL quoted (Vespa always uses UTF-8 there) | h%C3%B4tel | -| Encoded as ISO-8859-1 (ISO Latin-1), then URL quoted | h%F4tel | -| Encoded as UTF-16 (as in Java strings), then URL quoted | %00h%00%F4%00t%00e%00l | -| For completeness, little endian UTF-16, including byte order marker | %FF%FEh%00%F4%00t%00e%00l%00 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TransformationResult
Inputhôtel
Correctly URL quoted (Vespa always uses UTF-8 there)h%C3%B4tel
Encoded as ISO-8859-1 (ISO Latin-1), then URL quotedh%F4tel
Encoded as UTF-16 (as in Java strings), then URL quoted%00h%00%F4%00t%00e%00l
For completeness, little endian UTF-16, including byte order marker%FF%FEh%00%F4%00t%00e%00l%00
What we are looking for is single bytes outside ASCII, i.e. ordinal above 127. Given UTF-8, there should always be sequences of two or more of these when a code point is outside ASCII. The first byte for each code point will have the two most significant bits set, in other words hex C to hex F. The rest of the bytes for that code point will have the most significant bit set, and the second most unset, in other words hex 8 to hex B. From here, we move on to the two most common de-/encoding errors: -| Error | Hex dump of code points | Rendered | -| :--- | :--- | :--- | -| UTF-8 input decoded as if it were ISO-8859-1 | h\xc3\xb4tel | hôtel | -| UTF-8 input re-encoded as UTF-8, then decoded as UTF-8 again | h\xc3\xb4tel | hôtel | + + + + + + + + + + + + + + + + + + + + +
ErrorHex dump of code pointsRendered
UTF-8 input decoded as if it were ISO-8859-1h\xc3\xb4telhôtel
UTF-8 input re-encoded as UTF-8, then decoded as UTF-8 againh\xc3\xb4telhôtel
Note how these two bugs create exactly the same byte sequences. This is because the first 256 code points of Unicode are identical to ISO-8859-1. What we are looking for is line noise in-between normal ASCII, as both ISO-8859-1 and Unicode are ASCII compatible. diff --git a/mintlify-docs/en/modules/e-commerce/multi-currency-filtering.mdx b/mintlify-docs/en/modules/e-commerce/multi-currency-filtering.mdx index f3ec481bd0..a0b3227069 100644 --- a/mintlify-docs/en/modules/e-commerce/multi-currency-filtering.mdx +++ b/mintlify-docs/en/modules/e-commerce/multi-currency-filtering.mdx @@ -208,13 +208,42 @@ Feed products with their seller currency and per-market prices. Always include a Use the following query parameters to filter products by price range in a specific market and currency: -| Parameter | Description | Example | -| :--- | :--- | :--- | -| `ecommerce.multicurrency.market` | Target market code | `NO`, `US`, `EU`, `NO-49`, `27` | -| `ecommerce.multicurrency.currency` | Target currency code | `NOK`, `USD`, `EUR` | -| `ecommerce.multicurrency.price-min` | Minimum price in target currency | `1000` | -| `ecommerce.multicurrency.price-max` | Maximum price in target currency | `1500` | -| `ecommerce.multicurrency.enrich` | Optional: expose forex rates as query tensor for ranking. Defaults to false | `true` or `false` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionExample
{`ecommerce.multicurrency.market`}Target market code{`NO`}, {`US`}, {`EU`}, {`NO-49`}, {`27`}
{`ecommerce.multicurrency.currency`}Target currency code{`NOK`}, {`USD`}, {`EUR`}
{`ecommerce.multicurrency.price-min`}Minimum price in target currency{`1000`}
{`ecommerce.multicurrency.price-max`}Maximum price in target currency{`1500`}
{`ecommerce.multicurrency.enrich`}Optional: expose forex rates as query tensor for ranking. Defaults to false{`true`} or {`false`}
#### Example Query @@ -296,12 +325,37 @@ The `ForexRateRetriever` component automatically refreshes forex rates every 10 The forex service tracks its operational status with the following health states: -| State | Description | Query Behavior | -| :--- | :--- | :--- | -| `READY` | Forex rates loaded and service is operational | Queries with multi-currency filtering work normally | -| `UNINITIALIZED` | No forex document has been loaded yet | Queries return error: "forex rate service not initialized" | -| `OUTAGE` | Refresh failed but stale data exists (cache stays ready for re-use once the retriever succeeds again) | Queries return error: "forex rate service temporarily unavailable (last refresh failed)" | -| `INVALID_FOREX_DOCUMENTS` | Multiple forex documents detected (expected exactly one) | Queries return error: "ensure exactly one forex document exists" | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StateDescriptionQuery Behavior
{`READY`}Forex rates loaded and service is operationalQueries with multi-currency filtering work normally
{`UNINITIALIZED`}No forex document has been loaded yetQueries return error: "forex rate service not initialized"
{`OUTAGE`}Refresh failed but stale data exists (cache stays ready for re-use once the retriever succeeds again)Queries return error: "forex rate service temporarily unavailable (last refresh failed)"
{`INVALID_FOREX_DOCUMENTS`}Multiple forex documents detected (expected exactly one)Queries return error: "ensure exactly one forex document exists"
#### Error Handling @@ -416,10 +470,30 @@ rank-profile price_ranking { There are two distinct types of query parameters used together, and they must not be confused: -| Type | Prefix | Format | Purpose | -| :--- | :--- | :--- | :--- | -| Filter parameters | `ecommerce.multicurrency.*` | Plain string or number | Tells the searcher which market, currency, and price range to filter on. Consumed server-side ” never reach the rank profile. | -| Ranking inputs | `ranking.features.query(...)` | One-hot tensor | Passed directly to the rank profile to drive scoring expressions. The searcher does not read or modify these. | + + + + + + + + + + + + + + + + + + + + + + + +
TypePrefixFormatPurpose
Filter parameters{`ecommerce.multicurrency.*`}Plain string or numberTells the searcher which market, currency, and price range to filter on. Consumed server-side ” never reach the rank profile.
Ranking inputs{`ranking.features.query(...)`}One-hot tensorPassed directly to the rank profile to drive scoring expressions. The searcher does not read or modify these.
**Note:** The only exception is `enrich=true`, which causes the searcher to inject `query(forexRates)` from its in-memory cache ” because the client cannot know the current rates. `buyer_currency` and `buyer_market` are already known to the client so they are passed directly as ranking inputs, not via the searcher. @@ -464,14 +538,54 @@ Key functions: This section describes the [configuration parameters](/en/applications/configuring-components) used by the multi-currency components. All parameters are part of the `ecommerce-schema-wiring` config (`ai.vespa.ecommerce.common.ecommerce-schema-wiring`). -| Parameter | Description | Type | Default | -| :--- | :--- | :--- | :--- | -| `productFields.sellerCurrency` | Field name for the product's seller currency. | `string` | `seller_currency` | -| `productFields.perMarketPriceArrayStruct` | Array field name containing per-market prices. | `string` | `per_market_price` | -| `productFields.marketStructField` | Struct field name for market code. | `string` | `market` | -| `productFields.priceStructField` | Struct field name for price value. | `string` | `price` | -| `defaults.market` | Default market identifier used as fallback when no market-specific price exists. | `string` | `DEFAULT` | -| `rankProfileInputs.forexRates` | Query tensor name for forex rates in ranking. Used when `enrich=true` to inject the forex tensor into the query. | `string` | `forexRates` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionTypeDefault
{`productFields.sellerCurrency`}Field name for the product's seller currency.{`string`}{`seller_currency`}
{`productFields.perMarketPriceArrayStruct`}Array field name containing per-market prices.{`string`}{`per_market_price`}
{`productFields.marketStructField`}Struct field name for market code.{`string`}{`market`}
{`productFields.priceStructField`}Struct field name for price value.{`string`}{`price`}
{`defaults.market`}Default market identifier used as fallback when no market-specific price exists.{`string`}{`DEFAULT`}
{`rankProfileInputs.forexRates`}Query tensor name for forex rates in ranking. Used when {`enrich=true`} to inject the forex tensor into the query.{`string`}{`forexRates`}
## Requirements diff --git a/mintlify-docs/en/modules/e-commerce/saved-search.mdx b/mintlify-docs/en/modules/e-commerce/saved-search.mdx index 4de0f9e70c..2e14b81270 100644 --- a/mintlify-docs/en/modules/e-commerce/saved-search.mdx +++ b/mintlify-docs/en/modules/e-commerce/saved-search.mdx @@ -316,29 +316,144 @@ Now notifications can be inspected by using `vespa visit` or `vespa query` with This section describes the possible [configuration parameters](/en/applications/configuring-components) used by the document processor. -| Parameter | Description | Type | Default value | -| :--- | :--- | :--- | :--- | -| `notification.kind` | Method to use for sending notifications. | `enum {WEBHOOK, DUMMY, VESPA_SCHEMA}` | `DUMMY` | -| `notification.webhook.URL` | URL to send notification requests. | `string` | | -| `notification.webhook.connectionPoolSize` | Number of HTTP client threads to use in the container cluster. | `int` | `20` | -| `notification.webhook.headers[].key` | Key of a header to add to all webhook requests. | `string` | | -| `notification.webhook.headers[].value` | Value of a header to add to all webhook requests. | `string` | | -| `notification.webhook.headers[].secret` | Use a secret from Vespa secret store instead of the value provided in `.value`. The value provided here should match the name of a secret specified with a `secrets` tag in `services.xml`. | `string` | | -| `notification.vespaSchema.documentType` | Name of the Vespa document type to use for storing notifications. This document type has to be defined in the application. | `string` | saved\_search\_notification | -| `notification.vespaSchema.namespace` | Namespace to use for creating document IDs for the notification documents. | `string` | saved\_search | -| `notification.vespaSchema.fieldPathProductId` | Fieldpath for storing the product id in the notification documents. | `string` | product\_id | -| `notification.vespaSchema.fieldPathSavedSearchId` | Fieldpath for storing saved search id in the notification documents. | `string` | saved\_search\_id | -| `notification.vespaSchema.fieldPathTimestamp` | Fieldpath for storing timestamps in the notification documents. | `string` | timestamp | -| `productDocumentType` | The name of the document type that can trigger notifications, e.g. `product`. | `string` | product | -| `savedSearchDocumentType` | The name of the document type storing saved searches, e.g. `saved_search`. | `string` | saved\_search | -| `predicateFieldName` | The name of the field in `savedSearchDocumentType` storing the predicate query. | `string` | filters | -| `savedSearchNumHits` | Maximum number of saved searches that can match per product update. Matches beyond this limit are silently dropped. Higher values increase work per update. | `int` | 100 | -| `regularAttributes[].predicateName` | The name of a regular (string) attribute to be used in the saved search predicate field. | `string` | | -| `regularAttributes[].fieldPath` | The field in the `productDocumentType` to be matched with this attribute. This field should be of type `string`. | `string` | | -| `regularAttributes[].required` | Whether documents are required to specify this attribute. | `bool` | `false` | -| `rangeAttributes[].predicateName` | The name of a numerical range attribute to be used in the saved search predicate field. | `string` | | -| `rangeAttributes[].fieldPath` | The field in the `productDocumentType` to be matched with this attribute. This field should be of a numeric type, e.g. `int`. | `string` | | -| `rangeAttributes[].required` | Whether documents are required to specify this attribute. | `bool` | `false` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionTypeDefault value
{`notification.kind`}Method to use for sending notifications.{`enum {WEBHOOK, DUMMY, VESPA_SCHEMA}`}{`DUMMY`}
{`notification.webhook.URL`}URL to send notification requests.{`string`}
{`notification.webhook.connectionPoolSize`}Number of HTTP client threads to use in the container cluster.{`int`}{`20`}
{`notification.webhook.headers[].key`}Key of a header to add to all webhook requests.{`string`}
{`notification.webhook.headers[].value`}Value of a header to add to all webhook requests.{`string`}
{`notification.webhook.headers[].secret`}Use a secret from Vespa secret store instead of the value provided in {`.value`}. The value provided here should match the name of a secret specified with a {`secrets`} tag in {`services.xml`}.{`string`}
{`notification.vespaSchema.documentType`}Name of the Vespa document type to use for storing notifications. This document type has to be defined in the application.{`string`}saved_search_notification
{`notification.vespaSchema.namespace`}Namespace to use for creating document IDs for the notification documents.{`string`}saved_search
{`notification.vespaSchema.fieldPathProductId`}Fieldpath for storing the product id in the notification documents.{`string`}product_id
{`notification.vespaSchema.fieldPathSavedSearchId`}Fieldpath for storing saved search id in the notification documents.{`string`}saved_search_id
{`notification.vespaSchema.fieldPathTimestamp`}Fieldpath for storing timestamps in the notification documents.{`string`}timestamp
{`productDocumentType`}The name of the document type that can trigger notifications, e.g. {`product`}.{`string`}product
{`savedSearchDocumentType`}The name of the document type storing saved searches, e.g. {`saved_search`}.{`string`}saved_search
{`predicateFieldName`}The name of the field in {`savedSearchDocumentType`} storing the predicate query.{`string`}filters
{`savedSearchNumHits`}Maximum number of saved searches that can match per product update. Matches beyond this limit are silently dropped. Higher values increase work per update.{`int`}100
{`regularAttributes[].predicateName`}The name of a regular (string) attribute to be used in the saved search predicate field.{`string`}
{`regularAttributes[].fieldPath`}The field in the {`productDocumentType`} to be matched with this attribute. This field should be of type {`string`}.{`string`}
{`regularAttributes[].required`}Whether documents are required to specify this attribute.{`bool`}{`false`}
{`rangeAttributes[].predicateName`}The name of a numerical range attribute to be used in the saved search predicate field.{`string`}
{`rangeAttributes[].fieldPath`}The field in the {`productDocumentType`} to be matched with this attribute. This field should be of a numeric type, e.g. {`int`}.{`string`}
{`rangeAttributes[].required`}Whether documents are required to specify this attribute.{`bool`}{`false`}
## See Also diff --git a/mintlify-docs/en/modules/e-commerce/using-features-together.mdx b/mintlify-docs/en/modules/e-commerce/using-features-together.mdx index b8fe35b7b0..93eb716ce1 100644 --- a/mintlify-docs/en/modules/e-commerce/using-features-together.mdx +++ b/mintlify-docs/en/modules/e-commerce/using-features-together.mdx @@ -204,11 +204,36 @@ Both features are configured in the same container cluster. The example below sh These parameters are part of the `ecommerce-schema-wiring` config and only apply when the saved search document processor is used together with multi-currency: -| Parameter | Description | Type | Default | -| :--- | :--- | :--- | :--- | -| `multicurrency.enabled` | Enable generation of per-currency price features at feed time. | `bool` | `false` | -| `multicurrency.featurePrefix` | Prefix for the generated predicate range features. A feature is named `{prefix}_{currency}_{market}`. | `string` | `price` | -| `multicurrency.priceScaleFactor` | Integer multiplier applied to converted prices before feeding as predicate range features. Predicate ranges require integer values, so this preserves decimal precision. A factor of 100 preserves two decimal places. | `int` | `100` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionTypeDefault
{`multicurrency.enabled`}Enable generation of per-currency price features at feed time.{`bool`}{`false`}
{`multicurrency.featurePrefix`}Prefix for the generated predicate range features. A feature is named {`{prefix}_{currency}_{market}`}.{`string`}{`price`}
{`multicurrency.priceScaleFactor`}Integer multiplier applied to converted prices before feeding as predicate range features. Predicate ranges require integer values, so this preserves decimal precision. A factor of 100 preserves two decimal places.{`int`}{`100`}
**Note:** The `productFields` config block is shared between both features. When combining, use the same field names in the searcher and document processor configurations. diff --git a/mintlify-docs/en/operations/access-logging.mdx b/mintlify-docs/en/operations/access-logging.mdx index 123ef3b5b1..9ef02a0c37 100644 --- a/mintlify-docs/en/operations/access-logging.mdx +++ b/mintlify-docs/en/operations/access-logging.mdx @@ -8,32 +8,162 @@ The Vespa access log format allows the logs to be processed by a number of avail In the Vespa access log, each log event is logged as a JSON object on a single line. The log format defines a list of fields that can be logged with every request. In addition to these fields, [custom key/value pairs](#logging-key-value-pairs-to-the-json-access-log-from-searchers) can be logged via Searcher code. Pre-defined fields: -| Name | Type | Description | Always present | -| --- | --- | --- | --- | -| ip | string | The IP address request came from | yes | -| time | number | UNIX timestamp with millisecond decimal precision (e.g. 1477828938.123) when request is received | yes | -| duration | number | The duration of the request in seconds with millisecond decimal precision (e.g. 0.123) | yes | -| responsesize | number | The size of the response in bytes | yes | -| code | number | The HTTP status code returned | yes | -| method | string | The HTTP method used (e.g. 'GET') | yes | -| uri | string | The request URI from path and beyond (e.g. '/search?query=test') | yes | -| version | string | The HTTP version (e.g. 'HTTP/1.1') | yes | -| agent | string | The user agent specified in the request | yes | -| host | string | The host header provided in the request | yes | -| scheme | string | The scheme of the request | yes | -| port | number | The IP port number of the interface on which the request was received | yes | -| remoteaddr | string | The IP address of the [remote client](#logging-remote-address-port) if specified in HTTP header | no | -| remoteport | string | The port used from the [remote client](#logging-remote-address-port) if specified in HTTP header | no | -| peeraddr | string | Address of immediate client making request if different from *remoteaddr* | no | -| peerport | string | Port used by immediate client making request if different from *remoteport* | no | -| user-principal | string | The name of the authenticated user (java.security.Principal.getName()) if principal is set | no | -| ssl-principal | string | The name of the x500 principal if client is authenticated through SSL/TLS | no | -| search | object | Object holding search specific fields | no | -| search.totalhits | number | The total number of hits for the query | no | -| search.hits | number | The hits returned in this specific response | no | -| search.coverage | object | Object holding [query coverage information](/en/performance/graceful-degradation) similar to that returned in result set. | no | -| connection | string | Reference to the connection log entry. See [Connection log](#connection-log) | no | -| attributes | object | Object holding [custom key/value pairs](#logging-key-value-pairs-to-the-json-access-log-from-searchers) logged in searcher. | no | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAlways present
ipstringThe IP address request came fromyes
timenumberUNIX timestamp with millisecond decimal precision (e.g. 1477828938.123) when request is receivedyes
durationnumberThe duration of the request in seconds with millisecond decimal precision (e.g. 0.123)yes
responsesizenumberThe size of the response in bytesyes
codenumberThe HTTP status code returnedyes
methodstringThe HTTP method used (e.g. 'GET')yes
uristringThe request URI from path and beyond (e.g. '/search?query=test')yes
versionstringThe HTTP version (e.g. 'HTTP/1.1')yes
agentstringThe user agent specified in the requestyes
hoststringThe host header provided in the requestyes
schemestringThe scheme of the requestyes
portnumberThe IP port number of the interface on which the request was receivedyes
remoteaddrstringThe IP address of the remote client if specified in HTTP headerno
remoteportstringThe port used from the remote client if specified in HTTP headerno
peeraddrstringAddress of immediate client making request if different from *remoteaddr*no
peerportstringPort used by immediate client making request if different from *remoteport*no
user-principalstringThe name of the authenticated user (java.security.Principal.getName()) if principal is setno
ssl-principalstringThe name of the x500 principal if client is authenticated through SSL/TLSno
searchobjectObject holding search specific fieldsno
search.totalhitsnumberThe total number of hits for the queryno
search.hitsnumberThe hits returned in this specific responseno
search.coverageobjectObject holding query coverage information similar to that returned in result set.no
connectionstringReference to the connection log entry. See Connection logno
attributesobjectObject holding custom key/value pairs logged in searcher.no
**Note:** @@ -126,19 +256,84 @@ Here is an example of how the request content appears in the JSON access log: The file name pattern is expanded using the time when the file is created. The following parts in the file name are expanded: -| Field | Format | Meaning | Example | -| --- | --- | --- | --- | -| `%`Y` | YYYY | Year | 2003 | -| `%`m` | MM | Month, numeric | 08 | -| `%`x` | MMM | Month, textual | Aug | -| `%`d` | dd | Date | 25 | -| `%`H` | HH | Hour | 14 | -| `%`M` | mm | Minute | 30 | -| `%`S` | ss | Seconds | 35 | -| `%`s` | SSS | Milliseconds | 123 | -| `%`Z` | Z | Time zone | \-0400 | -| `%`T` | Long | System.currentTimeMillis | 1349333576093 | -| `%`%` `| `%``| Escape percentage | % | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldFormatMeaningExample
{`%`}Y`YYYYYear2003
{`%`}m`MMMonth, numeric08
{`%`}x`MMMMonth, textualAug
{`%`}d`ddDate25
{`%`}H`HHHour14
{`%`}M`mmMinute30
{`%`}S`ssSeconds35
{`%`}s`SSSMilliseconds123
{`%`}Z`ZTime zone-0400
{`%`}T`LongSystem.currentTimeMillis1349333576093
{`%`}%{` `}{`%`}`Escape percentage%
## Log rotation @@ -235,31 +430,156 @@ A pretty print version of the same example: In addition to the access log, one entry per connection is written to the connection log. This entry is written on connection close. Available fields: -| Name | Type | Description | Always present | -| :--- | :--- | :--- | :--- | -| id | string | Unique ID of the connection, referenced from access log. | yes | -| timestamp | number | Timestamp (ISO8601 format) when the connection was opened | yes | -| duration | number | The duration of the request in seconds with millisecond decimal precision (e.g. 0.123) | yes | -| peerAddress | string | IP address used by immediate client making request | yes | -| peerPort | number | Port used by immediate client making request | yes | -| localAddress | string | The local IP address the request was received on | yes | -| localPort | number | The local port the request was received on | yes | -| remoteAddress | string | Original client ip, if proxy protocol enabled | no | -| remotePort | number | Original client port, if proxy protocol enabled | no | -| httpBytesReceived | number | Number of HTTP bytes sent over the connection | no | -| httpBytesSent | number | Number of HTTP bytes received over the connection | no | -| requests | number | Number of requests sent by the client | no | -| responses | number | Number of responses sent to the client | no | -| ssl | object | Detailed information on ssl connection | no | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAlways present
idstringUnique ID of the connection, referenced from access log.yes
timestampnumberTimestamp (ISO8601 format) when the connection was openedyes
durationnumberThe duration of the request in seconds with millisecond decimal precision (e.g. 0.123)yes
peerAddressstringIP address used by immediate client making requestyes
peerPortnumberPort used by immediate client making requestyes
localAddressstringThe local IP address the request was received onyes
localPortnumberThe local port the request was received onyes
remoteAddressstringOriginal client ip, if proxy protocol enabledno
remotePortnumberOriginal client port, if proxy protocol enabledno
httpBytesReceivednumberNumber of HTTP bytes sent over the connectionno
httpBytesSentnumberNumber of HTTP bytes received over the connectionno
requestsnumberNumber of requests sent by the clientno
responsesnumberNumber of responses sent to the clientno
sslobjectDetailed information on ssl connectionno
## SSL information -| Name | Type | Description | Always present | -| :--- | :--- | :--- | :--- | -| clientSubject | string | Client certificate subject | no | -| clientNotBefore | string | Client certificate valid from | no | -| clientNotAfter | string | Client certificate valid to | no | -| sessionId | string | SSL session id | no | -| protocol | string | SSL protocol | no | -| cipherSuite | string | Name of session cipher suite | no | -| sniServerName | string | SNI server name | no | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionAlways present
clientSubjectstringClient certificate subjectno
clientNotBeforestringClient certificate valid fromno
clientNotAfterstringClient certificate valid tono
sessionIdstringSSL session idno
protocolstringSSL protocolno
cipherSuitestringName of session cipher suiteno
sniServerNamestringSNI server nameno
\ No newline at end of file diff --git a/mintlify-docs/en/operations/automated-deployments.mdx b/mintlify-docs/en/operations/automated-deployments.mdx index 30a2e65970..f6b2a3feba 100644 --- a/mintlify-docs/en/operations/automated-deployments.mdx +++ b/mintlify-docs/en/operations/automated-deployments.mdx @@ -3,7 +3,8 @@ title: "Automated Deployments" --- -![Picture of an automated deployment](/assets/img/automated-deployments-overview.png) + ![Picture of an automated + deployment](/assets/img/automated-deployments-overview.png) See [pipeline graph](#pipeline-graph) for details on the visual elements. @@ -17,10 +18,10 @@ This guide goes through details of an orchestrated deployment. Read / try [produ ## CD tests -Before deployment in production zones, [system tests](#system-tests) and [staging tests](#staging-tests) are run. Tests are run in a dedicated and [downsized](/en/operations/environments) environment. These tests are optional, see details in the sections below. Status and logs of ongoing tests can be found in the *Deployment* view in the [Vespa Cloud Console](https://console.vespa-cloud.com/): +Before deployment in production zones, [system tests](#system-tests) and [staging tests](#staging-tests) are run. Tests are run in a dedicated and [downsized](/en/operations/environments) environment. These tests are optional, see details in the sections below. Status and logs of ongoing tests can be found in the _Deployment_ view in the [Vespa Cloud Console](https://console.vespa-cloud.com/): -![Minimal deployment pipeline](/assets/img/deployment-with-system-test.png) + ![Minimal deployment pipeline](/assets/img/deployment-with-system-test.png) These tests are also run during [Vespa Cloud upgrades](#vespa-cloud-upgrades). @@ -42,21 +43,27 @@ Read more about [system tests](/en/applications/testing#system-tests). A staging test verifies the transition of a deployment of a new application package - i.e., from application package `Appold` to `Appnew`. A test suite includes at least one [staging setup](/en/applications/testing#staging-tests), and [staging test](/en/applications/testing#staging-tests). - -All production zone deployments are polled for the current versions. As there can be multiple versions already being deployed (i.e. multiple `Appold`), there can be a series of staging test runs. - - -The application at revision `Appold` is deployed in the [staging environment](/en/operations/environments#staging). - - -The staging setup test code is run, typically making the cluster reasonably similar to a production cluster. - - -The test deployment is then upgraded to application revision `Appnew`. - - -Finally, the staging test code is run, to verify the deployment works as expected after the upgrade. - + + All production zone deployments are polled for the current versions. As + there can be multiple versions already being deployed (i.e. multiple `App + old`), there can be a series of staging test runs. + + + The application at revision `Appold` is deployed in the [staging + environment](/en/operations/environments#staging). + + + The staging setup test code is run, typically making the cluster reasonably + similar to a production cluster. + + + The test deployment is then upgraded to application revision `App + new`. + + + Finally, the staging test code is run, to verify the deployment works as + expected after the upgrade. + An application can be deployed to a production zone without staging tests - this step will then only test that the application starts successfully before and after the change. See [production deployment](/en/reference/applications/deployment) for an example without tests. @@ -67,13 +74,13 @@ Read more about [staging tests](/en/applications/testing#staging-tests). ### Disabling tests -To deploy without testing, remove the test files from the application package. Tests are always run, regardless of *deployment.xml*. +To deploy without testing, remove the test files from the application package. Tests are always run, regardless of _deployment.xml_. To temporarily deploy without testing, run `deploy` and hit the "Abort" button (see illustration above, hover over the test step in the Console) - this skips the test step and makes the orchestration progress to the next step. ### Running tests only -To run a system test, without deploying to any nodes after, add a new test instance. In *deployment.xml*, add the instance without `dev` or`prod` elements, like: +To run a system test, without deploying to any nodes after, add a new test instance. In _deployment.xml_, add the instance without `dev` or`prod` elements, like: ```xml @@ -90,10 +97,11 @@ Make sure to run `vespa prod deploy` to invoke the pipeline for testing, and use ## Deployment orchestration -The *deployment orchestration* is flexible. One can configure dependencies between deployments to production zones, production verification tests, and configured delays; by ordering these in parallel and serial blocks of steps: +The _deployment orchestration_ is flexible. One can configure dependencies between deployments to production zones, production verification tests, and configured delays; by ordering these in parallel and serial blocks of steps: -![Picture of a complex automated deployment](/assets/img/automated-deployments-complex.png) + ![Picture of a complex automated + deployment](/assets/img/automated-deployments-complex.png) ### Pipeline graph @@ -102,25 +110,188 @@ The deployment pipeline is visualized as a graph in the [Vespa Cloud Console](ht #### Node shapes -| Shape | Step type | Description | -| --- | --- | --- | -| | Instance | The application instance. Hover to see target versions, cancel/deploy/pin controls, and block windows. | -| | Test | System test, staging test, or production test. Hover to see run status, versions, and abort/restart actions. | -| | Production deployment | A deployment to a production zone. Hover to see run status, versions, and abort/restart/defer actions. | -| | Delay | A configured delay between steps. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ShapeStep typeDescription
+ Instance + The application instance. Hover to see target versions, + cancel/deploy/pin controls, and block windows. +
+ Test + System test, staging test, or production test. Hover to see run status, + versions, and abort/restart actions. +
+ Production deployment + A deployment to a production zone. Hover to see run status, versions, + and abort/restart/defer actions. +
+ DelayA configured delay between steps.
#### Visual indicators -| Indicator | Meaning | Description | -| --- | --- | --- | -| | Completed | The step has completed successfully on the current version. The color corresponds to the deployed version. | -| | Running | A deployment or test is currently in progress. Shown as an animated gradient between the source and target version colors. | -| | Failed | The last run of this step failed. | -| | Unknown / initial | No version has been deployed to this step yet. | -| | Pending change | A newer version is queued and waiting to be deployed to this step. | -| | Paused / deferred | Deployments to this step are temporarily postponed. | -|
| Application blocked | Application changes are blocked by a [block window](#block-windows). Shown as vertical bars. | -|

| Platform blocked | Platform upgrades are blocked by a [block window](#block-windows). Shown as horizontal bars. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndicatorMeaningDescription
+ Completed + The step has completed successfully on the current version. The color + corresponds to the deployed version. +
+ Running + A deployment or test is currently in progress. Shown as an animated + gradient between the source and target version colors. +
+ FailedThe last run of this step failed.
+ Unknown / initialNo version has been deployed to this step yet.
+ Pending change + A newer version is queued and waiting to be deployed to this step. +
+ Paused / deferredDeployments to this step are temporarily postponed.
+ Application blocked + Application changes are blocked by a{" "} + + block window + + . Shown as vertical bars. +
+ Platform blocked + Platform upgrades are blocked by a{" "} + + block window + + . Shown as horizontal bars. +
Each version deployed through the pipeline is assigned a distinct color. This makes it easy to see at a glance which zones are on the same version and where a rollout is in progress. A thumbtack icon on a node indicates that the version is [pinned](#pinning-versions). @@ -134,16 +305,17 @@ System and staging tests, if present, must always be successfully run before the ### Version progression -The deployment pipeline deploys one revision at a time through the production zones. When a revision is being deployed, it must complete deployment to *all* declared production zones before the next revision begins its production rollout. System and staging tests for newer revisions may run in parallel, but production deployment is serialized. +The deployment pipeline deploys one revision at a time through the production zones. When a revision is being deployed, it must complete deployment to _all_ declared production zones before the next revision begins its production rollout. System and staging tests for newer revisions may run in parallel, but production deployment is serialized. For example, if build 90 is being deployed to the second of two production zones, build 91 will not start deploying to the first zone until build 90 has completed in all zones — even if build 91 has already passed system and staging tests. #### Superseding a version -To override the currently deploying revision and force a newer build through the pipeline, hover over the instance node in the pipeline graph and use the *TARGET VERSIONS* controls. Select the desired build number from the revision dropdown and click **deploy**. This updates the instance's deployment target. Any running production job for the old revision will be aborted, and the pipeline will start deploying the new revision from the first production zone. +To override the currently deploying revision and force a newer build through the pipeline, hover over the instance node in the pipeline graph and use the _TARGET VERSIONS_ controls. Select the desired build number from the revision dropdown and click **deploy**. This updates the instance's deployment target. Any running production job for the old revision will be aborted, and the pipeline will start deploying the new revision from the first production zone. -![Picture of instance hover card with build selector and deploy button](/assets/img/automated-deployment-supersede.png) + ![Picture of instance hover card with build selector and deploy + button](/assets/img/automated-deployment-supersede.png) To cancel the currently deploying revision without selecting a new one, click **cancel**. This lets the pipeline pick the next revision automatically. @@ -152,10 +324,11 @@ To cancel the currently deploying revision without selecting a new one, click ** Pinning locks the pipeline to a specific platform version or application revision, preventing automatic upgrades. This is useful for forcing a downgrade, holding a known-good revision during an incident, or preventing the system from picking up a new platform version. -To pin a version, hover over the instance node in the pipeline graph. Under *TARGET VERSIONS*, select the desired version from the dropdown and click **pin**. A reason is required — enter a description and click **submit pin**. Platform and revision can be pinned independently. +To pin a version, hover over the instance node in the pipeline graph. Under _TARGET VERSIONS_, select the desired version from the dropdown and click **pin**. A reason is required — enter a description and click **submit pin**. Platform and revision can be pinned independently. -![Picture of instance hover card showing pin dialog](/assets/img/automated-deployment-pin.png) + ![Picture of instance hover card showing pin + dialog](/assets/img/automated-deployment-pin.png) While pinned, no newer platform versions or revisions will be deployed for the pinned dimension. The dropdown and deploy button are disabled to prevent accidental changes. To unpin, hover over the instance node and click **unpin**, which allows newer versions to move through the pipeline again. @@ -163,18 +336,17 @@ While pinned, no newer platform versions or revisions will be deployed for the p For example, to roll back to a previous revision: - -Select the older build number from the revision dropdown. - - -Click **pin** and provide a reason (e.g., "rollback due to regression in build 91"). - - -The pipeline will deploy the pinned build to all production zones. - - -Once the issue is resolved, click **unpin** to resume normal deployments. - + Select the older build number from the revision dropdown. + + Click **pin** and provide a reason (e.g., "rollback due to regression in + build 91"). + + + The pipeline will deploy the pinned build to all production zones. + + + Once the issue is resolved, click **unpin** to resume normal deployments. + #### Cooldown after failures @@ -186,7 +358,8 @@ The cooldown applies only when the target versions match those of the failing ru To manually re-trigger a failed deployment and bypass the cooldown, hover over the failed zone node in the pipeline graph and click **restart**. -![Picture of zone hover card showing failed status with restart button](/assets/img/automated-deployment-restart.png) + ![Picture of zone hover card showing failed status with restart + button](/assets/img/automated-deployment-restart.png) #### Pausing deployments to a zone @@ -195,10 +368,11 @@ To temporarily hold off deployments to a specific production zone, hover over th ### Source code repository integration -Each new *submission* is assigned an increasing build number, which can be used to track the roll-out of the new package to the instances and their zones. With the submission, add a source code repository reference for easy integration - this makes it easy to track changes: +Each new _submission_ is assigned an increasing build number, which can be used to track the roll-out of the new package to the instances and their zones. With the submission, add a source code repository reference for easy integration - this makes it easy to track changes: -![Build numbers and source code repository reference](/assets/img/CI-integration.png) + ![Build numbers and source code repository + reference](/assets/img/CI-integration.png) Add the source diff link to the pull request - see example [GitHub Action](https://github.com/vespa-cloud/vespa-documentation-search/blob/main/.github/workflows/deploy-vespa-documentation-search.yaml): @@ -212,9 +386,7 @@ $ vespa prod deploy \ Use block-windows to block deployments during certain windows throughout the week, e.g., avoid rolling out changes during peak hours / during vacations. Hover over the instance (here "default") to find block status - see [block-change](/en/reference/applications/deployment#block-change): - -![Application block window](/assets/img/block-window.png) - +![Application block window](/assets/img/block-window.png) ### Validation overrides @@ -232,7 +404,8 @@ Some configuration changes are potentially destructive / change the application Production tests are optional and configured in [deployment.xml](/en/reference/applications/deployment). A production test is placed after a deployment zone in the pipeline and acts as a gate: if it fails, the rollout stops and subsequent zones will not receive the new version. This is useful in multi-zone deployments where the first zone serves as a canary. Production tests run against the endpoints of the preceding production region in the pipeline. -![Picture of production test hover card with version or build tested](/assets/img/automated-deployment-production-test.png) + ![Picture of production test hover card with version or build + tested](/assets/img/automated-deployment-production-test.png) ### Deploying Components @@ -309,21 +482,29 @@ System tests are run the same way as for deploying a new application package. A staging test verifies the upgrade from application package `Appold` to `Appnew`, and from Vespa platform version `Vold` to `Vnew`. The staging test then consists of the following steps: - -All production zone deployments are polled for the current `Vold` / `Appold` versions. As there can be multiple versions already being deployed (i.e. multiple `Vold` / `Appold`), there can be a series of staging test runs. - - -The application at revision `Appold` is deployed on platform version `Vold`, to a zone in the [staging environment](/en/operations/environments#staging). - - -The *staging setup* test code is run, typically making the cluster reasonably similar to a production cluster. - - -The test deployment is then upgraded to application revision `Appnew` and platform version `Vnew`. - - -Finally, the *staging test* test code is run, to verify the deployment works as expected after the upgrade. - + + All production zone deployments are polled for the current `Vold` + / `Appold` versions. As there can be multiple versions already + being deployed (i.e. multiple `Vold` / `Appold`), + there can be a series of staging test runs. + + + The application at revision `Appold` is deployed on platform + version `Vold`, to a zone in the [staging + environment](/en/operations/environments#staging). + + + The *staging setup* test code is run, typically making the cluster + reasonably similar to a production cluster. + + + The test deployment is then upgraded to application revision `App + new` and platform version `Vnew`. + + + Finally, the *staging test* test code is run, to verify the deployment works + as expected after the upgrade. + Note that one or both of the application revision and platform may be upgraded during the staging test, depending on what upgrade scenario the test is run to verify. @@ -343,4 +524,4 @@ With the default `simultaneous` strategy, a new revision will not be held back b - Read more about [feature switches and bucket tests](/en/applications/testing#feature-switches-and-bucket-tests). - A challenge with continuous deployment can be integration testing across multiple services: Another service depends on this Vespa application for its own integration testing. Use a separate [application instance](/en/reference/applications/deployment#instance) for such integration testing. - Set up a deployment badge - available from the console's deployment view - example: ![vespa-team.vespacloud-docsearch.default overview](https://api-ctl.vespa-cloud.com/badge/v1/vespa-team/vespacloud-docsearch/default) -- Set up a [global query endpoint](/en/reference/applications/deployment#endpoints-global). \ No newline at end of file +- Set up a [global query endpoint](/en/reference/applications/deployment#endpoints-global). diff --git a/mintlify-docs/en/operations/autoscaling.mdx b/mintlify-docs/en/operations/autoscaling.mdx index e06533e2ac..22e0b82791 100644 --- a/mintlify-docs/en/operations/autoscaling.mdx +++ b/mintlify-docs/en/operations/autoscaling.mdx @@ -52,25 +52,37 @@ The best solution for this case is to slow down the batch job, as it is of short ## Examples -Below is an example of node resources with autoscaling that would work well for a container cluster: +The examples below show recommended starting points per cluster type. As a rule of thumb, container clusters can autoscale on any dimension, while content clusters work best with fixed node resources and a range on the number of nodes or groups. + +### Container clusters + +Container clusters are stateless, so nodes can be added, removed or replaced quickly, and no data needs to move. Scaling the number of nodes is the simplest option and a good starting point: ```xml - + ``` -The above would in general **not be recommended for a content cluster.** Changing cpu, memory or disk usually leads to allocating new nodes to fulfil the new node resources spec. When that happens there will be redistribution of documents between the old and new nodes and this might impact service quality to some degree. For a content cluster it would usually be better to try to stick to the same node resources and add or remove nodes, e.g something like: +You can also let autoscaling choose the node resources within ranges. Changing node resources usually means replacing nodes, but for a container cluster this causes little overhead: ```xml - + ``` -If a content cluster is configured to autoscale based on node resources (not just number of nodes or groups) this will work fine, but note that using paged attributes or HNSW indexes will make it more expensive and time-consuming to redistribute documents when scaling up or down. When doing the initial feeding of a cluster it will be best to avoid auto-scaling, as changing the topology will require redistribution of documents, possibly several times. +### Content clusters -When using groups in a content cluster it's possible to scale the number of groups instead of the number of nodes, e.g. with a fixed group size and a range for the number of groups: +Content clusters hold data, so scaling them means redistributing documents. Changing vcpu, memory or disk usually leads to allocating new nodes to fulfil the new node resource spec, replacing all nodes in the cluster and redistributing all documents. Keep node resources fixed and autoscale the number of nodes instead - then only the data on added or removed nodes has to move: + +```xml + + + +``` + +For content clusters using [groups](/en/reference/applications/services/services#nodes), express the topology with `groups` and `group-size` rather than a `count` range, and autoscale the number of groups: ```xml @@ -78,6 +90,34 @@ When using groups in a content cluster it's possible to scale the number of grou ``` +This scales between 2 and 4 groups of 8 nodes each, 16 to 32 nodes in total. Since each query is handled by a single group, query capacity scales with the number of groups, and adding a group populates the new group without redistributing documents between the existing nodes. + + +**Important:** + +Autoscaling node resources (vcpu, memory, disk) in a content cluster is supported, but each resource change replaces all nodes and redistributes all documents, which might impact service quality to some degree. Using [paged attributes](/en/content/attributes#paged-attributes) or HNSW indexes makes redistribution more expensive and time-consuming. + + + +**Note:** + +Avoid autoscaling during the initial feeding of a cluster, as changing the topology will require redistribution of documents, possibly several times - see [initial batch feed](/en/writing/initial-batch-feed). + + +### Avoid ranges on every dimension + +For completeness, this is a configuration to avoid, in particular for content clusters: + +```xml + + + +``` + +As node resources often come in increments of x2, these ranges span 7 node counts x 3 vcpu x 3 memory x 3 disk steps - around 190 configurations the autoscaler can choose between. For a content cluster, every move between configurations with different node resources replaces all nodes and redistributes all documents. Wide ranges on many dimensions mostly give the autoscaler more expensive ways to reach the same utilization - prefer scaling a single dimension, and see [resource tradeoffs](#resource-tradeoffs). + +### GPU resources + Note that at the moment it is not possible to autoscale GPU resources per node, but you can scale the number of nodes with GPUs: ```xml @@ -88,6 +128,12 @@ Note that at the moment it is not possible to autoscale GPU resources per node,
``` +### Notes + +- Autoscaling requires a cluster of at least two nodes - single-node clusters are not autoscaled. +- Ranges only take effect in production zones. The [dev environment](/en/operations/environments#dev) ignores `nodes` and `resources` settings by default. +- Set the lower bound of a range close to your normal baseline load - a very wide range lets the autoscaler shed many nodes in quiet periods, making the swing back on the next load peak larger and slower. + ## Related reading diff --git a/mintlify-docs/en/operations/az.mdx b/mintlify-docs/en/operations/az.mdx new file mode 100644 index 0000000000..eae6995961 --- /dev/null +++ b/mintlify-docs/en/operations/az.mdx @@ -0,0 +1,38 @@ +--- +title: "Availability zones" +--- + +A traditional zone in Vespa Cloud is tied to a single availability zone (AZ). Deploying to such a single-AZ zone results in the application running in that AZ. + +Vespa Cloud also has zones like `prod.aws-us-east-1` that support multiple availability zones, aka *multi-AZ* zones. You can see how many and exactly which availability zones a zone supports in [zones](/en/operations/zones). To deploy to a multi-AZ zone, you *must* specify a list of availability zones, using the `` elements in the `` element, see [deployment.xml](/en/reference/applications/deployment#availability-zone). + + +![Single-AZ zone with container and content cluster](/assets/img/az-single-cluster.svg) + + + +![Multi-AZ zone with clusters spread across two availability zones](/assets/img/az-multi-cluster.svg) + + +It is an error to deploy to a multi-AZ zone and not specifying at least one AZ. If you specify exactly one AZ, it is identical to deploying to a traditional zone tied to that AZ. + +Specifying more than one AZ means your application instance will spread evenly across those AZ. This means the number of nodes in each cluster must be a multiple of the number of AZs. For content clusters, the number of groups must also be a multiple of the number of AZs. + +For example, let's say an application instance has been configured in deployment.xml with 2 availability zones `use1-az1` and `use1-az2`, and a content cluster in services.xml specifies 4 groups and a total of 12 nodes. Each group contains 3 nodes. This means 2 groups will be placed in `use1-az1`, and 2 groups will be placed in `use1-az2`. + + +![Content cluster with 4 groups in a single AZ](/assets/img/az-single-content.svg) + + + +![Content cluster with 4 groups spread across two AZs](/assets/img/az-multi-content.svg) + + +## Benefits to multi-AZ applications + +Deploying a single application instance to multiple availability zones, instead of deploying multiple application instances to each of those availability zones, has several benefits: + +1. A single load balancer spanning backends across AZs is more reliable than a DNS-based global endpoint wrapping the zonal endpoints. +2. Document embedding is cheaper, as it needs to be done once instead of once per AZ. +3. Feeding to a single endpoint is simpler and more robust than feeding to one endpoint for each AZ. For instance, if an entire AZ goes down, then feeding to a multi-AZ application instance still works. And once the AZ comes back online, the nodes in that AZ will automatically have their documents updated from the nodes in the other AZs. +4. Deploying two instances of the same application to two AZs in the same region, with `redundancy=1`, is prone to data loss. Instead, one application instance can be deployed to those two AZs. diff --git a/mintlify-docs/en/operations/data-management.mdx b/mintlify-docs/en/operations/data-management.mdx index 5fd23b3bdf..714d0247e8 100644 --- a/mintlify-docs/en/operations/data-management.mdx +++ b/mintlify-docs/en/operations/data-management.mdx @@ -17,6 +17,8 @@ Depending on [plan](https://vespa.ai/pricing/), content clusters are automatical ``` +The first backup of a cluster is not created immediately when backups are enabled. A cluster becomes eligible for its first backup only once a content node has been running for at least one full backup interval — for example, 7 days for a `7d` frequency, measured from when the node was first allocated. Subsequent backups then follow at the configured frequency. Backup eligibility is evaluated approximately once per hour, so the first backup may appear up to an hour after the cluster becomes eligible. + Backups are retained for three backup intervals (e.g. 21 days for a 7-day frequency). The most recent fully completed backup is always retained regardless of age. See [Restore from Backup](#restore) for how to request a restore. If you prefer to manage backups yourself, documents can be exported manually using `vespa visit` as shown in the [Google Cloud Function example](https://github.com/vespa-engine/sample-apps/tree/master/examples/google-cloud/cloud-functions#backup---experimental). diff --git a/mintlify-docs/en/operations/environments.mdx b/mintlify-docs/en/operations/environments.mdx index aedc8e9423..25b758ad70 100644 --- a/mintlify-docs/en/operations/environments.mdx +++ b/mintlify-docs/en/operations/environments.mdx @@ -77,9 +77,39 @@ See system tests above, this applies to the staging, too. [Staging tests](/en/op Environment settings: -| Name | Description | Expiry | Cluster sizes | -| :--- | :--- | :--- | :--- | -| `dev` | Used for manual development testing. | 14 days | `1` | -| `test` | Used for [automated system tests](/en/applications/testing#system-tests). | \- | `1` | -| `staging` | Used for [automated staging tests](/en/applications/testing#staging-tests). | \- | `min(max(2, 0.05 * spec), spec)` | -| `prod` | Hosts all production deployments. | No expiry | `max(2, spec)` | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionExpiryCluster sizes
{`dev`}Used for manual development testing.14 days{`1`}
{`test`}Used for automated system tests.-{`1`}
{`staging`}Used for automated staging tests.-{`min(max(2, 0.05 * spec), spec)`}
{`prod`}Hosts all production deployments.No expiry{`max(2, spec)`}
\ No newline at end of file diff --git a/mintlify-docs/en/operations/kubernetes/custom-overrides-podtemplate.mdx b/mintlify-docs/en/operations/kubernetes/custom-overrides-podtemplate.mdx index 37407f0fab..b14ba05823 100644 --- a/mintlify-docs/en/operations/kubernetes/custom-overrides-podtemplate.mdx +++ b/mintlify-docs/en/operations/kubernetes/custom-overrides-podtemplate.mdx @@ -1,102 +1,219 @@ --- -title: "Provide Custom Overrides" -description: "While services.xml defines the Vespa application specification, it abstracts away the underlying Kubernetes infrastructure. Advanced users often need to configure Kubernetes-specific settings for the Vespa application Pods to integrate Vespa within their broader platform ecosystem." +title: "Configure Custom Overrides" +description: "While services.xml defines the Vespa application specification, it abstracts away the underlying Kubernetes infrastructure. Advanced users often need to configure Kubernetes-specific settings for Vespa Pods to integrate Vespa within their broader platform ecosystem." --- -The Pod Template mechanism allows you to inject custom configurations into the Vespa application pods created by the ConfigServer. - -Common use cases for overriding the default pod configuration include: +The VespaSet supports three override targets — ConfigServer, profiles (container and content clusters), and ClusterControllers — each with a typed merge policy that controls which fields may be added or modified. All overrides accept a standard Kubernetes [PodTemplateSpec](https://kubernetes.io/docs/reference/kubernetes-api/core/pod-template-v1/#PodTemplateSpec). + +The `vespa` container is the main container in every Pod type. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldConfigServerContainerContentClusterControllers
{`labels`}
{`annotations`}
{`volumes`}
{`nodeSelector`}
{`imagePullSecrets`}
{`tolerations`}
{`podAffinity`}
{`podAntiAffinity`}
{`nodeAffinity`}
{`containers[vespa].env`}
{`containers[vespa].volumeMounts`}
{`containers[vespa].resources`}
{`containers[]`}
+ +Any overlay field marked ❌ is explicitly rejected at admission time. + +Overrides to the `containers[vespa]` are intentionally restricted to prevent corruption of operator-managed configuration. On application Pods (container, content, ClusterControllers), setting these fields is rejected to protect the integrity of the running Vespa process and prevent conflicts with `services.xml`. + +## ConfigServer Overrides + +ConfigServer overrides are defined under `spec.configServer.podTemplate` in the `VespaSet` resource. The override policy explicitly allows adding volume mounts and overriding CPU and memory resources on the main `vespa` container. + +### Example: spreading ConfigServer Pods across hosts + +A production Vespa cluster typically runs three ConfigServer Pods. To guarantee that no two ConfigServer Pods share the same Kubernetes node — and therefore survive a single-node failure — add a `podAntiAffinity` rule with `topologyKey: kubernetes.io/hostname`. + +```yaml +apiVersion: k8s.ai.vespa/v1 +kind: VespaSet +metadata: + name: my-vespa-cluster +spec: + configServer: + podTemplate: + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/component: configserver + topologyKey: kubernetes.io/hostname +``` -- **Sidecar Injection**: Running auxiliary containers alongside Vespa for logging (e.g., Fluent Bit), monitoring (e.g., Datadog, Prometheus exporters), or service mesh proxies (e.g., Envoy, Istio). -- **Scheduling Constraints**: Using nodeSelector, affinity, or tolerations to pin Vespa pods to specific hardware (e.g., high-memory nodes, specific availability zones) or isolate them from other workloads. -- **Metadata Management**: Adding custom Labels or Annotations for cost allocation, team ownership, or integration with external inventory tools. -- **Security & Config**: Mounting Kubernetes Secrets or ConfigMaps that contain credentials or environment configurations required by custom sidecars. +The VespaSet appends this anti-affinity term to the base template rather than replacing it, so any operator-managed affinity rules remain in effect. -## Configure Custom Overrides +## Profile Overrides -Overrides are defined in the `VespaSet` Custom Resource under `spec.application.podTemplate` and `spec.configServer.podTemplate`. This field accepts a standard Kubernetes PodTemplateSpec. +Profile overrides allow different Pod configurations for different cluster types within the same `VespaSet`. A profile maps a `id` as defined in `services.xml` to an `PodTemplateSpec` overlay. This mapping can be set for an arbitrary number of Vespa Clusters. -The Operator and ConfigServer treat this template as an overlay. When creating a ConfigServer or Application Pod, the base template of the main `vespa` container is merged with your custom overlay. +### Example: routing clusters to dedicated node pools -Vespa on Kubernetes enforces a `Add-Only` merge strategy. One cannot remove or downgrade core `vespa` container settings, but only augment them. +A common pattern is to isolate each Vespa cluster type on its own node pool — container nodes for stateless query processing and content nodes for storage and search. The following example uses `nodeSelector` in each profile. -| Category | Allowed Actions | Restricted Actions | -| --- | --- | --- | -| **Containers** | • Add new sidecar containers.
• Add env vars/mounts to main container. | • Cannot change main container image, command, or args.
• Cannot override main container CPU/Memory resources (these are locked to `services.xml`). | -| **Volumes** | • Add new Volumes (ConfigMap, Secret, EmptyDir). | • Cannot modify operator-reserved volumes (e.g., `/data`). | -| **Metadata** | • Add new Labels and Annotations. | • Cannot overwrite operator-created labels and annotations | +In `services.xml`, declare a profile on each cluster: -## Examples +```xml + + + -### Example 1: Injecting a Logging Sidecar + + + +``` -This example adds a Fluent Bit sidecar to ship logs to a central system. It defines the sidecar container and mounts a shared volume that the Vespa container also writes to. +In the `VespaSet`, define a profile for each name: -```bash +```yaml apiVersion: k8s.ai.vespa/v1 kind: VespaSet metadata: name: my-vespa-cluster spec: - application: - image: vespaengine/vespa:8.200.15 - # Define the Custom Overlay - podTemplate: - spec: - containers: - # 1. Define the Sidecar - - name: fluent-bit - image: fluent/fluent-bit:1.9 - volumeMounts: - - name: vespa-logs - mountPath: /opt/vespa/logs/vespa - # 2. Define the Shared Volume - volumes: - - name: vespa-logs - emptyDir: {} + profiles: + default: + podTemplate: + spec: + nodeSelector: + node-pool: vespa-container + music: + podTemplate: + spec: + nodeSelector: + node-pool: vespa-content ``` -### Example 2: Pinning Pods to Specific Nodes +The VespaSet resolves the profile for each cluster at reconciliation time and overlays the corresponding `podTemplate` onto the base `PodSpec`. Pods belonging to clusters with no matching profile entry receive no overlay. -This example uses a nodeSelector to ensure Vespa pods only run on nodes labeled with workload=high-performance. +## ClusterController Overrides -```bash -apiVersion: k8s.ai.vespa/v1 -kind: VespaSet -metadata: - name: prod-vespa -spec: - application: - podTemplate: - spec: - # Schedule only on nodes with label 'workload: high-performance' - nodeSelector: - workload: high-performance - # Tolerate the 'dedicated' taint if those nodes are tainted - tolerations: - - key: "dedicated" - operator: "Equal" - value: "search-team" - effect: "NoSchedule" -``` - -### Example 3: Adding Cost Allocation Labels +`clusterControllers` is a reserved profile name. The VespaSet automatically applies this profile to all cluster-controller Pods. If no `clusterControllers` profile is defined, cluster-controller Pods receive no overlay. -This example adds custom labels that will appear on every tenant pod, enabling cost tracking by team. +### Example: pinning cluster-controller Pods to a dedicated admin node pool -```bash +```yaml apiVersion: k8s.ai.vespa/v1 kind: VespaSet metadata: - name: shared-vespa + name: my-vespa-cluster spec: - application: - podTemplate: - metadata: - labels: - cost-center: "engineering-search" - owner: "team-alpha" - annotations: - # Example annotation for an external monitoring system - monitoring.datadoghq.com/enabled: "true" -``` \ No newline at end of file + profiles: + clusterControllers: + podTemplate: + spec: + nodeSelector: + node-pool: vespa-admin +``` + +## Reconciliation + +When a `VespaSet` is updated, the VespaSet evaluates the delta between the current and desired `PodTemplateSpec` for each Pod and determines the minimum action required. Changes that do not affect scheduling — such as a label update — only require the Pod to be recreated, leaving its Persistent Volume intact. Changes to scheduling constraints — such as `nodeSelector` or affinity rules — require both the Pod and its Persistent Volume to be recreated, so that the Pod can be placed on a new node and its data redistributed accordingly. + +Redistributing data across content nodes after a Pod and Volume recreation may take time, depending on the size of the dataset. + +When multiple fields change simultaneously, the most disruptive action takes precedence: if any change requires a Pod and Volume recreation, that action is applied regardless of whether other changes would have required only a Pod restart. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldRecreate PodRecreate Pod and volume
{`labels`}
{`annotations`}
{`nodeSelector`}
{`nodeAffinity`}
{`podAffinity`}
{`podAntiAffinity`}
{`tolerations`}
+ +This set is representative. If a spec is not listed on the table, then automatic reconciliation will not take effect. In this case, you should manually delete the Pod and allow the Operator to recreate it. diff --git a/mintlify-docs/en/operations/kubernetes/deployment/dev-mode.mdx b/mintlify-docs/en/operations/kubernetes/deployment/dev-mode.mdx deleted file mode 100644 index 51258904fa..0000000000 --- a/mintlify-docs/en/operations/kubernetes/deployment/dev-mode.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "Setup Dev Environment" ---- - -The steps to enable the `dev` environment for Vespa on Kubernetes are described in this guide. This is a one-time irreversible operation. Once a `VespaSet` has been deployed in the `dev` environment configuration, it cannot be reserved. - - -**Important:** - -The `dev` environment is intended for local development, integration testing, and experimentation — not for production serving. - - -## Dev Environment - -Contrary to Vespa Cloud, the `dev` environment must additionally be configured at the `VespaSet` resource level. Once this is enabled, any Vespa Cluster that is reconciled through this `VespaSet` will have a `min-availability` in their `contenet` cluster and `node` count of 1 for all cluster types. - -As such, HA (high-availability) of Vespa Pods is not guaranteed, and availability will be reduced during upgrades. The only exception is the ConfigServer Pods, which must always maintain a replica count of 3 to ensure a quorum. - -For more information on Environments, refer to the [Vespa Cloud](/en/operations/environments#dev) documentation. - -## Enable Dev Environment - -The `dev` environment is activated by adding the following annotation to the `VespaSet` resource: - -| Annotation | Value | Effect | -| --- | --- | --- | -| `internal.vespa.ai/environment` | `dev` | Signals to the ConfigServer that this is a `dev` environment. | - -```bash -$ cat > vespaset-dev.yaml < - - - - - - - - - - - - - 1 - - - - - - - - - -``` \ No newline at end of file diff --git a/mintlify-docs/en/operations/kubernetes/deployment/ecr-pull-through-cache.mdx b/mintlify-docs/en/operations/kubernetes/deployment/ecr-pull-through-cache.mdx deleted file mode 100644 index 3078ce8253..0000000000 --- a/mintlify-docs/en/operations/kubernetes/deployment/ecr-pull-through-cache.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "Setup Amazon ECR Pull-Through Cache" -sidebarTitle: "Setup ECR Pull-through Cache" ---- - -For production, we recommend mirroring the upstream artifacts into your own registry. This section shows how to create an [Amazon ECR pull-through cache](https://docs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache.html) for the images referenced in the [Installation](/en/operations/kubernetes/deployment/installation) guide. - -## AWS Console Steps - - - -Open AWS Console -> **Amazon ECR** -> **Private registry** -> **Pull through cache rules**. - - -Choose **Create rule**. - - -Set **ECR repository prefix** to `vespa-cache`. - - -Set **Upstream registry URL** to `images.ves.pa`. - - -Create or select a Secrets Manager credential with your support-provided upstream username/token. - - -Create the rule, then optionally pull one tag of each artifact to warm the cache. - - - -## AWS CLI Steps - -Set the AWS account, region, and ECR registry variables, along with the upstream credentials provided by Vespa support. - -```js -export AWS_ACCOUNT_ID=123456789012 -export AWS_REGION=us-east-1 -export ECR_REGISTRY=${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com -export ECR_CACHE_PREFIX=vespa-cache - -export VESPAAI_REGISTRY_USER= -export VESPAAI_REGISTRY_TOKEN= -``` - -Create a Secrets Manager secret to store the upstream registry credentials. - -```bash -aws secretsmanager create-secret \ - --name vespa-registry-creds \ - --secret-string "{\"username\":\"${VESPAAI_REGISTRY_USER}\",\"password\":\"${VESPAAI_REGISTRY_TOKEN}\"}" \ - --region ${AWS_REGION} || \ -aws secretsmanager put-secret-value \ - --secret-id vespa-registry-creds \ - --secret-string "{\"username\":\"${VESPAAI_REGISTRY_USER}\",\"password\":\"${VESPAAI_REGISTRY_TOKEN}\"}" \ - --region ${AWS_REGION} -``` - -Create the pull-through cache rule. A single rule covers all repositories under the `images.ves.pa` host. - -```bash -aws ecr create-pull-through-cache-rule \ - --ecr-repository-prefix ${ECR_CACHE_PREFIX} \ - --upstream-registry-url images.ves.pa \ - --credential-arn arn:aws:secretsmanager:${AWS_REGION}:${AWS_ACCOUNT_ID}:secret:vespa-registry-creds \ - --region ${AWS_REGION} -``` - -Authenticate your local tooling to the ECR registry. - -```bash -aws ecr get-login-password --region ${AWS_REGION} | \ - docker login --username AWS --password-stdin ${ECR_REGISTRY} -aws ecr get-login-password --region ${AWS_REGION} | \ - helm registry login --username AWS --password-stdin ${ECR_REGISTRY} -``` - -Warm the cache by pulling the Vespa images and the Helm chart artifact. - -```bash -podman pull ${ECR_REGISTRY}/${ECR_CACHE_PREFIX}/kubernetes/vespa:${VESPA_VERSION} -podman pull ${ECR_REGISTRY}/${ECR_CACHE_PREFIX}/kubernetes/operator:${VESPA_VERSION} -helm pull oci://${ECR_REGISTRY}/${ECR_CACHE_PREFIX}/helm/vespa-operator --version ${VESPA_VERSION} -``` - -Point the installation variables to ECR. - -```bash -export VESPA_IMAGE=${ECR_REGISTRY}/${ECR_CACHE_PREFIX}/kubernetes/vespa -export VESPA_OPERATOR_IMAGE=${ECR_REGISTRY}/${ECR_CACHE_PREFIX}/kubernetes/operator -export HELM_CHART_REF=oci://${ECR_REGISTRY}/${ECR_CACHE_PREFIX}/helm/vespa-operator -``` \ No newline at end of file diff --git a/mintlify-docs/en/operations/kubernetes/deployment/installation.mdx b/mintlify-docs/en/operations/kubernetes/deployment/installation.mdx index 7551a4d5c3..44f45c1e81 100644 --- a/mintlify-docs/en/operations/kubernetes/deployment/installation.mdx +++ b/mintlify-docs/en/operations/kubernetes/deployment/installation.mdx @@ -14,7 +14,7 @@ The following tools are required for a smooth deployment.
-These instructions assume that your `kubeconfig` is pointing to an active Kubernetes cluster. Refer to the [Getting Started](https://kubernetes.io/docs/setup/) guide to create a Kubernetes cluster. For instructions on deploying Vespa locally on MiniKube, refer to the [Deploy Vespa Locally](/en/reference/applications/deployment) guide. +These instructions assume that your `kubeconfig` is pointing to an active Kubernetes cluster. Refer to the [Getting Started](https://kubernetes.io/docs/setup/) guide to create a Kubernetes cluster. Vespa on Kubernetes uses a [Custom Resource Definition](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) (CRD) called a `VespaSet`. Users intending to manage the CRD definition by themselves should apply it to the cluster before installation. @@ -61,8 +61,6 @@ Ensure that the `Deployment` resource was successfully created, and that the `Ve ## Deploy a VespaSet -To set up a `dev` environment in Vespa on Kubernetes, refer to the example on the [Setup Dev Environment](/en/operations/kubernetes/deployment/dev-mode) page. - A `VespaSet` is a quorum of [ConfigServer](/en/operations/self-managed/configuration-server) Pods that manage the lifecycle of Vespa applications. Several examples of `VespaSet` resources are provided in the Helm Chart `samples` directory. An example of a `VespaSet` for an archetypical [Amazon Elastic Kubernetes Service](https://aws.amazon.com/eks/) (EKS) setup is shown below. ```bash diff --git a/mintlify-docs/en/operations/kubernetes/deployment/local-deployment.mdx b/mintlify-docs/en/operations/kubernetes/deployment/local-deployment.mdx deleted file mode 100644 index 74b0af925d..0000000000 --- a/mintlify-docs/en/operations/kubernetes/deployment/local-deployment.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: "Deploy Vespa Locally" -description: "Vespa on Kubernetes can be deployed locally using MiniKube for development and experimental use-cases." -sidebarTitle: "Minikube Setup" ---- - - -**Note:** - -This setup is not recommended for production. - - -Initialize a Minikube cluster with 8 nodes, each with 4GiB of memory and 2 CPUs. Enable Minikube's image registry add-on to allow the Minikube nodes to access the Vespa images. In this example, we use `podman` as the driver. - -```bash -minikube start --nodes 8 --cpus 2 --memory 4GiB --driver=podman --insecure-registry="192.168.49.0/24" -minikube addons enable registry -``` - -Cache the images provided by our support team into the MiniKube registry. - -```bash -echo $VESPAAI_REGISTRY_TOKEN | podman login images.ves.pa \ - -u "$VESPAAI_REGISTRY_USER" \ - --password-stdin - -podman pull images.ves.pa/kubernetes/vespa:$VESPA_VERSION -podman pull images.ves.pa/kubernetes/operator:$VESPA_VERSION -``` - -Then, push the images to the MiniKube registry. The images will then be accessible from `$(minikube ip):5000`. - -```bash -export MINIKUBE_REGISTRY=$(minikube ip) - -podman tag kubernetes/vespa:$VESPA_VERSION $MINIKUBE_REGISTRY:5000/localhost/kubernetes/vespa:$VESPA_VERSION -podman push --tls-verify=false $MINIKUBE_REGISTRY:5000/localhost/kubernetes/vespa:$VESPA_VERSION - -podman tag kubernetes/operator:$VESPA_VERSION $MINIKUBE_REGISTRY:5000/localhost/kubernetes/operator:$VESPA_VERSION -podman push --tls-verify=false $MINIKUBE_REGISTRY:5000/localhost/kubernetes/operator:$VESPA_VERSION -``` - -We will now use the following environment variables for the rest of the guide to refer to the images. - -```bash -export VESPA_IMAGE=$MINIKUBE_REGISTRY:5000/localhost/kubernetes/vespa -export VESPA_OPERATOR_IMAGE=$MINIKUBE_REGISTRY:5000/localhost/kubernetes/operator -``` - -Then, install the [Local Persistent Volume](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) Helm Chart. This will allow provisioning Persistent Volumes locally, which is required to run Vespa on Kubernetes. Helm will automatically create a StorageClass called `local-storage`, which should be used as the `StorageClass` for subsequent steps. - -```bash -$ git clone git@github.com:kubernetes-sigs/sig-storage-local-static-provisioner.git - -# Install the Helm Chart onto the cluster globally -$ cd sig-storage-local-static-provisioner -$ helm install -f helm/examples/baremetal-default-storage.yaml local-volume-provisioner --namespace kube-system ./helm/provisioner -``` - -Create several usable volumes on each MiniKube Node. We recommend at least 4 per node for a smooth deployment. - -```bash -# Create several volumes on each Minikube node. -$ for n in minikube minikube-m02 minikube-m03 minikube-m04 minikube-m05 minikube-m06 minikube-m07 minikube-m08; do - echo "==> $n" - minikube ssh -n "$n" -- ' - set -e - for i in 1 2 3 4; do - sudo mkdir -p /mnt/disks/vol$i - if ! mountpoint -q /mnt/disks/vol$i; then - sudo mount --bind /mnt/disks/vol$i /mnt/disks/vol$i - fi - done - echo "Mounted:" - mount | grep -E "/mnt/disks/vol[1-4]" || true - ' -done -``` - -Once the images are available in the MiniKube registry, proceed to the [Installation](/en/operations/kubernetes/deployment/installation) guide, using `local-storage` as the `storageClass` and `NONE` as the `endpointType`. \ No newline at end of file diff --git a/mintlify-docs/en/operations/kubernetes/deployment/permissions.mdx b/mintlify-docs/en/operations/kubernetes/deployment/permissions.mdx index 9ef3c15183..bff9bcfcb5 100644 --- a/mintlify-docs/en/operations/kubernetes/deployment/permissions.mdx +++ b/mintlify-docs/en/operations/kubernetes/deployment/permissions.mdx @@ -4,17 +4,61 @@ title: "Permissions" The Vespa Operator requires the following permissions within the namespace. These permissions are listed by Kubernetes [API verbs](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) per resource. -| Kubernetes Resource | Required Permissions | -| --- | --- | -| CustomResourceDefinitions | create, get, list, watch | -| VespaSet | get, list, watch, create, update, patch, delete | -| VespaSet Subresources | `vespasets/status`: update, patch `vespasets/finalizers`: update | -| ConfigMaps | get, list, watch, create, update, patch, delete | -| Services | get, list, watch, create, update, patch, delete | -| Pods | get, list, watch, create, update, patch, delete | -| Pod Execution | get, create | -| Events | create, patch | -| PersistentVolumeClaims | get, list, watch, create, update, patch, delete | -| ServiceAccounts | get, list, watch, create, update, patch, delete | -| Roles | get, list, watch, create, update, patch, delete | -| RoleBindings | get, list, watch, create, update, patch, delete | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Kubernetes ResourceRequired Permissions
CustomResourceDefinitionscreate, get, list, watch
VespaSetget, list, watch, create, update, patch, delete
VespaSet Subresources{`vespasets/status`}: update, patch {`vespasets/finalizers`}: update
ConfigMapsget, list, watch, create, update, patch, delete
Servicesget, list, watch, create, update, patch, delete
Podsget, list, watch, create, update, patch, delete
Pod Executionget, create
Eventscreate, patch
PersistentVolumeClaimsget, list, watch, create, update, patch, delete
ServiceAccountsget, list, watch, create, update, patch, delete
Rolesget, list, watch, create, update, patch, delete
RoleBindingsget, list, watch, create, update, patch, delete
\ No newline at end of file diff --git a/mintlify-docs/en/operations/kubernetes/ingress.mdx b/mintlify-docs/en/operations/kubernetes/ingress.mdx index 50b58e5cc6..cd5fabfdb4 100644 --- a/mintlify-docs/en/operations/kubernetes/ingress.mdx +++ b/mintlify-docs/en/operations/kubernetes/ingress.mdx @@ -10,12 +10,37 @@ Load balancers are provisioned exclusively for Container clusters. Content clust The operator supports four endpoint types to cover different infrastructure requirements. -| Endpoint Type | Kubernetes Service Type | Use Case | -| --- | --- | --- | -| `LOAD_BALANCER` | `LoadBalancer` | Provision the cloud-native (AWS, GCP, Azure) load-balancer. | -| `NODE_PORT` | `NodePort` | Expose a static port across every worker node, allowing external traffic to access the cluster from any node's IP. | -| `CLUSTER_IP` | `ClusterIP` | Each Container Pod will expose an internal IP address. Should not be used for production use-cases. | -| `NONE` | N/A | An external access layer will not be provisioned. Custom networking setups (Istio, Ingress Controllers) where no automatic service is desired. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Endpoint TypeKubernetes Service TypeUse Case
{`LOAD_BALANCER`}{`LoadBalancer`}Provision the cloud-native (AWS, GCP, Azure) load-balancer.
{`NODE_PORT`}{`NodePort`}Expose a static port across every worker node, allowing external traffic to access the cluster from any node's IP.
{`CLUSTER_IP`}{`ClusterIP`}Each Container Pod will expose an internal IP address. Should not be used for production use-cases.
{`NONE`}N/AAn external access layer will not be provisioned. Custom networking setups (Istio, Ingress Controllers) where no automatic service is desired.
## LOAD_BALANCER diff --git a/mintlify-docs/en/operations/kubernetes/operations/delete-vespaset.mdx b/mintlify-docs/en/operations/kubernetes/operations/delete-vespaset.mdx deleted file mode 100644 index 29ff4d17fb..0000000000 --- a/mintlify-docs/en/operations/kubernetes/operations/delete-vespaset.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "Delete a VespaSet" -sidebarTitle: "Delete a VespaSet" ---- - -This page provides instructions for deleting a VespaSet. - -The ConfigServer and Application Pods use [Kubernetes PreStop Hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) to prevent their immediate removal when evicted voluntarily or deleted involuntarily. In production cases, these finalizers are paramount for ensuring proper data redistribution between the Content Pods. However, they also have the adverse side effect of making Vespa difficult to fully uninstall. - -Follow the steps below to fully uninstall your setup. This example assumes the Pods were created for the [Album Recommendation](https://github.com/vespa-engine/sample-apps/tree/master/album-recommendation) sample application, the Pods are scheduled in the `$NAMESPACE` namespace, and a `VespaSet` called `vespaset-test` was deployed. - - - **Important:** These instructions should not be run on production serving environments. - - -## Steps - -### Delete Pods - -Run `vespa-stop-configserver` on all ConfigServer Pods. This will ensure that any finalizers will exit immediately, since all finalizers ultimately route to a ConfigServer. - -```bash -$ kubectl exec -n $NAMESPACE cfg-1 -- vespa-stop-configserver -$ kubectl exec -n $NAMESPACE cfg-2 -- vespa-stop-configserver -$ kubectl exec -n $NAMESPACE cfg-3 -- vespa-stop-configserver -``` - -Run `vespa-stop-services` on all Application Pods. - -```bash -$ kubectl exec -n $NAMESPACE default-100 -- vespa-stop-services -$ kubectl exec -n $NAMESPACE default-101 -- vespa-stop-services -$ kubectl exec -n $NAMESPACE music-102 -- vespa-stop-services -$ kubectl exec -n $NAMESPACE music-103 -- vespa-stop-services -$ kubectl exec -n $NAMESPACE cluster-controllers-104 -- vespa-stop-services -$ kubectl exec -n $NAMESPACE cluster-controllers-105 -- vespa-stop-services -$ kubectl exec -n $NAMESPACE cluster-controllers-106 -- vespa-stop-services -``` - -Delete all the ConfigServer and Application Pods. The finalizers will exit immediately. - -```bash -$ kubectl delete pod -n $NAMESPACE cfg-1 --grace-period=0 --force --ignore-not-found -$ kubectl delete pod -n $NAMESPACE cfg-2 --grace-period=0 --force --ignore-not-found -$ kubectl delete pod -n $NAMESPACE cfg-3 --grace-period=0 --force --ignore-not-found -$ kubectl delete pod -n $NAMESPACE default-100 --grace-period=0 --force --ignore-not-found -$ kubectl delete pod -n $NAMESPACE default-101 --grace-period=0 --force --ignore-not-found -$ kubectl delete pod -n $NAMESPACE music-102 --grace-period=0 --force --ignore-not-found -$ kubectl delete pod -n $NAMESPACE music-103 --grace-period=0 --force --ignore-not-found -$ kubectl delete pod -n $NAMESPACE cluster-controllers-104 --grace-period=0 --force --ignore-not-found -$ kubectl delete pod -n $NAMESPACE cluster-controllers-105 --grace-period=0 --force --ignore-not-found -$ kubectl delete pod -n $NAMESPACE cluster-controllers-106 --grace-period=0 --force --ignore-not-found -``` - -### Delete Persistent Volume Claims - -Delete all PersistentVolumeClaims (PVCs) from the namespace. This should be performed after all Pods have been deleted, to ensure PVC deletion does not hang on a Pod binding. - -```bash -$ kubectl delete pvc -n $NAMESPACE cfg-1-data --ignore-not-found -$ kubectl delete pvc -n $NAMESPACE cfg-2-data --ignore-not-found -$ kubectl delete pvc -n $NAMESPACE cfg-3-data --ignore-not-found -$ kubectl delete pvc -n $NAMESPACE default-100-data --ignore-not-found -$ kubectl delete pvc -n $NAMESPACE default-101-data --ignore-not-found -$ kubectl delete pvc -n $NAMESPACE music-102-data --ignore-not-found -$ kubectl delete pvc -n $NAMESPACE music-103-data --ignore-not-found -``` - -### Delete ConfigMaps - -Delete all remaining ConfigMaps in the namespace. - -```bash -$ kubectl delete configmap -n $NAMESPACE vespa-config --ignore-not-found -``` - -### Delete Services - -Delete any Services and other networking components that may have been setup by the operator. - -```bash -$ kubectl delete svc -n $NAMESPACE x --ignore-not-found -$ kubectl delete svc -n $NAMESPACE cfg-internal --ignore-not-found -``` - -### Delete VespaSet - -Delete the `VespaSet` resource. With all Pods and services already removed, the operator's finalizer will exit immediately. - -```bash -$ kubectl delete vespaset -n $NAMESPACE vespaset-test --ignore-not-found -``` \ No newline at end of file diff --git a/mintlify-docs/en/operations/kubernetes/operations/operations.mdx b/mintlify-docs/en/operations/kubernetes/operations/operations.mdx index 11605c42ec..c2e7bb80ab 100644 --- a/mintlify-docs/en/operations/kubernetes/operations/operations.mdx +++ b/mintlify-docs/en/operations/kubernetes/operations/operations.mdx @@ -16,10 +16,27 @@ To prevent query failures or data loss during termination, a [PreStop Hook](http Two types of disruptions exist in Kubernetes: -| Type | Scenario | Behavior | -| --- | --- | --- | -| **Voluntary Disruption** | Scaling down, rolling upgrades, or node maintenance. | The preStop hook detects a voluntary disruption, stops the Vespa Container cluster from accepting new traffic, flushes in-memory data to disk for Content clusters, and ensures a clean exit before the Pod is deleted. | -| **Involuntary Disruption** | Node hardware failure, kernel panic, or eviction. | Kubernetes initiates the termination. The preStop hook attempts to run to flush data and close connections. However, if the Pod is lost abruptly. the hook cannot run, and recovery relies on Vespa's data replication. | + + + + + + + + + + + + + + + + + + + + +
TypeScenarioBehavior
**Voluntary Disruption**Scaling down, rolling upgrades, or node maintenance.The preStop hook detects a voluntary disruption, stops the Vespa Container cluster from accepting new traffic, flushes in-memory data to disk for Content clusters, and ensures a clean exit before the Pod is deleted.
**Involuntary Disruption**Node hardware failure, kernel panic, or eviction.Kubernetes initiates the termination. The preStop hook attempts to run to flush data and close connections. However, if the Pod is lost abruptly. the hook cannot run, and recovery relies on Vespa's data replication.
### Pod Disruption Budget diff --git a/mintlify-docs/en/operations/kubernetes/vespa-on-kubernetes.mdx b/mintlify-docs/en/operations/kubernetes/vespa-on-kubernetes.mdx index 769a251e45..2b08f5a1b1 100644 --- a/mintlify-docs/en/operations/kubernetes/vespa-on-kubernetes.mdx +++ b/mintlify-docs/en/operations/kubernetes/vespa-on-kubernetes.mdx @@ -26,5 +26,5 @@ Refer to the following sections to install, configure, and manage Vespa on Kuber - + \ No newline at end of file diff --git a/mintlify-docs/en/operations/metrics.mdx b/mintlify-docs/en/operations/metrics.mdx index d2a8b749fb..2ec11140ed 100644 --- a/mintlify-docs/en/operations/metrics.mdx +++ b/mintlify-docs/en/operations/metrics.mdx @@ -39,16 +39,48 @@ Metrics in Vespa are generated from services running on the individual nodes, an For each of the values (suffixes) available for the different metrics here is how we recommend that you aggregate them to get the best use of them. The guidelines should be used both for aggregations over time (multiple snapshot intervals) and over tag combinations. -| Suffix Name | Aggregation | -| --- | --- | -| `max` | Use the highest value available `MAX(max)`. | -| `min` | Use the lowest value available `MIN(min)`. | -| `sum` | Use the sum of all values `SUM(sum)`. | -| `count` | Use the sum of all values `SUM(count)`. | -| `average` | To generate an average value you want to do `SUM(sum) / SUM(count)` where you generate the graph. Don’t use the `average` suffix itself if you have the `sum` and `count` suffixes available. Using this will easily lead to computing averages of averages, which will easily become very distorted and noisy. | -| `last` | Avoid this except for metrics you expect to be stable, such as amount of memory available on a node, etc. This value is the last from a metrics snapshot period, hence basically a single value picked from all values during the snapshot period. Typically, very noisy for volatile metrics. It does not make sense to aggregate on this value at all, but if you must then choose a value with the same combination of tags over time. | -| `95percentile` | This value cannot be aggregated in a way that gives a mathematically correct value. But where you have to either compute the average value for the most realistic value, `AVERAGE(95percentile)`, or max if the goal is to better identify outliers, `MAX(95percentile)`. Regardless, this value is best used when considered at the most granular level, with all tag values specified. | -| `99percentile` | Same as for the `95percentile` suffix. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Suffix NameAggregation
{`max`}Use the highest value available {`MAX(max)`}.
{`min`}Use the lowest value available {`MIN(min)`}.
{`sum`}Use the sum of all values {`SUM(sum)`}.
{`count`}Use the sum of all values {`SUM(count)`}.
{`average`}To generate an average value you want to do {`SUM(sum) / SUM(count)`} where you generate the graph. Don’t use the {`average`} suffix itself if you have the {`sum`} and {`count`} suffixes available. Using this will easily lead to computing averages of averages, which will easily become very distorted and noisy.
{`last`}Avoid this except for metrics you expect to be stable, such as amount of memory available on a node, etc. This value is the last from a metrics snapshot period, hence basically a single value picked from all values during the snapshot period. Typically, very noisy for volatile metrics. It does not make sense to aggregate on this value at all, but if you must then choose a value with the same combination of tags over time.
{`95percentile`}This value cannot be aggregated in a way that gives a mathematically correct value. But where you have to either compute the average value for the most realistic value, {`AVERAGE(95percentile)`}, or max if the goal is to better identify outliers, {`MAX(95percentile)`}. Regardless, this value is best used when considered at the most granular level, with all tag values specified.
{`99percentile`}Same as for the {`95percentile`} suffix.
## Metric-sets diff --git a/mintlify-docs/en/operations/monitoring.mdx b/mintlify-docs/en/operations/monitoring.mdx index 1c4e08f6ab..44308555ea 100644 --- a/mintlify-docs/en/operations/monitoring.mdx +++ b/mintlify-docs/en/operations/monitoring.mdx @@ -22,15 +22,52 @@ The Vespa Cloud metrics dashboard (the METRICS tab in the application zone view) The dashboard is organized into seven tabs: -| Tab | What it shows | When to use it | -| --- | --- | --- | -| **Overview** | Health indicators, request rates, QoS, latency summary, HTTP status codes, resource utilization | Daily health check, first stop during incidents | -| **Query** | Container- and content-node query latency, per-rank-profile breakdown, match/docsum executors | Investigating read latency, query quality issues | -| **Feed** | Feed operation rates and latency at each layer, feed blocking | Investigating write latency or throughput issues | -| **Nearest Neighbor Search** | NNS distance computations, visit efficiency | Tuning HNSW parameters (hidden when not in use) | -| **Content Node** | Document counts, Proton resource usage, executor utilization, maintenance jobs | Deep investigation of search engine internals | -| **Resources** | CPU, memory, disk, GPU, JVM, thread pools | Sizing and scaling decisions | -| **Health** | Cluster state, data consistency, restarts, reindexing, resource limits | Stability monitoring, post-incident review | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TabWhat it showsWhen to use it
**Overview**Health indicators, request rates, QoS, latency summary, HTTP status codes, resource utilizationDaily health check, first stop during incidents
**Query**Container- and content-node query latency, per-rank-profile breakdown, match/docsum executorsInvestigating read latency, query quality issues
**Feed**Feed operation rates and latency at each layer, feed blockingInvestigating write latency or throughput issues
**Nearest Neighbor Search**NNS distance computations, visit efficiencyTuning HNSW parameters (hidden when not in use)
**Content Node**Document counts, Proton resource usage, executor utilization, maintenance jobsDeep investigation of search engine internals
**Resources**CPU, memory, disk, GPU, JVM, thread poolsSizing and scaling decisions
**Health**Cluster state, data consistency, restarts, reindexing, resource limitsStability monitoring, post-incident review
Filters at the top apply across all tabs: @@ -48,15 +85,52 @@ Query, Feed, Content Node, Resources, and Health tabs group metrics per cluster Annotations are vertical lines drawn on every chart that mark operational events. When a latency or throughput anomaly lines up with an annotation, you get the context for the change without having to infer it from the graph alone. -| Annotation | Triggered by | Why it matters | -| :--- | :--- | :--- | -| **Feed blocked in cluster** | A content node crosses its disk/memory feed-block limit | Writes are paused cluster-wide until remediated | -| **Vespa upgrade** | A new Vespa version is rolled out | Brief rolling-restart latency spikes are expected around this marker | -| **Data migration** | Bucket merges pending exceed a threshold | Explains elevated CPU/IO and latency during redistribution | -| **Document re-indexing** | A reindexing job is running | Explains elevated CPU and search-side load | -| **Auto-scaling** | The autoscaler changed the cluster shape | Brief capacity drop during reshuffle | -| **Service restart** | `delta(sentinel_totalRestarts[10m]) > 0` — a Vespa service process restarted on one or more nodes | Unexpected restarts usually indicate a crash, OOM, or forced stop; outside of planned upgrades these are always worth investigating | -| **Core dump** | `delta(coredumps_processed[1h]) > 0` — a process core-dumped | Signals a crash; cross-reference with Service restart. Should be extremely rare | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AnnotationTriggered byWhy it matters
**Feed blocked in cluster**A content node crosses its disk/memory feed-block limitWrites are paused cluster-wide until remediated
**Vespa upgrade**A new Vespa version is rolled outBrief rolling-restart latency spikes are expected around this marker
**Data migration**Bucket merges pending exceed a thresholdExplains elevated CPU/IO and latency during redistribution
**Document re-indexing**A reindexing job is runningExplains elevated CPU and search-side load
**Auto-scaling**The autoscaler changed the cluster shapeBrief capacity drop during reshuffle
**Service restart**{`delta(sentinel_totalRestarts[10m]) > 0`} — a Vespa service process restarted on one or more nodesUnexpected restarts usually indicate a crash, OOM, or forced stop; outside of planned upgrades these are always worth investigating
**Core dump**{`delta(coredumps_processed[1h]) > 0`} — a process core-dumpedSignals a crash; cross-reference with Service restart. Should be extremely rare
### Overview tab @@ -70,13 +144,42 @@ The Overview tab is the fastest place to answer "is anything obviously broken?" The Overview tab opens with a dedicated **Health Indicators** row — five stat panels designed to surface stability issues in a single glance. A row of green zeros is the signal to stop; a non-zero value tells you which tab to visit next. -| Indicator | What it counts | Healthy value | -| :--- | :--- | :--- | -| **Core Dumps (1h)** | Core dumps processed across all clusters in the last hour | 0 — any non-zero value is a crash to investigate | -| **Restarts (1h)** | Vespa service restarts across all clusters in the last hour | 0 during steady state; brief spikes are normal during upgrades | -| **Feed Blocked** | Nodes currently above a feed-block resource limit | 0 — non-zero means writes are being rejected cluster-wide | -| **Content: Groups/Nodes Down** | Content groups with at least one node down | 0 during steady state. 1 group down is normal during rolling restarts or maintenance; 2 or more should be investigated | -| **Container: Services Down** | Active container nodes where some service isn't running | 0 during steady state; brief spikes during deployments are expected | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IndicatorWhat it countsHealthy value
**Core Dumps (1h)**Core dumps processed across all clusters in the last hour0 — any non-zero value is a crash to investigate
**Restarts (1h)**Vespa service restarts across all clusters in the last hour0 during steady state; brief spikes are normal during upgrades
**Feed Blocked**Nodes currently above a feed-block resource limit0 — non-zero means writes are being rejected cluster-wide
**Content: Groups/Nodes Down**Content groups with at least one node down0 during steady state. 1 group down is normal during rolling restarts or maintenance; 2 or more should be investigated
**Container: Services Down**Active container nodes where some service isn't running0 during steady state; brief spikes during deployments are expected
#### QoS and latency overview @@ -242,14 +345,40 @@ The dashboard renders avg as a solid green line and max as a dashed yellow line, Proton runs background [maintenance jobs](/en/content/proton#proton-maintenance-jobs) that manage data structures. The dashboard includes a reference panel (collapsed) explaining each job and its resource impact: -| Job | Resource impact | -| --- | --- | -| Attribute Flush | Low | -| Memory Index Flush | Moderate | -| Disk Index Fusion | High — temporary 2× disk usage | -| Document Store Compaction | High — holds file in memory | -| Bucket Move | High — competes with feeding | -| LID-Space Compaction | Moderate | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
JobResource impact
Attribute FlushLow
Memory Index FlushModerate
Disk Index FusionHigh — temporary 2× disk usage
Document Store CompactionHigh — holds file in memory
Bucket MoveHigh — competes with feeding
LID-Space CompactionModerate
Latency spikes that correlate with active maintenance are expected but may indicate the cluster needs more headroom. @@ -259,14 +388,54 @@ The Resources tab is the primary tool for sizing decisions. Node-level resources #### Typical healthy values -| Resource | Healthy | Concerning | Action needed | -| --- | --- | --- | --- | -| **CPU** | `< 70%` | `70-85%` | `> 85%` sustained | -| **CPU IOWait** | `< 5%` | `5-10%` | `> 10%` (I/O bottleneck) | -| **Memory** | `< 70%` | `70-80%` | Approaching feed-block limit | -| **Disk** | `< 70%` | `70-80% `| Approaching feed-block limit | -| **JVM GC Overhead** | `< 5%` | `5-15%` | `> 15%` (severe latency impact) | -| **Threadpool utilization** | `< 70%` | `70-90%` | Rejected tasks = requests dropped | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ResourceHealthyConcerningAction needed
**CPU**{`< 70%`}{`70-85%`}{`> 85%`} sustained
**CPU IOWait**{`< 5%`}{`5-10%`}{`> 10%`} (I/O bottleneck)
**Memory**{`< 70%`}{`70-80%`}Approaching feed-block limit
**Disk**{`< 70%`}{`70-80% `}Approaching feed-block limit
**JVM GC Overhead**{`< 5%`}{`5-15%`}{`> 15%`} (severe latency impact)
**Threadpool utilization**{`< 70%`}{`70-90%`}Rejected tasks = requests dropped
Content nodes need extra headroom because [maintenance jobs](/en/content/proton#proton-maintenance-jobs) (especially disk index fusion) temporarily increase resource usage. @@ -278,11 +447,28 @@ Content nodes need extra headroom because [maintenance jobs](/en/content/proton# Which thread pools exist on a container depends on which elements are configured in `services.xml`: -| Thread pool | Present when | -| --- | --- | -| `default-handler-common` | Always (handler executor used by anything without its own pool) | -| `search-handler` | `` element is present | -| `feedapi-handler` | `` element is present | + + + + + + + + + + + + + + + + + + + + + +
Thread poolPresent when
{`default-handler-common`}Always (handler executor used by anything without its own pool)
{`search-handler`}{``} element is present
{`feedapi-handler`}{``} element is present
To keep the dashboard free of empty panels, the Resources tab contains three threadpool rows — one per container configuration case — and each row repeats per container cluster that falls into that case: @@ -467,12 +653,37 @@ To pull metrics from your Vespa application into AWS Cloudwatch, refer to the [m The [Vespa Grafana Terraform template](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/monitoring/vespa-grafana-terraform) provides a set of dashboards and alerts. If you are using a different monitoring service and want to set up an equivalent alert set, you can follow this table: -| Metric name | Threshold | Dimension aggregation | -| --- | --- | --- | -| [content_proton_resource_usage_disk_average](/en/reference/operations/metrics/searchnode#content_proton_resource_usage_disk) | `>` 0.9 | max by(applicationId, clusterId, zone) | -| [content_proton_resource_usage_memory_average](/en/reference/operations/metrics/searchnode#content_proton_resource_usage_memory) | `>` 0.8 | max by(applicationId, zone, clusterId) | -| cpu_util | `>` 90 | max by(applicationId, zone, clusterId) | -| [content_proton_resource_usage_feeding_blocked_last](/en/reference/operations/metrics/searchnode#content_proton_resource_usage_feeding_blocked) | `>=` 1 | N/A | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Metric nameThresholdDimension aggregation
content_proton_resource_usage_disk_average{`>`} 0.9max by(applicationId, clusterId, zone)
content_proton_resource_usage_memory_average{`>`} 0.8max by(applicationId, zone, clusterId)
cpu_util{`>`} 90max by(applicationId, zone, clusterId)
content_proton_resource_usage_feeding_blocked_last{`>=`} 1N/A
All metrics are from the [default metric set](/en/reference/operations/metrics/default-metric-set#metric-sets). Metrics are using the naming scheme from the [Prometheus metrics](/en/reference/api/prometheus-v1#prometheus-v1-values) API. Dimension aggregation is optional, but reduces alerting noise - e.g. in the case where an entire cluster goes bad. It is recommended to filter all alerts on zones in the [prod environment](/en/operations/environments#prod). diff --git a/mintlify-docs/en/operations/private-endpoints.mdx b/mintlify-docs/en/operations/private-endpoints.mdx index f80add455f..f2ea0d6a8b 100644 --- a/mintlify-docs/en/operations/private-endpoints.mdx +++ b/mintlify-docs/en/operations/private-endpoints.mdx @@ -6,6 +6,8 @@ Vespa Cloud lets you set up private endpoint services on your application cluste Private endpoints are only supported in zones in the [prod environment](/en/operations/environments#prod). +Adding a private endpoint does *not* disable the existing public endpoint for that cluster—both remain reachable unless you explicitly disable the public one, by adding a `"zone"` type endpoint with `enabled="false"`: `` + **Note:** @@ -14,11 +16,28 @@ Private endpoints use mTLS authentication by default, and token-based authentica ## AWS PrivateLinkRequired information: -| Item | Description | -| --- | --- | -| **Your IAM account number** | The numeric identifier for your AWS account. | -| **VPC ID** | The identifier of your AWS VPC where you wish to connect to the service endpoints from. | -| **AWS region name** | The name of the AWS region to connect from. Note that you can only connect to a service in the same region, or, if public endpoints are disabled, in the same AWS availability zone. | + + + + + + + + + + + + + + + + + + + + + +
ItemDescription
**Your IAM account number**The numeric identifier for your AWS account.
**VPC ID**The identifier of your AWS VPC where you wish to connect to the service endpoints from.
**AWS region name**The name of the AWS region to connect from. Note that you can only connect to a service in the same region, or, if public endpoints are disabled, in the same AWS availability zone.
Procedure: @@ -109,11 +128,28 @@ Enclave users may set up high-availability PrivateLink endpoints connected acros ## GCP Private Service ConnectPrerequisites: -| Item | Description | -| --- | --- | -| **Enabled GCP APIs** | The *Compute Engine*, *Service Directory* and *Cloud DNS* APIs must all be enabled in your GCP account:

`$ gcloud services enable compute.googleapis.com`
`$ gcloud services enable dns.googleapis.com`
`$ gcloud services enable servicedirectory.googleapis.com` | -| **Your GCP project name** | The string identifier for your GCP account, like *resonant-diode-123456* | -| **VPC network and subnetwork names** | The name of the network and subnetwork to create your consumer endpoint in. | + + + + + + + + + + + + + + + + + + + + + +
ItemDescription
**Enabled GCP APIs**The *Compute Engine*, *Service Directory* and *Cloud DNS* APIs must all be enabled in your GCP account:

{`$ gcloud services enable compute.googleapis.com`}
{`$ gcloud services enable dns.googleapis.com`}
{`$ gcloud services enable servicedirectory.googleapis.com`}
**Your GCP project name**The string identifier for your GCP account, like *resonant-diode-123456*
**VPC network and subnetwork names**The name of the network and subnetwork to create your consumer endpoint in.
Procedure: diff --git a/mintlify-docs/en/operations/reindexing.mdx b/mintlify-docs/en/operations/reindexing.mdx index 537bb18079..3c4ae31884 100644 --- a/mintlify-docs/en/operations/reindexing.mdx +++ b/mintlify-docs/en/operations/reindexing.mdx @@ -37,10 +37,24 @@ Refer to [schema changes](/en/reference/schemas/schemas#modifying-schemas) for a Below are sample changes to the schema for different use cases, or examples of operational steps for data manipulation. -| Use case | Description | -| --- | --- | -| **clear field** | To clear a field, do a partial update of all documents with the value, say an empty string.

It is also possible to use reindexing, but there is a twist - intuitively, this would work:

`field artist type string {`
`indexing: "" \| summary \| index`
`}`

However, the reset only works for [synthetic fields](/en/reference/schemas/schemas#schema).

A solution is to deploy a [document processor](/en/applications/document-processors) that empties the field, to the default indexing chain - then trigger a reprocessing. | -| **change indexing settings** | As reindexing takes time, a field's data can be in one state or another, while the queries to it have the most current state. This is OK for many changes and applications.

If not, it is possible to reindex to a new field for a more atomic change. Add a *synthetic field* outside the *document definition* and pipe the content of the current field to it:

`search mydocs {`
`field title_non_stemmed type string {`
`indexing: input title \| index \| summary`
`stemming: none`
`}`
`document mydocs {`
`field title type string`
`{`
`indexing: index \| summary`
`}`

Once reindexing is completed, switch queries to use the new field. This solution naturally increases memory and disk requirements in the transition.

Going back to using the original field with the new settings can be done by changing the index settings for the original field, wait for reindexing to be finished and start using the original field again in queries, then remove the temporary synthetic field. | + + + + + + + + + + + + + + + + + +
Use caseDescription
**clear field**To clear a field, do a partial update of all documents with the value, say an empty string.

It is also possible to use reindexing, but there is a twist - intuitively, this would work:

{`field artist type string {`}
{`indexing: "" | summary | index`}
{`}`}

However, the reset only works for synthetic fields.

A solution is to deploy a document processor that empties the field, to the default indexing chain - then trigger a reprocessing.
**change indexing settings**As reindexing takes time, a field's data can be in one state or another, while the queries to it have the most current state. This is OK for many changes and applications.

If not, it is possible to reindex to a new field for a more atomic change. Add a *synthetic field* outside the *document definition* and pipe the content of the current field to it:

{`search mydocs {`}
{`field title_non_stemmed type string {`}
{`indexing: input title | index | summary`}
{`stemming: none`}
{`}`}
{`document mydocs {`}
{`field title type string`}
{`{`}
{`indexing: index | summary`}
{`}`}

Once reindexing is completed, switch queries to use the new field. This solution naturally increases memory and disk requirements in the transition.

Going back to using the original field with the new settings can be done by changing the index settings for the original field, wait for reindexing to be finished and start using the original field again in queries, then remove the temporary synthetic field.
Relevant pointers: diff --git a/mintlify-docs/en/operations/self-managed/admin-procedures.mdx b/mintlify-docs/en/operations/self-managed/admin-procedures.mdx index d41c9ec158..27bce04f0d 100644 --- a/mintlify-docs/en/operations/self-managed/admin-procedures.mdx +++ b/mintlify-docs/en/operations/self-managed/admin-procedures.mdx @@ -226,13 +226,36 @@ Start Vespa on the nodes that have changes Also see the [FAQ](/en/learn/faq). -||| -| --- | --- | -| **No endpoint** | Most problems with the quick start guides are due to Docker out of memory. Make sure at least 6G memory is allocated to Docker:

`$ docker info \| grep "Total Memory"`
`or`
`$ podman info \| grep "memTotal"`

OOM symptoms includeINFO:

`Problem with Handshake localhost:8080 ssl=false: localhost:8080 failed to respond `

The container is named *vespa* in the guides, for a shell do:

`$ docker exec -it vespa bash` | -| **Log viewing** | Use [vespa-logfmt](/en/reference/operations/self-managed/tools#vespa-logfmt) to view the vespa log - example:

`$ /opt/vespa/bin/vespa-logfmt -l warning,error` | -| **Json** | For json pretty-print, append

`\| python -m json.tool`

to commands that output json - or use [jq](https://stedolan.github.io/jq/). | -| **Routing** | Vespa lets application set up custom document processing / indexing, with different feed endpoints. Refer to [indexing](/en/writing/indexing) for how to configure this in *services.xml*.

[#13193](https://github.com/vespa-engine/vespa/issues/13193) has a summary of problems and solutions. | -| **Tracing** | Use [tracelevel](/en/reference/api/document-v1#request-parameters) to dump the routes and hops for a write operation - example:

`$ curl -H Content-Type:application/json --data-binary @docs.json \`
`$ENDPOINT/document/v1/mynamespace/doc/docid/1?tracelevel=4 \ jq .`
`{`
`"pathId": "/document/v1/mynamespace/doc/docid/1",`
`"id": "id:mynamespace:doc::1",`
`"trace": [`
`{ "message": "[1623413878.905] Sending message (version 7.418.23) from client to ..." },`
`{ "message": "[1623413878.906] Message (type 100004) received at 'default/container.0' ..." },`
`{ "message": "[1623413878.907] Sending message (version 7.418.23) from 'default/container.0' ..." },`
`{ "message": "[1623413878.907] Message (type 100004) received at 'default/container.0' ..." },`
`{ "message": "[1623413878.909] Selecting route" },`
`{ "message": "[1623413878.909] No cluster state cached. Sending to random distributor." }` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**No endpoint**Most problems with the quick start guides are due to Docker out of memory. Make sure at least 6G memory is allocated to Docker:

{`$ docker info | grep "Total Memory"`}
{`or`}
{`$ podman info | grep "memTotal"`}

OOM symptoms includeINFO:

{`Problem with Handshake localhost:8080 ssl=false: localhost:8080 failed to respond `}

The container is named *vespa* in the guides, for a shell do:

{`$ docker exec -it vespa bash`}
**Log viewing**Use vespa-logfmt to view the vespa log - example:

{`$ /opt/vespa/bin/vespa-logfmt -l warning,error`}
**Json**For json pretty-print, append

{`| python -m json.tool`}

to commands that output json - or use jq.
**Routing**Vespa lets application set up custom document processing / indexing, with different feed endpoints. Refer to indexing for how to configure this in *services.xml*.

#13193 has a summary of problems and solutions.
**Tracing**Use tracelevel to dump the routes and hops for a write operation - example:

{`$ curl -H Content-Type:application/json --data-binary @docs.json \\`}
{`$ENDPOINT/document/v1/mynamespace/doc/docid/1?tracelevel=4 \\ jq .`}
{`{`}
{`"pathId": "/document/v1/mynamespace/doc/docid/1",`}
{`"id": "id:mynamespace:doc::1",`}
{`"trace": [`}
{`{ "message": "[1623413878.905] Sending message (version 7.418.23) from client to ..." },`}
{`{ "message": "[1623413878.906] Message (type 100004) received at 'default/container.0' ..." },`}
{`{ "message": "[1623413878.907] Sending message (version 7.418.23) from 'default/container.0' ..." },`}
{`{ "message": "[1623413878.907] Message (type 100004) received at 'default/container.0' ..." },`}
{`{ "message": "[1623413878.909] Selecting route" },`}
{`{ "message": "[1623413878.909] No cluster state cached. Sending to random distributor." }`}
## Clean start mode @@ -240,10 +263,33 @@ There has been rare occasions were Vespa stored data that was internally inconsi ## Content cluster configuration -||| -| --- | --- | -| **Availability vs resources** | Keeping index structures costs resources. Not all replicas of buckets are necessarily searchable, unless configured using [searchable-copies](/en/reference/applications/services/content#searchable-copies). As Vespa indexes buckets on-demand, the most cost-efficient setting is 1, if one can tolerate temporary coverage loss during node failures. | -| **Data retention vs size** | When a document is removed, the document data is not immediately purged. Instead, *remove-entries* (tombstones of removed documents) are kept for a configurable amount of time. The default is two weeks, refer to [removed-db prune age](/en/reference/applications/services/content#removed-db-prune-age). This ensures that removed documents stay removed in a distributed system where nodes change state. Entries are removed periodically after expiry. Hence, if a node comes back up after being down for more than two weeks, removed documents are available again, unless the data on the node is wiped first. A larger *prune age* will grow the storage size as this keeps document and tombstones longer.

**Note:**

The backend does not store remove-entries for nonexistent documents. This to prevent clients sending wrong document identifiers from filling a cluster with invalid remove-entries. A side effect is that if a problem has caused all replicas of a bucket to be unavailable, documents in this bucket cannot be marked removed until at least one replica is available again. Documents are written in new bucket replicas while the others are down - if these are removed, then older versions of these will not re-emerge, as the most recent change wins.
| -| **Transition time** | See [transition-time](/en/reference/applications/services/content#transition-time) for tradeoffs for how quickly nodes are set down vs. system stability. | -| **Removing unstable nodes** | One can configure how many times a node is allowed to crash before it will automatically be removed. The crash count is reset if the node has been up or down continuously for more than the [stable state period](/en/reference/applications/services/content#stable-state-period). If the crash count exceeds [max premature crashes](/en/reference/applications/services/content#max-premature-crashes), the node will be disabled. Refer to [troubleshooting](#troubleshooting). | -| **Minimal amount of nodes required to be available** | A cluster is typically sized to handle a given load. A given percentage of the cluster resources are required for normal operations, and the remainder is the available resources that can be used if some of the nodes are no longer usable. If the cluster loses enough nodes, it will be overloaded:

• Remaining nodes may create disk full situation. This will likely fail a lot of write operations, and if disk is shared with OS, it may also stop the node from functioning.
• Partition queues will grow to maximum size. As queues are processed in FIFO order, operations are likely to get long latencies.
• Many operations may time out while being processed, causing the operation to be resent, adding more load to the cluster.
• When new nodes are added, they cannot serve requests before data is moved to the new nodes from the already overloaded nodes. Moving data puts even more load on the existing nodes, and as moving data is typically not high priority this may never actually happen.

To configure what the minimal cluster size is, use [min-distributor-up-ratio](/en/reference/applications/services/content#min-distributor-up-ratio) and [min-storage-up-ratio](/en/reference/applications/services/content#min-storage-up-ratio). | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**Availability vs resources**Keeping index structures costs resources. Not all replicas of buckets are necessarily searchable, unless configured using searchable-copies. As Vespa indexes buckets on-demand, the most cost-efficient setting is 1, if one can tolerate temporary coverage loss during node failures.
**Data retention vs size**When a document is removed, the document data is not immediately purged. Instead, *remove-entries* (tombstones of removed documents) are kept for a configurable amount of time. The default is two weeks, refer to removed-db prune age. This ensures that removed documents stay removed in a distributed system where nodes change state. Entries are removed periodically after expiry. Hence, if a node comes back up after being down for more than two weeks, removed documents are available again, unless the data on the node is wiped first. A larger *prune age* will grow the storage size as this keeps document and tombstones longer.

**Note:**

The backend does not store remove-entries for nonexistent documents. This to prevent clients sending wrong document identifiers from filling a cluster with invalid remove-entries. A side effect is that if a problem has caused all replicas of a bucket to be unavailable, documents in this bucket cannot be marked removed until at least one replica is available again. Documents are written in new bucket replicas while the others are down - if these are removed, then older versions of these will not re-emerge, as the most recent change wins.
**Transition time**See transition-time for tradeoffs for how quickly nodes are set down vs. system stability.
**Removing unstable nodes**One can configure how many times a node is allowed to crash before it will automatically be removed. The crash count is reset if the node has been up or down continuously for more than the stable state period. If the crash count exceeds max premature crashes, the node will be disabled. Refer to troubleshooting.
**Minimal amount of nodes required to be available**A cluster is typically sized to handle a given load. A given percentage of the cluster resources are required for normal operations, and the remainder is the available resources that can be used if some of the nodes are no longer usable. If the cluster loses enough nodes, it will be overloaded:

• Remaining nodes may create disk full situation. This will likely fail a lot of write operations, and if disk is shared with OS, it may also stop the node from functioning.
• Partition queues will grow to maximum size. As queues are processed in FIFO order, operations are likely to get long latencies.
• Many operations may time out while being processed, causing the operation to be resent, adding more load to the cluster.
• When new nodes are added, they cannot serve requests before data is moved to the new nodes from the already overloaded nodes. Moving data puts even more load on the existing nodes, and as moving data is typically not high priority this may never actually happen.

To configure what the minimal cluster size is, use min-distributor-up-ratio and min-storage-up-ratio.
\ No newline at end of file diff --git a/mintlify-docs/en/operations/self-managed/build-install.mdx b/mintlify-docs/en/operations/self-managed/build-install.mdx index 412246667e..e3b31f0eb7 100644 --- a/mintlify-docs/en/operations/self-managed/build-install.mdx +++ b/mintlify-docs/en/operations/self-managed/build-install.mdx @@ -16,11 +16,28 @@ See [vespa.ai releases](/en/learn/releases). ## Container images -| Image | Description | -| --- | --- | -| [docker.io/vespaengine/vespa](https://hub.docker.com/r/vespaengine/vespa) [ghcr.io/vespa-engine/vespa](https://github.com/orgs/vespa-engine/packages/container/package/vespa) | Container image for running Vespa. | -| [docker.io/vespaengine/vespa-build-almalinux-8](https://hub.docker.com/r/vespaengine/vespa-build-almalinux-8) | Container image for building Vespa on AlmaLinux 8. | -| [docker.io/vespaengine/vespa-dev-almalinux-8](https://hub.docker.com/r/vespaengine/vespa-dev-almalinux-8) | Container image for development of Vespa on AlmaLinux 8. Used for incremental building and system testing. | + + + + + + + + + + + + + + + + + + + + + +
ImageDescription
docker.io/vespaengine/vespa ghcr.io/vespa-engine/vespaContainer image for running Vespa.
docker.io/vespaengine/vespa-build-almalinux-8Container image for building Vespa on AlmaLinux 8.
docker.io/vespaengine/vespa-dev-almalinux-8Container image for development of Vespa on AlmaLinux 8. Used for incremental building and system testing.
## RPMs @@ -75,8 +92,25 @@ vespa-tools-8.691.19-1.el8.x86_64.rpm Find most utilities in the vespa-x.y.z\*.rpm - other RPMs: -| RPM | Description | -| --- | --- | -| **vespa-tools** | Tools accessing Vespa endpoints for query or document operations:

• [vespa-destination](/en/reference/operations/self-managed/tools#vespa-destination)
• [vespa-fbench](/en/reference/operations/tools#vespa-fbench)
• [vespa-feeder](/en/reference/operations/self-managed/tools#vespa-feeder)
• [vespa-get](/en/reference/operations/self-managed/tools#vespa-get)
• [vespa-query-profile-dump-tool](/en/reference/operations/tools#vespa-query-profile-dump-tool)
• [vespa-stat](/en/reference/operations/self-managed/tools#vespa-stat)
• [vespa-summary-benchmark](/en/reference/operations/self-managed/tools#vespa-summary-benchmark)
• [vespa-visit](/en/reference/operations/self-managed/tools#vespa-visit)
• [vespa-visit-target](/en/reference/operations/self-managed/tools#vespa-visit-target) | -| **vespa-malloc** | Vespa has its own memory allocator, *vespa-malloc* - refer to */opt/vespa/etc/vespamalloc.conf* | -| **vespa-clients** | *vespa-feed-client.jar* - see [vespa-feed-client](/en/clients/vespa-feed-client) | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + +
RPMDescription
**vespa-tools**Tools accessing Vespa endpoints for query or document operations:

vespa-destination
vespa-fbench
vespa-feeder
vespa-get
vespa-query-profile-dump-tool
vespa-stat
vespa-summary-benchmark
vespa-visit
vespa-visit-target
**vespa-malloc**Vespa has its own memory allocator, *vespa-malloc* - refer to */opt/vespa/etc/vespamalloc.conf*
**vespa-clients***vespa-feed-client.jar* - see vespa-feed-client
\ No newline at end of file diff --git a/mintlify-docs/en/operations/self-managed/config-proxy.mdx b/mintlify-docs/en/operations/self-managed/config-proxy.mdx index 6bc533c108..7ffa85d090 100644 --- a/mintlify-docs/en/operations/self-managed/config-proxy.mdx +++ b/mintlify-docs/en/operations/self-managed/config-proxy.mdx @@ -11,10 +11,24 @@ The proxy has a memory cache that is used to serve configs if it is possible. In The config proxy has two modes: -| Mode | Description | -| --- | --- | -| default | Gets config from server and stores in memory cache. The config proxy will always be started in *default* mode. Serves from cache if possible. Always uses a config source. If restarted, it will lose all configs that were cached in memory. | -| memorycache | Serves config from memory cache only. Never uses a config source. A restart will lose all cached configs. Setting the mode to *memorycache* will make all applications on the node work as before (given that they have previously been running and requested config), since the config proxy will serve config from cache and work without connection to any config server. Applications on this node will not work if the config proxy stops, is restarted or crashes. | + + + + + + + + + + + + + + + + + +
ModeDescription
defaultGets config from server and stores in memory cache. The config proxy will always be started in *default* mode. Serves from cache if possible. Always uses a config source. If restarted, it will lose all configs that were cached in memory.
memorycacheServes config from memory cache only. Never uses a config source. A restart will lose all cached configs. Setting the mode to *memorycache* will make all applications on the node work as before (given that they have previously been running and requested config), since the config proxy will serve config from cache and work without connection to any config server. Applications on this node will not work if the config proxy stops, is restarted or crashes.
Use [vespa-configproxy-cmd](/en/reference/operations/self-managed/tools#vespa-configproxy-cmd) to inspect cached configs, mode, config sources etc., there are also some commands to change some of the settings. Run the command as: diff --git a/mintlify-docs/en/operations/self-managed/config-sentinel.mdx b/mintlify-docs/en/operations/self-managed/config-sentinel.mdx index b6f8e3ce67..5174932209 100644 --- a/mintlify-docs/en/operations/self-managed/config-sentinel.mdx +++ b/mintlify-docs/en/operations/self-managed/config-sentinel.mdx @@ -4,12 +4,32 @@ title: "Config sentinel" The config sentinel starts and stops services - and restart failed services unless they are manually stopped. All nodes in a Vespa system have at least these running processes: -| Process | Description | -| --- | --- | -| [config-proxy](/en/operations/self-managed/config-proxy) | Proxies config requests between Vespa applications and the configserver node. All configuration is cached locally so that this node can maintain its current configuration, even if the configserver shuts down. | -| **config-sentinel** | Registers itself with the *config-proxy* and subscribes to and enforces node configuration, meaning the configuration of what services should be run locally, and with what parameters. | -| [vespa-logd](/en/reference/operations/log-files#logd) | Monitors *$VESPA\_HOME/logs/vespa/vespa.log*, which is used by all other services, and relays everything to the [log-server](/en/reference/operations/log-files#log-server). | -| [metrics-proxy](/en/operations/self-managed/monitoring#metrics-proxy) | Provides APIs for metrics access to all nodes and services. | + + + + + + + + + + + + + + + + + + + + + + + + + +
ProcessDescription
config-proxyProxies config requests between Vespa applications and the configserver node. All configuration is cached locally so that this node can maintain its current configuration, even if the configserver shuts down.
**config-sentinel**Registers itself with the *config-proxy* and subscribes to and enforces node configuration, meaning the configuration of what services should be run locally, and with what parameters.
vespa-logdMonitors *$VESPA_HOME/logs/vespa/vespa.log*, which is used by all other services, and relays everything to the log-server.
metrics-proxyProvides APIs for metrics access to all nodes and services.
![Vespa node configuration, startup and logs](/assets/img/config-sentinel.svg) diff --git a/mintlify-docs/en/operations/self-managed/configuration-server.mdx b/mintlify-docs/en/operations/self-managed/configuration-server.mdx index 6ffd84f6fc..47a30b3572 100644 --- a/mintlify-docs/en/operations/self-managed/configuration-server.mdx +++ b/mintlify-docs/en/operations/self-managed/configuration-server.mdx @@ -262,11 +262,37 @@ When deploying, use the *\-p* option, if port is changed from the default. ## Troubleshooting -| Problem | Description | -| --- | --- | -| **Health checks** | Verify that a config server is up and running using [/state/v1/health](/en/reference/api/state-v1#state-v1-health), see [start sequence](#start-sequence). Status code is `up` if the server is up and has finished bootstrapping.

Alternatively, use [http://localhost:19071/status.html](http://localhost:19071/status.html) which will return response code 200 if server is up and has finished bootstrapping.

Metrics are found at [/state/v1/metrics](/en/reference/api/state-v1#state-v1-metrics). Use [vespa-model-inspect](/en/reference/operations/self-managed/tools#vespa-model-inspect) to find host and port number, port is 19071 by default. | -| **Consistency** | When having more than one config server, consistency between the servers is crucial. [http://localhost:19071/status](http://localhost:19071/status) can be used to check that settings for config servers are the same for all servers.

[vespa-config-status](/en/reference/operations/self-managed/tools#vespa-config-status) can be used to check config on nodes.

[http://localhost:19071/application/v2/tenant/default/application/default](http://localhost:19071/application/v2/tenant/default/application/default) displays active config generation and should be the same on all servers, and the same as in response from running [vespa deploy](/en/clients/vespa-cli#deployment) | -| **Bad Node** | If running with more than one config server and one of these goes down or has hardware failure, the cluster will still work and serve config as usual (clients will switch to use one of the good servers). It is not necessary to remove a bad server from the configuration.

Deploying applications will take longer, as [vespa deploy](/en/clients/vespa-cli#deployment) will not be able to complete a deployment on all servers when one of them is down. If this is troublesome, lower the [barrier timeout](#zookeeper-barrier-timeout) - (default value is 120 seconds).

Note also that if you have not configured [cluster controllers](/en/reference/applications/services/admin#cluster-controller) explicitly, these will run on the config server nodes and the operation of these might be affected. This is another reason for not trying to manually remove a bad node from the config server setup. | -| **Stuck filedistribution** | The config system distributes binary files (such as jar bundle files) using [file-distribution](/en/reference/applications/deployment#file-distribution) - use [vespa-status-filedistribution](/en/reference/operations/self-managed/tools#vespa-status-filedistribution) to see detailed status if it gets stuck. | -| **Memory** | Insufficient memory on the host / in the container running the config server will cause startup or deploy / configuration problems - see [Docker containers](/en/operations/self-managed/docker-containers). | -| **ZooKeeper** | The following can be caused by a full disk on the config server, or clocks out of sync:

`at com.yahoo.vespa.zookeeper.ZooKeeperRunner.startServer(ZooKeeperRunner.java:92)`
`Caused by: java.io.IOException: The accepted epoch, 10 is less than the current epoch, 48`

Users have reported that "Copying the currentEpoch to acceptedEpoch fixed the problem". | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProblemDescription
**Health checks**Verify that a config server is up and running using /state/v1/health, see start sequence. Status code is {`up`} if the server is up and has finished bootstrapping.

Alternatively, use http://localhost:19071/status.html which will return response code 200 if server is up and has finished bootstrapping.

Metrics are found at /state/v1/metrics. Use vespa-model-inspect to find host and port number, port is 19071 by default.
**Consistency**When having more than one config server, consistency between the servers is crucial. http://localhost:19071/status can be used to check that settings for config servers are the same for all servers.

vespa-config-status can be used to check config on nodes.

http://localhost:19071/application/v2/tenant/default/application/default displays active config generation and should be the same on all servers, and the same as in response from running vespa deploy
**Bad Node**If running with more than one config server and one of these goes down or has hardware failure, the cluster will still work and serve config as usual (clients will switch to use one of the good servers). It is not necessary to remove a bad server from the configuration.

Deploying applications will take longer, as vespa deploy will not be able to complete a deployment on all servers when one of them is down. If this is troublesome, lower the barrier timeout - (default value is 120 seconds).

Note also that if you have not configured cluster controllers explicitly, these will run on the config server nodes and the operation of these might be affected. This is another reason for not trying to manually remove a bad node from the config server setup.
**Stuck filedistribution**The config system distributes binary files (such as jar bundle files) using file-distribution - use vespa-status-filedistribution to see detailed status if it gets stuck.
**Memory**Insufficient memory on the host / in the container running the config server will cause startup or deploy / configuration problems - see Docker containers.
**ZooKeeper**The following can be caused by a full disk on the config server, or clocks out of sync:

{`at com.yahoo.vespa.zookeeper.ZooKeeperRunner.startServer(ZooKeeperRunner.java:92)`}
{`Caused by: java.io.IOException: The accepted epoch, 10 is less than the current epoch, 48`}

Users have reported that "Copying the currentEpoch to acceptedEpoch fixed the problem".
\ No newline at end of file diff --git a/mintlify-docs/en/operations/self-managed/container.mdx b/mintlify-docs/en/operations/self-managed/container.mdx index faf7d4aea3..58a8edaf13 100644 --- a/mintlify-docs/en/operations/self-managed/container.mdx +++ b/mintlify-docs/en/operations/self-managed/container.mdx @@ -79,10 +79,27 @@ $ jconsole localhost: Port numbers: -| Service | Port 1 | Port 2 | -| --- | --- | --- | -| QRS | 19015 | 19016 | -| Docproc | 19123 | 19124 | + + + + + + + + + + + + + + + + + + + + +
ServicePort 1Port 2
QRS1901519016
Docproc1912319124
Updated port information can be found by running: diff --git a/mintlify-docs/en/operations/self-managed/files-processes-and-ports.mdx b/mintlify-docs/en/operations/self-managed/files-processes-and-ports.mdx index 80aa3f946d..585989a1c1 100644 --- a/mintlify-docs/en/operations/self-managed/files-processes-and-ports.mdx +++ b/mintlify-docs/en/operations/self-managed/files-processes-and-ports.mdx @@ -6,17 +6,52 @@ This is a reference of directories used in a Vespa installation, processes that ## Directories -| Directory | Description | -| --- | --- | -| `$VESPA_HOME/bin/` | Command line utilities and scripts | -| `$VESPA_HOME/libexec/vespa/` | Command line utilities and scripts | -| `$VESPA_HOME/sbin/` | Server programs, daemons, etc | -| `$VESPA_HOME/lib64/` | Dynamically linked libraries, typically third-party libraries | -| `$VESPA_HOME/lib/jars/` | Java archives | -| `$VESPA_HOME/logs/vespa/` | Log files | -| `$VESPA_HOME/var/db/vespa/config_server/serverdb/` | Config server database and user applications | -| `$VESPA_HOME/share/vespa/` | A directory with config definitions and XML schemas for application package validation | -| `$VESPA_HOME/conf/vespa` | Various config files used by Vespa or libraries Vespa depend on | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectoryDescription
{`$VESPA_HOME/bin/`}Command line utilities and scripts
{`$VESPA_HOME/libexec/vespa/`}Command line utilities and scripts
{`$VESPA_HOME/sbin/`}Server programs, daemons, etc
{`$VESPA_HOME/lib64/`}Dynamically linked libraries, typically third-party libraries
{`$VESPA_HOME/lib/jars/`}Java archives
{`$VESPA_HOME/logs/vespa/`}Log files
{`$VESPA_HOME/var/db/vespa/config_server/serverdb/`}Config server database and user applications
{`$VESPA_HOME/share/vespa/`}A directory with config definitions and XML schemas for application package validation
{`$VESPA_HOME/conf/vespa`}Various config files used by Vespa or libraries Vespa depend on
## Processes and ports @@ -31,20 +66,103 @@ Many services are allocated ports dynamically. So even though the allocation is - The range from 19100 is used for internal communication ports, i.e. ports that are not necessary to use from an external API - See [Configuring Http Servers and Filters](/en/applications/http-servers-and-filters) for how to configure Container ports and [services.xml](/en/reference/applications/services/services) for how to configure other ports -| Process | Host | Port/range | ps | Function | -| --- | --- | --- | --- | --- | -| [Config server](/en/operations/self-managed/configuration-server) | Config server nodes | 19070-19071 | `java (...) -jar $VESPA_HOME/lib/jars/standalone-container-jar-with-dependencies.jar` | Vespa Configuration server | -| | | 2181-2183 | | Embedded Zookeeper cluster ports, see [zookeeper-server.def](https://github.com/vespa-engine/vespa/blob/master/configdefinitions/src/vespa/zookeeper-server.def) | -| [Config sentinel](/en/operations/self-managed/config-sentinel) | All nodes | 19098 | `$VESPA_HOME/sbin/vespa-config-sentinel` | Sentinel that starts and stops vespa services and makes sure they are running unless they are manually stopped | -| [Config proxy](/en/operations/self-managed/config-proxy) | All nodes | 19090 | `java (…) com.yahoo.vespa.config.proxy.ProxyServer` | Communication liaison between Vespa processes and config server. Caches config in memory | -| [Slobrok](/en/operations/self-managed/slobrok) | Admin nodes | 19099 for RPC port, HTTP port dynamically allocated in the 19100-19899 range | `$VESPA_HOME/sbin/vespa-slobrok` | Service location object broker | -| [logd](/en/reference/operations/log-files#logd) | All nodes | 19089 | `$VESPA_HOME/sbin/vespa-logd` | Reads local log files and sends them to log server | -| [Log server](/en/reference/operations/log-files#log-server) | Log server node | 19080 | `java (...) -jar lib/jars/logserver-jar-with-dependencies.jar` | Vespa Log server | -| [Metrics proxy](/en/operations/self-managed/monitoring#metrics-proxy) | All nodes | 19092-19095 | `java (...) -jar $VESPA_HOME/lib/jars/container-disc-with-dependencies.jar` | Provides a single access point for metrics from all services on a Vespa node | -| [Distributor](/en/content/content-nodes#distributor) | Content cluster | dynamically allocated in the 19100-19899 range | `$VESPA_HOME/sbin/vespa-distributord-bin` | Content layer distributor processes | -| [Cluster controller](/en/content/content-nodes#cluster-controller) | Content cluster | 19050, plus ports dynamically allocated in the 19100-19899 range | `java (...) -jar $VESPA_HOME/lib/jars/container-disc-jar-with-dependencies.jar` | Cluster controller processes, manages state for content nodes | -| [proton](/en/content/proton) | Content cluster | dynamically allocated in the 19100-19899 range | `$VESPA_HOME/sbin/vespa-proton-bin` | Searchnode process, receives queries from the container and returns results from the indexes. Also receives feed and indexes documents | -| [container](/en/applications/containers) | Container cluster | 8080 | `java (...) -jar $VESPA_HOME/lib/jars/container-disc-with-dependencies.jar` | Container running servers, handlers and processing components | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProcessHostPort/rangepsFunction
Config serverConfig server nodes19070-19071{`java (...) -jar $VESPA_HOME/lib/jars/standalone-container-jar-with-dependencies.jar`}Vespa Configuration server
2181-2183Embedded Zookeeper cluster ports, see zookeeper-server.def
Config sentinelAll nodes19098{`$VESPA_HOME/sbin/vespa-config-sentinel`}Sentinel that starts and stops vespa services and makes sure they are running unless they are manually stopped
Config proxyAll nodes19090{`java (…) com.yahoo.vespa.config.proxy.ProxyServer`}Communication liaison between Vespa processes and config server. Caches config in memory
SlobrokAdmin nodes19099 for RPC port, HTTP port dynamically allocated in the 19100-19899 range{`$VESPA_HOME/sbin/vespa-slobrok`}Service location object broker
logdAll nodes19089{`$VESPA_HOME/sbin/vespa-logd`}Reads local log files and sends them to log server
Log serverLog server node19080{`java (...) -jar lib/jars/logserver-jar-with-dependencies.jar`}Vespa Log server
Metrics proxyAll nodes19092-19095{`java (...) -jar $VESPA_HOME/lib/jars/container-disc-with-dependencies.jar`}Provides a single access point for metrics from all services on a Vespa node
DistributorContent clusterdynamically allocated in the 19100-19899 range{`$VESPA_HOME/sbin/vespa-distributord-bin`}Content layer distributor processes
Cluster controllerContent cluster19050, plus ports dynamically allocated in the 19100-19899 range{`java (...) -jar $VESPA_HOME/lib/jars/container-disc-jar-with-dependencies.jar`}Cluster controller processes, manages state for content nodes
protonContent clusterdynamically allocated in the 19100-19899 range{`$VESPA_HOME/sbin/vespa-proton-bin`}Searchnode process, receives queries from the container and returns results from the indexes. Also receives feed and indexes documents
containerContainer cluster8080{`java (...) -jar $VESPA_HOME/lib/jars/container-disc-with-dependencies.jar`}Container running servers, handlers and processing components
## System limits @@ -67,21 +185,70 @@ Vespa configuration is set in [application packages](/en/basics/applications). S *`$VESPA_HOME/conf/vespa/default-env.txt`* is read in Vespa start scripts - use this to modify variables ([example](/en/operations/self-managed/multinode-systems#aws-ec2)). Each line has the format `action variablename value` where the items are: -| Item | Description | -| --- | --- | -| action | One of `fallback`, `override`, or `unset`. `fallback` sets the variable if it is unset (or empty). `override` set the value regardless. `unset` unsets the variable. | -| variablename | The name of the variable, e.g. `VESPA_CONFIGSERVERS` | -| value | The rest of the line is the variable's value. | + + + + + + + + + + + + + + + + + + + + + +
ItemDescription
actionOne of {`fallback`}, {`override`}, or {`unset`}. {`fallback`} sets the variable if it is unset (or empty). {`override`} set the value regardless. {`unset`} unsets the variable.
variablenameThe name of the variable, e.g. {`VESPA_CONFIGSERVERS`}
valueThe rest of the line is the variable's value.
Refer to the [template](https://github.com/vespa-engine/vespa/blob/master/vespabase/conf/default-env.txt.in) for format. -| Environment variable | Description | -| --- | --- | -| VESPA_CONFIGSERVERS | A comma-separated list of hosts to run configservers, use fully qualified hostnames. Should always be set to the same value on all hosts in a multi-host setup. If not set, `localhost` is assumed. Refer to [configuration server operations](/en/operations/self-managed/configuration-server). | -| VESPA_HOSTNAME | Vespa uses `hostname` for node identity. But sometimes this doesn't work properly, either because that name can't be used to find an IP address which works for connecting to services running on the node, or it's just that the name doesn't agree with what the config server thinks the node's host name is. In this case, override by setting the `VESPA_HOSTNAME`, to be used instead of running the `hostname` command.

Note that `VESPA_HOSTNAME` will be used *both* when a node identifies itself to the config server *and* when a service on that node registers a network connection point that other services can connect to.

An error message with "hostname detection failed" is emitted if the `VESPA_HOSTNAME` isn't set and the hostname isn't usable. If `VESPA_HOSTNAME` is set to something that cannot work, an error with "hostname validation failed" is emitted instead. | -| VESPA_CONFIG_SOURCES | Used by libraries like the [Document API](/en/writing/document-api-guide) to set config server endpoints. Refer to [configuration server operations](/en/operations/self-managed/configuration-server#configuration) for example use. | -| VESPA_WEB_SERVICE_PORT | The port number where REST apis will run, default `8080`. This isn't strictly needed, as the port number can be set for each HTTP server in `services.xml`, but with a big application it can be easier to set the default port number just once. Also note that this needs to be set when starting the *configserver*, since the REST api implementation gets its port number from there. | -| VESPA_TLS_CONFIG_FILE | Absolute path to [TLS configuration file](/en/security/mtls). | -| VESPA_CONFIGSERVER_JVMARGS | JVM arguments for the config server - see [tuning](/en/performance/container-tuning#config-server-and-config-proxy). | -| VESPA_CONFIGPROXY_JVMARGS | JVM arguments for the config proxy - see [tuning](/en/performance/container-tuning#config-server-and-config-proxy). | -| VESPA_LOG_LEVEL | Tuning of log output from tools, see [controlling log levels](/en/reference/operations/log-files#controlling-log-levels) | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Environment variableDescription
VESPA_CONFIGSERVERSA comma-separated list of hosts to run configservers, use fully qualified hostnames. Should always be set to the same value on all hosts in a multi-host setup. If not set, {`localhost`} is assumed. Refer to configuration server operations.
VESPA_HOSTNAMEVespa uses {`hostname`} for node identity. But sometimes this doesn't work properly, either because that name can't be used to find an IP address which works for connecting to services running on the node, or it's just that the name doesn't agree with what the config server thinks the node's host name is. In this case, override by setting the {`VESPA_HOSTNAME`}, to be used instead of running the {`hostname`} command.

Note that {`VESPA_HOSTNAME`} will be used *both* when a node identifies itself to the config server *and* when a service on that node registers a network connection point that other services can connect to.

An error message with "hostname detection failed" is emitted if the {`VESPA_HOSTNAME`} isn't set and the hostname isn't usable. If {`VESPA_HOSTNAME`} is set to something that cannot work, an error with "hostname validation failed" is emitted instead.
VESPA_CONFIG_SOURCESUsed by libraries like the Document API to set config server endpoints. Refer to configuration server operations for example use.
VESPA_WEB_SERVICE_PORTThe port number where REST apis will run, default {`8080`}. This isn't strictly needed, as the port number can be set for each HTTP server in {`services.xml`}, but with a big application it can be easier to set the default port number just once. Also note that this needs to be set when starting the *configserver*, since the REST api implementation gets its port number from there.
VESPA_TLS_CONFIG_FILEAbsolute path to TLS configuration file.
VESPA_CONFIGSERVER_JVMARGSJVM arguments for the config server - see tuning.
VESPA_CONFIGPROXY_JVMARGSJVM arguments for the config proxy - see tuning.
VESPA_LOG_LEVELTuning of log output from tools, see controlling log levels
\ No newline at end of file diff --git a/mintlify-docs/en/operations/self-managed/monitoring.mdx b/mintlify-docs/en/operations/self-managed/monitoring.mdx index a29800c636..712d3a2eef 100644 --- a/mintlify-docs/en/operations/self-managed/monitoring.mdx +++ b/mintlify-docs/en/operations/self-managed/monitoring.mdx @@ -233,11 +233,28 @@ The prometheus API on each node exposes metrics in a text based [format](https:/ All pull-based solutions use Vespa's [metrics API](#metrics-v2-values), which provides metrics in JSON format, either for the full system or for a single node. The polling frequency should be limited to max once every 30 seconds as more frequent polling would not give increased granularity but only lead to unnecessary load on your systems. -| Service | Description | -| --- | --- | -| CloudWatch | Metrics can be pulled into CloudWatch from both [Vespa Cloud](/) and self-hosted Vespa. The recommended solution is to use an AWS lambda function, as described in [Pulling Vespa metrics to Cloudwatch](https://github.com/vespa-engine/metrics-emitter/tree/master/cloudwatch). | -| Datadog | The Vespa team has created a Datadog Agent integration to allow real-time monitoring of Vespa in Datadog. The [Datadog Vespa](https://docs.datadoghq.com/integrations/vespa/) integration is not packaged with the agent, but is included in Datadog's [integrations-extras](https://github.com/DataDog/integrations-extras) repository. Clone it and follow the steps in the [README](https://github.com/DataDog/integrations-extras/blob/master/vespa/README.md).

**Note:**

The Datadog Agent integration currently works for self-hosted Vespa only.
| -| Prometheus | Vespa exposes metrics in a text based [format](https://prometheus.io/docs/instrumenting/exposition_formats/) that can be scraped by [Prometheus](https://prometheus.io/docs/introduction/overview/). For [Vespa Cloud](/), append */prometheus/v1/values* to your endpoint URL. For self-hosted Vespa the URL is: *http://`:`/prometheus/v1/values*, where the *port* is the same as for searching, e.g. 8080. Metrics for each individual host can also be retrieved at `http://host:19092/prometheus/v1/values`.

See the below for a Prometheus / Grafana example. | + + + + + + + + + + + + + + + + + + + + + +
ServiceDescription
CloudWatchMetrics can be pulled into CloudWatch from both Vespa Cloud and self-hosted Vespa. The recommended solution is to use an AWS lambda function, as described in Pulling Vespa metrics to Cloudwatch.
DatadogThe Vespa team has created a Datadog Agent integration to allow real-time monitoring of Vespa in Datadog. The Datadog Vespa integration is not packaged with the agent, but is included in Datadog's integrations-extras repository. Clone it and follow the steps in the README.

**Note:**

The Datadog Agent integration currently works for self-hosted Vespa only.
PrometheusVespa exposes metrics in a text based format that can be scraped by Prometheus. For Vespa Cloud, append */prometheus/v1/values* to your endpoint URL. For self-hosted Vespa the URL is: *http://{`:`}/prometheus/v1/values*, where the *port* is the same as for searching, e.g. 8080. Metrics for each individual host can also be retrieved at {`http://host:19092/prometheus/v1/values`}.

See the below for a Prometheus / Grafana example.
## Pushing metrics to CloudWatch diff --git a/mintlify-docs/en/operations/self-managed/multinode-systems.mdx b/mintlify-docs/en/operations/self-managed/multinode-systems.mdx index 2fb2d3e35c..7dd6593d76 100644 --- a/mintlify-docs/en/operations/self-managed/multinode-systems.mdx +++ b/mintlify-docs/en/operations/self-managed/multinode-systems.mdx @@ -90,18 +90,67 @@ Can [AWS Auto Scaling](https://aws.amazon.com/autoscaling/) be used? Read the [a - Make sure to check for SSH traffic, for host login. - Launch 10 instances - the 3 first will be Vespa config server nodes, the 7 last Vespa nodes. Write down private / public hostnames. The private names are used in Vespa configuration, the public names for login to check status. To find a hostname, click the instance and copy hostname from *Private IP DNS name (IPv4 only)* and *Public IPv4 DNS*. Create a table like: - | type | Private IP DNS name (IPv4 only) | Public IPv4 DNS | - | :--- | :--- | :--- | - | configserver | ip-10-0-1-234.ec2.internal | ec2-3-231-33-190.compute-1.amazonaws.com | - | configserver | ip-10-0-1-154.ec2.internal | ec2-3-216-28-201.compute-1.amazonaws.com | - | configserver | ip-10-0-0-88.ec2.internal | ec2-34-230-33-42.compute-1.amazonaws.com | - | services | ip-10-0-1-95.ec2.internal | ec2-44-192-98-165.compute-1.amazonaws.com | - | services | ip-10-0-0-219.ec2.internal | ec2-3-88-143-47.compute-1.amazonaws.com | - | services | ip-10-0-0-28.ec2.internal | ec2-107-23-52-245.compute-1.amazonaws.com | - | services | ip-10-0-0-67.ec2.internal | ec2-54-198-251-100.compute-1.amazonaws.com | - | services | ip-10-0-1-84.ec2.internal | ec2-44-193-84-85.compute-1.amazonaws.com | - | services | ip-10-0-0-167.ec2.internal | ec2-54-224-15-163.compute-1.amazonaws.com | - | services | ip-10-0-1-41.ec2.internal | ec2-44-200-227-127.compute-1.amazonaws.com | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
typePrivate IP DNS name (IPv4 only)Public IPv4 DNS
configserverip-10-0-1-234.ec2.internalec2-3-231-33-190.compute-1.amazonaws.com
configserverip-10-0-1-154.ec2.internalec2-3-216-28-201.compute-1.amazonaws.com
configserverip-10-0-0-88.ec2.internalec2-34-230-33-42.compute-1.amazonaws.com
servicesip-10-0-1-95.ec2.internalec2-44-192-98-165.compute-1.amazonaws.com
servicesip-10-0-0-219.ec2.internalec2-3-88-143-47.compute-1.amazonaws.com
servicesip-10-0-0-28.ec2.internalec2-107-23-52-245.compute-1.amazonaws.com
servicesip-10-0-0-67.ec2.internalec2-54-198-251-100.compute-1.amazonaws.com
servicesip-10-0-1-84.ec2.internalec2-44-193-84-85.compute-1.amazonaws.com
servicesip-10-0-0-167.ec2.internalec2-54-224-15-163.compute-1.amazonaws.com
servicesip-10-0-1-41.ec2.internalec2-44-200-227-127.compute-1.amazonaws.com
- Security group setup: - Click the Security Group for the nodes just provisioned (under the security tab), then *Edit inbound rules*. Add *All TCP* for port range 0-65535, specifying the name of the current Security Group as the Source. This lets the hosts communicate with each other. - Host login example, without ssh-agent: @@ -318,12 +367,32 @@ The following is a procedure to set up a multinode application on [AWS ECS](http - Log in to AWS and the EC2 Container Service. Click *Clusters > Create Cluster > EC2 Linux + Networking > Next step*, using the defaults and: - | Cluster name | vespa | - | --- | --- | - | EC2 instance type | t2.medium | - | Number of instances | 10 | - | Key pair | *Select or create your keypair* | - | Security group inbound rules - port range | 0 - 65535 | + + + + + + + + + + + + + + + + + + + + + + + + + +
Cluster namevespa
EC2 instance typet2.medium
Number of instances10
Key pair*Select or create your keypair*
Security group inbound rules - port range0 - 65535
- Click *Create*, wait for the tasks to succeed, then *View Cluster* - it should say *Registered container instances: 10* in ACTIVE state. @@ -369,11 +438,28 @@ The following is a procedure to set up a multinode application on [AWS ECS](http - Click *Save `>` Create*. - Choose *Actions `->` Run task* and configure: - | Launch type | EC2 | - | --- | --- | - | Cluster | vespa | - | Number of tasks | 3 | - | Placement templates | One Task Per Host | + + + + + + + + + + + + + + + + + + + + + +
Launch typeEC2
Clustervespa
Number of tasks3
Placement templatesOne Task Per Host
- Click *Run Task*. - Validate that the config servers started successfully - use the same procedure as for [EC2 instances](#config-server-cluster-setup), checking */state/v1/health*. Do not continue before successfully validating this: @@ -444,11 +530,28 @@ The following is a procedure to set up a multinode application on [AWS ECS](http - Click *Save `>` Create*. Note the `"command": [ "services" ]`. See [controlling which services to start](/en/operations/self-managed/docker-containers#controlling-which-services-to-start) for details, this starts *services* only - the start script starts both the *configserver* and *services* if given no arguments - this is used for the config server above. For these 7 nodes, `services` is given as an argument to the start script to only start Vespa services. - Choose *Actions `>` Run task* and configure: - | Launch type | EC2 | - | --- | --- | - | Cluster | vespa | - | Number of tasks | 7 | - | Placement templates | One Task Per Host | + + + + + + + + + + + + + + + + + + + + + +
Launch typeEC2
Clustervespa
Number of tasks7
Placement templatesOne Task Per Host
- Click *Run Task*. - Validate startup. This step is the same as for [EC2 instances](#vespa-nodes-setup), e.g. for nodes running a Vespa container the port is 8080: diff --git a/mintlify-docs/en/operations/self-managed/using-kubernetes-with-vespa.mdx b/mintlify-docs/en/operations/self-managed/using-kubernetes-with-vespa.mdx deleted file mode 100644 index 11314c47ee..0000000000 --- a/mintlify-docs/en/operations/self-managed/using-kubernetes-with-vespa.mdx +++ /dev/null @@ -1,234 +0,0 @@ ---- -title: "Using Kubernetes with Vespa" -sidebarTitle: "Using Kubernetes" ---- - - -**Note:** - -In this article, find a recipe for how to start self-managed Vespa in a Kubernetes cluster. For production serving, [Vespa on Kubernetes](/en/operations/kubernetes/vespa-on-kubernetes) is a good read; The Vespa Operator provides a more Kubernetes-native integration with a high degree of automation and value-adds. - - -This article outlines how to run Vespa using Kubernetes. Find a quickstart for running Vespa in a single pod in [singlenode quickstart with minikube](#singlenode-quickstart-with-minikube). - -Setting up a multi-pod Vespa cluster is a bit more complicated, and requires knowledge about how Vespa configures its services. Use the [multinode-HA](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA/gke) sample application as a basis for configuration. - - -![Vespa overview illustration](/assets/img/vespa-overview.svg) - - -- A Vespa cluster is made of one or more config servers in a config server cluster. This cluster keeps configuration for the services running in the service pods. The config server cluster pods should hence be started first. -- Config servers use Apache Zookeeper for shared state. The config servers will not set their */state/v1/health* to UP before Zookeeper quorum is reached. This means that all config server pods must be running before quorum is reached, and one cannot use a *readinessProbe* probe for the config servers for a staggered start. -- See a practical example at [config server cluster startup](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA/gke#config-server-cluster-startup) - once completed it should look like:$ kubectl get pods - - ```bash - $ kubectl get pods - NAME READY STATUS RESTARTS AGE - vespa-configserver-0 1/1 Running 0 2m45s - vespa-configserver-1 1/1 Running 0 107s - vespa-configserver-2 1/1 Running 0 62s - ``` -- Once the config server cluster is started successfully, the [application package](/en/basics/applications) can be deployed, and the pods for the services nodes started. The application package maps services to pods (nodes), so this must be deployed successfully before the services in the pods can start. It does not matter whether one deploys the application package before or after starting the service pods, as the pods will idle, waiting for configuration. -- [multinode-HA](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA/gke) starts the pods first, see [Vespa startup](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA/gke#vespa-startup). As the application package is not yet deployed, the service inside the pods is not started (as it is not configured). The Vespa infrastructure is started, however, see [config sentinel](/en/operations/self-managed/config-sentinel) - so the pod is started with the config-proxy waiting for services config at this point. -- The [cluster startup](/en/operations/self-managed/config-sentinel#cluster-startup) feature is good to know. This is a setting to not start a service before enough services can run - see the *Connectivity check* log messages. -- Deploy the application package. At this point, the pods will know which service to run, and start a container or content node service. Shortly after, the */state/v1/health* endpoint is enabled on the pods. -- Note that ports are allocated dynamically, but the defaults will get you started - see the illustration with [services and ports](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA#get-started) for */state/v1/health*: - - Config server: 19071 - - Container node: 8080 - - Content node: 19107 - -The list above is an overview of the config server -> application package -> service */state/v1/health* dependency chain. This sequence of steps must be considered when building the Kubernetes cluster configuration. - -A good next step is running the [multinode-HA](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA/gke) for Kubernetes - there you will also find useful [troubleshooting](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA/gke#misc--troubleshooting) tools. - -## Singlenode quickstart with minikube - -This section describes how to install and run Vespa on a single machine using Kubernetes (K8s). Also see [Vespa example on GKE](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/basic-search-on-gke). - - -**Prerequisites:** - -- Linux, macOS or Windows 10 Pro on x86\_64 or arm64, with [Podman Desktop](https://podman.io/) or [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed, with an engine running. - - Alternatively, start the Podman daemon: - - ```bash - $ podman machine init --memory 6000 - $ podman machine start - ``` - - See [Docker Containers](/en/operations/self-managed/docker-containers) for system limits and other settings. -- For CPUs older than Haswell (2013), see [CPU Support](/en/operations/self-managed/cpu-support). -- Memory: Minimum 5 GB RAM dedicated to Docker/Podman. [Memory recommendations](/en/operations/self-managed/node-setup#memory-settings). -- Disk: Avoid `NO_SPACE` - the vespaengine/vespa container image + headroom for data requires disk space. [Read more](/en/writing/feed-block). -- [Homebrew](https://brew.sh/) to install the [Vespa CLI](/en/clients/vespa-cli), or download the Vespa CLI from [Github releases](https://github.com/vespa-engine/vespa/releases). -- [Git](https://git-scm.com/downloads). -- [Minikube](https://kubernetes.io/docs/tasks/tools/). - - - - -Refer to [Docker memory](/en/operations/self-managed/docker-containers#memory) for details and troubleshooting: - -```bash -docker info | grep "Total Memory" -or -podman info | grep "memTotal" -``` - - -```bash -minikube start --driver docker --memory 4096 -``` - - -**Clone the [Vespa sample apps](https://github.com/vespa-engine/sample-apps):** - -```bash -git clone --depth 1 https://github.com/vespa-engine/sample-apps.git -export VESPA_SAMPLE_APPS=`pwd`/sample-apps -``` - - -```yaml expandable -cat << EOF > service.yml -apiVersion: v1 -kind: Service -metadata: - name: vespa - labels: - app: vespa -spec: - selector: - app: vespa - type: NodePort - ports: - - name: container - port: 8080 - targetPort: 8080 - protocol: TCP - - name: config - port: 19071 - targetPort: 19071 - protocol: TCP -EOF -``` - -```yaml expandable -cat << EOF > statefulset.yml -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: vespa - labels: - app: vespa -spec: - replicas: 1 - serviceName: vespa - selector: - matchLabels: - app: vespa - template: - metadata: - labels: - app: vespa - spec: - containers: - - name: vespa - image: vespaengine/vespa - imagePullPolicy: Always - env: - - name: VESPA_CONFIGSERVERS - value: vespa-0.vespa.default.svc.cluster.local - securityContext: - runAsUser: 1000 - ports: - - containerPort: 8080 - protocol: TCP - readinessProbe: - httpGet: - path: /state/v1/health - port: 19071 - scheme: HTTP -EOF -``` - - -```bash -kubectl apply -f service.yml -f statefulset.yml -``` - - -```bash -kubectl get pods --watch -``` - -Wait for STATUS Running: - -```bash -NAME READY STATUS RESTARTS AGE -vespa-0 0/1 ContainerCreating 0 8s -vespa-0 0/1 Running 0 2m4s -``` - - -```bash -kubectl port-forward vespa-0 19071 8080 & -``` - - -```bash -curl -s --head http://localhost:19071/state/v1/health -``` - - -```bash -vespa deploy ${VESPA_SAMPLE_APPS}/album-recommendation -``` - - -This normally takes a minute or so: - -```bash -$ curl -s --head http://localhost:8080/state/v1/health -``` - - -```bash -$ vespa feed sample-apps/album-recommendation/ext/documents.jsonl -``` - - -```bash -$ vespa query 'select * from music where true' -``` - - -```bash -$ vespa document get id:mynamespace:music::love-is-here-to-stay -``` - - -Stop the running container: - -```bash -$ kubectl delete service,statefulsets vespa -``` - -Stop port forwarding: - -```bash -$ killall kubectl -``` - -Stop minikube: - -```bash -$ minikube stop -``` - - - -At any point during the procedure, dump logs for troubleshooting: - -```bash -$ kubectl logs vespa-0 -``` \ No newline at end of file diff --git a/mintlify-docs/en/operations/self-managed/vespa-support.mdx b/mintlify-docs/en/operations/self-managed/vespa-support.mdx index 7af4bff150..edf5192e07 100644 --- a/mintlify-docs/en/operations/self-managed/vespa-support.mdx +++ b/mintlify-docs/en/operations/self-managed/vespa-support.mdx @@ -50,12 +50,42 @@ $ vespa support diagnostics application --dest-dir The following options apply to all `diagnostics` subcommands. -| Option | Required | Default | Description | -| :--- | :--- | :--- | :--- | -| `--dest-dir` | Yes | — | Directory where the diagnostic output files will be written. | -| `--config-server-host` | No | Auto-detected | Host address of the Vespa config server. If not set, the tool resolves it automatically from the environment. | -| `--config-server-port` | No | 19071 | Port of the Vespa config server. | -| `--timeout-secs` | No | 60 | Timeout in seconds for operations that contact the config server. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionRequiredDefaultDescription
{`--dest-dir`}YesDirectory where the diagnostic output files will be written.
{`--config-server-host`}NoAuto-detectedHost address of the Vespa config server. If not set, the tool resolves it automatically from the environment.
{`--config-server-port`}No19071Port of the Vespa config server.
{`--timeout-secs`}No60Timeout in seconds for operations that contact the config server.
## What Is Collected diff --git a/mintlify-docs/en/operations/zones.mdx b/mintlify-docs/en/operations/zones.mdx index 714051e584..7a75cdace0 100644 --- a/mintlify-docs/en/operations/zones.mdx +++ b/mintlify-docs/en/operations/zones.mdx @@ -4,49 +4,245 @@ title: "Zones" An application is deployed to a *zone*, which is a combination of an [environment](/en/operations/environments) and a *region*, like `vespa deploy -z dev.aws-us-east-1c`. +A zone supports one or more availability zones. The `prod.aws-us-east-1c` zone is in the AWS availability zone with AZ ID `use1-az6`. Zones in Azure and GCP support the availability zone given by the region identifier, for example `prod.gcp-europe-west3-b` is in the GCP availability zone europe-west3-b. You can read more about zones supporting more than one availability zone in [regional zones](/en/operations/az). + If an application requires zone-specific configuration (e.g., different capacity requirements per zone), use [environment and region variants](/en/operations/deployment-variants#services.xml-variants). Also see [deployment.xml](/en/reference/applications/deployment). `dev` zones for development and performance testing: -| Environment | Default | Region | AWS Zone ID | -| --- | --- | --- | --- | -| [dev](/en/operations/environments#dev) | Yes | aws-us-east-1c | use1-az6 | -| [dev](/en/operations/environments#dev) | No | aws-euw1-az1 | euw1-az1 | -| [dev](/en/operations/environments#dev) | No | azure-eastus-az1 | | -| [dev](/en/operations/environments#dev) | No | gcp-us-central1-f | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EnvironmentDefaultRegionAvailability Zones
devYesaws-us-east-1cuse1-az6
devNoaws-euw1-az1euw1-az1
devNoazure-eastus-az1
devNogcp-us-central1-f
`prod` zones for production serving, with a [CD pipeline](/en/operations/automated-deployments): -| Environment | Region | AWS Zone ID | -| --- | --- | --- | -| [prod](/en/operations/environments#prod) | aws-us-east-1c | use1-az6 | -| [prod](/en/operations/environments#prod) | aws-use1-az4 | use1-az4 | -| [prod](/en/operations/environments#prod) | aws-use2-az1 | use2-az1 | -| [prod](/en/operations/environments#prod) | aws-use2-az3 | use2-az3 | -| [prod](/en/operations/environments#prod) | aws-us-west-2a | usw2-az1 | -| [prod](/en/operations/environments#prod) | aws-usw2-az3 | usw2-az3 | -| [prod](/en/operations/environments#prod) | aws-eu-west-1a | euw1-az2 | -| [prod](/en/operations/environments#prod) | aws-euw1-az1 | euw1-az1 | -| [prod](/en/operations/environments#prod) | aws-euc1-az1 | euc1-az1 | -| [prod](/en/operations/environments#prod) | aws-euc1-az3 | euc1-az3 | -| [prod](/en/operations/environments#prod) | aws-cac1-az1 | cac1-az1 | -| [prod](/en/operations/environments#prod) | aws-cac1-az2 | cac1-az2 | -| [prod](/en/operations/environments#prod) | aws-aps1-az1 | aps1-az1 | -| [prod](/en/operations/environments#prod) | aws-ap-northeast-1a | apne1-az4 | -| [prod](/en/operations/environments#prod) | aws-apne1-az1 | apne1-az1 | -| [prod](/en/operations/environments#prod) | gcp-europe-west3-b | | -| [prod](/en/operations/environments#prod) | gcp-us-central1-a | | -| [prod](/en/operations/environments#prod) | gcp-us-central1-b | | -| [prod](/en/operations/environments#prod) | gcp-us-central1-c | | -| [prod](/en/operations/environments#prod) | gcp-us-central1-f | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EnvironmentRegionAvailability Zones
prodaws-us-east-1use1-az1 to use1-az6, except use1-az3
prodaws-us-east-1cuse1-az6
prodaws-use1-az4use1-az4
prodaws-use2-az1use2-az1
prodaws-use2-az3use2-az3
prodaws-us-west-2ausw2-az1
prodaws-usw2-az2usw2-az2
prodaws-usw2-az3usw2-az3
prodaws-eu-west-1euw1-az1 to euw1-az3
prodaws-eu-west-1aeuw1-az2
prodaws-euw1-az1euw1-az1
prodaws-euw1-az3euw1-az3
prodaws-euc1-az1euc1-az1
prodaws-euc1-az2euc1-az2
prodaws-euc1-az3euc1-az3
prodaws-eun1-az1eun1-az1
prodaws-cac1-az1cac1-az1
prodaws-cac1-az2cac1-az2
prodaws-cac1-az4cac1-az4
prodaws-aps1-az1aps1-az1
prodaws-ap-northeast-1aapne1-az4
prodaws-apne1-az1apne1-az1
prodaws-apne1-az2apne1-az2
prodgcp-europe-west3-b
prodgcp-us-central1-a
prodgcp-us-central1-b
prodgcp-us-central1-c
prodgcp-us-central1-f
prodgcp-us-east4-c
prodgcp-us-west1-c
The `prod` zones use ephemeral instances for system tests and staging tests, running in [test](/en/operations/environments#test) and [staging](/en/operations/environments#staging) environments. These are internal zones, and never directly deployed to, included here for reference: -| Environment | Region | AWS Zone ID | -| --- | --- | --- | -| [test](/en/operations/environments#test) | aws-us-east-1c | use1-az6 | -| [test](/en/operations/environments#test) | gcp-us-central1-f | | -| [staging](/en/operations/environments#staging) | aws-us-east-1c | use1-az6 | -| [staging](/en/operations/environments#staging) | gcp-us-central1-f | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EnvironmentRegionAvailability Zones
testaws-us-east-1cuse1-az6
testgcp-us-central1-f
stagingaws-us-east-1cuse1-az6
staginggcp-us-central1-f
Contact [Support](https://vespa.ai/support/) to request more zones. \ No newline at end of file diff --git a/mintlify-docs/en/performance/feature-tuning.mdx b/mintlify-docs/en/performance/feature-tuning.mdx index 8233e45b69..da80ffe730 100644 --- a/mintlify-docs/en/performance/feature-tuning.mdx +++ b/mintlify-docs/en/performance/feature-tuning.mdx @@ -320,23 +320,78 @@ The blog post series on [Building Billion-Scale Vector Search](https://blog.vesp ### Cell value types -| Type | Description | -| :--- | :--- | -| double | The default tensor cell type is the 64-bit floating-point `double` format. It gives the best precision at the cost of high memory usage and somewhat slower calculations. Using a smaller value type increases performance, trading off precision, so consider changing to one of the cell types below before scaling the application. | -| float | The 32-bit floating-point format `float` should usually be used for all tensors when scaling for production. Note that some frameworks like TensorFlow prefer 32-bit floats. A vector with 1000 dimensions, `tensor(x[1000])` uses approximately 4K memory per tensor value. | -| bfloat16 | This type has the range as a normal 32-bit float but only 8 bits of precision and can be thought of as a "float with lossy compression" - see [Wikipedia](https://en.wikipedia.org/wiki/Bfloat16_floating-point_format). If memory (or memory bandwidth) is a concern, change the most space-consuming tensors to use the `bfloat16` cell type. Some careful analysis of the data is required before using this type.

When doing calculations, `bfloat16` will act as if it was a 32-bit float, but the smaller size comes with a potential computational overhead. In most cases, the `bfloat16` needs conversion to a 32-bit float before the actual calculation can occur, adding an extra conversion step.

In some cases, having tensors with `bfloat16` cells might bypass some built-in optimizations (like matrix multiplication) that will be hardware-accelerated only if the cells are of the same type. To avoid this, use the [cell\_cast](/en/reference/ranking/ranking-expressions#cell_cast) tensor operation to make sure the cells are of the right type before doing the more expensive operations. | -| int8 | If using machine learning to generate a model with data quantization, one can target the `int8` cell value type, which is a signed integer with a range from -128 to +127 only. This is also treated like a "float with limited range and lossy compression" by the Vespa tensor framework, and gives results as if it were a 32-bit float when any calculation is done. This type is also suitable when representing boolean values (0 or 1).

**Note:**

If the input for an `int8` cell is not directly representable, the resulting cell value is undefined, so take care to only input numbers in the `[-128,127]` range.


It's also possible to use `int8` representing binary data for [hamming distance](/en/reference/schemas/schemas#distance-metric) Nearest-Neighbor search. Refer to [billion-scale-knn](https://blog.vespa.ai/billion-scale-knn/) for example use.> | + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
doubleThe default tensor cell type is the 64-bit floating-point {`double`} format. It gives the best precision at the cost of high memory usage and somewhat slower calculations. Using a smaller value type increases performance, trading off precision, so consider changing to one of the cell types below before scaling the application.
floatThe 32-bit floating-point format {`float`} should usually be used for all tensors when scaling for production. Note that some frameworks like TensorFlow prefer 32-bit floats. A vector with 1000 dimensions, {`tensor(x[1000])`} uses approximately 4K memory per tensor value.
bfloat16This type has the range as a normal 32-bit float but only 8 bits of precision and can be thought of as a "float with lossy compression" - see Wikipedia. If memory (or memory bandwidth) is a concern, change the most space-consuming tensors to use the {`bfloat16`} cell type. Some careful analysis of the data is required before using this type.

When doing calculations, {`bfloat16`} will act as if it was a 32-bit float, but the smaller size comes with a potential computational overhead. In most cases, the {`bfloat16`} needs conversion to a 32-bit float before the actual calculation can occur, adding an extra conversion step.

In some cases, having tensors with {`bfloat16`} cells might bypass some built-in optimizations (like matrix multiplication) that will be hardware-accelerated only if the cells are of the same type. To avoid this, use the cell_cast tensor operation to make sure the cells are of the right type before doing the more expensive operations.
int8If using machine learning to generate a model with data quantization, one can target the {`int8`} cell value type, which is a signed integer with a range from -128 to +127 only. This is also treated like a "float with limited range and lossy compression" by the Vespa tensor framework, and gives results as if it were a 32-bit float when any calculation is done. This type is also suitable when representing boolean values (0 or 1).

**Note:**

If the input for an {`int8`} cell is not directly representable, the resulting cell value is undefined, so take care to only input numbers in the {`[-128,127]`} range.


It's also possible to use {`int8`} representing binary data for hamming distance Nearest-Neighbor search. Refer to billion-scale-knn for example use.>
### Inner/outer products The following is a primer into inner/outer products and execution details: -| tensor a | tensor b | product | sum | comment | -| :--- | :--- | :--- | :--- | :--- | -| tensor(x\[3\]):\[1.0, 2.0, 3.0\] | tensor(x\[3\]):\[4.0, 5.0, 6.0\] | tensor(x\[3\]):\[4.0, 10.0, 18.0\] | 32 | [Playground example](https://docs.vespa.ai/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEMSybIiFIAXA2gZywAnABQAPRAGYAugEo4iAIzEwAJmXTIrCAF9W20hmrlcDIgbaU0WugwBGLGpg5Qe-IWMmz5AFmUBWZQA2KU1HXQx9ViNME04zawp8aPJ6TlhzR3YGRgAqe2tw1EjDBNjCBwsk6whIVKhoAFdaAGMKzOdIPgaAW2Fc2xlQmkKdFCkQbSA). The dimension name and size are the same in both tensors - this is an inner product with a scalar result. | -| tensor(x\[3\]):\[1.0, 2.0, 3.0\] | tensor(y\[3\]):\[4.0, 5.0, 6.0\] | tensor(x\[3\],y\[3\]):\[ \[4.0, 5.0, 6.0\], \[8.0, 10.0, 12.0\], \[12.0, 15.0, 18.0\] \] | 90 | [Playground example](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEMSybIiFIAXA2gZywAnABQAPRAGYAugEo4iAIzEwAJmXTIrCAF9W20hmrlcDIgbaU0WugwBGLGpg5Qe-IWMmz5AFmUBWZQA2KU1HXQx9ViNME04zawp8aPJ6TlhzR3YGRgAqe2tw1EjDBNjCBwsk6whIVKhoAFdaAGMKzOdIPgaAW2Fc2xlQmkKdFCkQbSA). The dimension size is the same in both tensors, but dimensions have different names -> this is an outer product; the result is a two-dimensional tensor. | -| tensor(x\[3\]):\[1.0, 2.0, 3.0\] | tensor(x\[2\]):\[4.0, 5.0\] | undefined | | [Playground example](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEMSybIiFIAXA2gZywAnABQAPRAGYAugEo4iAIzEwAJmXTIrCAF9W20hmrlcDIgbaU0WugwBGLGpg5Qe-IWMQrZ8gCzKArFKajroY+qxGmCacZtYU+JHk9Jyw5o7sDIwAVPbWoajhhnHRhA4WCdYQkMlQ0ACutADGZenOkHx1ALbC2bYywTT5OihSINpAA). Two tensors in the same dimension but with different lengths -> undefined. | -| tensor(x\[3\]):\[1.0, 2.0, 3.0\] | tensor(y\[2\]):\[4.0, 5.0\] | tensor(x\[3\],y\[2\]):\[ \[4.0, 5.0\], \[8.0, 10.0\], \[12.0, 15.0\] \] | 54 | [Playground example](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEMSybIiFIAXA2gZywAnABQAPRAGYAugEo4iAIzEwAJmXTIrCAF9W20hmrlcDIgbaU0WugwBGLGpg5Qe-IcICeiFbPkAWZQBWKU1HXQx9ViNME04zawp8aPJ6TlhzR3YGRgAqe2tw1EjDBNjCBwsk6whIVKhoAFdaAGMKzOdIPgaAW2Fc2xlQmkKdFCkQbSA). Two tensors with different names and dimensions -> this is an outer product; the result is a two-dimensional tensor. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
tensor atensor bproductsumcomment
tensor(x[3]):[1.0, 2.0, 3.0]tensor(x[3]):[4.0, 5.0, 6.0]tensor(x[3]):[4.0, 10.0, 18.0]32Playground example. The dimension name and size are the same in both tensors - this is an inner product with a scalar result.
tensor(x[3]):[1.0, 2.0, 3.0]tensor(y[3]):[4.0, 5.0, 6.0]tensor(x[3],y[3]):[ [4.0, 5.0, 6.0], [8.0, 10.0, 12.0], [12.0, 15.0, 18.0] ]90Playground example. The dimension size is the same in both tensors, but dimensions have different names -> this is an outer product; the result is a two-dimensional tensor.
tensor(x[3]):[1.0, 2.0, 3.0]tensor(x[2]):[4.0, 5.0]undefinedPlayground example. Two tensors in the same dimension but with different lengths -> undefined.
tensor(x[3]):[1.0, 2.0, 3.0]tensor(y[2]):[4.0, 5.0]tensor(x[3],y[2]):[ [4.0, 5.0], [8.0, 10.0], [12.0, 15.0] ]54Playground example. Two tensors with different names and dimensions -> this is an outer product; the result is a two-dimensional tensor.
Inner product - observe optimized into `DenseDotProductFunction` with no temporary objects: @@ -397,10 +452,24 @@ Note that an inner product can also be run on mapped tensors ([Playground exampl `sum(model_id * models, m_id)` -| tensor name | tensor type | -| :--- | :--- | -| model\_id | `tensor(m_id{})` | -| models | `tensor(m_id{}, x[3])` | + + + + + + + + + + + + + + + + + +
tensor nametensor type
model_id{`tensor(m_id{})`}
models{`tensor(m_id{}, x[3])`}
Using a mapped dimension to select an indexed tensor can be considered a [mapped lookup](/en/ranking/tensor-examples#using-a-tensor-as-a-lookup-structure). This is similar to creating a slice but optimized into a single `MappedLookup` - see [Tensor Playground](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gFssATAgGwH0BLFksmpCIJIAFwK0AzlgBOACkY8WwAL4BKOMEYAmOAEYAdAAYVkARBUCVpDNXK4GRG4MppzdBszbtJ-GpmEocSlZBSVVYgAPRABmAF0NLT04RAAWY2IwAFYMsAA2YzjMnRSAdlyADlyATkLTd0sMawE7TAcRJ3cKfFbyehFJAFdGBVYOJTAAKjAvDklipTU-f0IGIZHZrl4pmbGfBd4lhqtnCF6odtXTzFdziEh+qEl2bgBjTpXVkVHvSUnNxZaJRwHT1fyNVDNWxdS5CZbkW7ue6PJgAQxwOAILE47CwWAA1oMcJwZFjBu94YJApBSSxyQQfnN-nslMR1sRFIczOCrCg4iAVEA) example. @@ -423,11 +492,28 @@ Using a mapped dimension to select an indexed tensor can be considered a [mapped `sum(query(model_id) * model_weights * model_features)` -| tensor name | tensor type | -| :--- | :--- | -| query(model\_id) | `tensor(model{})` | -| model\_weights | `tensor(model{}, feature{})` | -| model\_features | `tensor(feature{})` | + + + + + + + + + + + + + + + + + + + + + +
tensor nametensor type
query(model_id){`tensor(model{})`}
model_weights{`tensor(model{}, feature{})`}
model_features{`tensor(feature{})`}
Three-way mapped (sparse) dot product: [Tensor Playground](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEcBXAgJwE8AKAWywBMCAGwD6AS34BKEmRqQiCSABcCtAM5Y2AHmhCsAQyUA+XgOHAAvpLjAeABjgBGC5FkQLsi6QzVyuBkTecpRobnQMfIKiAO4EYgDmABZKajI0mApQKuqaOnqGJpHmXmDQBIbMbASW1sBgADq0tmZCcPbEpeVKlQRw0HYWTsSNzVFtdh1lFVV9znAATMNNRa08jpNdPX0DcADMS6PCbeud073QcwAsYC5hHhhesr6Y-oqBYRT4z+T0iisiU26VVSQXS8gY2Q02l0BmMXEBPRqNn6cAArJNHHAAGy3dL3VCPHwfV6ENLBL5hCCQX5QFjsbj-CSSMAAKjA-1iCWSalZ7JaAM2wLJYMyTFYnFMUXEUl5HLiSRSsv5CKFd08oNCYJJ4I1VJC33CijUzB4XDpEsZMrZcq5iutysFBDU0l1GQYxtN5oZ-KZSqlnIVPPtUpVTukaoeKAAuiALEA) @@ -454,11 +540,28 @@ Three-way mapped (sparse) dot product: [Tensor Playground](https://docs.vespa.ai `sum(query(model_id) * model_weights * model_features)` -| tensor name | tensor type | -| :--- | :--- | -| query(model\_id) | `tensor(model{})` | -| model\_weights | `tensor(model{}, feature[2])` | -| model\_features | `tensor(feature[2])` | + + + + + + + + + + + + + + + + + + + + + +
tensor nametensor type
query(model_id){`tensor(model{})`}
model_weights{`tensor(model{}, feature[2])`}
model_features{`tensor(feature[2])`}
Three-way mapped (mixed) dot product: [Tensor Playground](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEcBXAgJwE8AKAWywBMCAGwD6AS34BKEmRqQiCSABcCtAM5Y2AHmhCsAQyUA+XgOHAAvpLjAeABjgBGC5FkQLsi6QzVyuBkTecpRobnQMfIKiAO4EYgDmABZKajI0mApQKuqaOnqGJpHmXmDQBIbMbASIAEwAutbAYAA6tLZmQnD2xKXlSpUEcHYWTsSt7VFddj1lFVVOIzVjbUWdPI4zfQNDIwDMyxPCXRu9c4POcAAsYC5hHhhesr6Y-oqBYRT4z+T0iqsis36VVSQXS8gY2Q02l0BmMXEBA1qDTgiAArMQAGx1Vzpe6oR4+D6vQhpYJfMIQSC-KAsdjcf4SSRgABUYH+sQSyTULLZHQBW2BpLBmSYrE4pii4ikPPZcSSKRlfIRgrunlBoTBxPB6spIW+4UUamYPC4tPFDOlrNlnIVVqVAoIamkOoyDCNJrN9L5jMVko58u5dslysd0lVDxQdRAFiAA) diff --git a/mintlify-docs/en/performance/instance-types/aws-instance-types.mdx b/mintlify-docs/en/performance/instance-types/aws-instance-types.mdx index 4c54ac5950..a26d7aceff 100644 --- a/mintlify-docs/en/performance/instance-types/aws-instance-types.mdx +++ b/mintlify-docs/en/performance/instance-types/aws-instance-types.mdx @@ -7,169 +7,1329 @@ All instance types without Local SSD use [Amazon Elastic Block Store](https://aw These volumes can be any size from a minimum of 3 x memory, up to 16TB. -| Architecture | CPU cores | Memory (GB) | Local SSD (GB) | GPU Memory (GB) | | -| :--- | :--- | :--- | :--- | :--- | :--- | -| arm64 | 1.0 | 8 | \- | \- | | -| arm64 | 1.0 | 8 | 59 | \- | | -| arm64 | 1.0 | 16 | \- | \- | | -| arm64 | 1.0 | 16 | 59 | \- | | -| arm64 | 2.0 | 8 | \- | \- | | -| arm64 | 2.0 | 8 | 118 | \- | | -| arm64 | 2.0 | 16 | \- | \- | | -| arm64 | 2.0 | 16 | 118 | \- | | -| arm64 | 2.0 | 16 | 468 | \- | | -| arm64 | 2.0 | 32 | \- | \- | | -| arm64 | 2.0 | 32 | 118 | \- | | -| arm64 | 4.0 | 8 | \- | \- | | -| arm64 | 4.0 | 8 | 237 | \- | | -| arm64 | 4.0 | 16 | \- | \- | | -| arm64 | 4.0 | 16 | 237 | \- | | -| arm64 | 4.0 | 32 | \- | \- | | -| arm64 | 4.0 | 32 | 237 | \- | | -| arm64 | 4.0 | 32 | 937 | \- | | -| arm64 | 4.0 | 64 | \- | \- | | -| arm64 | 4.0 | 64 | 237 | \- | | -| arm64 | 8.0 | 16 | \- | \- | | -| arm64 | 8.0 | 16 | 474 | \- | | -| arm64 | 8.0 | 32 | \- | \- | | -| arm64 | 8.0 | 32 | 474 | \- | | -| arm64 | 8.0 | 64 | \- | \- | | -| arm64 | 8.0 | 64 | 474 | \- | | -| arm64 | 8.0 | 64 | 1875 | \- | | -| arm64 | 8.0 | 128 | \- | \- | | -| arm64 | 8.0 | 128 | 475 | \- | | -| arm64 | 16.0 | 32 | \- | \- | | -| arm64 | 16.0 | 32 | 950 | \- | | -| arm64 | 16.0 | 64 | \- | \- | | -| arm64 | 16.0 | 64 | 950 | \- | | -| arm64 | 16.0 | 128 | \- | \- | | -| arm64 | 16.0 | 128 | 950 | \- | | -| arm64 | 16.0 | 128 | 3750 | \- | | -| arm64 | 16.0 | 256 | \- | \- | | -| arm64 | 16.0 | 256 | 950 | \- | | -| arm64 | 32.0 | 64 | \- | \- | | -| arm64 | 32.0 | 64 | 1900 | \- | | -| arm64 | 32.0 | 128 | \- | \- | | -| arm64 | 32.0 | 128 | 1900 | \- | | -| arm64 | 32.0 | 256 | \- | \- | | -| arm64 | 32.0 | 256 | 1900 | \- | | -| arm64 | 32.0 | 256 | 7500 | \- | | -| arm64 | 32.0 | 512 | \- | \- | | -| arm64 | 32.0 | 512 | 1900 | \- | | -| arm64 | 48.0 | 96 | \- | \- | | -| arm64 | 48.0 | 96 | 2850 | \- | | -| arm64 | 48.0 | 192 | \- | \- | | -| arm64 | 48.0 | 192 | 2850 | \- | | -| arm64 | 48.0 | 384 | \- | \- | | -| arm64 | 48.0 | 384 | 2850 | \- | | -| arm64 | 48.0 | 384 | 11250 | \- | | -| arm64 | 48.0 | 768 | \- | \- | | -| arm64 | 48.0 | 768 | 2850 | \- | | -| arm64 | 64.0 | 128 | \- | \- | | -| arm64 | 64.0 | 128 | 3800 | \- | | -| arm64 | 64.0 | 256 | \- | \- | | -| arm64 | 64.0 | 256 | 3800 | \- | | -| arm64 | 64.0 | 512 | \- | \- | | -| arm64 | 64.0 | 512 | 3800 | \- | | -| arm64 | 64.0 | 512 | 15000 | \- | | -| arm64 | 64.0 | 1024 | \- | \- | | -| arm64 | 64.0 | 1024 | 3800 | \- | | -| arm64 | 96.0 | 192 | \- | \- | | -| arm64 | 96.0 | 192 | 5700 | \- | | -| arm64 | 96.0 | 384 | \- | \- | | -| arm64 | 96.0 | 384 | 5700 | \- | | -| arm64 | 96.0 | 768 | \- | \- | | -| arm64 | 96.0 | 768 | 5700 | \- | | -| arm64 | 96.0 | 768 | 22500 | \- | | -| arm64 | 96.0 | 1536 | \- | \- | | -| arm64 | 192.0 | 384 | \- | \- | | -| arm64 | 192.0 | 384 | 11400 | \- | | -| arm64 | 192.0 | 768 | \- | \- | | -| arm64 | 192.0 | 768 | 11400 | \- | | -| arm64 | 192.0 | 1536 | \- | \- | | -| arm64 | 192.0 | 1536 | 11400 | \- | | -| arm64 | 192.0 | 1536 | 45000 | \- | | -| arm64 | 192.0 | 3072 | \- | \- | | -| x86\_64 | 2.0 | 8 | \- | \- | | -| x86\_64 | 2.0 | 8 | 75 | \- | | -| x86\_64 | 2.0 | 8 | 118 | \- | | -| x86\_64 | 2.0 | 16 | \- | \- | | -| x86\_64 | 2.0 | 16 | 75 | \- | | -| x86\_64 | 2.0 | 16 | 468 | \- | | -| x86\_64 | 2.0 | 16 | 1250 | \- | | -| x86\_64 | 4.0 | 8 | \- | \- | | -| x86\_64 | 4.0 | 8 | 100 | \- | | -| x86\_64 | 4.0 | 8 | 237 | \- | | -| x86\_64 | 4.0 | 16 | \- | \- | | -| x86\_64 | 4.0 | 16 | 125 | 16.0 | | -| x86\_64 | 4.0 | 16 | 150 | \- | | -| x86\_64 | 4.0 | 16 | 237 | \- | | -| x86\_64 | 4.0 | 32 | \- | \- | | -| x86\_64 | 4.0 | 32 | 150 | \- | | -| x86\_64 | 4.0 | 32 | 237 | \- | | -| x86\_64 | 4.0 | 32 | 937 | \- | | -| x86\_64 | 4.0 | 32 | 2500 | \- | | -| x86\_64 | 8.0 | 16 | \- | \- | | -| x86\_64 | 8.0 | 16 | 200 | \- | | -| x86\_64 | 8.0 | 16 | 474 | \- | | -| x86\_64 | 8.0 | 32 | \- | \- | | -| x86\_64 | 8.0 | 32 | 225 | 16.0 | | -| x86\_64 | 8.0 | 32 | 300 | \- | | -| x86\_64 | 8.0 | 32 | 474 | \- | | -| x86\_64 | 8.0 | 64 | \- | \- | | -| x86\_64 | 8.0 | 64 | 300 | \- | | -| x86\_64 | 8.0 | 64 | 1875 | \- | | -| x86\_64 | 8.0 | 64 | 5000 | \- | | -| x86\_64 | 12.0 | 96 | 7500 | \- | | -| x86\_64 | 16.0 | 32 | \- | \- | | -| x86\_64 | 16.0 | 32 | 400 | \- | | -| x86\_64 | 16.0 | 32 | 950 | \- | | -| x86\_64 | 16.0 | 64 | \- | \- | | -| x86\_64 | 16.0 | 64 | 600 | \- | | -| x86\_64 | 16.0 | 64 | 950 | \- | | -| x86\_64 | 16.0 | 128 | \- | \- | | -| x86\_64 | 16.0 | 128 | 600 | \- | | -| x86\_64 | 16.0 | 128 | 3750 | \- | | -| x86\_64 | 24.0 | 192 | 900 | \- | | -| x86\_64 | 24.0 | 192 | 15000 | \- | | -| x86\_64 | 32.0 | 64 | \- | \- | | -| x86\_64 | 32.0 | 64 | 1200 | \- | | -| x86\_64 | 32.0 | 64 | 1900 | \- | | -| x86\_64 | 32.0 | 128 | \- | \- | | -| x86\_64 | 32.0 | 128 | 1200 | \- | | -| x86\_64 | 32.0 | 128 | 1900 | \- | | -| x86\_64 | 32.0 | 256 | \- | \- | | -| x86\_64 | 32.0 | 256 | 1200 | \- | | -| x86\_64 | 32.0 | 256 | 7500 | \- | | -| x86\_64 | 36.0 | 72 | \- | \- | | -| x86\_64 | 36.0 | 72 | 900 | \- | | -| x86\_64 | 48.0 | 96 | \- | \- | | -| x86\_64 | 48.0 | 96 | 1800 | \- | | -| x86\_64 | 48.0 | 96 | 2850 | \- | | -| x86\_64 | 48.0 | 192 | \- | \- | | -| x86\_64 | 48.0 | 192 | 1800 | \- | | -| x86\_64 | 48.0 | 192 | 2850 | \- | | -| x86\_64 | 48.0 | 384 | \- | \- | | -| x86\_64 | 48.0 | 384 | 1800 | \- | | -| x86\_64 | 48.0 | 384 | 30000 | \- | | -| x86\_64 | 64.0 | 128 | \- | \- | | -| x86\_64 | 64.0 | 128 | 3800 | \- | | -| x86\_64 | 64.0 | 256 | \- | \- | | -| x86\_64 | 64.0 | 256 | 2400 | \- | | -| x86\_64 | 64.0 | 256 | 3800 | \- | | -| x86\_64 | 64.0 | 512 | \- | \- | | -| x86\_64 | 64.0 | 512 | 2400 | \- | | -| x86\_64 | 64.0 | 512 | 15000 | \- | | -| x86\_64 | 72.0 | 144 | \- | \- | | -| x86\_64 | 72.0 | 144 | 1800 | \- | | -| x86\_64 | 72.0 | 576 | 45000 | \- | | -| x86\_64 | 96.0 | 192 | \- | \- | | -| x86\_64 | 96.0 | 192 | 3600 | \- | | -| x86\_64 | 96.0 | 192 | 5700 | \- | | -| x86\_64 | 96.0 | 384 | \- | \- | | -| x86\_64 | 96.0 | 384 | 3600 | \- | | -| x86\_64 | 96.0 | 768 | \- | \- | | -| x86\_64 | 96.0 | 768 | 3600 | \- | | -| x86\_64 | 96.0 | 768 | 60000 | \- | | -| x86\_64 | 128.0 | 1024 | 30000 | \- | | -| x86\_64 | 192.0 | 1536 | 120000 | \- | | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArchitectureCPU coresMemory (GB)Local SSD (GB)GPU Memory (GB)
arm641.08--
arm641.0859-
arm641.016--
arm641.01659-
arm642.08--
arm642.08118-
arm642.016--
arm642.016118-
arm642.016468-
arm642.032--
arm642.032118-
arm644.08--
arm644.08237-
arm644.016--
arm644.016237-
arm644.032--
arm644.032237-
arm644.032937-
arm644.064--
arm644.064237-
arm648.016--
arm648.016474-
arm648.032--
arm648.032474-
arm648.064--
arm648.064474-
arm648.0641875-
arm648.0128--
arm648.0128475-
arm6416.032--
arm6416.032950-
arm6416.064--
arm6416.064950-
arm6416.0128--
arm6416.0128950-
arm6416.01283750-
arm6416.0256--
arm6416.0256950-
arm6432.064--
arm6432.0641900-
arm6432.0128--
arm6432.01281900-
arm6432.0256--
arm6432.02561900-
arm6432.02567500-
arm6432.0512--
arm6432.05121900-
arm6448.096--
arm6448.0962850-
arm6448.0192--
arm6448.01922850-
arm6448.0384--
arm6448.03842850-
arm6448.038411250-
arm6448.0768--
arm6448.07682850-
arm6464.0128--
arm6464.01283800-
arm6464.0256--
arm6464.02563800-
arm6464.0512--
arm6464.05123800-
arm6464.051215000-
arm6464.01024--
arm6464.010243800-
arm6496.0192--
arm6496.01925700-
arm6496.0384--
arm6496.03845700-
arm6496.0768--
arm6496.07685700-
arm6496.076822500-
arm6496.01536--
arm64192.0384--
arm64192.038411400-
arm64192.0768--
arm64192.076811400-
arm64192.01536--
arm64192.0153611400-
arm64192.0153645000-
arm64192.03072--
x86_642.08--
x86_642.0875-
x86_642.08118-
x86_642.016--
x86_642.01675-
x86_642.016468-
x86_642.0161250-
x86_644.08--
x86_644.08100-
x86_644.08237-
x86_644.016--
x86_644.01612516.0
x86_644.016150-
x86_644.016237-
x86_644.032--
x86_644.032150-
x86_644.032237-
x86_644.032937-
x86_644.0322500-
x86_648.016--
x86_648.016200-
x86_648.016474-
x86_648.032--
x86_648.03222516.0
x86_648.032300-
x86_648.032474-
x86_648.064--
x86_648.064300-
x86_648.0641875-
x86_648.0645000-
x86_6412.0967500-
x86_6416.032--
x86_6416.032400-
x86_6416.032950-
x86_6416.064--
x86_6416.064600-
x86_6416.064950-
x86_6416.0128--
x86_6416.0128600-
x86_6416.01283750-
x86_6424.0192900-
x86_6424.019215000-
x86_6432.064--
x86_6432.0641200-
x86_6432.0641900-
x86_6432.0128--
x86_6432.01281200-
x86_6432.01281900-
x86_6432.0256--
x86_6432.02561200-
x86_6432.02567500-
x86_6436.072--
x86_6436.072900-
x86_6448.096--
x86_6448.0961800-
x86_6448.0962850-
x86_6448.0192--
x86_6448.01921800-
x86_6448.01922850-
x86_6448.0384--
x86_6448.03841800-
x86_6448.038430000-
x86_6464.0128--
x86_6464.01283800-
x86_6464.0256--
x86_6464.02562400-
x86_6464.02563800-
x86_6464.0512--
x86_6464.05122400-
x86_6464.051215000-
x86_6472.0144--
x86_6472.01441800-
x86_6472.057645000-
x86_6496.0192--
x86_6496.01923600-
x86_6496.01925700-
x86_6496.0384--
x86_6496.03843600-
x86_6496.0768--
x86_6496.07683600-
x86_6496.076860000-
x86_64128.0102430000-
x86_64192.01536120000-
\ No newline at end of file diff --git a/mintlify-docs/en/performance/instance-types/azure-instance-types.mdx b/mintlify-docs/en/performance/instance-types/azure-instance-types.mdx index fdc9130fa3..f94a1f8221 100644 --- a/mintlify-docs/en/performance/instance-types/azure-instance-types.mdx +++ b/mintlify-docs/en/performance/instance-types/azure-instance-types.mdx @@ -6,70 +6,537 @@ sidebarTitle: "Azure instance types" All instance types without Local SSD use [Azure Managed Disk](https://learn.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview) for storage. -| Architecture | CPU cores | Memory (GB) | Local SSD (GB) | GPU Memory (GB) | | -| :--- | :--- | :--- | :--- | :--- | :--- | -| x86\_64 | 2.0 | 8 | \- | \- | | -| x86\_64 | 2.0 | 8 | 75 | \- | | -| x86\_64 | 2.0 | 8 | 118 | \- | | -| x86\_64 | 2.0 | 16 | \- | \- | | -| x86\_64 | 2.0 | 16 | 75 | \- | | -| x86\_64 | 2.0 | 16 | 118 | \- | | -| x86\_64 | 4.0 | 8 | \- | \- | | -| x86\_64 | 4.0 | 8 | 150 | \- | | -| x86\_64 | 4.0 | 16 | \- | \- | | -| x86\_64 | 4.0 | 16 | 150 | \- | | -| x86\_64 | 4.0 | 16 | 236 | \- | | -| x86\_64 | 4.0 | 32 | \- | \- | | -| x86\_64 | 4.0 | 32 | 150 | \- | | -| x86\_64 | 4.0 | 32 | 236 | \- | | -| x86\_64 | 8.0 | 16 | \- | \- | | -| x86\_64 | 8.0 | 16 | 300 | \- | | -| x86\_64 | 8.0 | 32 | \- | \- | | -| x86\_64 | 8.0 | 32 | 300 | \- | | -| x86\_64 | 8.0 | 32 | 472 | \- | | -| x86\_64 | 8.0 | 64 | \- | \- | | -| x86\_64 | 8.0 | 64 | 300 | \- | | -| x86\_64 | 8.0 | 64 | 472 | \- | | -| x86\_64 | 16.0 | 32 | \- | \- | | -| x86\_64 | 16.0 | 32 | 600 | \- | | -| x86\_64 | 16.0 | 64 | \- | \- | | -| x86\_64 | 16.0 | 64 | 600 | \- | | -| x86\_64 | 16.0 | 64 | 944 | \- | | -| x86\_64 | 16.0 | 128 | \- | \- | | -| x86\_64 | 16.0 | 128 | 600 | \- | | -| x86\_64 | 16.0 | 128 | 944 | \- | | -| x86\_64 | 20.0 | 160 | \- | \- | | -| x86\_64 | 20.0 | 160 | 750 | \- | | -| x86\_64 | 20.0 | 160 | 1181 | \- | | -| x86\_64 | 32.0 | 64 | \- | \- | | -| x86\_64 | 32.0 | 64 | 1200 | \- | | -| x86\_64 | 32.0 | 128 | \- | \- | | -| x86\_64 | 32.0 | 128 | 1200 | \- | | -| x86\_64 | 32.0 | 128 | 1889 | \- | | -| x86\_64 | 32.0 | 256 | \- | \- | | -| x86\_64 | 32.0 | 256 | 1200 | \- | | -| x86\_64 | 32.0 | 256 | 1889 | \- | | -| x86\_64 | 48.0 | 96 | \- | \- | | -| x86\_64 | 48.0 | 96 | 1800 | \- | | -| x86\_64 | 48.0 | 192 | \- | \- | | -| x86\_64 | 48.0 | 192 | 1800 | \- | | -| x86\_64 | 48.0 | 192 | 2834 | \- | | -| x86\_64 | 48.0 | 384 | \- | \- | | -| x86\_64 | 48.0 | 384 | 1800 | \- | | -| x86\_64 | 48.0 | 384 | 2834 | \- | | -| x86\_64 | 64.0 | 128 | \- | \- | | -| x86\_64 | 64.0 | 128 | 2400 | \- | | -| x86\_64 | 64.0 | 256 | \- | \- | | -| x86\_64 | 64.0 | 256 | 2400 | \- | | -| x86\_64 | 64.0 | 256 | 3779 | \- | | -| x86\_64 | 64.0 | 512 | \- | \- | | -| x86\_64 | 64.0 | 512 | 2400 | \- | | -| x86\_64 | 64.0 | 512 | 3779 | \- | | -| x86\_64 | 96.0 | 192 | \- | \- | | -| x86\_64 | 96.0 | 192 | 3600 | \- | | -| x86\_64 | 96.0 | 384 | \- | \- | | -| x86\_64 | 96.0 | 384 | 3600 | \- | | -| x86\_64 | 96.0 | 384 | 5669 | \- | | -| x86\_64 | 96.0 | 672 | \- | \- | | -| x86\_64 | 96.0 | 672 | 3600 | \- | | -| x86\_64 | 96.0 | 672 | 5669 | \- | | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArchitectureCPU coresMemory (GB)Local SSD (GB)GPU Memory (GB)
x86_642.08--
x86_642.0875-
x86_642.08118-
x86_642.016--
x86_642.01675-
x86_642.016118-
x86_644.08--
x86_644.08150-
x86_644.016--
x86_644.016150-
x86_644.016236-
x86_644.032--
x86_644.032150-
x86_644.032236-
x86_648.016--
x86_648.016300-
x86_648.032--
x86_648.032300-
x86_648.032472-
x86_648.064--
x86_648.064300-
x86_648.064472-
x86_6416.032--
x86_6416.032600-
x86_6416.064--
x86_6416.064600-
x86_6416.064944-
x86_6416.0128--
x86_6416.0128600-
x86_6416.0128944-
x86_6420.0160--
x86_6420.0160750-
x86_6420.01601181-
x86_6432.064--
x86_6432.0641200-
x86_6432.0128--
x86_6432.01281200-
x86_6432.01281889-
x86_6432.0256--
x86_6432.02561200-
x86_6432.02561889-
x86_6448.096--
x86_6448.0961800-
x86_6448.0192--
x86_6448.01921800-
x86_6448.01922834-
x86_6448.0384--
x86_6448.03841800-
x86_6448.03842834-
x86_6464.0128--
x86_6464.01282400-
x86_6464.0256--
x86_6464.02562400-
x86_6464.02563779-
x86_6464.0512--
x86_6464.05122400-
x86_6464.05123779-
x86_6496.0192--
x86_6496.01923600-
x86_6496.0384--
x86_6496.03843600-
x86_6496.03845669-
x86_6496.0672--
x86_6496.06723600-
x86_6496.06725669-
\ No newline at end of file diff --git a/mintlify-docs/en/performance/instance-types/gcp-instance-types.mdx b/mintlify-docs/en/performance/instance-types/gcp-instance-types.mdx index 60b513e3ad..63af633b86 100644 --- a/mintlify-docs/en/performance/instance-types/gcp-instance-types.mdx +++ b/mintlify-docs/en/performance/instance-types/gcp-instance-types.mdx @@ -8,213 +8,1681 @@ All instance types without Local SSD use [GCP Persistent Disk](https://cloud.goo These volumes can be any size from a minimum of 3 x memory, up to 64TB. -| Architecture | CPU cores | Memory (GB) | Local SSD (GB) | GPU Memory (GB) | | -| :--- | :--- | :--- | :--- | :--- | :--- | -| arm64 | 2.0 | 8 | \- | \- | | -| arm64 | 2.0 | 16 | \- | \- | | -| arm64 | 4.0 | 8 | \- | \- | | -| arm64 | 4.0 | 16 | \- | \- | | -| arm64 | 4.0 | 16 | 375 | \- | | -| arm64 | 4.0 | 32 | \- | \- | | -| arm64 | 4.0 | 32 | 375 | \- | | -| arm64 | 8.0 | 16 | \- | \- | | -| arm64 | 8.0 | 32 | \- | \- | | -| arm64 | 8.0 | 32 | 750 | \- | | -| arm64 | 8.0 | 64 | \- | \- | | -| arm64 | 8.0 | 64 | 750 | \- | | -| arm64 | 16.0 | 32 | \- | \- | | -| arm64 | 16.0 | 64 | \- | \- | | -| arm64 | 16.0 | 64 | 1500 | \- | | -| arm64 | 16.0 | 128 | \- | \- | | -| arm64 | 16.0 | 128 | 1500 | \- | | -| arm64 | 32.0 | 64 | \- | \- | | -| arm64 | 32.0 | 128 | \- | \- | | -| arm64 | 32.0 | 128 | 2250 | \- | | -| arm64 | 32.0 | 256 | \- | \- | | -| arm64 | 32.0 | 256 | 2250 | \- | | -| arm64 | 48.0 | 96 | \- | \- | | -| arm64 | 48.0 | 192 | \- | \- | | -| arm64 | 48.0 | 192 | 3750 | \- | | -| arm64 | 48.0 | 384 | \- | \- | | -| arm64 | 48.0 | 384 | 3750 | \- | | -| arm64 | 64.0 | 128 | \- | \- | | -| arm64 | 64.0 | 256 | \- | \- | | -| arm64 | 64.0 | 256 | 5250 | \- | | -| arm64 | 64.0 | 512 | \- | \- | | -| arm64 | 64.0 | 512 | 5250 | \- | | -| arm64 | 72.0 | 144 | \- | \- | | -| arm64 | 72.0 | 288 | \- | \- | | -| arm64 | 72.0 | 288 | 6000 | \- | | -| arm64 | 72.0 | 576 | \- | \- | | -| arm64 | 72.0 | 576 | 6000 | \- | | -| x86\_64 | 2.0 | 8 | \- | \- | | -| x86\_64 | 2.0 | 8 | 375 | \- | | -| x86\_64 | 2.0 | 8 | 750 | \- | | -| x86\_64 | 2.0 | 8 | 1500 | \- | | -| x86\_64 | 2.0 | 8 | 3000 | \- | | -| x86\_64 | 2.0 | 8 | 6000 | \- | | -| x86\_64 | 2.0 | 8 | 9000 | \- | | -| x86\_64 | 2.0 | 16 | \- | \- | | -| x86\_64 | 2.0 | 16 | 375 | \- | | -| x86\_64 | 2.0 | 16 | 750 | \- | | -| x86\_64 | 2.0 | 16 | 1500 | \- | | -| x86\_64 | 2.0 | 16 | 3000 | \- | | -| x86\_64 | 2.0 | 16 | 6000 | \- | | -| x86\_64 | 2.0 | 16 | 9000 | \- | | -| x86\_64 | 4.0 | 8 | \- | \- | | -| x86\_64 | 4.0 | 16 | \- | \- | | -| x86\_64 | 4.0 | 16 | 375 | \- | | -| x86\_64 | 4.0 | 16 | 750 | \- | | -| x86\_64 | 4.0 | 16 | 1500 | \- | | -| x86\_64 | 4.0 | 16 | 3000 | \- | | -| x86\_64 | 4.0 | 16 | 6000 | \- | | -| x86\_64 | 4.0 | 16 | 9000 | \- | | -| x86\_64 | 4.0 | 32 | \- | \- | | -| x86\_64 | 4.0 | 32 | 375 | \- | | -| x86\_64 | 4.0 | 32 | 750 | \- | | -| x86\_64 | 4.0 | 32 | 1500 | \- | | -| x86\_64 | 4.0 | 32 | 3000 | \- | | -| x86\_64 | 4.0 | 32 | 6000 | \- | | -| x86\_64 | 4.0 | 32 | 9000 | \- | | -| x86\_64 | 8.0 | 8 | \- | \- | | -| x86\_64 | 8.0 | 8 | 375 | \- | | -| x86\_64 | 8.0 | 8 | 750 | \- | | -| x86\_64 | 8.0 | 8 | 1500 | \- | | -| x86\_64 | 8.0 | 8 | 3000 | \- | | -| x86\_64 | 8.0 | 8 | 6000 | \- | | -| x86\_64 | 8.0 | 8 | 9000 | \- | | -| x86\_64 | 8.0 | 16 | \- | \- | | -| x86\_64 | 8.0 | 32 | \- | \- | | -| x86\_64 | 8.0 | 32 | 375 | \- | | -| x86\_64 | 8.0 | 32 | 750 | \- | | -| x86\_64 | 8.0 | 32 | 1500 | \- | | -| x86\_64 | 8.0 | 32 | 3000 | \- | | -| x86\_64 | 8.0 | 32 | 6000 | \- | | -| x86\_64 | 8.0 | 32 | 9000 | \- | | -| x86\_64 | 8.0 | 64 | \- | \- | | -| x86\_64 | 8.0 | 64 | 375 | \- | | -| x86\_64 | 8.0 | 64 | 750 | \- | | -| x86\_64 | 8.0 | 64 | 1500 | \- | | -| x86\_64 | 8.0 | 64 | 3000 | \- | | -| x86\_64 | 8.0 | 64 | 6000 | \- | | -| x86\_64 | 8.0 | 64 | 9000 | \- | | -| x86\_64 | 16.0 | 16 | \- | \- | | -| x86\_64 | 16.0 | 16 | 375 | \- | | -| x86\_64 | 16.0 | 16 | 750 | \- | | -| x86\_64 | 16.0 | 16 | 1500 | \- | | -| x86\_64 | 16.0 | 16 | 3000 | \- | | -| x86\_64 | 16.0 | 16 | 6000 | \- | | -| x86\_64 | 16.0 | 16 | 9000 | \- | | -| x86\_64 | 16.0 | 32 | \- | \- | | -| x86\_64 | 16.0 | 64 | \- | \- | | -| x86\_64 | 16.0 | 64 | 375 | \- | | -| x86\_64 | 16.0 | 64 | 750 | \- | | -| x86\_64 | 16.0 | 64 | 1500 | \- | | -| x86\_64 | 16.0 | 64 | 3000 | \- | | -| x86\_64 | 16.0 | 64 | 6000 | \- | | -| x86\_64 | 16.0 | 64 | 9000 | \- | | -| x86\_64 | 16.0 | 128 | \- | \- | | -| x86\_64 | 16.0 | 128 | 375 | \- | | -| x86\_64 | 16.0 | 128 | 750 | \- | | -| x86\_64 | 16.0 | 128 | 1500 | \- | | -| x86\_64 | 16.0 | 128 | 3000 | \- | | -| x86\_64 | 16.0 | 128 | 6000 | \- | | -| x86\_64 | 16.0 | 128 | 9000 | \- | | -| x86\_64 | 32.0 | 32 | \- | \- | | -| x86\_64 | 32.0 | 32 | 750 | \- | | -| x86\_64 | 32.0 | 32 | 1500 | \- | | -| x86\_64 | 32.0 | 32 | 3000 | \- | | -| x86\_64 | 32.0 | 32 | 6000 | \- | | -| x86\_64 | 32.0 | 32 | 9000 | \- | | -| x86\_64 | 32.0 | 64 | \- | \- | | -| x86\_64 | 32.0 | 128 | \- | \- | | -| x86\_64 | 32.0 | 128 | 750 | \- | | -| x86\_64 | 32.0 | 128 | 1500 | \- | | -| x86\_64 | 32.0 | 128 | 3000 | \- | | -| x86\_64 | 32.0 | 128 | 6000 | \- | | -| x86\_64 | 32.0 | 128 | 9000 | \- | | -| x86\_64 | 32.0 | 256 | \- | \- | | -| x86\_64 | 32.0 | 256 | 750 | \- | | -| x86\_64 | 32.0 | 256 | 1500 | \- | | -| x86\_64 | 32.0 | 256 | 3000 | \- | | -| x86\_64 | 32.0 | 256 | 6000 | \- | | -| x86\_64 | 32.0 | 256 | 9000 | \- | | -| x86\_64 | 48.0 | 48 | \- | \- | | -| x86\_64 | 48.0 | 48 | 750 | \- | | -| x86\_64 | 48.0 | 48 | 1500 | \- | | -| x86\_64 | 48.0 | 48 | 3000 | \- | | -| x86\_64 | 48.0 | 48 | 6000 | \- | | -| x86\_64 | 48.0 | 48 | 9000 | \- | | -| x86\_64 | 48.0 | 96 | \- | \- | | -| x86\_64 | 48.0 | 192 | \- | \- | | -| x86\_64 | 48.0 | 192 | 750 | \- | | -| x86\_64 | 48.0 | 192 | 1500 | \- | | -| x86\_64 | 48.0 | 192 | 3000 | \- | | -| x86\_64 | 48.0 | 192 | 6000 | \- | | -| x86\_64 | 48.0 | 192 | 9000 | \- | | -| x86\_64 | 48.0 | 384 | \- | \- | | -| x86\_64 | 48.0 | 384 | 750 | \- | | -| x86\_64 | 48.0 | 384 | 1500 | \- | | -| x86\_64 | 48.0 | 384 | 3000 | \- | | -| x86\_64 | 48.0 | 384 | 6000 | \- | | -| x86\_64 | 48.0 | 384 | 9000 | \- | | -| x86\_64 | 64.0 | 64 | \- | \- | | -| x86\_64 | 64.0 | 64 | 1500 | \- | | -| x86\_64 | 64.0 | 64 | 3000 | \- | | -| x86\_64 | 64.0 | 64 | 6000 | \- | | -| x86\_64 | 64.0 | 64 | 9000 | \- | | -| x86\_64 | 64.0 | 128 | \- | \- | | -| x86\_64 | 64.0 | 256 | \- | \- | | -| x86\_64 | 64.0 | 256 | 1500 | \- | | -| x86\_64 | 64.0 | 256 | 3000 | \- | | -| x86\_64 | 64.0 | 256 | 6000 | \- | | -| x86\_64 | 64.0 | 256 | 9000 | \- | | -| x86\_64 | 64.0 | 512 | \- | \- | | -| x86\_64 | 64.0 | 512 | 1500 | \- | | -| x86\_64 | 64.0 | 512 | 3000 | \- | | -| x86\_64 | 64.0 | 512 | 6000 | \- | | -| x86\_64 | 64.0 | 512 | 9000 | \- | | -| x86\_64 | 80.0 | 80 | \- | \- | | -| x86\_64 | 80.0 | 80 | 1500 | \- | | -| x86\_64 | 80.0 | 80 | 3000 | \- | | -| x86\_64 | 80.0 | 80 | 6000 | \- | | -| x86\_64 | 80.0 | 80 | 9000 | \- | | -| x86\_64 | 80.0 | 160 | \- | \- | | -| x86\_64 | 80.0 | 320 | \- | \- | | -| x86\_64 | 80.0 | 320 | 1500 | \- | | -| x86\_64 | 80.0 | 320 | 3000 | \- | | -| x86\_64 | 80.0 | 320 | 6000 | \- | | -| x86\_64 | 80.0 | 320 | 9000 | \- | | -| x86\_64 | 80.0 | 640 | \- | \- | | -| x86\_64 | 80.0 | 640 | 1500 | \- | | -| x86\_64 | 80.0 | 640 | 3000 | \- | | -| x86\_64 | 80.0 | 640 | 6000 | \- | | -| x86\_64 | 80.0 | 640 | 9000 | \- | | -| x86\_64 | 96.0 | 96 | \- | \- | | -| x86\_64 | 96.0 | 96 | 3000 | \- | | -| x86\_64 | 96.0 | 96 | 6000 | \- | | -| x86\_64 | 96.0 | 96 | 9000 | \- | | -| x86\_64 | 96.0 | 384 | \- | \- | | -| x86\_64 | 96.0 | 384 | 3000 | \- | | -| x86\_64 | 96.0 | 384 | 6000 | \- | | -| x86\_64 | 96.0 | 384 | 9000 | \- | | -| x86\_64 | 96.0 | 768 | \- | \- | | -| x86\_64 | 96.0 | 768 | 3000 | \- | | -| x86\_64 | 96.0 | 768 | 6000 | \- | | -| x86\_64 | 96.0 | 768 | 9000 | \- | | -| x86\_64 | 128.0 | 128 | \- | \- | | -| x86\_64 | 128.0 | 128 | 3000 | \- | | -| x86\_64 | 128.0 | 128 | 6000 | \- | | -| x86\_64 | 128.0 | 128 | 9000 | \- | | -| x86\_64 | 128.0 | 512 | \- | \- | | -| x86\_64 | 128.0 | 512 | 3000 | \- | | -| x86\_64 | 128.0 | 512 | 6000 | \- | | -| x86\_64 | 128.0 | 512 | 9000 | \- | | -| x86\_64 | 224.0 | 224 | \- | \- | | -| x86\_64 | 224.0 | 224 | 3000 | \- | | -| x86\_64 | 224.0 | 224 | 6000 | \- | | -| x86\_64 | 224.0 | 224 | 9000 | \- | | -| x86\_64 | 224.0 | 896 | \- | \- | | -| x86\_64 | 224.0 | 896 | 3000 | \- | | -| x86\_64 | 224.0 | 896 | 6000 | \- | | -| x86\_64 | 224.0 | 896 | 9000 | \- | | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArchitectureCPU coresMemory (GB)Local SSD (GB)GPU Memory (GB)
arm642.08--
arm642.016--
arm644.08--
arm644.016--
arm644.016375-
arm644.032--
arm644.032375-
arm648.016--
arm648.032--
arm648.032750-
arm648.064--
arm648.064750-
arm6416.032--
arm6416.064--
arm6416.0641500-
arm6416.0128--
arm6416.01281500-
arm6432.064--
arm6432.0128--
arm6432.01282250-
arm6432.0256--
arm6432.02562250-
arm6448.096--
arm6448.0192--
arm6448.01923750-
arm6448.0384--
arm6448.03843750-
arm6464.0128--
arm6464.0256--
arm6464.02565250-
arm6464.0512--
arm6464.05125250-
arm6472.0144--
arm6472.0288--
arm6472.02886000-
arm6472.0576--
arm6472.05766000-
x86_642.08--
x86_642.08375-
x86_642.08750-
x86_642.081500-
x86_642.083000-
x86_642.086000-
x86_642.089000-
x86_642.016--
x86_642.016375-
x86_642.016750-
x86_642.0161500-
x86_642.0163000-
x86_642.0166000-
x86_642.0169000-
x86_644.08--
x86_644.016--
x86_644.016375-
x86_644.016750-
x86_644.0161500-
x86_644.0163000-
x86_644.0166000-
x86_644.0169000-
x86_644.032--
x86_644.032375-
x86_644.032750-
x86_644.0321500-
x86_644.0323000-
x86_644.0326000-
x86_644.0329000-
x86_648.08--
x86_648.08375-
x86_648.08750-
x86_648.081500-
x86_648.083000-
x86_648.086000-
x86_648.089000-
x86_648.016--
x86_648.032--
x86_648.032375-
x86_648.032750-
x86_648.0321500-
x86_648.0323000-
x86_648.0326000-
x86_648.0329000-
x86_648.064--
x86_648.064375-
x86_648.064750-
x86_648.0641500-
x86_648.0643000-
x86_648.0646000-
x86_648.0649000-
x86_6416.016--
x86_6416.016375-
x86_6416.016750-
x86_6416.0161500-
x86_6416.0163000-
x86_6416.0166000-
x86_6416.0169000-
x86_6416.032--
x86_6416.064--
x86_6416.064375-
x86_6416.064750-
x86_6416.0641500-
x86_6416.0643000-
x86_6416.0646000-
x86_6416.0649000-
x86_6416.0128--
x86_6416.0128375-
x86_6416.0128750-
x86_6416.01281500-
x86_6416.01283000-
x86_6416.01286000-
x86_6416.01289000-
x86_6432.032--
x86_6432.032750-
x86_6432.0321500-
x86_6432.0323000-
x86_6432.0326000-
x86_6432.0329000-
x86_6432.064--
x86_6432.0128--
x86_6432.0128750-
x86_6432.01281500-
x86_6432.01283000-
x86_6432.01286000-
x86_6432.01289000-
x86_6432.0256--
x86_6432.0256750-
x86_6432.02561500-
x86_6432.02563000-
x86_6432.02566000-
x86_6432.02569000-
x86_6448.048--
x86_6448.048750-
x86_6448.0481500-
x86_6448.0483000-
x86_6448.0486000-
x86_6448.0489000-
x86_6448.096--
x86_6448.0192--
x86_6448.0192750-
x86_6448.01921500-
x86_6448.01923000-
x86_6448.01926000-
x86_6448.01929000-
x86_6448.0384--
x86_6448.0384750-
x86_6448.03841500-
x86_6448.03843000-
x86_6448.03846000-
x86_6448.03849000-
x86_6464.064--
x86_6464.0641500-
x86_6464.0643000-
x86_6464.0646000-
x86_6464.0649000-
x86_6464.0128--
x86_6464.0256--
x86_6464.02561500-
x86_6464.02563000-
x86_6464.02566000-
x86_6464.02569000-
x86_6464.0512--
x86_6464.05121500-
x86_6464.05123000-
x86_6464.05126000-
x86_6464.05129000-
x86_6480.080--
x86_6480.0801500-
x86_6480.0803000-
x86_6480.0806000-
x86_6480.0809000-
x86_6480.0160--
x86_6480.0320--
x86_6480.03201500-
x86_6480.03203000-
x86_6480.03206000-
x86_6480.03209000-
x86_6480.0640--
x86_6480.06401500-
x86_6480.06403000-
x86_6480.06406000-
x86_6480.06409000-
x86_6496.096--
x86_6496.0963000-
x86_6496.0966000-
x86_6496.0969000-
x86_6496.0384--
x86_6496.03843000-
x86_6496.03846000-
x86_6496.03849000-
x86_6496.0768--
x86_6496.07683000-
x86_6496.07686000-
x86_6496.07689000-
x86_64128.0128--
x86_64128.01283000-
x86_64128.01286000-
x86_64128.01289000-
x86_64128.0512--
x86_64128.05123000-
x86_64128.05126000-
x86_64128.05129000-
x86_64224.0224--
x86_64224.02243000-
x86_64224.02246000-
x86_64224.02249000-
x86_64224.0896--
x86_64224.08963000-
x86_64224.08966000-
x86_64224.08969000-
\ No newline at end of file diff --git a/mintlify-docs/en/performance/profiling.mdx b/mintlify-docs/en/performance/profiling.mdx index a2830a10ae..99bcef69b0 100644 --- a/mintlify-docs/en/performance/profiling.mdx +++ b/mintlify-docs/en/performance/profiling.mdx @@ -16,11 +16,28 @@ Also see [using valgrind with Vespa](/en/performance/valgrind). ## CPU profiling -||| -|---|---| -| **vmstat** | *vmstat* can be used to figure out what kind of resources are used:

• cpu usage split in user, system, idle, and io wait: system should be low(`<10`)
• swap in/out: should be zero.

**Note:**
A maxed out system should have either maxed out disks or cpu (`idle == 0`). If not, there might be lock contention or the system is bottlenecked by upstream services.


Example:

`$ vmstat 1`

`procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----`
`r b swpd free buff cache si so bi bo in cs us sy id wa`
`0 0 5628 3315460 304024 23008616 0 0 14 34 0 0 0 0 99 0`
`1 0 5628 3298884 304024 23008640 0 0 0 396 33 4615 9 1 90 0`
`0 0 5628 3316336 304028 23008644 0 0 0 0 15 4469 4 1 95 0`
`0 0 5628 3316592 304028 23008644 0 0 0 0 24 4364 0 0 100 0`
`0 0 5628 3316592 304028 23008644 0 0 0 2948 20 4305 0 0 100 0`
`0 0 5628 3316468 304028 23008644 0 0 0 0 22 4259 0 0 100 0`
`0 0 5628 3316468 304028 23008644 0 0 0 180 20 4279 0 0 100 0`
`0 0 5628 3316468 304028 23008644 0 0 0 0 26 4349 0 0 100 0`
`16 0 5628 3284236 304056 23008688 0 0 12 188 17 9196 38 2 60 0`
`19 0 5628 3267020 304056 23008732 0 0 8 128 44 6408 99 1 0 0`
`16 0 5628 3245472 304060 23008840 0 0 20 0 9 7191 99 1 0 0`
`17 0 5628 3227784 304060 23008872 0 0 20 0 27 6420 99 1 0 0`| -| **top** | Use [top](https://linux.die.net/man/1/top) to get a real-time view of which processes consume CPU and memory. | -| **iostat** | Use [iostat](https://linux.die.net/man/1/iostat) to monitor disk IO. Note that the % busy is useless for SSD/NVMe storage disks, see [Two traps in iostat: %util and svctm](https://brooker.co.za/blog/2014/07/04/iostat-pct.html). | + + + + + + + + + + + + + + + + + + + + + +
**vmstat***vmstat* can be used to figure out what kind of resources are used:

• cpu usage split in user, system, idle, and io wait: system should be low({`<10`})
• swap in/out: should be zero.

**Note:**
A maxed out system should have either maxed out disks or cpu ({`idle == 0`}). If not, there might be lock contention or the system is bottlenecked by upstream services.


Example:

{`$ vmstat 1`}

{`procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----`}
{`r b swpd free buff cache si so bi bo in cs us sy id wa`}
{`0 0 5628 3315460 304024 23008616 0 0 14 34 0 0 0 0 99 0`}
{`1 0 5628 3298884 304024 23008640 0 0 0 396 33 4615 9 1 90 0`}
{`0 0 5628 3316336 304028 23008644 0 0 0 0 15 4469 4 1 95 0`}
{`0 0 5628 3316592 304028 23008644 0 0 0 0 24 4364 0 0 100 0`}
{`0 0 5628 3316592 304028 23008644 0 0 0 2948 20 4305 0 0 100 0`}
{`0 0 5628 3316468 304028 23008644 0 0 0 0 22 4259 0 0 100 0`}
{`0 0 5628 3316468 304028 23008644 0 0 0 180 20 4279 0 0 100 0`}
{`0 0 5628 3316468 304028 23008644 0 0 0 0 26 4349 0 0 100 0`}
{`16 0 5628 3284236 304056 23008688 0 0 12 188 17 9196 38 2 60 0`}
{`19 0 5628 3267020 304056 23008732 0 0 8 128 44 6408 99 1 0 0`}
{`16 0 5628 3245472 304060 23008840 0 0 20 0 9 7191 99 1 0 0`}
{`17 0 5628 3227784 304060 23008872 0 0 20 0 27 6420 99 1 0 0`}
**top**Use top to get a real-time view of which processes consume CPU and memory.
**iostat**Use iostat to monitor disk IO. Note that the % busy is useless for SSD/NVMe storage disks, see Two traps in iostat: %util and svctm.
## CPU Profiling using perf diff --git a/mintlify-docs/en/performance/rate-limiting-searcher.mdx b/mintlify-docs/en/performance/rate-limiting-searcher.mdx index 69cdc1cddd..3349d1bd64 100644 --- a/mintlify-docs/en/performance/rate-limiting-searcher.mdx +++ b/mintlify-docs/en/performance/rate-limiting-searcher.mdx @@ -25,13 +25,42 @@ When this configuration is live, the rate limiting searcher is loaded, but not a The searcher takes these query parameter arguments: -| Argument | Type | Description | -| :--- | :--- | :--- | -| rate.id | String | The id of the client from rate limiting perspective. | -| rate.cost | Double | The cost Double of this query. This is read after executing the query and so can be set by downstream searchers inspecting the result to allow differencing the cost of various queries. Default is 1. | -| rate.quota | Double | The cost per second a particular id is allowed to consume in this system. | -| rate.idDimension | String | The name of the rate-id dimension used when logging metrics. If this is not specified, the metric will be logged without dimensions. | -| rate.dryRun | Boolean | Emit metrics on rejected requests but don't actually reject them. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescription
rate.idStringThe id of the client from rate limiting perspective.
rate.costDoubleThe cost Double of this query. This is read after executing the query and so can be set by downstream searchers inspecting the result to allow differencing the cost of various queries. Default is 1.
rate.quotaDoubleThe cost per second a particular id is allowed to consume in this system.
rate.idDimensionStringThe name of the rate-id dimension used when logging metrics. If this is not specified, the metric will be logged without dimensions.
rate.dryRunBooleanEmit metrics on rejected requests but don't actually reject them.
In a typical scenario, the application logic constructing the HTTP search request will set `&rate.id` and `&rate.quota` in the request depending on where the traffic originated - example: diff --git a/mintlify-docs/en/performance/sizing-feeding.mdx b/mintlify-docs/en/performance/sizing-feeding.mdx index 50438e6f82..b7d94cea53 100644 --- a/mintlify-docs/en/performance/sizing-feeding.mdx +++ b/mintlify-docs/en/performance/sizing-feeding.mdx @@ -79,38 +79,144 @@ Several thread pools are involved when handling write operations on a content no To analyse performance and bottlenecks, the most relevant metrics are *.utilization* and *.queuesize*. In addition, *.saturation* is relevant for the [field writer](#field-writer-executor) thread pool. See [bottlenecks](#bottlenecks) for details. -| Thread pool | Description || -|---|---|---| -| **master** | Updates the [document metastore](/en/content/attributes#document-meta-store), prepares tasks to the [index](#index-thread) and [summary](#summary-thread) threads, and splits a write operation into a set of tasks to update individual [attributes](/en/content/proton#attributes), executed by the threads in the [field writer](#field-writer-executor). | | -| | **Threads** | 1 | -| | **Instances** | One instance per document database. | -| | **Metric prefix** | *content.proton.documentdb.threading_service.master.* | -| **index** | Manages writing of index fields in the [memory index](/en/content/proton#index). It splits a write operation into a set of tasks to update individual index fields, executed by the threads in the [field writer](#field-writer-executor). | | -| | **Threads** | 1 | -| | **Instances** | One instance per document database. | -| | **Metric prefix** | *content.proton.documentdb.threading_service.index.* | -| **summary** | Writes documents to the [document store](/en/content/proton#document-store). | | -| | **Threads** | 1 | -| | **Instances** | One instance per document database. | -| | **Metric prefix** | *content.proton.documentdb.threading_service.summary.* | -| **field writer** | The threads in this thread pool are used to invert index fields, write changes to the memory index, and write changes to attributes. Index fields and attribute fields across all document databases are randomly assigned to one of the threads in this thread pool. A field that is costly to write or update might become the bottleneck during feeding. | | -| | **Threads** | Many, controlled by [feeding concurrency](/en/reference/applications/services/content#feeding). | -| | **Instances** | One instance shared between all document databases. | -| | **Metric prefix** | *content.proton.executor.field_writer.* | -| **shared** | The threads in this thread pool are among other used to compress and de-compress documents in the [document store](/en/content/proton#document-store), merge files as part of [disk index fusion](/en/content/proton#disk-index-fusion), and prepare for inserting a vector into a [HNSW index](/en/reference/schemas/schemas#index-hnsw). | | -| | **Threads** | Many, controlled by [feeding concurrency](/en/reference/applications/services/content#feeding). | -| | **Instances** | One instance shared between all document databases. | -| | **Metric prefix** | *content.proton.executor.shared.* | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Thread poolDescription
**master**Updates the document metastore, prepares tasks to the index and summary threads, and splits a write operation into a set of tasks to update individual attributes, executed by the threads in the field writer.
**Threads**1
**Instances**One instance per document database.
**Metric prefix***content.proton.documentdb.threading_service.master.*
**index**Manages writing of index fields in the memory index. It splits a write operation into a set of tasks to update individual index fields, executed by the threads in the field writer.
**Threads**1
**Instances**One instance per document database.
**Metric prefix***content.proton.documentdb.threading_service.index.*
**summary**Writes documents to the document store.
**Threads**1
**Instances**One instance per document database.
**Metric prefix***content.proton.documentdb.threading_service.summary.*
**field writer**The threads in this thread pool are used to invert index fields, write changes to the memory index, and write changes to attributes. Index fields and attribute fields across all document databases are randomly assigned to one of the threads in this thread pool. A field that is costly to write or update might become the bottleneck during feeding.
**Threads**Many, controlled by feeding concurrency.
**Instances**One instance shared between all document databases.
**Metric prefix***content.proton.executor.field_writer.*
**shared**The threads in this thread pool are among other used to compress and de-compress documents in the document store, merge files as part of disk index fusion, and prepare for inserting a vector into a HNSW index.
**Threads**Many, controlled by feeding concurrency.
**Instances**One instance shared between all document databases.
**Metric prefix***content.proton.executor.shared.*
## Multivalue attribute [Multivalued attributes](/en/reference/schemas/schemas#field) are *weightedset*, *array of struct/map*, *map of struct/map* and *tensor*. The attributes have different characteristics, which affects write performance. Generally, updates to multivalue fields are more expensive as the field size grows: -| Attribute | Description | -| :--- | :--- | -| **weightedset** | Memory-only operation when updating: read full set, update, write back. Make the update as inexpensive as possible using numeric types instead of strings, where possible Example: a weighted set of string with many (1000+) elements. Adding an element to the set means an enum store lookup/add and add/sort of the attribute multivalue map - details in [attributes](/en/content/attributes). Use a numeric type instead to speed this up - this has no string comparisons. | -| **array/map of struct/map** | Update to array of struct/map and map of struct/map requires a read from the [document store](/en/content/proton#document-store) and will reduce update rate - see [#10892](https://github.com/vespa-engine/vespa/issues/10892). | -| **tensor** | Updating tensor cell values is a memory-only operation: copy tensor, update, write back. For large tensors, this implicates reading and writing a large chunk of memory for single cell updates. | + + + + + + + + + + + + + + + + + + + + + +
AttributeDescription
**weightedset**Memory-only operation when updating: read full set, update, write back. Make the update as inexpensive as possible using numeric types instead of strings, where possible Example: a weighted set of string with many (1000+) elements. Adding an element to the set means an enum store lookup/add and add/sort of the attribute multivalue map - details in attributes. Use a numeric type instead to speed this up - this has no string comparisons.
**array/map of struct/map**Update to array of struct/map and map of struct/map requires a read from the document store and will reduce update rate - see #10892.
**tensor**Updating tensor cell values is a memory-only operation: copy tensor, update, write back. For large tensors, this implicates reading and writing a large chunk of memory for single cell updates.
## Parent/child @@ -215,12 +321,41 @@ Other scenarios: Feed testing for capacity for sustained load in a system in ste Use the [monitoring sample app](/en/operations/self-managed/monitoring#monitoring-with-grafana) to set up a sample system, with a document/query feed and dashboards, to familiarize with metrics.
-||| -| :--- | :--- | -| **Metrics** | Use [metrics](/en/reference/operations/metrics/vespa-metric-set#storage-metrics) from content nodes and look at queues - queue wait time and queue size (all metrics in milliseconds):

`vds.filestor.averagequeuewait.sum`
`vds.filestor.queuesize`

Check content node metrics across all nodes to see if there are any outliers. Also check latency metrics per operation type:

`vds.filestor.allthreads.put.latency`
`vds.filestor.allthreads.update.latency`
`vds.filestor.allthreads.remove.latency` | -| **Bottlenecks** | One of the [threads](#content-node-thread-pools) used to handle write operations might become the bottleneck during feeding. Look at the *.utilization* metrics for all thread pools:

`content.proton.documentdb.threading_service.master.utilization`
`content.proton.documentdb.threading_service.index.utilization`
`content.proton.documentdb.threading_service.summary.utilization`
`content.proton.executor.field_writer.utilization`
`content.proton.executor.shared.utilization`

If utilization is high for [field writer](#field-writer-executor) or [shared](#shared-executor), adjust [feeding concurrency](/en/reference/applications/services/content#feeding) to allow more CPU cores to be used for feeding.

For the field writer also look at the *.saturation* metric:

`content.proton.executor.field_writer.saturation`

If this is close to 1.0 and higher than *.utilization* it indicates that one of its worker threads is a bottleneck. The reason can be that this particular thread is handling a large index or attribute field that is naturally expensive to write and update. Use the [custom component state API](/en/content/proton#custom-component-state-api) to find which index and attribute fields are assigned to which thread (identified by *executor\_id*), and look at the detailed statistics of the field writer to find which thread is the actual bottleneck:

`state/v1/custom/component/documentdb/mydoctype/subdb/ready/index`
`state/v1/custom/component/documentdb/mydoctype/subdb/ready/attributewriter`
`state/v1/custom/component/threadpools/field_writer | -| **Failure rates** | Inspect these metrics for failures during load testing:

`vds.distributor.updates.latency`
`vds.distributor.updates.ok`
`vds.distributor.updates.failures.total`
`vds.distributor.puts.latency`
`vds.distributor.puts.ok`
`vds.distributor.puts.failures.total`
`vds.distributor.removes.latency`
`vds.distributor.removes.ok`
`vds.distributor.removes.failures.total` | -| **Blocked feeding** | This metric should be 0 - refer to [feed block](/en/writing/feed-block):

`content.proton.resource_usage.feeding_blocked` | -| **Concurrent mutations** | Multiple clients updating the same document concurrently will stall writes:

`vds.distributor.updates.failures.concurrent_mutations`

Mutating client operations towards a given document ID are sequenced on the [distributors](/en/content/content-nodes#distributor). If an operation is already active towards a document, a subsequently arriving one will be bounced back to the client with a transient failure code. Usually this happens when users send feed from multiple clients concurrently without synchronisation. Note that feed operations sent by a single client are sequenced client-side, so this should not be observed with a single client only. Bounced operations are never sent on to the backends and should not cause elevated latencies there, although the client will observe higher latencies due to automatic retries with back-off. | -| **Wrong distribution** | `vds.distributor.updates.failures.wrongdistributor`

Indicates that clients keep sending to the wrong distributor. Normally this happens infrequently (but is *does* happen on client startup or distributor state transitions), as clients update and cache all state required to route directly to the correct distributor (Vespa uses a deterministic CRUSH-based algorithmic distribution). Some potential reasons for this:

1. Clients are being constantly re-created with no cached state.
2. The system is in some kind of flux where the underlying state keeps changing constantly.
3. The client distribution policy has received so many errors that it throws away its cached state to start with a clean slate to e.g. avoid the case where it only has cached information for the bad side of a network partition.
4. The system has somehow failed to converge to a shared cluster state, causing parts of the cluster to have a different idea of the correct state than others. | -| **Cluster out of sync** | *update\_puts/gets* indicate "two-phase" updates:

`vds.distributor.update_puts.latency`
`vds.distributor.update_puts.ok`
`vds.distributor.update_gets.latency`
`vds.distributor.update_gets.ok`
`vds.distributor.update_gets.failures.total`
`vds.distributor.update_gets.failures.notfound`

If replicas are out of sync, updates cannot be applied directly on the replica nodes as they risk ending up with diverging state. In this case, Vespa performs an explicit read-consolidate-write (write repair) operation on the distributors. This is usually a lot slower than the regular update path because it doesn't happen in parallel. It also happens in the write-path of other operations, so risks blocking these if the updates are expensive in terms of CPU. Replicas being out of sync is by definition not the expected steady state of the system. For example, replica divergence can happen if one or more replica nodes are unable to process or persist operations. Track (pending) merges:

`vds.idealstate.buckets`
`vds.idealstate.merge_bucket.pending`
`vds.idealstate.merge_bucket.done_ok`
`vds.idealstate.merge_bucket.done_failed`| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**Metrics**Use metrics from content nodes and look at queues - queue wait time and queue size (all metrics in milliseconds):

{`vds.filestor.averagequeuewait.sum`}
{`vds.filestor.queuesize`}

Check content node metrics across all nodes to see if there are any outliers. Also check latency metrics per operation type:

{`vds.filestor.allthreads.put.latency`}
{`vds.filestor.allthreads.update.latency`}
{`vds.filestor.allthreads.remove.latency`}
**Bottlenecks**One of the threads used to handle write operations might become the bottleneck during feeding. Look at the *.utilization* metrics for all thread pools:

{`content.proton.documentdb.threading_service.master.utilization`}
{`content.proton.documentdb.threading_service.index.utilization`}
{`content.proton.documentdb.threading_service.summary.utilization`}
{`content.proton.executor.field_writer.utilization`}
{`content.proton.executor.shared.utilization`}

If utilization is high for field writer or shared, adjust feeding concurrency to allow more CPU cores to be used for feeding.

For the field writer also look at the *.saturation* metric:

{`content.proton.executor.field_writer.saturation`}

If this is close to 1.0 and higher than *.utilization* it indicates that one of its worker threads is a bottleneck. The reason can be that this particular thread is handling a large index or attribute field that is naturally expensive to write and update. Use the custom component state API to find which index and attribute fields are assigned to which thread (identified by *executor_id*), and look at the detailed statistics of the field writer to find which thread is the actual bottleneck:

{`state/v1/custom/component/documentdb/mydoctype/subdb/ready/index`}
{`state/v1/custom/component/documentdb/mydoctype/subdb/ready/attributewriter`}
`state/v1/custom/component/threadpools/field_writer
**Failure rates**Inspect these metrics for failures during load testing:

{`vds.distributor.updates.latency`}
{`vds.distributor.updates.ok`}
{`vds.distributor.updates.failures.total`}
{`vds.distributor.puts.latency`}
{`vds.distributor.puts.ok`}
{`vds.distributor.puts.failures.total`}
{`vds.distributor.removes.latency`}
{`vds.distributor.removes.ok`}
{`vds.distributor.removes.failures.total`}
**Blocked feeding**This metric should be 0 - refer to feed block:

{`content.proton.resource_usage.feeding_blocked`}
**Concurrent mutations**Multiple clients updating the same document concurrently will stall writes:

{`vds.distributor.updates.failures.concurrent_mutations`}

Mutating client operations towards a given document ID are sequenced on the distributors. If an operation is already active towards a document, a subsequently arriving one will be bounced back to the client with a transient failure code. Usually this happens when users send feed from multiple clients concurrently without synchronisation. Note that feed operations sent by a single client are sequenced client-side, so this should not be observed with a single client only. Bounced operations are never sent on to the backends and should not cause elevated latencies there, although the client will observe higher latencies due to automatic retries with back-off.
**Wrong distribution**{`vds.distributor.updates.failures.wrongdistributor`}

Indicates that clients keep sending to the wrong distributor. Normally this happens infrequently (but is *does* happen on client startup or distributor state transitions), as clients update and cache all state required to route directly to the correct distributor (Vespa uses a deterministic CRUSH-based algorithmic distribution). Some potential reasons for this:

1. Clients are being constantly re-created with no cached state.
2. The system is in some kind of flux where the underlying state keeps changing constantly.
3. The client distribution policy has received so many errors that it throws away its cached state to start with a clean slate to e.g. avoid the case where it only has cached information for the bad side of a network partition.
4. The system has somehow failed to converge to a shared cluster state, causing parts of the cluster to have a different idea of the correct state than others.
**Cluster out of sync***update_puts/gets* indicate "two-phase" updates:

{`vds.distributor.update_puts.latency`}
{`vds.distributor.update_puts.ok`}
{`vds.distributor.update_gets.latency`}
{`vds.distributor.update_gets.ok`}
{`vds.distributor.update_gets.failures.total`}
{`vds.distributor.update_gets.failures.notfound`}

If replicas are out of sync, updates cannot be applied directly on the replica nodes as they risk ending up with diverging state. In this case, Vespa performs an explicit read-consolidate-write (write repair) operation on the distributors. This is usually a lot slower than the regular update path because it doesn't happen in parallel. It also happens in the write-path of other operations, so risks blocking these if the updates are expensive in terms of CPU. Replicas being out of sync is by definition not the expected steady state of the system. For example, replica divergence can happen if one or more replica nodes are unable to process or persist operations. Track (pending) merges:

{`vds.idealstate.buckets`}
{`vds.idealstate.merge_bucket.pending`}
{`vds.idealstate.merge_bucket.done_ok`}
{`vds.idealstate.merge_bucket.done_failed`}
diff --git a/mintlify-docs/en/performance/sizing-search.mdx b/mintlify-docs/en/performance/sizing-search.mdx index 42683d15b7..38c4290c39 100644 --- a/mintlify-docs/en/performance/sizing-search.mdx +++ b/mintlify-docs/en/performance/sizing-search.mdx @@ -47,10 +47,24 @@ With a grouped distribution, content is distributed to a configured set of *grou Ideally, the data is available and searchable at all times, even during node failures. High availability costs resources due to data replication. How many replicas of the data to configure depends on what kind of availability guarantees the deployment should provide. Configure availability vs cost: -||| -| :--- | :--- | -| [redundancy](/en/reference/applications/services/content#redundancy) | Defines the total number of copies of each piece of data the cluster will store and maintain to avoid data loss. Example: with a redundancy of 2, the system tolerates 1 node failure before any further node failures may cause data to become unavailable. | -| [searchable-copies](/en/reference/applications/services/content#searchable-copies) | Configures how many of the copies (as configured with *redundancy*) to be indexed (*ready*) at any time. Configuring *searchable-copies* to be less than *redundancy* saves resources (memory, disk, cpu), as not all copies are indexed (*ready*). In case of node failure, the remaining nodes needs to index the *not ready* documents which belonged to the failed node. In this transition period, the search has reduced search coverage. | + + + + + + + + + + + + + + + + + +
redundancyDefines the total number of copies of each piece of data the cluster will store and maintain to avoid data loss. Example: with a redundancy of 2, the system tolerates 1 node failure before any further node failures may cause data to become unavailable.
searchable-copiesConfigures how many of the copies (as configured with *redundancy*) to be indexed (*ready*) at any time. Configuring *searchable-copies* to be less than *redundancy* saves resources (memory, disk, cpu), as not all copies are indexed (*ready*). In case of node failure, the remaining nodes needs to index the *not ready* documents which belonged to the failed node. In this transition period, the search has reduced search coverage.
### Content node database @@ -133,11 +147,28 @@ Merge all threads results and return up to the container. Vespa is a parallel computing platform where the work of matching and ranking is parallelized across a set of nodes and processors. The speedup one can get by altering the number of nodes in a Vespa content group follows [Amdahl's law](https://en.wikipedia.org/wiki/Amdahl%27s_law), which is a formula used to find the maximum improvement possible by improving a particular part of a system. In parallel computing, *Amdahl's law* is mainly used to predict the theoretical maximum speedup for program processing using multiple processors. In Vespa, as in any parallel computing system, there is work which can be parallelized and work which cannot. The relationship between these two work types determine how to best scale the system, using a flat or grouped distribution. -||| -| :--- | :--- | -| **static query work** | Portion of the query work on a content node that does not depend on the number of documents indexed on the node. This is an administrative overhead caused by system design and abstractions, e.g. number of memory allocations per query term. Typically, a large query tree means higher static work, and this work cannot be parallelized over multiple processors, threads or nodes. The static query work portion is described in step 1 to 4 and step 9 in the detailed life of a query explanation above. | -| **dynamic query work** | Portion of the query work on a content node that depends on the number of documents indexed and active on the node. This portion of the work scales mostly linearly with the number of matched documents. The dynamic query work can be parallelized over multiple processors and nodes. Referenced later as *DQW*. The *DQW* also depends on the phase two protocol summary fill where the actual contents of the global best documents is fetched from the content nodes which produced the hit in the first protocol phase. | -| **Total query work** | The total query work is given as the dynamic query work (*DQW*) + static query work (*SQW*). | + + + + + + + + + + + + + + + + + + + + + +
**static query work**Portion of the query work on a content node that does not depend on the number of documents indexed on the node. This is an administrative overhead caused by system design and abstractions, e.g. number of memory allocations per query term. Typically, a large query tree means higher static work, and this work cannot be parallelized over multiple processors, threads or nodes. The static query work portion is described in step 1 to 4 and step 9 in the detailed life of a query explanation above.
**dynamic query work**Portion of the query work on a content node that depends on the number of documents indexed and active on the node. This portion of the work scales mostly linearly with the number of matched documents. The dynamic query work can be parallelized over multiple processors and nodes. Referenced later as *DQW*. The *DQW* also depends on the phase two protocol summary fill where the actual contents of the global best documents is fetched from the content nodes which produced the hit in the first protocol phase.
**Total query work**The total query work is given as the dynamic query work (*DQW*) + static query work (*SQW*).
Adding content nodes to a content cluster (keeping the total document volume fixed) with flat distribution reduces the dynamic query work per node (*DQW*), but does not reduce the static query work (*SQW*). The overall system cost also increases as you need to rent another node. @@ -169,10 +200,24 @@ In the second figure there is a system where the dynamic work portion is much hi Given the theory, one can derive two rules of thumb for scaling throughput and latency: -||| -| :--- | :--- | -| **Add nodes in a flat distribution** | When DQW/TQW is large (close to 1.0), throughput QPS can be scaled by just adding more content nodes in a system using flat distribution. This will reduce the number of documents per node, and thus reduce the *DQW* per node. | -| **Add groups using grouped distribution** | When DQW/TQW is low, one can no longer just add more content nodes to scale throughput and must instead use a grouped distribution to scale throughput. | + + + + + + + + + + + + + + + + + +
**Add nodes in a flat distribution**When DQW/TQW is large (close to 1.0), throughput QPS can be scaled by just adding more content nodes in a system using flat distribution. This will reduce the number of documents per node, and thus reduce the *DQW* per node.
**Add groups using grouped distribution**When DQW/TQW is low, one can no longer just add more content nodes to scale throughput and must instead use a grouped distribution to scale throughput.
## Scaling latency in a content group diff --git a/mintlify-docs/en/performance/streaming-search.mdx b/mintlify-docs/en/performance/streaming-search.mdx index 95e1b746d1..f6f799bdf5 100644 --- a/mintlify-docs/en/performance/streaming-search.mdx +++ b/mintlify-docs/en/performance/streaming-search.mdx @@ -23,7 +23,7 @@ Streaming search uses the same implementation of most features in Vespa, includi - Streaming search does not use the [linguistics](/en/linguistics/linguistics) module while feeding documents. Instead, the string fields of each streamed document are [tokenized](/en/linguistics/linguistics-opennlp#tokenization) and [normalized](/en/linguistics/linguistics-opennlp#normalization) on the fly as part of performing a search. Query terms are [normalized](/en/linguistics/linguistics-opennlp#normalization) in the same way. [Stemming](/en/linguistics/linguistics-opennlp#stemming) is not supported for streaming search. - Since there are no indexes, the content nodes do not collect term statistics and average field length statistics. - Term significance should be provided by a [global significance model](/en/ranking/significance#global-significance-model), if [text matching features](/en/reference/ranking/rank-features) that benefit from it are used. This includes among others *[bm25](/en/ranking/bm25)*, *nativeRank*, *nativeFieldMatch*, *nativeProximity* and *fieldMatch*. - - If using *bm25*, adjust the [averageFieldLength](/en/reference/ranking/rank-feature-configuration#properties) configuration for a more precise *bm25* score. + - If using *bm25*, adjust the [averageFieldLength](/en/reference/ranking/rank-feature-configuration#properties) configuration for a more precise *bm25* score. The [num_docs_indexed](/en/reference/ranking/rank-features#num_docs_indexed) rank feature returns 1 in streaming search. - Even without any indexes, fields must be specified as [index](/en/reference/schemas/schemas#index) or [attribute](/en/reference/schemas/schemas#attribute) to make them available for matching, ranking, grouping and sorting. The associated default [match](/en/reference/schemas/schemas#match) setting for a field is equivalent to [indexed mode](/en/reference/applications/services/content#document). - Streaming search supports a wider range of matching options (such as substring and prefix), and these can be specified either at query time or at configuration time. See [matching options](#matching-options-in-streaming-search) for details. - [HNSW](/en/reference/schemas/schemas#index-hnsw) indexes are not supported in streaming search. This means a [nearest neighbor search](/en/querying/nearest-neighbor-search#using-nearest-neighbor-search) is always *exact* when used in streaming search. The following parameters for adjusting *approximate* nearest neighbor search thus have no effect: diff --git a/mintlify-docs/en/querying/geo-search.mdx b/mintlify-docs/en/querying/geo-search.mdx index c34b6c16a6..8b451fdaec 100644 --- a/mintlify-docs/en/querying/geo-search.mdx +++ b/mintlify-docs/en/querying/geo-search.mdx @@ -127,24 +127,97 @@ A single query item can only search in one of the position attributes. For a sea To give some more example positions, here is a list of some airports with their locations in JSON format: -| Airport code | City | Location | -|:---|:---|:---| -| SFO | San Francisco, USA | `{ "lat": 37.618806, "lng": -122.375416 }` | -| LAX | Los Angeles, USA | `{ "lat": 33.942496, "lng": -118.408048 }` | -| JFK | New York, USA | `{ "lat": 40.639928, "lng": -73.778692 }` | -| LHR | London, UK | `{ "lat": 51.477500, "lng": -0.461388 }` | -| SYD | Sydney, Australia | `{ "lat": -33.946110, "lng": 151.177222 }` | -| TRD | Trondheim, Norway | `{ "lat": 63.457556, "lng": 10.924250 }` | -| OSL | Oslo, Norway | `{ "lat": 60.193917, "lng": 11.100361 }` | -| GRU | São Paulo, Brazil | `{ "lat": -23.435555, "lng": -46.473055 }` | -| GIG | Rio de Janeiro, Brazil | `{ "lat": -22.809999, "lng": -43.250555 }` | -| BLR | Bangalore, India | `{ "lat": 13.198867, "lng": 77.705472 }` | -| FCO | Rome, Italy | `{ "lat": 41.804475, "lng": 12.250797 }` | -| NRT | Tokyo, Japan | `{ "lat": 35.765278, "lng": 140.385556 }` | -| PEK | Beijing, China | `{ "lat": 40.073, "lng": 116.598 }` | -| CPT | Cape Town, South Africa | `{ "lat": -33.971368, "lng": 18.604292 }` | -| ACC | Accra, Ghana | `{ "lat": 5.605186, "lng": -0.166785 }` | -| TBU | Nuku'alofa, Tonga | `{ "lat": -21.237999, "lng": -175.137166 }` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Airport codeCityLocation
SFOSan Francisco, USA{`{ "lat": 37.618806, "lng": -122.375416 }`}
LAXLos Angeles, USA{`{ "lat": 33.942496, "lng": -118.408048 }`}
JFKNew York, USA{`{ "lat": 40.639928, "lng": -73.778692 }`}
LHRLondon, UK{`{ "lat": 51.477500, "lng": -0.461388 }`}
SYDSydney, Australia{`{ "lat": -33.946110, "lng": 151.177222 }`}
TRDTrondheim, Norway{`{ "lat": 63.457556, "lng": 10.924250 }`}
OSLOslo, Norway{`{ "lat": 60.193917, "lng": 11.100361 }`}
GRUSão Paulo, Brazil{`{ "lat": -23.435555, "lng": -46.473055 }`}
GIGRio de Janeiro, Brazil{`{ "lat": -22.809999, "lng": -43.250555 }`}
BLRBangalore, India{`{ "lat": 13.198867, "lng": 77.705472 }`}
FCORome, Italy{`{ "lat": 41.804475, "lng": 12.250797 }`}
NRTTokyo, Japan{`{ "lat": 35.765278, "lng": 140.385556 }`}
PEKBeijing, China{`{ "lat": 40.073, "lng": 116.598 }`}
CPTCape Town, South Africa{`{ "lat": -33.971368, "lng": 18.604292 }`}
ACCAccra, Ghana{`{ "lat": 5.605186, "lng": -0.166785 }`}
TBUNuku'alofa, Tonga{`{ "lat": -21.237999, "lng": -175.137166 }`}
## Distance to path diff --git a/mintlify-docs/en/querying/grouping.mdx b/mintlify-docs/en/querying/grouping.mdx index 837338e4f4..98b0133261 100644 --- a/mintlify-docs/en/querying/grouping.mdx +++ b/mintlify-docs/en/querying/grouping.mdx @@ -33,28 +33,180 @@ Vespa distributes and executes the grouping program on content nodes and merges For the entirety of this document, assume an index of engine part purchases: -| Date | Price | Tax | Item | Customer | Is paid | -|:---|:---|:---|:---|:---|:---| -| 2006-09-06 09:00:00 | $1 000 | 0.24 | Intake valve | Smith | true | -| 2006-09-07 10:00:00 | $1 000 | 0.12 | Rocker arm | Smith | false | -| 2006-09-07 11:00:00 | $2 000 | 0.24 | Spring | Smith | true | -| 2006-09-08 12:00:00 | $3 000 | 0.12 | Valve cover | Jones | false | -| 2006-09-08 10:00:00 | $5 000 | 0.24 | Intake port | Jones | true | -| 2006-09-08 11:00:00 | $8 000 | 0.12 | Head | Brown | false | -| 2006-09-09 12:00:00 | $1 300 | 0.24 | Coolant | Smith | true | -| 2006-09-09 10:00:00 | $2 100 | 0.12 | Engine block | Jones | false | -| 2006-09-09 11:00:00 | $3 400 | 0.24 | Oil pan | Brown | true | -| 2006-09-09 12:00:00 | $5 500 | 0.12 | Oil sump | Smith | false | -| 2006-09-10 10:00:00 | $8 900 | 0.24 | Camshaft | Jones | true | -| 2006-09-10 11:00:00 | $1 440 | 0.12 | Exhaust valve | Brown | false | -| 2006-09-10 12:00:00 | $2 330 | 0.24 | Rocker arm | Brown | true | -| 2006-09-10 10:00:00 | $3 770 | 0.12 | Spring | Brown | false | -| 2006-09-10 11:00:00 | $6 100 | 0.24 | Spark plug | Smith | true | -| 2006-09-11 12:00:00 | $9 870 | 0.12 | Exhaust port | Jones | false | -| 2006-09-11 10:00:00 | $1 597 | 0.24 | Piston | Brown | true | -| 2006-09-11 11:00:00 | $2 584 | 0.12 | Connection rod | Smith | false | -| 2006-09-11 12:00:00 | $4 181 | 0.24 | Rod bearing | Jones | true | -| 2006-09-11 13:00:00 | $6 765 | 0.12 | Crankshaft | Jones | false | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DatePriceTaxItemCustomerIs paid
2006-09-06 09:00:00$1 0000.24Intake valveSmithtrue
2006-09-07 10:00:00$1 0000.12Rocker armSmithfalse
2006-09-07 11:00:00$2 0000.24SpringSmithtrue
2006-09-08 12:00:00$3 0000.12Valve coverJonesfalse
2006-09-08 10:00:00$5 0000.24Intake portJonestrue
2006-09-08 11:00:00$8 0000.12HeadBrownfalse
2006-09-09 12:00:00$1 3000.24CoolantSmithtrue
2006-09-09 10:00:00$2 1000.12Engine blockJonesfalse
2006-09-09 11:00:00$3 4000.24Oil panBrowntrue
2006-09-09 12:00:00$5 5000.12Oil sumpSmithfalse
2006-09-10 10:00:00$8 9000.24CamshaftJonestrue
2006-09-10 11:00:00$1 4400.12Exhaust valveBrownfalse
2006-09-10 12:00:00$2 3300.24Rocker armBrowntrue
2006-09-10 10:00:00$3 7700.12SpringBrownfalse
2006-09-10 11:00:00$6 1000.24Spark plugSmithtrue
2006-09-11 12:00:00$9 8700.12Exhaust portJonesfalse
2006-09-11 10:00:00$1 5970.24PistonBrowntrue
2006-09-11 11:00:00$2 5840.12Connection rodSmithfalse
2006-09-11 12:00:00$4 1810.24Rod bearingJonestrue
2006-09-11 13:00:00$6 7650.12CrankshaftJonesfalse
## Basic Grouping @@ -112,11 +264,28 @@ Here, limit is set to zero to get the grouping output only. URL encoded equivale Result: -| GroupId | Sum(price) | -|:---|:---| -| Brown | $20 537 | -| Jones | $39 816 | -| Smith | $19 484 | + + + + + + + + + + + + + + + + + + + + + +
GroupIdSum(price)
Brown$20 537
Jones$39 816
Smith$19 484
Example: *Sum price of purchases [per date](#time-and-date):* @@ -327,66 +496,543 @@ Use this to query for all items on a per-customer basis, displaying the most exp &ranking=pricerank ``` -| GroupId | sum(price) | | | | | | -|:---|:---|:---|:---|:---|:---|:---| -| Brown | $20 537 | | | | | | -| | Date | Price | Tax | Item | Customer | | -| | 2006-09-08 11:00 | $8 000 | 0.12 | Head | Brown | | -| | GroupId | Sum(price) | | | | | -| | 2006-09-08 | $8 000 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-08 11:00 | $8 000 | 0.12 | Head | Brown | -| | 2006-09-09 | $3 400 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-09 11:00 | $3 400 | 0.12 | Oil pan | Brown | -| | 2006-09-10 | $7 540 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-10 10:00 | $3 770 | 0.12 | Spring | Brown | -| | | 2006-09-10 12:00 | $2 330 | 0.24 | Rocker arm | Brown | -| | | 2006-09-10 11:00 | $1 440 | 0.12 | Exhaust valve | Brown | -| | 2006-09-11 | $1 597 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-11 10:00 | $1 597 | 0.24 | Piston | Brown | -| Jones | $39 816 | | | | | | -| | Date | Price | Tax | Item | Customer | | -| | 2006-09-11 12:00 | $9 870 | 0.12 | Exhaust port | Jones | | -| | GroupId | Sum(price) | | | | | -| | 2006-09-08 | $8 000 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-08 10:00 | $5 000 | 0.24 | Intake port | Jones | -| | | 2006-09-08 12:00 | $3 000 | 0.12 | Valve cover | Jones | -| | 2006-09-09 | $2 100 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-09 10:00 | $2 100 | 0,12 | Engine block | Jones | -| | 2006-09-10 | $8 900 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-10 10:00 | $8 900 | 0.24 | Camshaft | Jones | -| | 2006-09-11 | $20 816 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-11 12:00 | $9 870 | 0.12 | Exhaust port | Jones | -| | | 2006-09-11 13:00 | $6 765 | 0.12 | Crankshaft | Jones | -| | | 2006-09-11 12:00 | $4 181 | 0.24 | Rod bearing | Jones | -| Smith | $19 484 | | | | | | -| | Date | Price | Tax | Item | Customer | | -| | 2006-09-10 11:00 | $6 100 | 0.24 | Spark plug | Smith | | -| | GroupId | Sum(price) | | | | | -| | 2006-09-06 | $1 000 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-06 09:00 | $1 000 | 0.24 | Intake valve | Smith | -| | 2006-09-07 | $3 000 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-07 11:00 | $2 000 | 0.24 | Spring | Smith | -| | | 2006-09-07 10:00 | $1 000 | 0.12 | Rocker arm | Smith | -| | 2006-09-09 | $6 800 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-09 12:00 | $5 500 | 0.12 | Oil sump | Smith | -| | | 2006-09-09 12:00 | $1 300 | 0.24 | Coolant | Smith | -| | 2006-09-10 | $6 100 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-10 11:00 | $6 100 | 0.24 | Spark plug | Smith | -| | 2006-09-11 | $2 584 | | | | | -| | | Date | Price | Tax | Item | Customer | -| | | 2006-09-11 11:00 | $2 584 | 0.12 | Connection rod | Smith | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupIdsum(price)
Brown$20 537
DatePriceTaxItemCustomer
2006-09-08 11:00$8 0000.12HeadBrown
GroupIdSum(price)
2006-09-08$8 000
DatePriceTaxItemCustomer
2006-09-08 11:00$8 0000.12HeadBrown
2006-09-09$3 400
DatePriceTaxItemCustomer
2006-09-09 11:00$3 4000.12Oil panBrown
2006-09-10$7 540
DatePriceTaxItemCustomer
2006-09-10 10:00$3 7700.12SpringBrown
2006-09-10 12:00$2 3300.24Rocker armBrown
2006-09-10 11:00$1 4400.12Exhaust valveBrown
2006-09-11$1 597
DatePriceTaxItemCustomer
2006-09-11 10:00$1 5970.24PistonBrown
Jones$39 816
DatePriceTaxItemCustomer
2006-09-11 12:00$9 8700.12Exhaust portJones
GroupIdSum(price)
2006-09-08$8 000
DatePriceTaxItemCustomer
2006-09-08 10:00$5 0000.24Intake portJones
2006-09-08 12:00$3 0000.12Valve coverJones
2006-09-09$2 100
DatePriceTaxItemCustomer
2006-09-09 10:00$2 1000,12Engine blockJones
2006-09-10$8 900
DatePriceTaxItemCustomer
2006-09-10 10:00$8 9000.24CamshaftJones
2006-09-11$20 816
DatePriceTaxItemCustomer
2006-09-11 12:00$9 8700.12Exhaust portJones
2006-09-11 13:00$6 7650.12CrankshaftJones
2006-09-11 12:00$4 1810.24Rod bearingJones
Smith$19 484
DatePriceTaxItemCustomer
2006-09-10 11:00$6 1000.24Spark plugSmith
GroupIdSum(price)
2006-09-06$1 000
DatePriceTaxItemCustomer
2006-09-06 09:00$1 0000.24Intake valveSmith
2006-09-07$3 000
DatePriceTaxItemCustomer
2006-09-07 11:00$2 0000.24SpringSmith
2006-09-07 10:00$1 0000.12Rocker armSmith
2006-09-09$6 800
DatePriceTaxItemCustomer
2006-09-09 12:00$5 5000.12Oil sumpSmith
2006-09-09 12:00$1 3000.24CoolantSmith
2006-09-10$6 100
DatePriceTaxItemCustomer
2006-09-10 11:00$6 1000.24Spark plugSmith
2006-09-11$2 584
DatePriceTaxItemCustomer
2006-09-11 11:00$2 5840.12Connection rodSmith
## Structured grouping diff --git a/mintlify-docs/en/querying/text-matching.mdx b/mintlify-docs/en/querying/text-matching.mdx index a8bf04fbcf..f0b9b667d6 100644 --- a/mintlify-docs/en/querying/text-matching.mdx +++ b/mintlify-docs/en/querying/text-matching.mdx @@ -100,12 +100,32 @@ $ vespa query "select * from music where true" summary=my-debug-summary | \ Observe the [linguistic transformations](../linguistics/linguistics) to the data before indexed: -| Transformation | Type | -|:---|:---| -| Hardwired...To → hardwire to | Tokenization - split terms on non-characters, here "..." | -| Head → head | Lowercasing | -| für → fur | Normalizing | -| dreams → dream | Stemming | + + + + + + + + + + + + + + + + + + + + + + + + + +
TransformationType
Hardwired...To → hardwire toTokenization - split terms on non-characters, here "..."
Head → headLowercasing
für → furNormalizing
dreams → dreamStemming
Then, change from *index* to [attribute](../reference/schemas/schemas#indexing) in [schemas/music.sd](https://github.com/vespa-engine/sample-apps/blob/master/album-recommendation/app/schemas/music.sd) (and remove all bm25 settings): @@ -271,6 +291,14 @@ A substring search: $ vespa query 'select * from music where album matches "head"' ``` +A regular expression can also be used to select documents where a string attribute has a *non-empty* value - `^.` matches any value with at least one character: + +```bash +$ vespa query 'select * from music where album matches "^."' +``` + +This works on any string attribute field. Without *fast-search*, the expression is evaluated over the value of every document, which is slow on a large corpus. Add [fast-search](../reference/schemas/schemas#attribute) to the attribute to make this more efficient. For the complementary query - listing documents *missing* a value - see [count and list fields with NaN](/en/querying/grouping#count-fields-with-nan). + Character [normalization](../linguistics/linguistics-opennlp#normalization) is not performed for regular expression matches. ## N-Gram match diff --git a/mintlify-docs/en/querying/vector-search-intro.mdx b/mintlify-docs/en/querying/vector-search-intro.mdx index 5d6551291a..748b1e05ab 100644 --- a/mintlify-docs/en/querying/vector-search-intro.mdx +++ b/mintlify-docs/en/querying/vector-search-intro.mdx @@ -39,11 +39,28 @@ A solution to the synonym or multi-modal problem is to change from matching in t Examples of different objects, and their vector representation: -| ![DandelionFlower.jpg](https://upload.wikimedia.org/wikipedia/commons/4/4f/DandelionFlower.jpg) | [0.560, 0.001, 0.223, ...] | -|:---|:---| -| ![Dandelion bu Anna of the North](/assets/img/dandelion-song.png) | [0.0, 0.011, 0.0, ...] | -| "Taraxacum is a large genus of flowering plants in the family Asteraceae, which consists of species commonly known as dandelions." | [0.002, 0.001, 0.411, ...] | -| dandelions | [0.002, 0.021, 0.355, ...] | + + + + + + + + + + + + + + + + + + + + + +
<Columns cols={3}><Frame>!DandelionFlower.jpg</Frame></Columns>[0.560, 0.001, 0.223, ...]
<Columns cols={2}><Frame>!Dandelion bu Anna of the North</Frame></Columns>[0.0, 0.011, 0.0, ...]
"Taraxacum is a large genus of flowering plants in the family Asteraceae, which consists of species commonly known as dandelions."[0.002, 0.001, 0.411, ...]
dandelions[0.002, 0.021, 0.355, ...]
The digital representation of the object is hence a sequence of numbers, called a *vector*, also called an *embedding*. @@ -59,11 +76,28 @@ A vector has a *dimension* (length) and type (type of each cell). The cost/quality tradeoff is essential - given a vector, it can be represented with lower precision or shortened, keeping the most relevant dimensions. This reduces search precision, but cuts costs into a fraction. A 75% cost reduction might reduce precision, but acceptable for the use case. Vespa supports [four types](../reference/ranking/tensor), with an 8x difference in memory cost: -| Int8 | 8 bits, 1 byte per dimension | -|:---|:---| -| bfloat16 | 16 bits, 2 bytes per dimension | -| float | 32 bits, 4 bytes per dimension | -| double | 64 bits, 8 bytes per dimension | + + + + + + + + + + + + + + + + + + + + + +
Int88 bits, 1 byte per dimension
bfloat1616 bits, 2 bytes per dimension
float32 bits, 4 bytes per dimension
double64 bits, 8 bytes per dimension
Read more on selecting the optimal type: diff --git a/mintlify-docs/en/rag/binarizing-vectors.mdx b/mintlify-docs/en/rag/binarizing-vectors.mdx index 78ab30ec08..26c016c7eb 100644 --- a/mintlify-docs/en/rag/binarizing-vectors.mdx +++ b/mintlify-docs/en/rag/binarizing-vectors.mdx @@ -4,13 +4,42 @@ title: "Binarizing Vectors" Binarization in this context is mapping numbers in a vector (embedding) to bits (reducing the value range), and representing the vector of bits efficiently using the `int8` data type. Examples: -| input vector | binarized floats | pack\_bits (to INT8) | -| :--- | :--- | :--- | -| [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] | [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] | -1 | -| [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | 0 | -| [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0] | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | 0 | -| [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | -128 | -| [2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0] | [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0] | -127 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
input vectorbinarized floatspack_bits (to INT8)
[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0][1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]-1
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0][0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]0
[-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0][0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]0
[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0][1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]-128
[2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0][1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]-127
Binarization is key to reducing memory requirements and, therefore, cost. Binarization can also improve feeding performance, as the memory bandwidth requirements go down accordingly. @@ -285,11 +314,32 @@ See [tensor-hex-dump](/en/reference/schemas/document-json-format#tensor-hex-dump Example embeddings: -| document embedding | binarized floats | pack\_bits (to INT8) | -| :--- | :--- | :--- | -| [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0] | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | 0 | -| **query embedding** | **binarized floats** | **to INT8** | -| [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0] | [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0] | -119 | + + + + + + + + + + + + + + + + + + + + + + + + + +
document embeddingbinarized floatspack_bits (to INT8)
[-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0][0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]0
**query embedding****binarized floats****to INT8**
[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0][1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0]-119
Use [matchfeatures](/en/reference/schemas/schemas#match-features) to debug ranking (see ranking profile `app_ranking_bin` below): diff --git a/mintlify-docs/en/rag/external-llms.mdx b/mintlify-docs/en/rag/external-llms.mdx index 66ffd1ca77..96bdd8eb9a 100644 --- a/mintlify-docs/en/rag/external-llms.mdx +++ b/mintlify-docs/en/rag/external-llms.mdx @@ -85,15 +85,52 @@ parameters. The OpenAI-client also has the following inference parameters that can be sent along with the query: -| Parameter (Vespa) | Parameter (OpenAI) | Description | -| :--- | :--- | :--- | -| `maxTokens` | `max_completion_tokens` | Maximum number of tokens that can be generated in the chat completion. | -| `temperature` | `temperature` | Number between 0 and 2. Higher values like 0.8 make output more random, while lower values like 0.2 make it more focused and deterministic. | -| `topP` | `top_p` | An alternative to temperature sampling. Model considers tokens with top\_p probability mass (0-1). Value of 0.1 means only tokens comprising top 10% probability are considered. | -| `seed` | `seed` | If specified, the system will attempt to sample deterministically, so repeated requests with the same seed should return similar results. Determinism is not guaranteed. | -| `npredict` | `n` | How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all choices. | -| `frequencypenalty` | `frequency_penalty` | Number between -2.0 and 2.0. Positive values penalize new tokens based on their frequency in the text so far, decreasing the likelihood of repetition. Negative values encourage repetition. | -| `presencepenalty` | `presence_penalty` | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. Negative values encourage repeating content from the prompt. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parameter (Vespa)Parameter (OpenAI)Description
{`maxTokens`}{`max_completion_tokens`}Maximum number of tokens that can be generated in the chat completion.
{`temperature`}{`temperature`}Number between 0 and 2. Higher values like 0.8 make output more random, while lower values like 0.2 make it more focused and deterministic.
{`topP`}{`top_p`}An alternative to temperature sampling. Model considers tokens with top_p probability mass (0-1). Value of 0.1 means only tokens comprising top 10% probability are considered.
{`seed`}{`seed`}If specified, the system will attempt to sample deterministically, so repeated requests with the same seed should return similar results. Determinism is not guaranteed.
{`npredict`}{`n`}How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all choices.
{`frequencypenalty`}{`frequency_penalty`}Number between -2.0 and 2.0. Positive values penalize new tokens based on their frequency in the text so far, decreasing the likelihood of repetition. Negative values encourage repetition.
{`presencepenalty`}{`presence_penalty`}Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. Negative values encourage repeating content from the prompt.
Any parameter sent with the query will override configuration specified for the client component in `services.xml`. diff --git a/mintlify-docs/en/rag/model-hub.mdx b/mintlify-docs/en/rag/model-hub.mdx index 915f2415fc..65ced10a2d 100644 --- a/mintlify-docs/en/rag/model-hub.mdx +++ b/mintlify-docs/en/rag/model-hub.mdx @@ -33,192 +33,655 @@ Most models also support [binarization](/en/rag/binarizing-vectors), which requi #### alibaba-gte-modernbert -| | | -| :--- | :--- | -| GTE (General Text Embedding) model trained from ModernBERT-base. | | -| Model id | `alibaba-gte-modernbert` | -| Tensor definition | `tensor(x[768])` | -| Matryoshka dimensions | `x[768]`, `x[256]` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/Alibaba-NLP/gte-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-modernbert-base) @ 3ab3f8c | -| Language | English | -| Component declaration | ```8192cls ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GTE (General Text Embedding) model trained from ModernBERT-base.
Model id{`alibaba-gte-modernbert`}
Tensor definition{`tensor(x[768])`}
Matryoshka dimensions{`x[768]`}, {`x[256]`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/Alibaba-NLP/gte-modernbert-base @ 3ab3f8c
LanguageEnglish
Component declaration
{`8192cls`}
#### alibaba-gte-modernbert-int8 -| | | -| :--- | :--- | -| INT8 quantized variant of alibaba-gte-modernbert. Offers faster inference with minimal accuracy loss. | | -| Model id | `alibaba-gte-modernbert-int8` | -| Tensor definition | `tensor(x[768])` | -| Matryoshka dimensions | `x[768]`, `x[256]` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/Alibaba-NLP/gte-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-modernbert-base) @ e7f32e3 | -| Language | English | -| Component declaration | ```8192cls ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INT8 quantized variant of alibaba-gte-modernbert. Offers faster inference with minimal accuracy loss.
Model id{`alibaba-gte-modernbert-int8`}
Tensor definition{`tensor(x[768])`}
Matryoshka dimensions{`x[768]`}, {`x[256]`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/Alibaba-NLP/gte-modernbert-base @ e7f32e3
LanguageEnglish
Component declaration
{`8192cls`}
#### e5-base-v2 -| | | -| :--- | :--- | -| The base model of the _E5_ family. | | -| Model id | `e5-base-v2` | -| Tensor definition | `tensor(x[768])` or `tensor(p{},x[768])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [MIT](https://github.com/microsoft/unilm/blob/master/LICENSE) | -| Source | [https://huggingface.co/intfloat/e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) @ 121b23b | -| Language | English | -| Component declaration | ```512query: passage: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
The base model of the _E5_ family.
Model id{`e5-base-v2`}
Tensor definition{`tensor(x[768])`} or {`tensor(p{},x[768])`}
distance-metric{`angular`}
LicenseMIT
Sourcehttps://huggingface.co/intfloat/e5-base-v2 @ 121b23b
LanguageEnglish
Component declaration
{`512query: passage: `}
#### e5-large-v2 -| | | -| :--- | :--- | -| The largest model of the _E5_ family, at time of writing, this is the best performing embedding model on the MTEB benchmark. | | -| Model id | `e5-large-v2` | -| Tensor definition | `tensor(x[1024])` or `tensor(p{},x[1024])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [MIT](https://github.com/microsoft/unilm/blob/master/LICENSE) | -| Source | [https://huggingface.co/intfloat/e5-large-v2](https://huggingface.co/intfloat/e5-large-v2) | -| Language | English | -| Component declaration | ```512query: passage: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
The largest model of the _E5_ family, at time of writing, this is the best performing embedding model on the MTEB benchmark.
Model id{`e5-large-v2`}
Tensor definition{`tensor(x[1024])`} or {`tensor(p{},x[1024])`}
distance-metric{`angular`}
LicenseMIT
Sourcehttps://huggingface.co/intfloat/e5-large-v2
LanguageEnglish
Component declaration
{`512query: passage: `}
#### e5-small-v2 -| | | -| :--- | :--- | -| The smallest and most cost-efficient model from the _E5_ family. | | -| Model id | `e5-small-v2` | -| Tensor definition | `tensor(x[384])` or `tensor(p{},x[384])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [MIT](https://github.com/microsoft/unilm/blob/master/LICENSE) | -| Source | [https://huggingface.co/intfloat/e5-small-v2](https://huggingface.co/intfloat/e5-small-v2) | -| Language | English | -| Component declaration | ```512query: passage: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
The smallest and most cost-efficient model from the _E5_ family.
Model id{`e5-small-v2`}
Tensor definition{`tensor(x[384])`} or {`tensor(p{},x[384])`}
distance-metric{`angular`}
LicenseMIT
Sourcehttps://huggingface.co/intfloat/e5-small-v2
LanguageEnglish
Component declaration
{`512query: passage: `}
#### lightonai-modernbert-large -| | | -| :--- | :--- | -| Trained from ModernBERT-large on the Nomic Embed datasets, bringing the new advances of ModernBERT to embeddings. | | -| Model id | `lightonai-modernbert-large` | -| Tensor definition | `tensor(x[1024])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/lightonai/modernbert-embed-large](https://huggingface.co/lightonai/modernbert-embed-large) @ b3a781f | -| Language | English | -| Component declaration | ```8192search_query: search_document: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Trained from ModernBERT-large on the Nomic Embed datasets, bringing the new advances of ModernBERT to embeddings.
Model id{`lightonai-modernbert-large`}
Tensor definition{`tensor(x[1024])`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/lightonai/modernbert-embed-large @ b3a781f
LanguageEnglish
Component declaration
{`8192search_query: search_document: `}
#### lightonai-modernbert-large-int8 -| | | -| :--- | :--- | -| INT8 quantized variant of lightonai-modernbert-large. Offers faster inference with minimal accuracy loss. | | -| Model id | `lightonai-modernbert-large-int8` | -| Tensor definition | `tensor(x[1024])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/lightonai/modernbert-embed-large](https://huggingface.co/lightonai/modernbert-embed-large) @ 95a19bf | -| Language | English | -| Component declaration | ```8192search_query: search_document: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INT8 quantized variant of lightonai-modernbert-large. Offers faster inference with minimal accuracy loss.
Model id{`lightonai-modernbert-large-int8`}
Tensor definition{`tensor(x[1024])`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/lightonai/modernbert-embed-large @ 95a19bf
LanguageEnglish
Component declaration
{`8192search_query: search_document: `}
#### multilingual-e5-base -| | | -| :--- | :--- | -| The multilingual model of the _E5_ family. Use this model for multilingual queries and documents. | | -| Model id | `multilingual-e5-base` | -| Tensor definition | `tensor(x[768])` or `tensor(p{},x[768])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [MIT](https://github.com/microsoft/unilm/blob/master/LICENSE) | -| Source | [https://huggingface.co/intfloat/multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) | -| Language | Multilingual | -| Component declaration | ```512query: passage: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
The multilingual model of the _E5_ family. Use this model for multilingual queries and documents.
Model id{`multilingual-e5-base`}
Tensor definition{`tensor(x[768])`} or {`tensor(p{},x[768])`}
distance-metric{`angular`}
LicenseMIT
Sourcehttps://huggingface.co/intfloat/multilingual-e5-base
LanguageMultilingual
Component declaration
{`512query: passage: `}
#### nomic-ai-modernbert -| | | -| :--- | :--- | -| Trained from ModernBERT-base on the Nomic Embed datasets, bringing the new advances of ModernBERT to embeddings. | | -| Model id | `nomic-ai-modernbert` | -| Tensor definition | `tensor(x[768])` | -| Matryoshka dimensions | `x[768]`, `x[256]` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/nomic-ai/modernbert-embed-base](https://huggingface.co/nomic-ai/modernbert-embed-base) @ 92168cb | -| Language | English | -| Component declaration | ```token_embeddings8192search_query: search_document: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Trained from ModernBERT-base on the Nomic Embed datasets, bringing the new advances of ModernBERT to embeddings.
Model id{`nomic-ai-modernbert`}
Tensor definition{`tensor(x[768])`}
Matryoshka dimensions{`x[768]`}, {`x[256]`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/nomic-ai/modernbert-embed-base @ 92168cb
LanguageEnglish
Component declaration
{`token_embeddings8192search_query: search_document: `}
#### nomic-ai-modernbert-int8 -| | | -| :--- | :--- | -| INT8 quantized variant of nomic-ai-modernbert. Offers faster inference with minimal accuracy loss. | | -| Model id | `nomic-ai-modernbert-int8` | -| Tensor definition | `tensor(x[768])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/nomic-ai/modernbert-embed-base](https://huggingface.co/nomic-ai/modernbert-embed-base) @ d556a88 | -| Language | English | -| Component declaration | ```token_embeddings8192search_query: search_document: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INT8 quantized variant of nomic-ai-modernbert. Offers faster inference with minimal accuracy loss.
Model id{`nomic-ai-modernbert-int8`}
Tensor definition{`tensor(x[768])`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/nomic-ai/modernbert-embed-base @ d556a88
LanguageEnglish
Component declaration
{`token_embeddings8192search_query: search_document: `}
#### snowflake-arctic-embed-m-v2.0 -| | | -| :--- | :--- | -| Embedding model based on snowflake-arctic-embed-m-v2.0. | | -| Model id | `snowflake-arctic-embed-m-v2.0` | -| Tensor definition | `tensor(x[768])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v2.0](https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v2.0) @ 95c2741 | -| Language | Multilingual | -| Component declaration | ```8192token_embeddingsclstruequery: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Embedding model based on snowflake-arctic-embed-m-v2.0.
Model id{`snowflake-arctic-embed-m-v2.0`}
Tensor definition{`tensor(x[768])`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/Snowflake/snowflake-arctic-embed-m-v2.0 @ 95c2741
LanguageMultilingual
Component declaration
{`8192token_embeddingsclstruequery: `}
#### snowflake-arctic-embed-m-v2.0-int8 - | | | -| :--- | :--- | -| INT8 quantized variant of snowflake-arctic-embed-m-v2.0. Offers faster inference with minimal accuracy loss. | | -| Model id | `snowflake-arctic-embed-m-v2.0-int8` | -| Tensor definition | `tensor(x[768])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v2.0](https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v2.0) @ 95c2741 | -| Language | Multilingual | -| Component declaration | ```8192token_embeddingsclstruequery: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INT8 quantized variant of snowflake-arctic-embed-m-v2.0. Offers faster inference with minimal accuracy loss.
Model id{`snowflake-arctic-embed-m-v2.0-int8`}
Tensor definition{`tensor(x[768])`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/Snowflake/snowflake-arctic-embed-m-v2.0 @ 95c2741
LanguageMultilingual
Component declaration
{`8192token_embeddingsclstruequery: `}
#### voyage-4-nano -| | | -| :--- | :--- | -| Embedding model based on voyage-4-nano-ONNX. | | -| Model id | `voyage-4-nano` | -| Tensor definition | `tensor(x[2048])` | -| Matryoshka dimensions | `x[2048]`, `x[1024]`, `x[512]`, `x[256]` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/thomasht86/voyage-4-nano-ONNX](https://huggingface.co/thomasht86/voyage-4-nano-ONNX) @ fcf290d | -| Language | English | -| Component declaration | ```32768meantrueRepresent the query for retrieving supporting documents: Represent the document for retrieval: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Embedding model based on voyage-4-nano-ONNX.
Model id{`voyage-4-nano`}
Tensor definition{`tensor(x[2048])`}
Matryoshka dimensions{`x[2048]`}, {`x[1024]`}, {`x[512]`}, {`x[256]`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/thomasht86/voyage-4-nano-ONNX @ fcf290d
LanguageEnglish
Component declaration
{`32768meantrueRepresent the query for retrieving supporting documents: Represent the document for retrieval: `}
#### voyage-4-nano-int8 -| | | -| :--- | :--- | -| INT8 quantized variant of voyage-4-nano. Offers faster inference with minimal accuracy loss. | | -| Model id | `voyage-4-nano-int8` | -| Tensor definition | `tensor(x[2048])` | -| Matryoshka dimensions | `x[2048]`, `x[1024]`, `x[512]`, `x[256]` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/thomasht86/voyage-4-nano-ONNX](https://huggingface.co/thomasht86/voyage-4-nano-ONNX) @ fcf290d | -| Language | English | -| Component declaration | ```32768meantrueRepresent the query for retrieving supporting documents: Represent the document for retrieval: ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INT8 quantized variant of voyage-4-nano. Offers faster inference with minimal accuracy loss.
Model id{`voyage-4-nano-int8`}
Tensor definition{`tensor(x[2048])`}
Matryoshka dimensions{`x[2048]`}, {`x[1024]`}, {`x[512]`}, {`x[256]`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/thomasht86/voyage-4-nano-ONNX @ fcf290d
LanguageEnglish
Component declaration
{`32768meantrueRepresent the query for retrieving supporting documents: Represent the document for retrieval: `}
### Bert Embedder @@ -240,27 +703,79 @@ Note bert-embedder requires both `transformer-model` and `tokenizer-vocab`. A small, fast sentence-transformer model. -| | | -| :--- | :--- | -| Model-id | minilm-l6-v2 | -| Tensor definition | `tensor(x[384])` or `tensor(p{},x[384])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) | -| Language | English | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Model-idminilm-l6-v2
Tensor definition{`tensor(x[384])`} or {`tensor(p{},x[384])`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/sentence-transformers/all-MiniLM-L6-v2
LanguageEnglish
| #### mpnet-base-v2 A larger, but better than **minilm-l6-v2** sentence-transformer model. -| | | -| :--- | :--- | -| Model-id | mpnet-base-v2 | -| Tensor definition | `tensor(x[768])` or `tensor(p{},x[768])` | -| [distance-metric](/en/reference/schemas/schemas#distance-metric) | `angular` | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) | -| Language | English | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Model-idmpnet-base-v2
Tensor definition{`tensor(x[768])`} or {`tensor(p{},x[768])`}
distance-metric{`angular`}
Licenseapache-2.0
Sourcehttps://huggingface.co/sentence-transformers/all-mpnet-base-v2
LanguageEnglish
### Tokenization Embedders @@ -268,43 +783,128 @@ These are embedder implementations that tokenize text and embed string to the vo #### bert-base-uncased -| | | -| :--- | :--- | -| A vocabulary text (_vocab.txt_) file on the format expected by [WordPiece](/en/rag/embedding#wordpiece-embedder): A text token per line. | -| Model-id | bert-base-uncased | -| License | [apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) | -| Source | [https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) | + + + + + + + + + + + + + + + + + + + + + + + + +
A vocabulary text (_vocab.txt_) file on the format expected by WordPiece: A text token per line.
Model-idbert-base-uncased
Licenseapache-2.0
Sourcehttps://huggingface.co/sentence-transformers/all-MiniLM-L6-v2
#### e5-base-v2-vocab -| | | -| :--- | :--- | -| A _tokenizer.json_ configuration file on the format expected by [HF tokenizer](/en/rag/embedding#huggingface-tokenizer-embedder). This tokenizer configuration can be used with `e5-base-v2`, `e5-small-v2` and `e5-large-v2`. | -| Model-id | e5-base-v2-vocab | -| License | [MIT](https://github.com/microsoft/unilm/blob/master/LICENSE) | -| Source | [https://huggingface.co/intfloat/e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) | -| Language | English | + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
A _tokenizer.json_ configuration file on the format expected by HF tokenizer. This tokenizer configuration can be used with {`e5-base-v2`}, {`e5-small-v2`} and {`e5-large-v2`}.
Model-ide5-base-v2-vocab
LicenseMIT
Sourcehttps://huggingface.co/intfloat/e5-base-v2
LanguageEnglish
| #### multilingual-e5-base-vocab -| | | -| :--- | :--- | -| A _tokenizer.json_ configuration file on the format expected by [HF tokenizer](/en/rag/embedding#huggingface-tokenizer-embedder). This tokenizer configuration can be used with `multilingual-e5-base-vocab`. | -| Model-id | multilingual-e5-base-vocab | -| License | [MIT](https://github.com/microsoft/unilm/blob/master/LICENSE) | -| Source | [https://huggingface.co/intfloat/multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) | -| Language | Multilingual | + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
A _tokenizer.json_ configuration file on the format expected by HF tokenizer. This tokenizer configuration can be used with {`multilingual-e5-base-vocab`}.
Model-idmultilingual-e5-base-vocab
LicenseMIT
Sourcehttps://huggingface.co/intfloat/multilingual-e5-base
LanguageMultilingual
### Significance models These are [global significance models](/en/ranking/significance#significance-models-in-servicesxml) that can be added to [significance element in services.xml](/en/reference/applications/services/search#significance). #### significance-en-wikipedia-v1 -| | | -| :--- | :--- | -| This significance model was generated from [English Wikipedia dump data from 2024-08-01](https://dumps.wikimedia.org/enwiki/). Available in Vespa as of version 8.426.8. | -| Model-id | significance-en-wikipedia-v1 | -| License | [Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License](https://creativecommons.org/licenses/by-sa/3.0/deed.en). | -| Source | [https://data.vespa-cloud.com/significance\_models/significance-en-wikipedia-v1.json.zst](https://data.vespa-cloud.com/significance_models/significance-en-wikipedia-v1.json.zst) | -| Language | English | + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
This significance model was generated from English Wikipedia dump data from 2024-08-01. Available in Vespa as of version 8.426.8.
Model-idsignificance-en-wikipedia-v1
LicenseCreative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License.
Sourcehttps://data.vespa-cloud.com/significance_models/significance-en-wikipedia-v1.json.zst
LanguageEnglish
## Creating applications working both self-hosted and on Vespa Cloud diff --git a/mintlify-docs/en/ranking/bm25.mdx b/mintlify-docs/en/ranking/bm25.mdx index d78258e5f4..d32dedcf78 100644 --- a/mintlify-docs/en/ranking/bm25.mdx +++ b/mintlify-docs/en/ranking/bm25.mdx @@ -1,5 +1,5 @@ --- -title: "The BuM25 rank featre" +title: "The BM25 rank feature" --- The [bm25 rank feature](/en/reference/ranking/rank-features#bm25) implements the [Okapi BM25](https://en.wikipedia.org/wiki/Okapi_BM25) ranking function used to estimate the relevance of a text document given a search query. It is a pure text ranking feature which operates over an [indexed string field](/en/reference/schemas/schemas#indexing-index). The feature is cheap to compute, about 3-4 times faster than [nativeRank](/en/ranking/nativerank), while still providing a good rank score quality wise. It is a good candidate to use in a first phase ranking function when ranking text documents. @@ -18,7 +18,7 @@ Where the components in the function are: $$ l o g \left(\right. 1 + \frac{N - n \left(\right. q_{i} \left.\right) + 0.5}{n \left(\right. q_{i} \left.\right) + 0.5} \left.\right) $$ - *N* is the total number of documents on the content node. $n \left(\right. q_{i} \left.\right)$ is the number of documents containing query term *i* for field *t*, which is calculated per index existing for that field. The max value among the indexes is used in the calculation, which typically comes from the largest [disk index](/en/content/proton#index). + *N* is the total number of documents on the content node. The local value BM25 uses in this case is exposed as the [num_docs_indexed](/en/reference/ranking/rank-features#num_docs_indexed) rank feature. $n \left(\right. q_{i} \left.\right)$ is the number of documents containing query term *i* for field *t*, which is calculated per index existing for that field. The max value among the indexes is used in the calculation, which typically comes from the largest [disk index](/en/content/proton#index). As the *IDF* is calculated per content node and index, slight variations might occur. To use the same *IDF* across all content nodes, set it as the *significance* on each query term using [annotations](/en/reference/querying/yql#annotations). - $f \left(\right. q_{i} , D \left.\right)$: The number of occurrences (term frequency) of query term *i* in the field *t* of document *D*. For multi-value fields we use the sum of occurrences over all elements. - f i e l d __ l e n : The field length (in number of words) of field *t* in document *D*. For multi-value fields we use the sum of field lengths over all elements. diff --git a/mintlify-docs/en/ranking/lightgbm.mdx b/mintlify-docs/en/ranking/lightgbm.mdx index 475b08a79f..cd047be0d1 100644 --- a/mintlify-docs/en/ranking/lightgbm.mdx +++ b/mintlify-docs/en/ranking/lightgbm.mdx @@ -134,6 +134,29 @@ Generally the run time complexity is determined by: Serving latency can be brought down by [using multiple threads per query request](/en/performance/practical-search-performance-guide#multithreaded-search-and-ranking). +### Fast forest evaluation + +For large forests, an alternative GBDT evaluator can further reduce evaluation cost. Enable it by setting the `vespa.eval.use_fast_forest` [rank-property](/en/reference/ranking/rank-feature-configuration) to `true` in the rank profile: + +```js +rank-profile classify inherits default { + rank-properties { + vespa.eval.use_fast_forest: true + } + second-phase { + expression: lightgbm("lightgbm_model.json") + } +} +``` + +This is a rank profile setting, not a query parameter: it is applied when the model is compiled, so it cannot be toggled per query. To A/B test it, create a second rank profile that only adds this property. + + +Fast forest evaluation only applies when every split in the model is numeric (`<` or its inverted form) and no tree has more than 2,048 leaves. Models using LightGBM's native [categorical splits](#using-categorical-features) are not eligible, and neither is a model whose root expression wraps the tree sum in another function: for instance, a `binary` objective, which Vespa automatically wraps in `sigmoid(...)`. In any of these cases the setting has no effect and Vespa silently falls back to the default evaluator. + + +The speedup depends more on the number of leaves per tree than on the number of trees: models with at most 64 leaves per tree benefit the most. + ## Objective functions If you have used XGBoost with Vespa previously, you might have noticed you have to wrap the `xgboost` feature in for instance a `sigmoid` function if using a binary classifier. That should not be needed in LightGBM, as that information is passed along in the model dump as seen in the `objective` section in the JSON output above. diff --git a/mintlify-docs/en/ranking/nativerank.mdx b/mintlify-docs/en/ranking/nativerank.mdx index 86b140d7e5..2a4c68968d 100644 --- a/mintlify-docs/en/ranking/nativerank.mdx +++ b/mintlify-docs/en/ranking/nativerank.mdx @@ -12,11 +12,28 @@ Ranking signals that might be useful, like freshness (the age of the document co Modify the values of the match features from the query by sending *weight*, *significance* and *connectedness* with the query: -| Feature input | Description | -| --- | --- | -| Weight | Set query term [weight](/en/reference/querying/yql#weight). Example: `... where (title contains ({weight:200}"heads") AND title contains "tails")` specifies that `heads` is twice as important for the final rank score than `tails` (the default weight is 100).

The term weight is used in several text scoring features, including [fieldMatch(*name*).weight](/en/reference/ranking/rank-features#fieldMatch(name).weight) and [nativeRank](/en/ranking/nativerank). Note that the term weight is not applicable for all text scoring features, for example [bm25](/en/ranking/bm25) does not use the term weight.

Configure static field weights in the [schema](/en/reference/schemas/schemas#weight). | -| Significance | Significance is an indication of how rare a term is in the corpus of the language, used by a number of text matching [rank features](/en/reference/ranking/rank-features). This can be set explicitly for each term in [the query](/en/reference/querying/yql#significance), or by calling item.setSignificance() in a [Searcher](/en/applications/searchers).

With *indexed search*, default significance values are calculated automatically during indexing. However, unless the indexed corpus is representative of the word frequencies in the user's language, relevance can be improved by passing significances derived from a representative corpus. Relative significance is accessible in ranking through the [fieldMatch(*name*).significance](/en/reference/ranking/rank-features#fieldMatch(name).significance) feature. Weight and significance are also averaged into [fieldMatch(*name*).importance](/en/reference/ranking/rank-features#fieldMatch(name).importance) for convenience.

*Streaming search* does not compute term significance, queries should pass this with the query terms. [Read more](/en/performance/streaming-search#differences-in-streaming-search). | -| Connectedness | Signify the degree of connection between adjacent terms in the query - set query term [connectivity](/en/reference/querying/yql#connectivity) to another term.

For example, the query `new york newspaper` should have a higher connectedness between the terms "new" and "york" than between "york" and "newspaper" to rank documents higher if they contain "new york" as a phrase.

Term connectedness is taken into account by [fieldMatch(*name*).proximity](/en/reference/ranking/rank-features#fieldMatch(name).proximity), which is also an important contribution to [fieldMatch(*name*)](/en/reference/ranking/rank-features#fieldMatch(name)). Connectedness is a normalized value which is 0.1 by default. It must be set by a custom Searcher, looking up connectivity information from somewhere - there is no query syntax for it. | + + + + + + + + + + + + + + + + + + + + + +
Feature inputDescription
WeightSet query term weight. Example: {`... where (title contains ({weight:200}"heads") AND title contains "tails")`} specifies that {`heads`} is twice as important for the final rank score than {`tails`} (the default weight is 100).

The term weight is used in several text scoring features, including fieldMatch(*name*).weight and nativeRank. Note that the term weight is not applicable for all text scoring features, for example bm25 does not use the term weight.

Configure static field weights in the schema.
SignificanceSignificance is an indication of how rare a term is in the corpus of the language, used by a number of text matching rank features. This can be set explicitly for each term in the query, or by calling item.setSignificance() in a Searcher.

With *indexed search*, default significance values are calculated automatically during indexing. However, unless the indexed corpus is representative of the word frequencies in the user's language, relevance can be improved by passing significances derived from a representative corpus. Relative significance is accessible in ranking through the fieldMatch(*name*).significance feature. Weight and significance are also averaged into fieldMatch(*name*).importance for convenience.

*Streaming search* does not compute term significance, queries should pass this with the query terms. Read more.
ConnectednessSignify the degree of connection between adjacent terms in the query - set query term connectivity to another term.

For example, the query {`new york newspaper`} should have a higher connectedness between the terms "new" and "york" than between "york" and "newspaper" to rank documents higher if they contain "new york" as a phrase.

Term connectedness is taken into account by fieldMatch(*name*).proximity, which is also an important contribution to fieldMatch(*name*). Connectedness is a normalized value which is 0.1 by default. It must be set by a custom Searcher, looking up connectivity information from somewhere - there is no query syntax for it.
## Using nativeRank diff --git a/mintlify-docs/en/ranking/ranking-intro.mdx b/mintlify-docs/en/ranking/ranking-intro.mdx index c57a65fa8f..6c5e910f43 100644 --- a/mintlify-docs/en/ranking/ranking-intro.mdx +++ b/mintlify-docs/en/ranking/ranking-intro.mdx @@ -209,12 +209,37 @@ Inspect relevance and summary-features: Here, the tensors have one dimension, so they are vectors - the sum of the tensor product is hence the doc product. As all values are 1, all products are 1 and the sum is 2: -| document | query | value | -| :--- | :--- | :--- | -| /en/jdisc/container-components.html | | 0 | -| | /en/overview.html | 0 | -| /en/page-templates.html | /en/page-templates.html | 1 | -| /en/query-profiles.html | /en/query-profiles.html | 1 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
documentqueryvalue
/en/jdisc/container-components.html0
/en/overview.html0
/en/page-templates.html/en/page-templates.html1
/en/query-profiles.html/en/query-profiles.html1
Change values in the query tensor to see difference in rank score, setting different weights for links. diff --git a/mintlify-docs/en/ranking/stateless-model-evaluation.mdx b/mintlify-docs/en/ranking/stateless-model-evaluation.mdx index c269157bb0..10a14f0138 100644 --- a/mintlify-docs/en/ranking/stateless-model-evaluation.mdx +++ b/mintlify-docs/en/ranking/stateless-model-evaluation.mdx @@ -36,9 +36,22 @@ See the [model-inference sample app](https://github.com/vespa-engine/sample-apps Model evaluation requests accepts these request parameters: -| Parameter | Type | Description | -| --- | --- | --- | -| **format.tensors** | String | Controls how tensors are rendered in the result.

Value: `short`
Description:
**Default**. Render the tensor value in a JSON object having two keys, "type" containing the value, and "cells"/"blocks"/"values" ([depending on the type](/en/reference/schemas/document-json-format#tensor)) containing the tensor content. Render the tensor content in the [type-appropriate short form](/en/reference/schemas/document-json-format#tensor).

Value: `long`
Description:
Render the tensor value in a JSON object having two keys, "type" containing the value, and "cells" containing the tensor content.
Render the tensor content in the [general verbose form](/en/reference/schemas/document-json-format#tensor).

Value: `short-value`
Description:
Render the tensor content directly as a JSON value.
Render the tensor content in the [type-appropriate short form](/en/reference/schemas/document-json-format#tensor).

Value: `long-value`
Description:
Render the tensor content directly as a JSON value.
Render the tensor content in the [general verbose form](/en/reference/schemas/document-json-format#tensor).

Value: `string`
Description:
Render the tensor content as a string on the [appropriate literal short form](/en/reference/ranking/tensor#tensor-literal-form).

Value: `string-long`
Description:
Render the tensor content as a string on the [general literal form](/en/reference/ranking/tensor#general-literal-form). | + + + + + + + + + + + + + + + +
ParameterTypeDescription
**format.tensors**StringControls how tensors are rendered in the result.

Value: {`short`}
Description:
**Default**. Render the tensor value in a JSON object having two keys, "type" containing the value, and "cells"/"blocks"/"values" (depending on the type) containing the tensor content. Render the tensor content in the type-appropriate short form.

Value: {`long`}
Description:
Render the tensor value in a JSON object having two keys, "type" containing the value, and "cells" containing the tensor content.
Render the tensor content in the general verbose form.

Value: {`short-value`}
Description:
Render the tensor content directly as a JSON value.
Render the tensor content in the type-appropriate short form.

Value: {`long-value`}
Description:
Render the tensor content directly as a JSON value.
Render the tensor content in the general verbose form.

Value: {`string`}
Description:
Render the tensor content as a string on the appropriate literal short form.

Value: {`string-long`}
Description:
Render the tensor content as a string on the general literal form.
## Model inference using Java @@ -141,11 +154,46 @@ ONNX models are evaluated using [ONNX Runtime](https://onnxruntime.ai/). Vespa p ``` -| Attribute | Required | Value | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| intraop-threads | optional | number | max(1, CPU count / 4) | The number of threads available for running operations with multithreaded implementations. | -| interop-threads | optional | number | `max(1, CPU count / 4)` if execution mode `parallel` | The number of threads available for running multiple operations in parallel. This is only applicable for `parallel` execution mode. | -| execution-mode | optional | string | sequential | Controls how the operators of a graph are executed, either `sequential` or `parallel`. | -| gpu-device | optional | number | | Set the GPU device number to use for computation, starting at 0, i.e. if your GPU is `/dev/nvidia0` set this to 0. This must be an Nvidia CUDA-enabled GPU. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
intraop-threadsoptionalnumbermax(1, CPU count / 4)The number of threads available for running operations with multithreaded implementations.
interop-threadsoptionalnumber{`max(1, CPU count / 4)`} if execution mode {`parallel`}The number of threads available for running multiple operations in parallel. This is only applicable for {`parallel`} execution mode.
execution-modeoptionalstringsequentialControls how the operators of a graph are executed, either {`sequential`} or {`parallel`}.
gpu-deviceoptionalnumberSet the GPU device number to use for computation, starting at 0, i.e. if your GPU is {`/dev/nvidia0`} set this to 0. This must be an Nvidia CUDA-enabled GPU.
Since stateless model evaluation is based on auto-discovery of models under the `models` directory in the application package, the above would only be needed for models that should not use the default settings, or should run on a GPU. \ No newline at end of file diff --git a/mintlify-docs/en/ranking/xgboost.mdx b/mintlify-docs/en/ranking/xgboost.mdx index 476a939199..29118ba647 100644 --- a/mintlify-docs/en/ranking/xgboost.mdx +++ b/mintlify-docs/en/ranking/xgboost.mdx @@ -210,6 +210,29 @@ Generally the run time complexity is determined by: Serving latency can be brought down by [using multiple threads per query request](/en/performance/practical-search-performance-guide#multithreaded-search-and-ranking). +### Fast forest evaluation + +For large forests, an alternative GBDT evaluator can further reduce evaluation cost. Enable it by setting the `vespa.eval.use_fast_forest` [rank-property](/en/reference/ranking/rank-feature-configuration) to `true` in the rank profile: + +```js +rank-profile prediction inherits default { + rank-properties { + vespa.eval.use_fast_forest: true + } + second-phase { + expression: xgboost("my_model.json") + } +} +``` + +This is a rank profile setting, not a query parameter - it is applied when the model is compiled, so it cannot be toggled per query. To A/B test it, create a second rank profile that only adds this property. + + +Fast forest evaluation only applies when every split in the model is numeric (`<` or its inverted form), no tree has more than 2,048 leaves, and the root expression is the bare sum of trees. UBJ models are therefore never eligible: the importer always appends `base_score` to the tree sum. Legacy JSON models are eligible for `reg:squarederror` and ranking objectives, but not when the expression is wrapped in another function — for instance `sigmoid(xgboost(...))` for a logistic objective. In any of these cases the setting has no effect and Vespa silently falls back to the default evaluator. + + +The speedup depends more on the number of leaves per tree than on the number of trees: models with at most 64 leaves per tree benefit the most. + ## Categorical features diff --git a/mintlify-docs/en/reference/api/application-v2.mdx b/mintlify-docs/en/reference/api/application-v2.mdx index 45aa099d34..052a23847b 100644 --- a/mintlify-docs/en/reference/api/application-v2.mdx +++ b/mintlify-docs/en/reference/api/application-v2.mdx @@ -2,13 +2,50 @@ title: "/application/v2/tenant API reference" description: "/application/v2/tenant API reference in Vespa applications." --- -| HTTP request | application/v2/tenant operation | Description | -| :--- | :--- | :--- | -| GET | List tenant information. | | -| | List tenants | `/application/v2/tenant/` Example response: `[` `"default"` `]` | -| | Get tenant | `/application/v2/tenant/default` Example response: `{` `"message": "Tenant 'default' exists."` `}` | -| PUT | Create a new tenant. | | -| | Create tenant | `/application/v2/tenant/default` Response: A message with the name of the tenant created - example: `{` `"message" : "Tenant default created."` `}` **Note:** This operation is asynchronous, it will eventually propagate to all config servers. | -| DELETE | Delete a tenant. | | -| | Delete tenant | `/application/v2/tenant/default` Response: A message with the deleted tenant: `{` `"message" : "Tenant default deleted."` `}` **Note:** This operation is asynchronous, it will eventually propagate to all config servers. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP requestapplication/v2/tenant operationDescription
GETList tenant information.
List tenants{`/application/v2/tenant/`} Example response: {`[`} {`"default"`} {`]`}
Get tenant{`/application/v2/tenant/default`} Example response: {`{`} {`"message": "Tenant 'default' exists."`} {`}`}
PUTCreate a new tenant.
Create tenant{`/application/v2/tenant/default`} Response: A message with the name of the tenant created - example: {`{`} {`"message" : "Tenant default created."`} {`}`} **Note:** This operation is asynchronous, it will eventually propagate to all config servers.
DELETEDelete a tenant.
Delete tenant{`/application/v2/tenant/default`} Response: A message with the deleted tenant: {`{`} {`"message" : "Tenant default deleted."`} {`}`} **Note:** This operation is asynchronous, it will eventually propagate to all config servers.
diff --git a/mintlify-docs/en/reference/api/cluster-v2.mdx b/mintlify-docs/en/reference/api/cluster-v2.mdx index a75362084a..8831c326fa 100644 --- a/mintlify-docs/en/reference/api/cluster-v2.mdx +++ b/mintlify-docs/en/reference/api/cluster-v2.mdx @@ -2,37 +2,155 @@ title: "/cluster/v2 API reference" description: "/cluster/v2 API reference in Vespa applications." --- -| HTTP request | cluster/v2 operation | Description | -| :--- | :--- | :--- | -| GET | List cluster and nodes. Get cluster, node or disk states. | | -| | List content clusters | `/cluster/v2/` | -| | Get cluster state and list service types within cluster | `/cluster/v2/` | -| | List nodes per service type for cluster | `/cluster/v2//` | -| | Get node state | `/cluster/v2///` | -| PUT | Set node state | | -| | Set node user state | `/cluster/v2///` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP requestcluster/v2 operationDescription
GETList cluster and nodes. Get cluster, node or disk states.
List content clusters{`/cluster/v2/`}
Get cluster state and list service types within cluster{`/cluster/v2/`}
List nodes per service type for cluster{`/cluster/v2//`}
Get node state{`/cluster/v2///`}
PUTSet node state
Set node user state{`/cluster/v2///`}
-| State | Description | -| :--- | :--- | -| `Up` | The node is up and available to keep buckets and serve requests. | -| `Down` | The node is not available, and can not be used. | -| `Stopping` | This node is stopping and is expected to be down soon. This state is typically only exposed to the cluster controller to tell why the node stopped. The cluster controller will expose the node as down or in maintenance mode for the rest of the cluster. This state is thus not seen by the distribution algorithm. | -| `Maintenance` | This node is temporarily unavailable. The node is available for bucket placement, so redundancy is lower. Using this mode, new replicas of the documents stored on this node will not be created, allowing the node to be down with less of a performance impact on the rest of the cluster. This mode is typically used to mask a down state during controlled node restarts, or by an administrator that need to do some short maintenance work, like upgrading software or restart the node. | -| `Retired` | A retired node is available and serves requests. This state is used to remove nodes while keeping redundancy. Buckets are moved to other nodes (with low priority), until empty. Special considerations apply when using [grouped distribution](/en/content/elasticity#grouped-distribution) as buckets are not necessarily removed. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StateDescription
{`Up`}The node is up and available to keep buckets and serve requests.
{`Down`}The node is not available, and can not be used.
{`Stopping`}This node is stopping and is expected to be down soon. This state is typically only exposed to the cluster controller to tell why the node stopped. The cluster controller will expose the node as down or in maintenance mode for the rest of the cluster. This state is thus not seen by the distribution algorithm.
{`Maintenance`}This node is temporarily unavailable. The node is available for bucket placement, so redundancy is lower. Using this mode, new replicas of the documents stored on this node will not be created, allowing the node to be down with less of a performance impact on the rest of the cluster. This mode is typically used to mask a down state during controlled node restarts, or by an administrator that need to do some short maintenance work, like upgrading software or restart the node.
{`Retired`}A retired node is available and serves requests. This state is used to remove nodes while keeping redundancy. Buckets are moved to other nodes (with low priority), until empty. Special considerations apply when using grouped distribution as buckets are not necessarily removed.
-| Type | Spec | Description | -| :--- | :--- | :--- | -| cluster | *``* | The name given to a content cluster in a Vespa application. | -| description | *.** | Description can contain anything that is valid JSON. However, as the information is presented in various interfaces, some which may present reasons for all the states in a cluster or similar, keeping it short and to the point makes it easier to fit the information neatly into a table and get a better cluster overview. | -| group-spec | *``* (\. *``* )* | The hierarchical group assignment of a given content node. This is a dot separated list of identifiers given in the application services.xml configuration. | -| node | [0-9]+ | The index or distribution key identifying a given node within the context of a content cluster and a service type. | -| service-type | (distributor\|storage) | The type of the service to look at state for, within the context of a given content cluster. | -| state-disk | (up\|down) | One of the valid disk states. | -| state-unit | [up](#up) \| [stopping](#stopping) \| [down](#down) | The cluster controller fetches states from all nodes, called *unit states*. States reported from the nodes are either `up` or `stopping`. If the node can not be reached, a `down` state is assumed. This means, the cluster controller detects failed nodes. The subsequent *generated states* will have nodes in `down`, and the [ideal state algorithm](/en/content/idealstate) will redistribute [buckets](/en/content/buckets) of documents. | -| state-user | [up](#up) \| [down](#down) \| [maintenance](#maintenance) \| [retired](#retired) | Use tools for [user state management](/en/operations/self-managed/admin-procedures#cluster-state). Retire a node from a cluster - use `retired` to move buckets to other nodes Short-lived maintenance work - use `maintenance` to avoid merging buckets to other nodes Fail a bad node. The cluster controller or an operator can set a node `down` | -| state-generated | [up](#up) \| [down](#down) \| [maintenance](#maintenance) \| [retired](#retired) | The cluster controller generates the cluster state from the `unit` and `user` states, over time. The generated state is called the *cluster state*. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeSpecDescription
cluster*{``}*The name given to a content cluster in a Vespa application.
description*.**Description can contain anything that is valid JSON. However, as the information is presented in various interfaces, some which may present reasons for all the states in a cluster or similar, keeping it short and to the point makes it easier to fit the information neatly into a table and get a better cluster overview.
group-spec*{``}* (. *{``}* )*The hierarchical group assignment of a given content node. This is a dot separated list of identifiers given in the application services.xml configuration.
node[0-9]+The index or distribution key identifying a given node within the context of a content cluster and a service type.
service-type(distributor|storage)The type of the service to look at state for, within the context of a given content cluster.
state-disk(up|down)One of the valid disk states.
state-unitup | stopping | downThe cluster controller fetches states from all nodes, called *unit states*. States reported from the nodes are either {`up`} or {`stopping`}. If the node can not be reached, a {`down`} state is assumed. This means, the cluster controller detects failed nodes. The subsequent *generated states* will have nodes in {`down`}, and the ideal state algorithm will redistribute buckets of documents.
state-userup | down | maintenance | retiredUse tools for user state management. Retire a node from a cluster - use {`retired`} to move buckets to other nodes Short-lived maintenance work - use {`maintenance`} to avoid merging buckets to other nodes Fail a bad node. The cluster controller or an operator can set a node {`down`}
state-generatedup | down | maintenance | retiredThe cluster controller generates the cluster state from the {`unit`} and {`user`} states, over time. The generated state is called the *cluster state*.
-| Parameter | Type | Description | -| :--- | :--- | :--- | -| recursive | number | Number of levels, or `true` for all levels. Examples: Use `recursive=1` for a node request to also see all datause `recursive=2` to see all the node data within each service type In recursive mode, you will see the same output as found in the spec below. However, where there is a `{ "link" : "" }` element, this element will be replaced by the content of that request, given a recursive value of one less than the request above. | + + + + + + + + + + + + + + + +
ParameterTypeDescription
recursivenumberNumber of levels, or {`true`} for all levels. Examples: Use {`recursive=1`} for a node request to also see all datause {`recursive=2`} to see all the node data within each service type In recursive mode, you will see the same output as found in the spec below. However, where there is a {`{ "link" : "" }`} element, this element will be replaced by the content of that request, given a recursive value of one less than the request above.
diff --git a/mintlify-docs/en/reference/api/config-v2.mdx b/mintlify-docs/en/reference/api/config-v2.mdx index 420d5a6462..4ab5c15bec 100644 --- a/mintlify-docs/en/reference/api/config-v2.mdx +++ b/mintlify-docs/en/reference/api/config-v2.mdx @@ -2,31 +2,111 @@ title: "Config API" description: "Config API in Vespa applications." --- -| Term | Description | -| :--- | :--- | -| Parameters | **Parameter:** recursive; **Default:** false; **Description:** If true, include each config id in the model which produces the config, and list only the links to the config payload. If false, include the first level of the config ids in the listing of new list URLs, as explained above. | -| Request body | None | -| Response | A list response includes two arrays: List-links to descend one level down in the config id hierarchy, named `children`. [Config payload](#payload) links for the current (top) level, named `configs`. | -| Error Response | N/A | + + + + + + + + + + + + + + + + + + + + + + + + + +
TermDescription
Parameters**Parameter:** recursive; **Default:** false; **Description:** If true, include each config id in the model which produces the config, and list only the links to the config payload. If false, include the first level of the config ids in the listing of new list URLs, as explained above.
Request bodyNone
ResponseA list response includes two arrays: List-links to descend one level down in the config id hierarchy, named {`children`}. Config payload links for the current (top) level, named {`configs`}.
Error ResponseN/A
-| Term | Description | -| :--- | :--- | -| Parameters | Same as above. | -| Request body | None | -| Response | List the configs in the model with the given namespace and name. List semantics as above. | -| Error Response | 404 if the given namespace.name is not known to the config model. | + + + + + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersSame as above.
Request bodyNone
ResponseList the configs in the model with the given namespace and name. List semantics as above.
Error Response404 if the given namespace.name is not known to the config model.
-| Term | Description | -| :--- | :--- | -| Parameters | Same as above. | -| Request body | None | -| Response | List the configs in the model with the given namespace and name, and for which the given config id segment is a prefix. | -| Error Response | 404 if the given namespace.name is not known to the config model. 404 if the given config id is not in the model. | + + + + + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersSame as above.
Request bodyNone
ResponseList the configs in the model with the given namespace and name, and for which the given config id segment is a prefix.
Error Response404 if the given namespace.name is not known to the config model. 404 if the given config id is not in the model.
-| Term | Description | -| :--- | :--- | -| Parameters | None | -| Request body | None | -| Response | Returns the config payload of the given `namespace.name/config/id`, formatted as JSON. | -| Error Response | Same as above. | + + + + + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersNone
Request bodyNone
ResponseReturns the config payload of the given {`namespace.name/config/id`}, formatted as JSON.
Error ResponseSame as above.
diff --git a/mintlify-docs/en/reference/api/deploy-v2.mdx b/mintlify-docs/en/reference/api/deploy-v2.mdx index d47cd6e891..57098ab7ec 100644 --- a/mintlify-docs/en/reference/api/deploy-v2.mdx +++ b/mintlify-docs/en/reference/api/deploy-v2.mdx @@ -2,92 +2,344 @@ title: "Deploy API" description: "Example:" --- -| Term | Description | -| :--- | :--- | -| session-id | The session-id used in this API is generated by the server and is required for all operations after [creating](#create-session) a session. The session-id is valid if it is an active session, or it was created before [session lifetime](https://github.com/vespa-engine/vespa/blob/master/configdefinitions/src/vespa/configserver.def) has expired, the default value being 1 hour. | -| path | An application file path in a request URL or parameter refers to a relative path in the application package. A path ending with "/" refers to a directory. | + + + + + + + + + + + + + + + + + +
TermDescription
session-idThe session-id used in this API is generated by the server and is required for all operations after creating a session. The session-id is valid if it is an active session, or it was created before session lifetime has expired, the default value being 1 hour.
pathAn application file path in a request URL or parameter refers to a relative path in the application package. A path ending with "/" refers to a directory.
-| Term | Description | -| :--- | :--- | -| Parameters | | -| Request body | **Required:** Yes; **Content:** A compressed [application package](/en/reference/applications/application-packages) (with gzip or zip compression); **Note:** Set `Content-Type` HTTP header to `application/x-gzip` or `application/zip` . | -| Response | See [active](#activate-session). | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
Parameters
Request body**Required:** Yes; **Content:** A compressed application package (with gzip or zip compression); **Note:** Set {`Content-Type`} HTTP header to {`application/x-gzip`} or {`application/zip`} .
ResponseSee active.
-| Term | Description | -| :--- | :--- | -| Parameters | **Name:** from; **Default:** N/A; **Description:** Use when you want to create a new session based on an active application. The value supplied should be a URL to an active application. | -| Request body | **Required:** Yes, unless `from` parameter is used; **Content:** A compressed [application package](/en/reference/applications/application-packages) (with gzip or zip compression); **Note:** It is required to set the `Content-Type` HTTP header to `application/x-gzip` or `application/zip` , unless the `from` parameter is used. | -| Response | The response contains: A [session-id](#session-id) to the application that was created. A [prepared](#prepare-session) URL for preparing the application. | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
Parameters**Name:** from; **Default:** N/A; **Description:** Use when you want to create a new session based on an active application. The value supplied should be a URL to an active application.
Request body**Required:** Yes, unless {`from`} parameter is used; **Content:** A compressed application package (with gzip or zip compression); **Note:** It is required to set the {`Content-Type`} HTTP header to {`application/x-gzip`} or {`application/zip`} , unless the {`from`} parameter is used.
ResponseThe response contains: A session-id to the application that was created. A prepared URL for preparing the application.
-| Term | Description | -| :--- | :--- | -| Parameters | None | -| Request body | If path is a directory, none. If path is a file, the contents of the file. | -| Response | None Any errors or warnings from writing the file/creating the directory. | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersNone
Request bodyIf path is a directory, none. If path is a file, the contents of the file.
ResponseNone Any errors or warnings from writing the file/creating the directory.
-| Term | Description | -| :--- | :--- | -| Parameters | **Name:** recursive; **Default:** false; **Description:** If *true* , directory content will be listed recursively.
**Name:** return; **Default:** content; **Description:** If set to content and path refers to a file, the content will be returned. If set to content and path refers to a directory, the files and subdirectories in the directory will be listed. If set to status and path refers to a file, the file status and hash will be returned. If set to status and path refers to a directory, a list of file/subdirectory statuses and hashes will be returned. | -| Request body | None. | -| Response | If path is a directory: a JSON array of URLs to the files and subdirectories of that directory. If path is a file: the contents of the file. If status parameter is set, the status and hash will be returned. | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
Parameters**Name:** recursive; **Default:** false; **Description:** If *true* , directory content will be listed recursively.
**Name:** return; **Default:** content; **Description:** If set to content and path refers to a file, the content will be returned. If set to content and path refers to a directory, the files and subdirectories in the directory will be listed. If set to status and path refers to a file, the file status and hash will be returned. If set to status and path refers to a directory, a list of file/subdirectory statuses and hashes will be returned.
Request bodyNone.
ResponseIf path is a directory: a JSON array of URLs to the files and subdirectories of that directory. If path is a file: the contents of the file. If status parameter is set, the status and hash will be returned.
-| Term | Description | -| :--- | :--- | -| Parameters | None | -| Request body | None | -| Response | Any errors or warnings from deleting the resource. | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersNone
Request bodyNone
ResponseAny errors or warnings from deleting the resource.
-| Term | Description | -| :--- | :--- | -| Parameters | **Parameter:** applicationName; **Default:** N/A; **Description:** Name of the application to be deployed
**Parameter:** environment; **Default:** default; **Description:** Environment where application should be deployed
**Parameter:** region; **Default:** default; **Description:** Region where application should be deployed
**Parameter:** instance; **Default:** default; **Description:** Name of application instance
**Parameter:** debug; **Default:** false; **Description:** If true, include stack trace in response if prepare fails.
**Parameter:** timeout; **Default:** 360 seconds; **Description:** Timeout in seconds to wait for session to be prepared. | -| Request body | None | -| Response | Returns a [session-id](#session-id) and a link to activate the session. Log with any errors or warnings from preparing the application. An [activate](#activate-session) URL for activating the application with this [session-id](#session-id), if there were no errors. A list of actions (possibly empty) that must be performed in order to apply some config changes between the current active application and this next prepared application. These actions are organized into three categories; *restart*, *reindex*, and *refeed*: *Restart* actions are done after the application has been activated and are handled by restarting all listed services. See [schemas](/en/reference/schemas/schemas#modifying-schemas) for details. *Reindex* actions are special refeed actions that Vespa [handles automatically](/en/operations/reindexing), if the [reindex](#reindex) endpoint below is used. *Refeed* actions require several steps to handle. See [schemas](/en/reference/schemas/schemas#modifying-schemas) for details. | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
Parameters**Parameter:** applicationName; **Default:** N/A; **Description:** Name of the application to be deployed
**Parameter:** environment; **Default:** default; **Description:** Environment where application should be deployed
**Parameter:** region; **Default:** default; **Description:** Region where application should be deployed
**Parameter:** instance; **Default:** default; **Description:** Name of application instance
**Parameter:** debug; **Default:** false; **Description:** If true, include stack trace in response if prepare fails.
**Parameter:** timeout; **Default:** 360 seconds; **Description:** Timeout in seconds to wait for session to be prepared.
Request bodyNone
ResponseReturns a session-id and a link to activate the session. Log with any errors or warnings from preparing the application. An activate URL for activating the application with this session-id, if there were no errors. A list of actions (possibly empty) that must be performed in order to apply some config changes between the current active application and this next prepared application. These actions are organized into three categories; *restart*, *reindex*, and *refeed*: *Restart* actions are done after the application has been activated and are handled by restarting all listed services. See schemas for details. *Reindex* actions are special refeed actions that Vespa handles automatically, if the reindex endpoint below is used. *Refeed* actions require several steps to handle. See schemas for details.
-| Term | Description | -| :--- | :--- | -| Parameters | **Parameter:** timeout; **Default:** 60 seconds; **Description:** Timeout in seconds to wait for session to be activated (when several config servers are used, they might need to sync before activate can be done). | -| Request body | None | -| Response | Returns a [session-id](#session-id), a message and a URL to the activated application. [session-id](#session-id) Message | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
Parameters**Parameter:** timeout; **Default:** 60 seconds; **Description:** Timeout in seconds to wait for session to be activated (when several config servers are used, they might need to sync before activate can be done).
Request bodyNone
ResponseReturns a session-id, a message and a URL to the activated application. session-id Message
-| Term | Description | -| :--- | :--- | -| Parameters | None | -| Request body | None | -| Response | Returns a list of applications Array of active applications | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersNone
Request bodyNone
ResponseReturns a list of applications Array of active applications
-| Term | Description | -| :--- | :--- | -| Parameters | None | -| Request body | None | -| Response | Returns information about the application specified. config generation | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersNone
Request bodyNone
ResponseReturns information about the application specified. config generation
-| Term | Description | -| :--- | :--- | -| Parameters | N/A | -| Request body | N/A | -| Response | JSON detailing current reindexing status for the application, with all its clusters and document types. Status for each content cluster in the application, by name: Status of each document type in the cluster, by name: Last time reindexing was triggered for this document type.Current status of reindexing.Optional start time of reindexing.Optional end time of reindexing.Optional progress of reindexing, from 0 to 1.Pseudo-speed of reindexing. | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersN/A
Request bodyN/A
ResponseJSON detailing current reindexing status for the application, with all its clusters and document types. Status for each content cluster in the application, by name: Status of each document type in the cluster, by name: Last time reindexing was triggered for this document type.Current status of reindexing.Optional start time of reindexing.Optional end time of reindexing.Optional progress of reindexing, from 0 to 1.Pseudo-speed of reindexing.
-| Term | Description | -| :--- | :--- | -| Parameters | **Name:** clusterId; **Description:** A comma-separated list of content clusters to limit reindexing to. All clusters are reindexed if this is not present.
**Name:** documentType; **Description:** A comma-separated list of document types to limit reindexing to. All document types are reindexed if this is not present.
**Name:** indexedOnly; **Description:** Boolean: whether to mark reindexing ready only for document types with indexing mode *index* and at least one field with the indexing statement `index` . Default is `false` .
**Name:** speed; **Description:** Number (0–10], default 1: Indexing pseudo speed - balance speed vs. resource use. Example: speed=0.1 | -| Request body | N/A | -| Response | A human-readable message indicating what reindexing was marked as ready. | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
Parameters**Name:** clusterId; **Description:** A comma-separated list of content clusters to limit reindexing to. All clusters are reindexed if this is not present.
**Name:** documentType; **Description:** A comma-separated list of document types to limit reindexing to. All document types are reindexed if this is not present.
**Name:** indexedOnly; **Description:** Boolean: whether to mark reindexing ready only for document types with indexing mode *index* and at least one field with the indexing statement {`index`} . Default is {`false`} .
**Name:** speed; **Description:** Number (0–10], default 1: Indexing pseudo speed - balance speed vs. resource use. Example: speed=0.1
Request bodyN/A
ResponseA human-readable message indicating what reindexing was marked as ready.
-| Term | Description | -| :--- | :--- | -| Parameters | **Name:** clusterId; **Description:** A comma-separated list of content clusters to limit the changes to. Reindexing for all clusters are modified if this is not present.
**Name:** documentType; **Description:** A comma-separated list of document types to limit the changes to. Reindexing for all document types are modified if this is not present.
**Name:** indexedOnly; **Description:** Boolean: whether to modify reindexing only for document types with indexing mode *index* and at least one field with the indexing statement `index` . Default is `false` .
**Name:** speed; **Description:** Number [0–10], required: Indexing pseudo speed - balance speed vs. resource use. Example: speed=0.1 | -| Request body | N/A | -| Response | A human-readable message indicating what reindexing was modified. | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
Parameters**Name:** clusterId; **Description:** A comma-separated list of content clusters to limit the changes to. Reindexing for all clusters are modified if this is not present.
**Name:** documentType; **Description:** A comma-separated list of document types to limit the changes to. Reindexing for all document types are modified if this is not present.
**Name:** indexedOnly; **Description:** Boolean: whether to modify reindexing only for document types with indexing mode *index* and at least one field with the indexing statement {`index`} . Default is {`false`} .
**Name:** speed; **Description:** Number [0–10], required: Indexing pseudo speed - balance speed vs. resource use. Example: speed=0.1
Request bodyN/A
ResponseA human-readable message indicating what reindexing was modified.
-| Term | Description | -| :--- | :--- | -| Parameters | None | -| Request body | None | -| Response | Returns a message stating if the operation was successful or not | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersNone
Request bodyNone
ResponseReturns a message stating if the operation was successful or not
-| Term | Description | -| :--- | :--- | -| Parameters | None | -| Request body | None | -| Response | Returns a message with tenant and application details. | + + + + + + + + + + + + + + + + + + + + + +
TermDescription
ParametersNone
Request bodyNone
ResponseReturns a message with tenant and application details.
diff --git a/mintlify-docs/en/reference/api/document-v1.mdx b/mintlify-docs/en/reference/api/document-v1.mdx index 7ab2556f11..cd8ca40999 100644 --- a/mintlify-docs/en/reference/api/document-v1.mdx +++ b/mintlify-docs/en/reference/api/document-v1.mdx @@ -2,17 +2,70 @@ title: "/document/v1 API reference" description: "/document/v1 API reference in Vespa applications." --- -| HTTP request | document/v1 operation | Description | -| :--- | :--- | :--- | -| GET | *Get* a document by ID or *Visit* a set of documents by selection. | | -| | Get | Get a document: `/document/v1///docid/` `/document/v1///number//` `/document/v1///group//` Optional parameters: [cluster](#cluster) [fieldSet](#fieldset) [timeout](#timeout) [tracelevel](#tracelevel) | -| | Visit | Iterate over and get all documents, or a [selection](#selection) of documents, in chunks, using [continuation](#continuation) tokens to track progress. Visits are a linear scan over the documents in the cluster. `/document/v1/` It is possible to specify namespace and document type with the visit path: `/document/v1///docid` Documents can be grouped to limit accesses to a subset. A group is defined by a numeric ID or string — see [id scheme](/en/schemas/documents#id-scheme) . `/document/v1///group/` `/document/v1///number/` Mandatory parameters: [cluster](#cluster) - Visits can only retrieve data from *one* content cluster, so `cluster` **must** be specified for requests at the root `/document/v1/` level, or when there is ambiguity. This is required even if the application has only one content cluster. Optional parameters: [bucketSpace](#bucketspace) - Parent documents are [global](/en/reference/applications/services/content#document) and in the `global` [bucket space](#bucketspace). By default, visit will visit non-global documents in the `default` bucket space, unless document type is indicated, and is a global document type. [concurrency](#concurrency) - Use to configure backend parallelism for each visit HTTP request. [continuation](#continuation) [fieldSet](#fieldset) [selection](#selection) [sliceId](#sliceid) [slices](#slices) - Split visiting of the document corpus across more than one HTTP request—thus allowing the concurrent use of more HTTP containers—use the `slices` and `sliceId` parameters. [stream](#stream) - It's recommended enabling streamed HTTP responses, with the [stream](#stream) parameter, as this reduces memory consumption and reduces HTTP overhead. [timeout](#timeout) [tracelevel](#tracelevel) [wantedDocumentCount](#wanteddocumentcount) [fromTimestamp](#fromtimestamp) [toTimestamp](#totimestamp) [includeRemoves](#includeRemoves) Optional request headers: [Accept](#accept) - specify the desired response format. | -| POST | *Put* a given document, by ID, or *Copy* a set of documents by selection from one content cluster to another. | | -| | Copy | Write documents visited in source [cluster](#cluster) to the [destinationCluster](#destinationcluster) in the same application. A [selection](#selection) is mandatory — typically the document type. Supported paths (see [visit](#visit) above for semantics): `/document/v1/` `/document/v1///docid/` `/document/v1///group/` `/document/v1///number/` Mandatory parameters: [cluster](#cluster) [destinationCluster](#destinationcluster) [selection](#selection) Optional parameters: [bucketSpace](#bucketspace) [continuation](#continuation) [timeChunk](#timechunk) [timeout](#timeout) [tracelevel](#tracelevel) | -| PUT | *Update* a document with the given partial update, by ID, or *Update where* the given selection is true. | | -| | Update | Update a document with the partial update contained in the request body in the [document update JSON format](/en/reference/schemas/document-json-format#update) . `/document/v1///docid/` Optional parameters: [condition](#condition) - use for conditional writes [create](#create) - use to create empty documents when updating non-existent ones. [route](#route) [timeout](#timeout) [tracelevel](#tracelevel) | -| | Update where | Update visited documents in [cluster](#cluster) with the partial update contained in the request body in the [document update JSON format](/en/reference/schemas/document-json-format#update). Supported paths (see [visit](#visit) above for semantics): `/document/v1///docid/` `/document/v1///group/` `/document/v1///number/` Mandatory parameters: [cluster](#cluster) [selection](#selection) Optional parameters: [bucketSpace](#bucketspace) - See [visit](#visit), `default` or `global` bucket space [continuation](#continuation) [stream](#stream) [timeChunk](#timechunk) [timeout](#timeout) [tracelevel](#tracelevel) | -| DELETE | *Remove* a document, by ID, or *Remove where* the given selection is true. | | -| | Remove | Remove a document. `/document/v1///docid/` Optional parameters: [condition](#condition) [route](#route) [timeout](#timeout) [tracelevel](#tracelevel) | -| | Delete where | Delete visited documents from [cluster](#cluster). Supported paths (see [visit](#visit) above for semantics): `/document/v1/` `/document/v1///docid/` `/document/v1///group/` `/document/v1///number/` Mandatory parameters: [cluster](#cluster) [selection](#selection) Optional parameters: [bucketSpace](#bucketspace) - See [visit](#visit), `default` or `global` bucket space [continuation](#continuation) [stream](#stream) [timeChunk](#timechunk) [timeout](#timeout) [tracelevel](#tracelevel) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP requestdocument/v1 operationDescription
GET*Get* a document by ID or *Visit* a set of documents by selection.
GetGet a document: {`/document/v1///docid/`} {`/document/v1///number//`} {`/document/v1///group//`} Optional parameters: cluster fieldSet timeout tracelevel
VisitIterate over and get all documents, or a selection of documents, in chunks, using continuation tokens to track progress. Visits are a linear scan over the documents in the cluster. {`/document/v1/`} It is possible to specify namespace and document type with the visit path: {`/document/v1///docid`} Documents can be grouped to limit accesses to a subset. A group is defined by a numeric ID or string — see id scheme . {`/document/v1///group/`} {`/document/v1///number/`} Mandatory parameters: cluster - Visits can only retrieve data from *one* content cluster, so {`cluster`} **must** be specified for requests at the root {`/document/v1/`} level, or when there is ambiguity. This is required even if the application has only one content cluster. Optional parameters: bucketSpace - Parent documents are global and in the {`global`} bucket space. By default, visit will visit non-global documents in the {`default`} bucket space, unless document type is indicated, and is a global document type. concurrency - Use to configure backend parallelism for each visit HTTP request. continuation fieldSet selection sliceId slices - Split visiting of the document corpus across more than one HTTP request—thus allowing the concurrent use of more HTTP containers—use the {`slices`} and {`sliceId`} parameters. stream - It's recommended enabling streamed HTTP responses, with the stream parameter, as this reduces memory consumption and reduces HTTP overhead. timeout tracelevel wantedDocumentCount fromTimestamp toTimestamp includeRemoves Optional request headers: Accept - specify the desired response format.
POST*Put* a given document, by ID, or *Copy* a set of documents by selection from one content cluster to another.
CopyWrite documents visited in source cluster to the destinationCluster in the same application. A selection is mandatory — typically the document type. Supported paths (see visit above for semantics): {`/document/v1/`} {`/document/v1///docid/`} {`/document/v1///group/`} {`/document/v1///number/`} Mandatory parameters: cluster destinationCluster selection Optional parameters: bucketSpace continuation timeChunk timeout tracelevel
PUT*Update* a document with the given partial update, by ID, or *Update where* the given selection is true.
UpdateUpdate a document with the partial update contained in the request body in the document update JSON format . {`/document/v1///docid/`} Optional parameters: condition - use for conditional writes create - use to create empty documents when updating non-existent ones. route timeout tracelevel
Update whereUpdate visited documents in cluster with the partial update contained in the request body in the document update JSON format. Supported paths (see visit above for semantics): {`/document/v1///docid/`} {`/document/v1///group/`} {`/document/v1///number/`} Mandatory parameters: cluster selection Optional parameters: bucketSpace - See visit, {`default`} or {`global`} bucket space continuation stream timeChunk timeout tracelevel
DELETE*Remove* a document, by ID, or *Remove where* the given selection is true.
RemoveRemove a document. {`/document/v1///docid/`} Optional parameters: condition route timeout tracelevel
Delete whereDelete visited documents from cluster. Supported paths (see visit above for semantics): {`/document/v1/`} {`/document/v1///docid/`} {`/document/v1///group/`} {`/document/v1///number/`} Mandatory parameters: cluster selection Optional parameters: bucketSpace - See visit, {`default`} or {`global`} bucket space continuation stream timeChunk timeout tracelevel
diff --git a/mintlify-docs/en/reference/api/metrics-v1.mdx b/mintlify-docs/en/reference/api/metrics-v1.mdx index d2f22e399f..bbdc6e1e6d 100644 --- a/mintlify-docs/en/reference/api/metrics-v1.mdx +++ b/mintlify-docs/en/reference/api/metrics-v1.mdx @@ -2,24 +2,109 @@ title: "/metrics/v1 API reference" description: "/metrics/v1 API reference in Vespa applications." --- -| HTTP request | metrics/v1 operation | Description | -| :--- | :--- | :--- | -| GET | | | -| | Node metrics | `/metrics/v1/values` See [monitoring](/en/operations/self-managed/monitoring#metrics-v1-values) for examples. | + + + + + + + + + + + + + + + + + + + + +
HTTP requestmetrics/v1 operationDescription
GET
Node metrics{`/metrics/v1/values`} See monitoring for examples.
-| Parameter | Type | Description | -| :--- | :--- | :--- | -| consumer | String | Specify response [consumer](/en/reference/applications/services/admin#consumer), i.e. set of metrics. An unknown / empty value will return the `default` metric set. Built-in: `default` - see [DefaultMetrics](/en/reference/operations/metrics/default-metric-set). `vespa` - see [VespaMetricSet](/en/reference/operations/metrics/vespa-metric-set). | + + + + + + + + + + + + + + + +
ParameterTypeDescription
consumerStringSpecify response consumer, i.e. set of metrics. An unknown / empty value will return the {`default`} metric set. Built-in: {`default`} - see DefaultMetrics. {`vespa`} - see VespaMetricSet.
-| Element | Parent | Type | Description | -| :--- | :--- | :--- | :--- | -| services | | Object | Root for /metrics/v1/values. Contains service objects. | -| name | services | String | Service name. | -| timestamp | services | Number | EPOCH in seconds - time of metrics fetch from service. | -| status | services | Object | Status from metrics fetch. | -| code | status | String | The status for each service is one of: `up` `down` `unknown` `unknown` is used if the service seems to be alive, but does not report metrics. | -| description | status | String | Textual status. | -| metrics | services | Array | Array of metric objects. | -| values | metrics | Object | Set of metric-name/value pairs. | -| dimensions | metrics | Object | Set of metric dimension-name/value pairs. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementParentTypeDescription
servicesObjectRoot for /metrics/v1/values. Contains service objects.
nameservicesStringService name.
timestampservicesNumberEPOCH in seconds - time of metrics fetch from service.
statusservicesObjectStatus from metrics fetch.
codestatusStringThe status for each service is one of: {`up`} {`down`} {`unknown`} {`unknown`} is used if the service seems to be alive, but does not report metrics.
descriptionstatusStringTextual status.
metricsservicesArrayArray of metric objects.
valuesmetricsObjectSet of metric-name/value pairs.
dimensionsmetricsObjectSet of metric dimension-name/value pairs.
diff --git a/mintlify-docs/en/reference/api/metrics-v2.mdx b/mintlify-docs/en/reference/api/metrics-v2.mdx index 16c9ab72bf..e3321a0ace 100644 --- a/mintlify-docs/en/reference/api/metrics-v2.mdx +++ b/mintlify-docs/en/reference/api/metrics-v2.mdx @@ -2,12 +2,42 @@ title: "/metrics/v2 API reference" description: "/metrics/v2 API reference in Vespa applications." --- -| HTTP request | metrics/v2 operation | Description | -| :--- | :--- | :--- | -| GET | | | -| | Application metrics | `/metrics/v2/values` See [monitoring](/en/operations/self-managed/monitoring#metrics-v2-values) for examples. | + + + + + + + + + + + + + + + + + + + + +
HTTP requestmetrics/v2 operationDescription
GET
Application metrics{`/metrics/v2/values`} See monitoring for examples.
-| Parameter | Type | Description | -| :--- | :--- | :--- | -| consumer | String | Specify response [consumer](/en/reference/applications/services/admin#consumer), i.e. set of metrics. See [metrics/v1](/en/reference/api/metrics-v1#consumer) for details. | + + + + + + + + + + + + + + + +
ParameterTypeDescription
consumerStringSpecify response consumer, i.e. set of metrics. See metrics/v1 for details.
diff --git a/mintlify-docs/en/reference/api/prometheus-v1.mdx b/mintlify-docs/en/reference/api/prometheus-v1.mdx index cdc3088a45..5adb2e418e 100644 --- a/mintlify-docs/en/reference/api/prometheus-v1.mdx +++ b/mintlify-docs/en/reference/api/prometheus-v1.mdx @@ -2,12 +2,42 @@ title: "/prometheus/v1 API reference" description: "/prometheus/v1 API reference in Vespa applications." --- -| HTTP request | prometheus/v1 operation | Description | -| :--- | :--- | :--- | -| GET | | | -| | Node metrics | `/prometheus/v1/values` See [monitoring](/en/operations/self-managed/monitoring#prometheus-v1-values) for examples. | + + + + + + + + + + + + + + + + + + + + +
HTTP requestprometheus/v1 operationDescription
GET
Node metrics{`/prometheus/v1/values`} See monitoring for examples.
-| Parameter | Type | Description | -| :--- | :--- | :--- | -| consumer | String | Specify response [consumer](/en/reference/applications/services/admin#consumer), i.e. set of metrics. An unknown / empty value will return the `default` metric set. Built-in (note: case-sensitive): `default` `Vespa` | + + + + + + + + + + + + + + + +
ParameterTypeDescription
consumerStringSpecify response consumer, i.e. set of metrics. An unknown / empty value will return the {`default`} metric set. Built-in (note: case-sensitive): {`default`} {`Vespa`}
diff --git a/mintlify-docs/en/reference/api/query.mdx b/mintlify-docs/en/reference/api/query.mdx index cf380c9224..57b1107aa4 100644 --- a/mintlify-docs/en/reference/api/query.mdx +++ b/mintlify-docs/en/reference/api/query.mdx @@ -143,67 +143,363 @@ the root Query object to that parameter. ## Query -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| yql | | String | | See the [YQL query guide](/en/querying/query-language) for examples, and the [reference](/en/reference/querying/yql) for details. | + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
yqlStringSee the YQL query guide for examples, and the reference for details.
## Native Execution Parameters These parameters are defined in the `native` query profile type. -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| hits | count | Number | 10 | A positive integer, including 0. The maximum number of hits to return from the result set. `hits` is capped at `maxHits`, default 400. `maxHits` can be set in a [query profile](/en/querying/query-profiles). Number of hits can also be set in [YQL](/en/reference/querying/yql#limit-offset). | -| offset | start | Number | 0 | To implement pagination: The number of hits to skip when returning the result. A positive integer, including 0. `offset` is capped at `maxOffset`, default 1000. `maxOffset` can be set in a [query profile](/en/querying/query-profiles). Offset can also be set in [YQL](/en/reference/querying/yql#limit-offset). | -| queryProfile | | String | `default` | A query profile id with format `name:version`, where version can be omitted or partially specified, e.g. `myprofile:2.1`. A [query profile](/en/querying/query-profiles) has default properties for a query. The default query profile is named *default*. | -| groupingSessionCache | | Boolean | true | Set to true to enable grouping session cache. See the [grouping reference](/en/reference/querying/grouping-language#grouping-session-cache) for details. | -| searchChain | | String | `default` | A search chain id with format `name:version`, where version can be omitted or partially specified, e.g. `mychain:2.1.3`. The [search chain](/en/applications/chaining) initially invoked when processing the query. This search chain may invoke other chains. | -| timeout | | String | 0.5s | Positive floating point number with an optional unit. Default unit is seconds (s), valid unit strings are e.g. *ms* and *s*. To set a timeout of one minute, the argument could be set to *60 s*. Space between the number and the unit is optional. It specifies the overall timeout of the query execution and can be defined in a [query profile](/en/querying/query-profiles). Different classes of queries can then easily have a different latency budget/timeout using different profiles. At timeout, the hits generated thus far are returned, refer to [ranking.softtimeout.enable](#ranking.softtimeout.enable) for details on HTTP status codes and response elements. Refer to the [Query API guide](/en/querying/query-api#timeout) for more details on timeout handling. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
hitscountNumber10A positive integer, including 0. The maximum number of hits to return from the result set. {`hits`} is capped at {`maxHits`}, default 400. {`maxHits`} can be set in a query profile. Number of hits can also be set in YQL.
offsetstartNumber0To implement pagination: The number of hits to skip when returning the result. A positive integer, including 0. {`offset`} is capped at {`maxOffset`}, default 1000. {`maxOffset`} can be set in a query profile. Offset can also be set in YQL.
queryProfileString{`default`}A query profile id with format {`name:version`}, where version can be omitted or partially specified, e.g. {`myprofile:2.1`}. A query profile has default properties for a query. The default query profile is named *default*.
groupingSessionCacheBooleantrueSet to true to enable grouping session cache. See the grouping reference for details.
searchChainString{`default`}A search chain id with format {`name:version`}, where version can be omitted or partially specified, e.g. {`mychain:2.1.3`}. The search chain initially invoked when processing the query. This search chain may invoke other chains.
timeoutString0.5sPositive floating point number with an optional unit. Default unit is seconds (s), valid unit strings are e.g. *ms* and *s*. To set a timeout of one minute, the argument could be set to *60 s*. Space between the number and the unit is optional. It specifies the overall timeout of the query execution and can be defined in a query profile. Different classes of queries can then easily have a different latency budget/timeout using different profiles. At timeout, the hits generated thus far are returned, refer to ranking.softtimeout.enable for details on HTTP status codes and response elements. Refer to the Query API guide for more details on timeout handling.
## Query Model Parameters -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| model.defaultIndex | default-index | String | `default` | An index name. The field which is searched for query terms which doesn't explicitly specify an index. Also see the [defaultIndex](/en/reference/querying/yql#defaultindex) query annotation. | -| model.encoding | encoding | String | `utf-8` | Encoding names or aliases defined in the [IANA character sets](https://www.iana.org/assignments/character-sets/character-sets.xhtml). Sets the encoding to use when returning a result. The query is always encoded as UTF-8, independently of how the result will be encoded. The encodings `big5`, `euc-jp`, `euc-kr`, `gb2312`, `iso-2022-jp` and `shift-jis` also influences how [tokenization](/en/linguistics/linguistics-opennlp#tokenization) is done in the absence of an explicit language setting. | -| model.filter | filter | String | | A filter string in the [Simple Query Language](/en/reference/querying/simple-query-language). Sets a filter to be combined with the [model.queryString](#model.querystring). Typical use of a filter is to add machine generated or preferences based filter terms to the user query. Terms which are passed in the filter are not [bolded](#presentation.bolding). The filter is parsed the same way as a query of type `any`, the full syntax is available. The positive terms (preceded by +) and phrases act as AND filters, the negative terms (preceded by -) act as NOT filters, while the unprefixed terms will be used to RANK the results. Unless the query has no positive terms, the filter will only restrict and influence ranking of the result set, never cause more matches than the query. The [model.queryString](#model.querystring) must be present for this to have any effect. To add filters to the YQL string, use query profiles. See [example](/en/querying/query-profiles#example). | -| model.locale | locale | String | | A language tag from [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646). Sets the locale and language to use when parsing queries from a language tag, such as `en-US`. This attribute should always be set when it is known. If this parameter is not set, it will be guessed from the query and encoding, and default to english if it cannot be guessed. | -| model.language | lang, language | String | | A language tag from [RFC 5646](https://www.rfc-editor.org/rfc/rfc5646), but allowing underscore instead of dash as separator character. A legacy alternative to locale. When this value is accessed, underscores will be replaced by dashes in the returned value. Also see the [language](/en/reference/querying/yql#language) query term annotation. | -| model.queryString | query | String | | A query string in the [Simple Query Language](/en/reference/querying/simple-query-language). It is combined with [model.filter](#model.filter). See the [userQuery](/en/reference/querying/yql#userquery) operator for how to combine with YQL. Can also be used without YQL. | -| model.restrict | restrict | String | | A comma-delimited list of document type (schema) names, defaulting to all schemas if not set. See [federation](/en/querying/federation). Use [model.sources](#model.sources) to restrict to content cluster names or other source names. | -| model.searchPath | searchpath | String | | Specification of which content nodes a query should be sent to. This is useful for debugging/monitoring and when using [Rank phase statistics](/en/ranking/phased-ranking#rank-phase-statistics). Note that in a content cluster with flat distribution (i.e. no <group> element in *services.xml*), there is 1 implicit group. If not set, defaults to all nodes in one group, selected by load balancing. `searchpath::ELEMENT [';' ELEMENT]*` `ELEMENT::NODE ['/' GROUP]` `NODE::EXP [',' EXP]*` `EXP::NUM \| RANGE` `GROUP::NUM \| '*'` `RANGE::'['NUM ',' NUM ' >'` Examples: `7/3` = node 7, group 3. `7/` = node 7, any group. `*/0` = all nodes in group 0 `7,1,9/0` = nodes 1,7 and 9, group 0. `1,[3,9>/0` = nodes 1,3,4,5,6,7,8, group 0. | -| model.sources | search, sources | String | | A comma-separated list of content cluster names or other source names, defaulting to all sources/clusters if not set. The names of the sources to query, e.g., one or more content clusters and/or federated sources - see [federation](/en/querying/federation). Use [model.restrict](#model.restrict) to only search a subset of the schemas in a cluster. | -| model.type | type | String | `weakAnd` | Sets all the model.type parameters (composite, tokenization, and syntax) specifying how to parse a [model.queryString](#model.querystring) parameter at once, according to the given table: `all` → composite `and`, tokenization `internal`, syntax `simple` `any` → composite `or`, tokenization `internal`, syntax `simple` `linguistics` → composite `weakAnd`, tokenization `linguistics`, syntax `none` `phrase` → composite `phrase`, tokenization `internal`, syntax `none` `tokenize` → composite `weakAnd`, tokenization `internal`, syntax `none` `weakAnd` → composite `weakAnd`, tokenization `internal`, syntax `simple` `web` → composite `and`, tokenization `internal`, syntax `web` `yql` → composite `and`, tokenization `internal`, syntax `yql` Also see [YQL grammar](/en/reference/querying/yql#userinput). | -| model.type.composite | | String | `Determined by model.type` | Sets the Vespa query composite type that will collect parsed terms of the query by default. and Create an AndItem which only matches if *all* terms are present. nearCreate a NearItem which matches if all the terms appear near each other (gap of 1 by default). oNear — Create an ONearItem which matches if all the terms appear near each other (gap of 1 by default), in the given order. or — Create an OrItem which matches if *any* of the terms are present. phrase — Create a PhraseItem which matches if all the terms are present in the given order with no gaps. weakAnd — Create a [WeakAndItem](/en/ranking/wand#weakand) which has the semantics of `or` with performance approaching `and` . | -| model.type.tokenization | | String | `Determined by model.type` | Sets the tokenizer used to split the query string into tokens. internal Use the tokenizer built into the query parser. linguisticsPass the full query string as-is to the linguistics component for tokenization, exactly as on the indexing side, and collect any text and numeric token returned as-is, with no further stemming or normalization even when specified in the schema. This is only supported in conjunction with the `none` syntax option. | -| model.type.syntax | | String | `Determined by model.type` | Sets the syntax used to interpret the query string. Options: `none`: No syntax: Disregard any non-searchable terms `simple`: Use the [simple query language](/en/reference/querying/simple-query-language) suitable for end users. `web`: Like the [simple query language](/en/reference/querying/simple-query-language) , but '+' in front of a term means "search for this term as-is", and 'a OR b' (capital OR) means match either a or b. `yql`: Parse as a [YQL query](/en/reference/querying/yql) . | -| model.type.profile | | String | `*(null)*` | Overrides the linguistics profile assigned to the field(s) searched. The linguistics profile is used to choose the processing done in the [linguistics component](/en/linguistics/linguistics). | -| model.type.isYqlDefault | | Boolean | `false` | Whether the model.type settings should be used as the default settings for terms in YQL queries. With this parameter turned on, the model.type settings become the default "grammar" settings in userQuery, and with tokenization set to `linguistics` this will also cause "contains" terms to not undergo stemming, normalization and lowercasing as separate operations, as using this mode delegates all token processing to a single pass through the lingustics module. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
model.defaultIndexdefault-indexString{`default`}An index name. The field which is searched for query terms which doesn't explicitly specify an index. Also see the defaultIndex query annotation.
model.encodingencodingString{`utf-8`}Encoding names or aliases defined in the IANA character sets. Sets the encoding to use when returning a result. The query is always encoded as UTF-8, independently of how the result will be encoded. The encodings {`big5`}, {`euc-jp`}, {`euc-kr`}, {`gb2312`}, {`iso-2022-jp`} and {`shift-jis`} also influences how tokenization is done in the absence of an explicit language setting.
model.filterfilterStringA filter string in the Simple Query Language. Sets a filter to be combined with the model.queryString. Typical use of a filter is to add machine generated or preferences based filter terms to the user query. Terms which are passed in the filter are not bolded. The filter is parsed the same way as a query of type {`any`}, the full syntax is available. The positive terms (preceded by +) and phrases act as AND filters, the negative terms (preceded by -) act as NOT filters, while the unprefixed terms will be used to RANK the results. Unless the query has no positive terms, the filter will only restrict and influence ranking of the result set, never cause more matches than the query. The model.queryString must be present for this to have any effect. To add filters to the YQL string, use query profiles. See example.
model.localelocaleStringA language tag from RFC 5646. Sets the locale and language to use when parsing queries from a language tag, such as {`en-US`}. This attribute should always be set when it is known. If this parameter is not set, it will be guessed from the query and encoding, and default to english if it cannot be guessed.
model.languagelang, languageStringA language tag from RFC 5646, but allowing underscore instead of dash as separator character. A legacy alternative to locale. When this value is accessed, underscores will be replaced by dashes in the returned value. Also see the language query term annotation.
model.queryStringqueryStringA query string in the Simple Query Language. It is combined with model.filter. See the userQuery operator for how to combine with YQL. Can also be used without YQL.
model.restrictrestrictStringA comma-delimited list of document type (schema) names, defaulting to all schemas if not set. See federation. Use model.sources to restrict to content cluster names or other source names.
model.searchPathsearchpathStringSpecification of which content nodes a query should be sent to. This is useful for debugging/monitoring and when using Rank phase statistics. Note that in a content cluster with flat distribution (i.e. no &lt;group&gt; element in *services.xml*), there is 1 implicit group. If not set, defaults to all nodes in one group, selected by load balancing. {`searchpath::ELEMENT [';' ELEMENT]*`} {`ELEMENT::NODE ['/' GROUP]`} {`NODE::EXP [',' EXP]*`} {`EXP::NUM | RANGE`} {`GROUP::NUM | '*'`} {`RANGE::'['NUM ',' NUM ' >'`} Examples: {`7/3`} = node 7, group 3. {`7/`} = node 7, any group. {`*/0`} = all nodes in group 0 {`7,1,9/0`} = nodes 1,7 and 9, group 0. {`1,[3,9>/0`} = nodes 1,3,4,5,6,7,8, group 0.
model.sourcessearch, sourcesStringA comma-separated list of content cluster names or other source names, defaulting to all sources/clusters if not set. The names of the sources to query, e.g., one or more content clusters and/or federated sources - see federation. Use model.restrict to only search a subset of the schemas in a cluster.
model.typetypeString{`weakAnd`}Sets all the model.type parameters (composite, tokenization, and syntax) specifying how to parse a model.queryString parameter at once, according to the given table: {`all`} → composite {`and`}, tokenization {`internal`}, syntax {`simple`} {`any`} → composite {`or`}, tokenization {`internal`}, syntax {`simple`} {`linguistics`} → composite {`weakAnd`}, tokenization {`linguistics`}, syntax {`none`} {`phrase`} → composite {`phrase`}, tokenization {`internal`}, syntax {`none`} {`tokenize`} → composite {`weakAnd`}, tokenization {`internal`}, syntax {`none`} {`weakAnd`} → composite {`weakAnd`}, tokenization {`internal`}, syntax {`simple`} {`web`} → composite {`and`}, tokenization {`internal`}, syntax {`web`} {`yql`} → composite {`and`}, tokenization {`internal`}, syntax {`yql`} Also see YQL grammar.
model.type.compositeString{`Determined by model.type`}Sets the Vespa query composite type that will collect parsed terms of the query by default. and Create an AndItem which only matches if *all* terms are present. nearCreate a NearItem which matches if all the terms appear near each other (gap of 1 by default). oNear — Create an ONearItem which matches if all the terms appear near each other (gap of 1 by default), in the given order. or — Create an OrItem which matches if *any* of the terms are present. phrase — Create a PhraseItem which matches if all the terms are present in the given order with no gaps. weakAnd — Create a WeakAndItem which has the semantics of {`or`} with performance approaching {`and`} .
model.type.tokenizationString{`Determined by model.type`}Sets the tokenizer used to split the query string into tokens. internal Use the tokenizer built into the query parser. linguisticsPass the full query string as-is to the linguistics component for tokenization, exactly as on the indexing side, and collect any text and numeric token returned as-is, with no further stemming or normalization even when specified in the schema. This is only supported in conjunction with the {`none`} syntax option.
model.type.syntaxString{`Determined by model.type`}Sets the syntax used to interpret the query string. Options: {`none`}: No syntax: Disregard any non-searchable terms {`simple`}: Use the simple query language suitable for end users. {`web`}: Like the simple query language , but '+' in front of a term means "search for this term as-is", and 'a OR b' (capital OR) means match either a or b. {`yql`}: Parse as a YQL query .
model.type.profileString{`*(null)*`}Overrides the linguistics profile assigned to the field(s) searched. The linguistics profile is used to choose the processing done in the linguistics component.
model.type.isYqlDefaultBoolean{`false`}Whether the model.type settings should be used as the default settings for terms in YQL queries. With this parameter turned on, the model.type settings become the default "grammar" settings in userQuery, and with tokenization set to {`linguistics`} this will also cause "contains" terms to not undergo stemming, normalization and lowercasing as separate operations, as using this mode delegates all token processing to a single pass through the lingustics module.
## Ranking -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| ranking.location | | String | | See [Geo search](/en/querying/geo-search). Point (two-dimensional location) to use as base for location ranking. **Important:** Deprecated in favor of adding a [geoLocation](/en/reference/querying/yql#geolocation) item to the query tree. Use inside a [rank](/en/reference/querying/yql#rank) operator if it should be used only for ranking). | -| ranking.features
.*featurename* | input
. *featurename* , rankfeature
. *featurename* | String | | Set a query rank feature input to a value. The key must be a query feature - `query(anyname)`, and the value must be a double, string (to be hashed to a double), or a tensor matching the [declared input type](/en/reference/schemas/schemas#inputs) on [tensor literal form](/en/reference/ranking/tensor#tensor-literal-form) - see the [tensor user guide](/en/ranking/tensor-user-guide#querying-with-tensors). Examples: `input.query(userageDouble)=42.1` `input.query(stringToBeHashed)=abcd` `input.query(myIndexedTensor)=[1.0, 2.0, 3.0]` `input.query(myMappedTensor)={"Tablet Keyboard Cases": 0.8, "Keyboards":0.3}` | -| ranking.listFeatures | rankfeatures | Boolean | false | Set to true to request *all* [rank-features](/en/reference/schemas/schemas#rank-features) to be calculated and returned. The rank features will be returned in the summary field *rankfeatures*. This option is typically used for MLR training, should not to be used for production. | -| ranking.profile | ranking | String | `default` | Sets [rank profile](/en/reference/schemas/schemas#rank-profile) to use for assigning rank scores for documents. The `default` rank profile will be used for backends which does not have the given rank profile. | -| ranking.properties
.*propertyname* | rankproperty
. *propertyname* | String | | Set a [rank property](/en/reference/schemas/schemas#rank-properties) that is passed to, and used by a feature executor for this query. Example: `query=foo&ranking.properties.dotProduct.X={a:1,b:2}` | -| ranking.softtimeout
.enable | | Boolean | true | By default, the hits available are returned on [timeout](#timeout). To return no hits at timeout instead, set `ranking.softtimeout.enable=false`. Softtimeout uses `ranking.softtimeout.factor` of the [timeout](#timeout), default 70%. The rest of the time budget is spent on later ranking phases. The factor is adaptive, per rank profile - the factor is adjusted based on remaining time after all ranking phases, unless overridden in the query using `ranking.softtimeout.factor`. A [timeout](/en/reference/querying/default-result-format#timeout) element is returned in the query response at timeout. Example: query with 500ms timeout, use 300ms in first-phase ranking: `&ranking.softtimeout.enable=true
&ranking.softtimeout.factor=0.6
&timeout=0.5` The `ranking.softtimeout` settings controls what the content nodes should do in the case where the latency budget has almost been used (timeout times a factor). Return the documents recalled and ranked with the [first phase function](/en/ranking/phased-ranking) within the time used, or simply don't produce a result: With soft timeout disabled, the Vespa container will return a 504 timeout without any results. When enabled, it will return the documents matched and ranked up until the timeout was reached, with a 200 OK response along with the reason the result set was degraded. The container might respond with a timeout error with HTTP response code 504 even with soft timeout enabled if the timeout is set so low that the query does not make it to the content nodes, or the container does not have any time left after input and query processing to dispatch the query to the content nodes. Read more about soft timeout in [coverage degradation](/en/performance/graceful-degradation). | -| ranking.softtimeout
.factor | | Number | 0.7 | See [ranking.softtimeout.enable](#ranking.softtimeout.enable). | -| ranking.sorting | sorting | String | | A valid [sort specification](/en/reference/querying/sorting-language). Fields you want to sort on must be stored as document attributes in the index structure by adding [attribute](/en/reference/schemas/schemas#attribute) to the indexing statement. | -| ranking.significance.useModel | | Boolean | false | Enables or disables the use of significance models specified in [service.xml](/en/reference/applications/services/search#significance). Overrides [use-model](/en/reference/schemas/schemas#significance) set in the rank profile. | -| ranking.freshness | | String | | Sets the time which will be used as *now* during execution. `[integer]`, an absolute time in seconds since epoch, or `now-[number]`, to use a time [integer] seconds into the past, or `now` to use the current time. | -| ranking.queryCache | | Boolean | false | Turns query cache on or off. Query is a two-phase process. If the query cache is on, the query is stored on the content nodes between the first and second phase, saving network bandwidth and also query setup time, at the expense of using more memory. It only affects the protocol phase two, see [caches in Vespa](/en/performance/caches-in-vespa). It does not cache the result, it just saves resources by not forwarding the query twice (one for the first protocol phase which is find the best k documents from all nodes, to the second phase which is to fill summary data and potentially ranking features listed in summary-features in the rank profile). The [summary-features](/en/reference/schemas/schemas#summary-features) are re-calculated but this setting avoids sending the query down once more. There is little downside of using it, and it can save resources and latency in cases where the query tree and query ranking features (e.g. tensors used in ranking) are large. As this is a protocol optimization, it also works with changing filter, it's not cached cross independent queries, it's just saving having to send the same query twice. | -| ranking.secondPhase.totalRerankCount | | Number | | Specifies the number of hits that should be ranked in the second ranking phase in total over the queried content nodes. Overrides the [total-rerank-count](/en/reference/schemas/schemas#secondphase-total-rerank-count) set in the rank profile. Setting to 0 disables second phase reranking. | -| ranking.secondPhase.rerankCount | | Number | | Specifies the number of hits that should be ranked in the second phase *per node*. Prefer using [totalRerankCount](#ranking.secondphase.totalrerankcount) over this. | -| ranking.totalKeepRankCount | | Number | | Specifies the number of hits for which the rank score should be kept after first phase ranking in total over the nodes participating in the query. Overrides the [total-keep-rank-count](/en/reference/schemas/schemas#total-keep-rank-count) set in the rank profile. | -| ranking.keepRankCount | | Number | | Specifies the number of hits for which the rank score should be kept after first phase ranking on each node. Overrides the [keep-rank-count](/en/reference/schemas/schemas#keep-rank-count) set in the rank profile. Prefer [total-keep-rank-count](#ranking.totalkeeprankcount) over this. | -| ranking.rankScoreDropLimit | | Number | | Minimum rankscore for a document to be considered a hit. Overrides the [rank-score-drop-limit](/en/reference/schemas/schemas#rank-score-drop-limit) set in the rank profile. | -| ranking.secondPhase.rankScoreDropLimit | | Number | | Minimum rank score for a document to be considered a hit after second phase reranking or rescoring. Overrides the [second phase rank-score-drop-limit](/en/reference/schemas/schemas#secondphase-rank-score-drop-limit) set in the rank profile. | -| ranking.globalPhase.rerankCount | | Number | | Specifies the number of hits that should be re-ranked in the global ranking phase. Overrides the [rerank-count](/en/reference/schemas/schemas#globalphase-rerank-count) set in the rank profile. Setting to 0 disables the global phase reranking. | -| ranking.globalPhase.rankScoreDropLimit | | Number | | Minimum rank score for a document to be considered a hit after global phase reranking or rescoring. Overrides the [global phase rank-score-drop-limit](/en/reference/schemas/schemas#globalphase-rank-score-drop-limit) set in the rank profile. | -| ranking.elementGap.*fieldName* | | Integer | | Set or overrides [element-gap](/en/reference/schemas/schemas#rank-element-gap) configured for a given *fieldName* in the rank profile. Note: Can be the integer "0" to consider elements to be adjacent, or the string "infinity" to signal that words in different elements never are considered "close". | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
ranking.locationStringSee Geo search. Point (two-dimensional location) to use as base for location ranking. **Important:** Deprecated in favor of adding a geoLocation item to the query tree. Use inside a rank operator if it should be used only for ranking).
ranking.features
.*featurename*
input
. *featurename* , rankfeature
. *featurename*
StringSet a query rank feature input to a value. The key must be a query feature - {`query(anyname)`}, and the value must be a double, string (to be hashed to a double), or a tensor matching the declared input type on tensor literal form - see the tensor user guide. Examples: {`input.query(userageDouble)=42.1`} {`input.query(stringToBeHashed)=abcd`} {`input.query(myIndexedTensor)=[1.0, 2.0, 3.0]`} {`input.query(myMappedTensor)={"Tablet Keyboard Cases": 0.8, "Keyboards":0.3}`}
ranking.listFeaturesrankfeaturesBooleanfalseSet to true to request *all* rank-features to be calculated and returned. The rank features will be returned in the summary field *rankfeatures*. This option is typically used for MLR training, should not to be used for production.
ranking.profilerankingString{`default`}Sets rank profile to use for assigning rank scores for documents. The {`default`} rank profile will be used for backends which does not have the given rank profile.
ranking.properties
.*propertyname*
rankproperty
. *propertyname*
StringSet a rank property that is passed to, and used by a feature executor for this query. Example: {`query=foo&ranking.properties.dotProduct.X={a:1,b:2}`}
ranking.softtimeout
.enable
BooleantrueBy default, the hits available are returned on timeout. To return no hits at timeout instead, set {`ranking.softtimeout.enable=false`}. Softtimeout uses {`ranking.softtimeout.factor`} of the timeout, default 70%. The rest of the time budget is spent on later ranking phases. The factor is adaptive, per rank profile - the factor is adjusted based on remaining time after all ranking phases, unless overridden in the query using {`ranking.softtimeout.factor`}. A timeout element is returned in the query response at timeout. Example: query with 500ms timeout, use 300ms in first-phase ranking: {`&ranking.softtimeout.enable=true
&ranking.softtimeout.factor=0.6
&timeout=0.5`}
The {`ranking.softtimeout`} settings controls what the content nodes should do in the case where the latency budget has almost been used (timeout times a factor). Return the documents recalled and ranked with the first phase function within the time used, or simply don't produce a result: With soft timeout disabled, the Vespa container will return a 504 timeout without any results. When enabled, it will return the documents matched and ranked up until the timeout was reached, with a 200 OK response along with the reason the result set was degraded. The container might respond with a timeout error with HTTP response code 504 even with soft timeout enabled if the timeout is set so low that the query does not make it to the content nodes, or the container does not have any time left after input and query processing to dispatch the query to the content nodes. Read more about soft timeout in coverage degradation.
ranking.softtimeout
.factor
Number0.7See ranking.softtimeout.enable.
ranking.sortingsortingStringA valid sort specification. Fields you want to sort on must be stored as document attributes in the index structure by adding attribute to the indexing statement.
ranking.significance.useModelBooleanfalseEnables or disables the use of significance models specified in service.xml. Overrides use-model set in the rank profile.
ranking.freshnessStringSets the time which will be used as *now* during execution. {`[integer]`}, an absolute time in seconds since epoch, or {`now-[number]`}, to use a time [integer] seconds into the past, or {`now`} to use the current time.
ranking.queryCacheBooleanfalseTurns query cache on or off. Query is a two-phase process. If the query cache is on, the query is stored on the content nodes between the first and second phase, saving network bandwidth and also query setup time, at the expense of using more memory. It only affects the protocol phase two, see caches in Vespa. It does not cache the result, it just saves resources by not forwarding the query twice (one for the first protocol phase which is find the best k documents from all nodes, to the second phase which is to fill summary data and potentially ranking features listed in summary-features in the rank profile). The summary-features are re-calculated but this setting avoids sending the query down once more. There is little downside of using it, and it can save resources and latency in cases where the query tree and query ranking features (e.g. tensors used in ranking) are large. As this is a protocol optimization, it also works with changing filter, it's not cached cross independent queries, it's just saving having to send the same query twice.
ranking.secondPhase.totalRerankCountNumberSpecifies the number of hits that should be ranked in the second ranking phase in total over the queried content nodes. Overrides the total-rerank-count set in the rank profile. Setting to 0 disables second phase reranking.
ranking.secondPhase.rerankCountNumberSpecifies the number of hits that should be ranked in the second phase *per node*. Prefer using totalRerankCount over this.
ranking.totalKeepRankCountNumberSpecifies the number of hits for which the rank score should be kept after first phase ranking in total over the nodes participating in the query. Overrides the total-keep-rank-count set in the rank profile.
ranking.keepRankCountNumberSpecifies the number of hits for which the rank score should be kept after first phase ranking on each node. Overrides the keep-rank-count set in the rank profile. Prefer total-keep-rank-count over this.
ranking.rankScoreDropLimitNumberMinimum rankscore for a document to be considered a hit. Overrides the rank-score-drop-limit set in the rank profile.
ranking.secondPhase.rankScoreDropLimitNumberMinimum rank score for a document to be considered a hit after second phase reranking or rescoring. Overrides the second phase rank-score-drop-limit set in the rank profile.
ranking.globalPhase.rerankCountNumberSpecifies the number of hits that should be re-ranked in the global ranking phase. Overrides the rerank-count set in the rank profile. Setting to 0 disables the global phase reranking.
ranking.globalPhase.rankScoreDropLimitNumberMinimum rank score for a document to be considered a hit after global phase reranking or rescoring. Overrides the global phase rank-score-drop-limit set in the rank profile.
ranking.elementGap.*fieldName*IntegerSet or overrides element-gap configured for a given *fieldName* in the rank profile. Note: Can be the integer "0" to consider elements to be adjacent, or the string "infinity" to signal that words in different elements never are considered "close".
## ranking.matching @@ -212,22 +508,117 @@ Settings to control behavior during matching of query evaluation. [rank profile](/en/reference/schemas/schemas#rank-profile). Detailed descriptions are found in the rank profile documentation. -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| ranking.matching
.numThreadsPerSearch | | integer | | Rank profile equivalent: [num-threads-per-search](/en/reference/schemas/schemas#num-threads-per-search) Overrides the global [persearch](/en/reference/applications/services/content#requestthreads-persearch) threads to a **lower** value. | -| ranking.matching
.minHitsPerThread | | integer | | Rank profile equivalent: [min-hits-per-thread](/en/reference/schemas/schemas#min-hits-per-thread) After estimating the number of hits for a query, this number is used to decide how many search threads to use. | -| ranking.matching
.numSearchPartitions | | integer | | Rank profile equivalent: [num-search-partitions](/en/reference/schemas/schemas#num-search-partitions) Number of logical partitions the corpus on a content node is divided in. A partition is the smallest unit a search thread will handle. | -| ranking.matching
.termwiseLimit | | double [0.0, 1.0] | | Rank profile equivalent: [termwise-limit](/en/reference/schemas/schemas#termwise-limit) If estimated number of hits > corpus * termwise-limit, document candidates are pruned with a [TAAT](/en/performance/feature-tuning#hybrid-taat-daat) evaluation for query terms not needed for ranking. | -| ranking.matching
.postFilterThreshold | | double [0.0, 1.0] | 1.0 | Rank profile equivalent: [post-filter-threshold](/en/reference/schemas/schemas#post-filter-threshold) Threshold value deciding if a query with an approximate [nearestNeighbor](/en/reference/querying/yql#nearestneighbor) operator combined with filters is evaluated using post-filtering. | -| ranking.matching
.approximateThreshold | | double [0.0, 1.0] | 0.02 | Rank profile equivalent: [approximate-threshold](/en/reference/schemas/schemas#approximate-threshold) Threshold value deciding if a query with an approximate [nearestNeighbor](/en/reference/querying/yql#nearestneighbor) operator combined with filters is evaluated by searching for approximate or exact nearest neighbors. | -| ranking.matching
.filterFirstThreshold | | double [0.0, 1.0] | 0.2 | Rank profile equivalent: [filter-first-threshold](/en/reference/schemas/schemas#filter-first-threshold) Threshold value deciding if the filter is checked before computing a distance (*filter-first heuristic*) while searching the [HNSW](/en/reference/schemas/schemas#index-hnsw) graph for approximate neighbors with filtering. | -| ranking.matching
.filterFirstExploration | | double [0.0, 1.0] | 0.01 | Rank profile equivalent: [filter-first-exploration](/en/reference/schemas/schemas#filter-first-exploration) Value specifying how aggressively the filter-first heuristic searches the [HNSW](/en/reference/schemas/schemas#index-hnsw) graph for approximate neighbors with filtering. | -| ranking.matching
.explorationSlack | | double [0.0, 1.0] | 0.0 | Rank profile equivalent: [exploration-slack](/en/reference/schemas/schemas#exploration-slack) Value specifying slack to delay the termination of the search of the [HNSW](/en/reference/schemas/schemas#index-hnsw) graph for nearest neighbors with or without filtering. | -| ranking.matching
.targetHitsMaxAdjustmentFactor | | double [1.0, inf] | | Rank profile equivalent: [target-hits-max-adjustment-factor](/en/reference/schemas/schemas#target-hits-max-adjustment-factor) Value used to control the auto-adjustment of [totalTargetHits](/en/reference/querying/yql#totaltargethits) used when evaluating an approximate [nearestNeighbor](/en/reference/querying/yql#nearestneighbor) operator with post-filtering. | -| ranking.matching
.filterThreshold | | double [0.0, 1.0] | | Rank profile equivalent: [filter-threshold](/en/reference/schemas/schemas#filter-threshold) Threshold value (in the range [0, 1]) deciding when matching in *index* fields should be treated as filters. This happens for query terms with [estimated hit ratios](/en/learn/glossary#estimated-hit-ratio) that are above the *filterThreshold*. | -| ranking.matching.weakand
.stopwordLimit | | double [0.0, 1.0] | | Rank profile equivalent: [weakand stopword-limit](/en/reference/schemas/schemas#weakand-stopword-limit) A number in the range [0, 1] representing the maximum [normalized document frequency](/en/learn/glossary#document-frequency-normalized) a query term can have in the corpus before it's considered a stopword and dropped entirely from being a part of the `weakAnd` evaluation. | -| ranking.matching.weakand
.adjustTarget | | double [0.0, 1.0] | | Rank profile equivalent: [weakand adjust-target](/en/reference/schemas/schemas#weakand-adjust-target) A number in the range [0, 1] representing [normalized document frequency](/en/learn/glossary#document-frequency-normalized). Used to derive a per-query document score threshold, where documents scoring lower than the threshold will not be considered as potential hits from the `weakAnd` operator. | -| ranking.matching.weakand
.allowDropAll | | boolean | false | Rank profile equivalent: [weakand allow-drop-all](/en/reference/schemas/schemas#weakand-allow-drop-all) A boolean value that, if set to `true`, will allow the `weakAnd` operator to drop *all* terms from the query if all terms are considered stopwords (i.e. by setting `weakAnd.stopwordLimit`). Typically used in conjunction with [nearestNeighbor](/en/querying/nearest-neighbor-search#querying-using-nearestneighbor-query-operator) or other operators to ensure that the query will return hits even when all terms are considered stopwords. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
ranking.matching
.numThreadsPerSearch
integerRank profile equivalent: num-threads-per-search Overrides the global persearch threads to a **lower** value.
ranking.matching
.minHitsPerThread
integerRank profile equivalent: min-hits-per-thread After estimating the number of hits for a query, this number is used to decide how many search threads to use.
ranking.matching
.numSearchPartitions
integerRank profile equivalent: num-search-partitions Number of logical partitions the corpus on a content node is divided in. A partition is the smallest unit a search thread will handle.
ranking.matching
.termwiseLimit
double [0.0, 1.0]Rank profile equivalent: termwise-limit If estimated number of hits > corpus * termwise-limit, document candidates are pruned with a TAAT evaluation for query terms not needed for ranking.
ranking.matching
.postFilterThreshold
double [0.0, 1.0]1.0Rank profile equivalent: post-filter-threshold Threshold value deciding if a query with an approximate nearestNeighbor operator combined with filters is evaluated using post-filtering.
ranking.matching
.approximateThreshold
double [0.0, 1.0]0.02Rank profile equivalent: approximate-threshold Threshold value deciding if a query with an approximate nearestNeighbor operator combined with filters is evaluated by searching for approximate or exact nearest neighbors.
ranking.matching
.filterFirstThreshold
double [0.0, 1.0]0.2Rank profile equivalent: filter-first-threshold Threshold value deciding if the filter is checked before computing a distance (*filter-first heuristic*) while searching the HNSW graph for approximate neighbors with filtering.
ranking.matching
.filterFirstExploration
double [0.0, 1.0]0.01Rank profile equivalent: filter-first-exploration Value specifying how aggressively the filter-first heuristic searches the HNSW graph for approximate neighbors with filtering.
ranking.matching
.explorationSlack
double [0.0, 1.0]0.0Rank profile equivalent: exploration-slack Value specifying slack to delay the termination of the search of the HNSW graph for nearest neighbors with or without filtering.
ranking.matching
.targetHitsMaxAdjustmentFactor
double [1.0, inf]Rank profile equivalent: target-hits-max-adjustment-factor Value used to control the auto-adjustment of totalTargetHits used when evaluating an approximate nearestNeighbor operator with post-filtering.
ranking.matching
.filterThreshold
double [0.0, 1.0]Rank profile equivalent: filter-threshold Threshold value (in the range [0, 1]) deciding when matching in *index* fields should be treated as filters. This happens for query terms with estimated hit ratios that are above the *filterThreshold*.
ranking.matching.weakand
.stopwordLimit
double [0.0, 1.0]Rank profile equivalent: weakand stopword-limit A number in the range [0, 1] representing the maximum normalized document frequency a query term can have in the corpus before it's considered a stopword and dropped entirely from being a part of the {`weakAnd`} evaluation.
ranking.matching.weakand
.adjustTarget
double [0.0, 1.0]Rank profile equivalent: weakand adjust-target A number in the range [0, 1] representing normalized document frequency. Used to derive a per-query document score threshold, where documents scoring lower than the threshold will not be considered as potential hits from the {`weakAnd`} operator.
ranking.matching.weakand
.allowDropAll
booleanfalseRank profile equivalent: weakand allow-drop-all A boolean value that, if set to {`true`}, will allow the {`weakAnd`} operator to drop *all* terms from the query if all terms are considered stopwords (i.e. by setting {`weakAnd.stopwordLimit`}). Typically used in conjunction with nearestNeighbor or other operators to ensure that the query will return hits even when all terms are considered stopwords.
## ranking.matchPhase @@ -236,95 +627,459 @@ Settings to control behavior during the match phase of query evaluation. [match-phase](/en/reference/schemas/schemas#match-phase) settings in the rank profile. Detailed descriptions are found in the rank profile documentation. -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| ranking.matchPhase
.attribute | | string | | Rank profile equivalent: [match-phase: attribute](/en/reference/schemas/schemas#match-phase-attribute) The attribute used to limit matches by if more than maxHits hits will be produced. | -| ranking.matchPhase
.totalMaxHits | | long | | The max number of hits that should be generated in total over the content nodes during the match phase. Setting the value to `0` disables match phase early termination. Rank profile equivalent: [match-phase: total-max-hits](/en/reference/schemas/schemas#match-phase-total-max-hits) | -| ranking.matchPhase
.maxHits | | long | | The max number of hits that should be generated on eache content nodes during the match phase. Prefer using [totalMaxHits](#ranking.matchphase.totalmaxhits) over this. Rank profile equivalent: [match-phase: max-hits](/en/reference/schemas/schemas#match-phase-max-hits) | -| ranking.matchPhase
.ascending | | boolean | | Rank profile equivalent: [match-phase: order](/en/reference/schemas/schemas#match-phase-order) Whether to keep the documents having the highest (false) or lowest (true) values of the match phase attribute. | -| ranking.matchPhase
.diversity.attribute | | string | | Rank profile equivalent: [diversity: attribute](/en/reference/schemas/schemas#diversity-attribute) The attribute to use when deciding diversity. | -| ranking.matchPhase
.diversity.minGroups | | long | | Rank profile equivalent: [diversity: min-groups](/en/reference/schemas/schemas#diversity-min-groups) The minimum number of groups that should be returned from the match phase grouped by the diversity attribute. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
ranking.matchPhase
.attribute
stringRank profile equivalent: match-phase: attribute The attribute used to limit matches by if more than maxHits hits will be produced.
ranking.matchPhase
.totalMaxHits
longThe max number of hits that should be generated in total over the content nodes during the match phase. Setting the value to {`0`} disables match phase early termination. Rank profile equivalent: match-phase: total-max-hits
ranking.matchPhase
.maxHits
longThe max number of hits that should be generated on eache content nodes during the match phase. Prefer using totalMaxHits over this. Rank profile equivalent: match-phase: max-hits
ranking.matchPhase
.ascending
booleanRank profile equivalent: match-phase: order Whether to keep the documents having the highest (false) or lowest (true) values of the match phase attribute.
ranking.matchPhase
.diversity.attribute
stringRank profile equivalent: diversity: attribute The attribute to use when deciding diversity.
ranking.matchPhase
.diversity.minGroups
longRank profile equivalent: diversity: min-groups The minimum number of groups that should be returned from the match phase grouped by the diversity attribute.
## Dispatch -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| dispatch.topKProbability | | double | | Probability to use when computing how many hits to fetch from each partition when merging and creating the final result set. See [services](/en/reference/applications/services/content#top-k-probability) for details. Default: [none](/en/reference/applications/services/content#top-k-probability). | + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
dispatch.topKProbabilitydoubleProbability to use when computing how many hits to fetch from each partition when merging and creating the final result set. See services for details. Default: none.
## Presentation -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| presentation.bolding | bolding | Boolean | true | Whether to bold query terms in [schema](/en/reference/schemas/schemas) fields defined with [bolding: on](/en/reference/schemas/schemas#bolding) or [summary: dynamic](/en/reference/schemas/schemas#summary). | -| presentation.format | format | String | `default` | `Value`: Description `*No value* or [default](/en/reference/querying/default-result-format)`: The default, builtin JSON format `[json](/en/reference/querying/default-result-format)`: Builtin JSON format ``cbor``: Builtin [CBOR](https://cbor.io/) format. Binary encoding, responses are smaller and faster to render than JSON, especially for numeric data. Semantically equivalent to JSON. Cannot be used with `jsoncallback` (JSONP). Requires Vespa 8.623.5 or later. ``xml``: Builtin XML format. **Important:** See [deprecations](/en/reference/release-notes/vespa8). `[page](/en/reference/querying/page-result-format)`: XML format which is suitable for use with [page templates](/en/querying/page-templates) . **Important:** See [deprecations](/en/reference/release-notes/vespa8). `*Any other value*`: A custom [result renderer](/en/applications/result-renderers) supplied by the application The response format can also be selected via the HTTP `Accept` header. If the Accept header specifies `application/cbor` with higher priority than `application/json`, CBOR will be used. The `format` query parameter overrides the Accept header. | -| presentation.summary | summary | String | | The name of the [summary class](/en/querying/document-summaries) used to select fields in results. Default: The default summary class of the schema. | -| presentation.template | | String | | The id of a deployed page template to use for this result. This should be used with the [page](/en/reference/querying/page-result-format) result format. | -| presentation.timing | | Boolean | false | Whether a result renderer should try to add optional timing information to the rendered page - see the [result reference](/en/reference/querying/default-result-format#timing). | -| presentation.format.tensors | | String | `short` | Controls how tensors are rendered in the result. `Value`: Description ``short``: Render the tensor value in an object having two keys, "type" containing the value, and "cells"/"blocks"/"values" ( [depending on the type](/en/reference/schemas/document-json-format#tensor) ) containing the tensor content.
Render the tensor content in the [type-appropriate short form](/en/reference/schemas/document-json-format#tensor) . ``long``: Render the tensor value in an object having two keys, "type" containing the value, and "cells" containing the tensor content.
Render the tensor content in the [general verbose form](/en/reference/schemas/document-json-format#tensor) . ``short-value``: Render the tensor content directly.
Render the tensor content in the [type-appropriate short form](/en/reference/schemas/document-json-format#tensor) . ``long-value``: Render the tensor content directly.
Render the tensor content in the [general verbose form](/en/reference/schemas/document-json-format#tensor) . ``hex``: Use `short` form, and render dense values [hex encoded](/en/reference/ranking/tensor#indexed-hex-form) .
``hex-value``: Use `short-value` form, and render dense values [hex encoded](/en/reference/ranking/tensor#indexed-hex-form) .
| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
presentation.boldingboldingBooleantrueWhether to bold query terms in schema fields defined with bolding: on or summary: dynamic.
presentation.formatformatString{`default`}{`Value`}: Description {`*No value* or [default](/en/reference/querying/default-result-format)`}: The default, builtin JSON format {`[json](/en/reference/querying/default-result-format)`}: Builtin JSON format {``}cbor{``}: Builtin CBOR format. Binary encoding, responses are smaller and faster to render than JSON, especially for numeric data. Semantically equivalent to JSON. Cannot be used with {`jsoncallback`} (JSONP). Requires Vespa 8.623.5 or later. {``}xml{``}: Builtin XML format. **Important:** See deprecations. {`[page](/en/reference/querying/page-result-format)`}: XML format which is suitable for use with page templates . **Important:** See deprecations. {`*Any other value*`}: A custom result renderer supplied by the application The response format can also be selected via the HTTP {`Accept`} header. If the Accept header specifies {`application/cbor`} with higher priority than {`application/json`}, CBOR will be used. The {`format`} query parameter overrides the Accept header.
presentation.summarysummaryStringThe name of the summary class used to select fields in results. Default: The default summary class of the schema.
presentation.templateStringThe id of a deployed page template to use for this result. This should be used with the page result format.
presentation.timingBooleanfalseWhether a result renderer should try to add optional timing information to the rendered page - see the result reference.
presentation.format.tensorsString{`short`}Controls how tensors are rendered in the result. {`Value`}: Description {``}short{``}: Render the tensor value in an object having two keys, "type" containing the value, and "cells"/"blocks"/"values" ( depending on the type ) containing the tensor content.
Render the tensor content in the type-appropriate short form . {``}long{``}: Render the tensor value in an object having two keys, "type" containing the value, and "cells" containing the tensor content.
Render the tensor content in the general verbose form . {``}short-value{``}: Render the tensor content directly.
Render the tensor content in the type-appropriate short form . {``}long-value{``}: Render the tensor content directly.
Render the tensor content in the general verbose form . {``}hex{``}: Use {`short`} form, and render dense values hex encoded .
{``}hex-value{``}: Use {`short-value`} form, and render dense values hex encoded .
## Grouping and Aggregation -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| select | | String | | Requests specific multi-level result set statistics and/or hit groups to be returned in the result. Fields you want to retrieve statistics or hit groups for must be stored as document attributes in the index structure by adding attribute to the indexing statement. Default is no grouping. See the [grouping guide](/en/querying/grouping) for examples. | -| collapsefield | | String | | Comma-separated list of [field names](/en/reference/schemas/schemas#summary), that should only appear uniquely in a result. Hits with values in these fields which are already present in a higher-ranked hit will be filtered out. Read more in [result diversity](/en/querying/result-diversity) to compare this with other options. Default is no field collapsing. | -| collapsesize | | Number | 1 | The number of hits to keep in each collapsed bucket - used for all collapsefields. | -| collapsesize.*fieldname* | | Number | 1 | The number of hits to keep in each collapsed bucket - used for the specified field. This value takes precedence over the value specified in `collapsesize`. | -| collapse.summary | | String | | A valid name of a document summary class. Use this summary class to fetch the fields used for collapsing. Default: Use default summary or attributes. | -| grouping.defaultMaxGroups | | Number | 10 | Positive integer or `-1` to disable. The default number of groups to return when [max](/en/querying/grouping#ordering-and-limiting-groups) is not specified. | -| grouping.defaultMaxHits | | Number | 10 | Positive integer or `-1` to disable. The default number of hits to return when [max](/en/querying/grouping#hits-per-group) is not specified. | -| grouping.globalMaxGroups | | Number | 10000 | Positive integer or `-1` to disable. A cost limit for grouping queries. Any query that may exceed this threshold will be preemptively failed by the container. The limit is defined as the total number of groups and document summaries a query may produce. A query that does not have an implicit or explicit `max` defined for all levels will always fail if limit is enabled. This parameter can only be overridden in a [query profile](/en/querying/query-profiles). See the [grouping guide](/en/querying/grouping#global-limit) for practical examples. | -| grouping.defaultPrecisionFactor | | Decimal
number | 2.0 | The default precision scale factor when [precision](/en/querying/grouping#ordering-and-limiting-groups) is not specified. The final precision value is calculated by multiplying the effective `max` value with the scale factor. | -| timezone | | String | `utc` | Specifies a timezone that will be used to offset all `time` related expressions in grouping. See [Java's definition](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/TimeZone.html#getTimeZone(java.lang.String)) for valid timezones. See the [grouping guide](/en/querying/grouping#timezone-grouping) for examples. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
selectStringRequests specific multi-level result set statistics and/or hit groups to be returned in the result. Fields you want to retrieve statistics or hit groups for must be stored as document attributes in the index structure by adding attribute to the indexing statement. Default is no grouping. See the grouping guide for examples.
collapsefieldStringComma-separated list of field names, that should only appear uniquely in a result. Hits with values in these fields which are already present in a higher-ranked hit will be filtered out. Read more in result diversity to compare this with other options. Default is no field collapsing.
collapsesizeNumber1The number of hits to keep in each collapsed bucket - used for all collapsefields.
collapsesize.*fieldname*Number1The number of hits to keep in each collapsed bucket - used for the specified field. This value takes precedence over the value specified in {`collapsesize`}.
collapse.summaryStringA valid name of a document summary class. Use this summary class to fetch the fields used for collapsing. Default: Use default summary or attributes.
grouping.defaultMaxGroupsNumber10Positive integer or {`-1`} to disable. The default number of groups to return when max is not specified.
grouping.defaultMaxHitsNumber10Positive integer or {`-1`} to disable. The default number of hits to return when max is not specified.
grouping.globalMaxGroupsNumber10000Positive integer or {`-1`} to disable. A cost limit for grouping queries. Any query that may exceed this threshold will be preemptively failed by the container. The limit is defined as the total number of groups and document summaries a query may produce. A query that does not have an implicit or explicit {`max`} defined for all levels will always fail if limit is enabled. This parameter can only be overridden in a query profile. See the grouping guide for practical examples.
grouping.defaultPrecisionFactorDecimal
number
2.0The default precision scale factor when precision is not specified. The final precision value is calculated by multiplying the effective {`max`} value with the scale factor.
timezoneString{`utc`}Specifies a timezone that will be used to offset all {`time`} related expressions in grouping. See Java's definition for valid timezones. See the grouping guide for examples.
## Streaming Parameters for [streaming search mode](/en/performance/streaming-search). -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| streaming.groupname | | A string | | Sets the group (specified by [g=<groupname>](/en/schemas/documents#id-scheme)) of the documents to stream through. | -| streaming.selection | | A [document selection](/en/reference/writing/document-selector-language) | | Restricts streaming search using a selection expression instead of a group id. If the selection is on the form `id.group == "foo" or id.group == "bar" or id.group == ...` this will only stream documents in those groups, which is efficient for a small number of groups. If any other selection is used, this will stream through *all* groups, which is very costly. | -| streaming.maxbucketspervisitor | | An integer Positive infinity If set, limit backend bucket concurrency to the specified number of buckets. Can be used to explicitly control resource usage for extremely large streaming search locations. This is an expert option. | | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
streaming.groupnameA stringSets the group (specified by g=&lt;groupname&gt;) of the documents to stream through.
streaming.selectionA document selectionRestricts streaming search using a selection expression instead of a group id. If the selection is on the form {`id.group == "foo" or id.group == "bar" or id.group == ...`} this will only stream documents in those groups, which is efficient for a small number of groups. If any other selection is used, this will stream through *all* groups, which is very costly.
streaming.maxbucketspervisitorAn integer Positive infinity If set, limit backend bucket concurrency to the specified number of buckets. Can be used to explicitly control resource usage for extremely large streaming search locations. This is an expert option.
## Tracing Parameters controlling trace information returning with the result for diagnostics. -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| trace.profile | profile | Boolean | false | True to produce a structured trace for performance analysis. Returns a structured trace for performance analysis. This is a shorthand to set various other parameters to the suitable values to generate a performance trace. | -| trace.level | tracelevel | Number | 0 | A positive number. Default is no tracing. Collect trace information for debugging when running a query. Higher numbers give progressively more detail on query transformations, searcher execution and content node(s) query execution. See [query tracing](/en/querying/query-api#query-tracing) for details and examples. Tracing is subject to change at any time, the below is a guide: `Level`: Description `1`: Basic tracing in container `2`: Basic tracing, more details `3`: Basic tracing, even more details `4`: Include timing info from content nodes `5`: Even more timing info from content nodes `6`: Include the query execution plan (blueprint) `7`: Include the query execution tree | -| trace.explainLevel | explainlevel | Number | 0 | Set to a positive number to collect query execution information for debugging when running a query. Higher numbers give progressively more detail on content node query execution. Tuning this parameter is useful if we want to get more information from the content nodes without gathering lots of trace information from the container chain. Explanation is subject to change at any time, the below is a guide: `Level`: Description `1`: Timing and overall query plan (blueprint) from each content node `2`: Timing per search thread and execution tree (search iterator tree) Note that you might get the same at [trace.level](#trace.level) 5 and above. Default is no explanation. Tracing with `trace.explainLevel` also requires that [trace.level](#trace.level) is positive. | -| trace.profileDepth | | Number | 0 | Turns on performance profiling of the content node query execution for [matching](#trace.profiling.matching.depth), [first-phase ranking](#trace.profiling.firstPhaseRanking.depth), and [second-phase ranking](#trace.profiling.secondPhaseRanking.depth). How profiling is performed is based on whether `trace.profileDepth` is positive or negative: `Type`: Description `Tree`: A positive number specifies the depth used by a tree profiler. A higher number means more profiler data. The output resembles the structure of the search iterator tree or rank expression tree being profiled, with total time and self time tracked per component (node in the tree). `Flat`: A negative number specifies the topn (cut-off) used by a flat profiler. The output returns the topn components that use the most self time. The performance profiling output is subject to change at any time. Default is no information. Tracing with `trace.profileDepth` also requires that [trace.level](#trace.level) is positive. | -| trace.profiling.matching.depth | | Number | 0 | Turns on profiling of [matching](/en/performance/sizing-search#life-of-a-query-in-vespa) of the content node query execution. This exposes information about how time spent on matching is distributed between individual search iterators. The profiling output is tagged *match_profiling* and is subject to change at any time. Default is no information. See [trace.profileDepth](#trace.profiledepth) for semantics of this parameter. Tracing with `trace.profiling.matching.depth` requires that [trace.level](#trace.level) is positive. | -| trace.profiling.firstPhaseRanking.depth | | Number | 0 | Turns on profiling of the [first-phase ranking](/en/basics/ranking) of the content node query execution. This exposes information about how time spent on first-phase ranking is distributed between individual [rank features](/en/reference/ranking/rank-features). The profiling output is tagged *first_phase_profiling* and is subject to change at any time. Default is no information. See [trace.profileDepth](#trace.profiledepth) for semantics of this parameter. Tracing with `trace.profiling.firstPhaseRanking.depth` also requires that [trace.level](#trace.level) is positive. | -| trace.profiling.secondPhaseRanking.depth | | Number | 0 | Turns on profiling of the [second-phase ranking](/en/basics/ranking) of the content node query execution. This exposes information about how time spent on second-phase ranking is distributed between individual [rank features](/en/reference/ranking/rank-features). The profiling output is tagged *second_phase_profiling* and is subject to change at any time. Default is no information. See [trace.profileDepth](#trace.profiledepth) for semantics of this parameter. Tracing with `trace.profiling.secondPhaseRanking.depth` also requires that [trace.level](#trace.level) is positive. | -| trace.timestamps | | Boolean | false | Enable to get timing information already at [trace.level=1](#trace.level). This is useful for debugging latency spent at different components in the container search chain without rendering a lot of string data which is associated with higher trace levels. | -| trace.query | | Boolean | true | Whether to include the query in any trace messages. This is useful for avoiding query serialization with very large queries to avoid impact from it on performance and excessively large traces. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
trace.profileprofileBooleanfalseTrue to produce a structured trace for performance analysis. Returns a structured trace for performance analysis. This is a shorthand to set various other parameters to the suitable values to generate a performance trace.
trace.leveltracelevelNumber0A positive number. Default is no tracing. Collect trace information for debugging when running a query. Higher numbers give progressively more detail on query transformations, searcher execution and content node(s) query execution. See query tracing for details and examples. Tracing is subject to change at any time, the below is a guide: {`Level`}: Description {`1`}: Basic tracing in container {`2`}: Basic tracing, more details {`3`}: Basic tracing, even more details {`4`}: Include timing info from content nodes {`5`}: Even more timing info from content nodes {`6`}: Include the query execution plan (blueprint) {`7`}: Include the query execution tree
trace.explainLevelexplainlevelNumber0Set to a positive number to collect query execution information for debugging when running a query. Higher numbers give progressively more detail on content node query execution. Tuning this parameter is useful if we want to get more information from the content nodes without gathering lots of trace information from the container chain. Explanation is subject to change at any time, the below is a guide: {`Level`}: Description {`1`}: Timing and overall query plan (blueprint) from each content node {`2`}: Timing per search thread and execution tree (search iterator tree) Note that you might get the same at trace.level 5 and above. Default is no explanation. Tracing with {`trace.explainLevel`} also requires that trace.level is positive.
trace.profileDepthNumber0Turns on performance profiling of the content node query execution for matching, first-phase ranking, and second-phase ranking. How profiling is performed is based on whether {`trace.profileDepth`} is positive or negative: {`Type`}: Description {`Tree`}: A positive number specifies the depth used by a tree profiler. A higher number means more profiler data. The output resembles the structure of the search iterator tree or rank expression tree being profiled, with total time and self time tracked per component (node in the tree). {`Flat`}: A negative number specifies the topn (cut-off) used by a flat profiler. The output returns the topn components that use the most self time. The performance profiling output is subject to change at any time. Default is no information. Tracing with {`trace.profileDepth`} also requires that trace.level is positive.
trace.profiling.matching.depthNumber0Turns on profiling of matching of the content node query execution. This exposes information about how time spent on matching is distributed between individual search iterators. The profiling output is tagged *match_profiling* and is subject to change at any time. Default is no information. See trace.profileDepth for semantics of this parameter. Tracing with {`trace.profiling.matching.depth`} requires that trace.level is positive.
trace.profiling.firstPhaseRanking.depthNumber0Turns on profiling of the first-phase ranking of the content node query execution. This exposes information about how time spent on first-phase ranking is distributed between individual rank features. The profiling output is tagged *first_phase_profiling* and is subject to change at any time. Default is no information. See trace.profileDepth for semantics of this parameter. Tracing with {`trace.profiling.firstPhaseRanking.depth`} also requires that trace.level is positive.
trace.profiling.secondPhaseRanking.depthNumber0Turns on profiling of the second-phase ranking of the content node query execution. This exposes information about how time spent on second-phase ranking is distributed between individual rank features. The profiling output is tagged *second_phase_profiling* and is subject to change at any time. Default is no information. See trace.profileDepth for semantics of this parameter. Tracing with {`trace.profiling.secondPhaseRanking.depth`} also requires that trace.level is positive.
trace.timestampsBooleanfalseEnable to get timing information already at trace.level=1. This is useful for debugging latency spent at different components in the container search chain without rendering a lot of string data which is associated with higher trace levels.
trace.queryBooleantrueWhether to include the query in any trace messages. This is useful for avoiding query serialization with very large queries to avoid impact from it on performance and excessively large traces.
## Semantic Rules Refer to [semantic rules](/en/reference/querying/semantic-rules). -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| rules.off | | Boolean | true | Turn rule evaluation off for this query. | -| rules.rulebase | | String | | A rule base name - the name of the rule base to use for these queries. | -| tracelevel.rules | | Number | | The amount of rule evaluation trace output to show, higher number means more details. This is useful to see a trace from rule evaluation without having to see trace from all other searchers at the same time. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
rules.offBooleantrueTurn rule evaluation off for this query.
rules.rulebaseStringA rule base name - the name of the rule base to use for these queries.
tracelevel.rulesNumberThe amount of rule evaluation trace output to show, higher number means more details. This is useful to see a trace from rule evaluation without having to see trace from all other searchers at the same time.
## Other -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| recall | | String | | Any allowed collection of recall terms. Sets a recall parameter to be combined with the query. This is identical to [filter](#model.filter), except that recall terms are not exposed to the ranking framework and thus not ranked. As such, one can not use unprefixed terms; they must either be positive or negative. | -| user | | String | | The id of the user making the query. The content of the argument is made available to the search chain, but it triggers no features in Vespa apart from being propagated to the access log. | -| hitcountestimate | | Boolean | false | Make this an estimation query. No hits will be returned, and total hit count will be set to an estimate of what executing the query as a normal query would give. | -| metrics.ignore | | Boolean | false | Ignore metric collection for this query request, useful for [warm-up queries](/en/performance/container-tuning#container-warmup). | -| weakAnd.replace | | Boolean | false | Replace all instances of OR in the query tree with weakAnd. | -| wand.hits | | Number | 100 | Used in combination with [weakAnd.replace](#weakand.replace). Sets the targetHits of the new weakAnds to the specified value. | -| sorting.degrading | | Boolean | true | When sorting on a [single-value numeric attribute with fast-search](/en/content/attributes) an optimization is activated to return early, with an inaccurate total-hits count. Set `sorting.degrading` to false to disable this optimization. This optimization sets the primary sorting attribute as the [match phase attribute](#ranking.matchphase.attribute), and [match phase maxHits](#ranking.matchphase.maxhits) equal to `max(10000, maxHits+maxOffset)`. [maxHits](#hits) and [maxOffset](#offset) can be set in a query profile. | -| noCache | nocache | Boolean | false | Sets whether this query should never be served from a cache. Vespa has [few caches](/en/performance/caches-in-vespa), and this parameter does not control any of them. Therefore, this parameter has no effect | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
recallStringAny allowed collection of recall terms. Sets a recall parameter to be combined with the query. This is identical to filter, except that recall terms are not exposed to the ranking framework and thus not ranked. As such, one can not use unprefixed terms; they must either be positive or negative.
userStringThe id of the user making the query. The content of the argument is made available to the search chain, but it triggers no features in Vespa apart from being propagated to the access log.
hitcountestimateBooleanfalseMake this an estimation query. No hits will be returned, and total hit count will be set to an estimate of what executing the query as a normal query would give.
metrics.ignoreBooleanfalseIgnore metric collection for this query request, useful for warm-up queries.
weakAnd.replaceBooleanfalseReplace all instances of OR in the query tree with weakAnd.
wand.hitsNumber100Used in combination with weakAnd.replace. Sets the targetHits of the new weakAnds to the specified value.
sorting.degradingBooleantrueWhen sorting on a single-value numeric attribute with fast-search an optimization is activated to return early, with an inaccurate total-hits count. Set {`sorting.degrading`} to false to disable this optimization. This optimization sets the primary sorting attribute as the match phase attribute, and match phase maxHits equal to {`max(10000, maxHits+maxOffset)`}. maxHits and maxOffset can be set in a query profile.
noCachenocacheBooleanfalseSets whether this query should never be served from a cache. Vespa has few caches, and this parameter does not control any of them. Therefore, this parameter has no effect
## HTTP status codes @@ -347,41 +1102,146 @@ The following rules determine which HTTP status code is returned: *List of possible HTTP status codes and their descriptions.* -| Code | Description | -| :--- | :--- | -| 200 | OK | -| 400 | Bad Request | -| 401 | Unauthorized | -| 403 | Forbidden | -| 404 | Not Found | -| 405 | Method Not Allowed | -| 408 | Request Timeout | -| 428 | Precondition Required | -| 431 | Request Header Fields Too Large | -| 500 | Internal Server Error | -| 502 | Bad Gateway | -| 503 | Service Unavailable; no available search handler threads in the jdisc container to serve the request. See [Container Tuning](/en/performance/container-tuning#container-worker-threads) on sizing thread pools. | -| 504 | Gateway Timeout | -| 507 | Insufficient Storage | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeDescription
200OK
400Bad Request
401Unauthorized
403Forbidden
404Not Found
405Method Not Allowed
408Request Timeout
428Precondition Required
431Request Header Fields Too Large
500Internal Server Error
502Bad Gateway
503Service Unavailable; no available search handler threads in the jdisc container to serve the request. See Container Tuning on sizing thread pools.
504Gateway Timeout
507Insufficient Storage
Mapping of internal error codes to HTTP status codes. -| Error Code | HTTP Code | -| :--- | :--- | -| com.yahoo.container.protect.Error.BAD_REQUEST | 400 | -| com.yahoo.container.protect.Error.UNAUTHORIZED | 401 | -| com.yahoo.container.protect.Error.FORBIDDEN | 403 | -| com.yahoo.container.protect.Error.NOT_FOUND | 404 | -| com.yahoo.container.protect.Error.INTERNAL_SERVER_ERROR | 500 | -| com.yahoo.container.protect.Error.INSUFFICIENT_STORAGE | 507 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Error CodeHTTP Code
com.yahoo.container.protect.Error.BAD_REQUEST400
com.yahoo.container.protect.Error.UNAUTHORIZED401
com.yahoo.container.protect.Error.FORBIDDEN403
com.yahoo.container.protect.Error.NOT_FOUND404
com.yahoo.container.protect.Error.INTERNAL_SERVER_ERROR500
com.yahoo.container.protect.Error.INSUFFICIENT_STORAGE507
## select A `select` query is equivalent in structure to YQL, written in JSON. Contains subparameters `where`, `grouping` and `fields`. -| Parameter | Alias | Type | Default | Description | -| :--- | :--- | :--- | :--- | :--- | -| where | | String | | A string with JSON. Refer to the [select reference](/en/reference/querying/json-query-language) for details. | -| grouping | | String | | A string with JSON. Refer to the [select reference](/en/reference/querying/json-query-language) for details. | -| fields | | String | | A JSON array of [summary field](/en/querying/document-summaries#selecting-summary-fields-in-yql) names to include in each hit. Equivalent to the field list in a YQL `select` clause. Refer to the [select reference](/en/reference/querying/json-query-language) for details. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterAliasTypeDefaultDescription
whereStringA string with JSON. Refer to the select reference for details.
groupingStringA string with JSON. Refer to the select reference for details.
fieldsStringA JSON array of summary field names to include in each hit. Equivalent to the field list in a YQL {`select`} clause. Refer to the select reference for details.
diff --git a/mintlify-docs/en/reference/api/state-v1.mdx b/mintlify-docs/en/reference/api/state-v1.mdx index 6546b046e2..7eea28bc7c 100644 --- a/mintlify-docs/en/reference/api/state-v1.mdx +++ b/mintlify-docs/en/reference/api/state-v1.mdx @@ -2,39 +2,202 @@ title: "/state/v1 API reference" description: "/state/v1 API reference in Vespa applications." --- -| HTTP request | state/v1 operation | Description | -| :--- | :--- | :--- | -| GET | | | -| | Service config generation | `/state/v1/config` In the response, [config](#config) has a mandatory [generation](#generation) and one or more \ elements: sentinel container distributor logd slobroks servicelayer proton Note: Other configuration elements can also be added as a service. A \ has a mandatory [generation](#generation). An optional [message](#message) can be returned. Example: ```{ "config": {"generation": 11, "slobroks": {"generation": 11, "message": "ok"}}}``` | -| | Service version | `/state/v1/version` Returns a mandatory service [version](#version). Example: ```{ "version": "8.43.64"}``` | -| | Service health | `/state/v1/health` Returns the service status, with [time](#time), [status](#status) and [metrics](#metrics). Metrics contains `requestsPerSecond` and `latencySeconds`, see [StateHandler](https://github.com/vespa-engine/vespa/blob/master/container-disc/src/main/java/com/yahoo/container/jdisc/state/StateHandler.java). Example: `{` `"time": 1661863544346,` `"status": {` `"code": "up"` `},` `"metrics": {` `"snapshot": {` `"from": 1661863483.422,` `"to": 1661863543.38` `},` `"values": [` `{` `"name": "requestsPerSecond",` `"values": {` `"count": 30,` `"rate": 0.5` `}` `},` `{` `"name": "latencySeconds",` `"values": {` `"average": 0.001,` `"sum": 0,` `"count": 0,` `"last": 0.001,` `"max": 0.001,` `"min": 0.001,` `"rate": 0` `}` `}` `]` `}` `}` | -| | Service metrics | `/state/v1/metrics` Same as `/state/v1/health`, but with a full metrics set. A metric has a [name](#name) and [values](#values), and can have a [description](#description) and a set of [dimensions](#dimensions): `{` `"name": "content.proton.documentdb.matching.rank_profile.query_setup_time",` `"description": "Average time (sec) spent setting up and tearing down queries",` `"values": {` `"average": 0,` `"sum": 0,` `"count": 0,` `"rate": 0,` `"min": 0,` `"max": 0,` `"last": 0` `},` `"dimensions": {` `"documenttype": "music",` `"rankProfile": "default"` `}` `}` | -| | Service metric histograms | `/state/v1/metrics/histograms` See [histograms](/en/operations/self-managed/monitoring#histograms) for usage. The histograms are implemented using [HdrHistogram](http://hdrhistogram.org/), and the CSV result is what that library generates. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HTTP requeststate/v1 operationDescription
GET
Service config generation{`/state/v1/config`} In the response, config has a mandatory generation and one or more <service> elements: sentinel container distributor logd slobroks servicelayer proton Note: Other configuration elements can also be added as a service. A <service> has a mandatory generation. An optional message can be returned. Example: {``}{`{ "config": {"generation": 11, "slobroks": {"generation": 11, "message": "ok"}}}`}{``}
Service version{`/state/v1/version`} Returns a mandatory service version. Example: {``}{`{ "version": "8.43.64"}`}{``}
Service health{`/state/v1/health`} Returns the service status, with time, status and metrics. Metrics contains {`requestsPerSecond`} and {`latencySeconds`}, see StateHandler. Example: {`{`} {`"time": 1661863544346,`} {`"status": {`} {`"code": "up"`} {`},`} {`"metrics": {`} {`"snapshot": {`} {`"from": 1661863483.422,`} {`"to": 1661863543.38`} {`},`} {`"values": [`} {`{`} {`"name": "requestsPerSecond",`} {`"values": {`} {`"count": 30,`} {`"rate": 0.5`} {`}`} {`},`} {`{`} {`"name": "latencySeconds",`} {`"values": {`} {`"average": 0.001,`} {`"sum": 0,`} {`"count": 0,`} {`"last": 0.001,`} {`"max": 0.001,`} {`"min": 0.001,`} {`"rate": 0`} {`}`} {`}`} {`]`} {`}`} {`}`}
Service metrics{`/state/v1/metrics`} Same as {`/state/v1/health`}, but with a full metrics set. A metric has a name and values, and can have a description and a set of dimensions: {`{`} {`"name": "content.proton.documentdb.matching.rank_profile.query_setup_time",`} {`"description": "Average time (sec) spent setting up and tearing down queries",`} {`"values": {`} {`"average": 0,`} {`"sum": 0,`} {`"count": 0,`} {`"rate": 0,`} {`"min": 0,`} {`"max": 0,`} {`"last": 0`} {`},`} {`"dimensions": {`} {`"documenttype": "music",`} {`"rankProfile": "default"`} {`}`} {`}`}
Service metric histograms{`/state/v1/metrics/histograms`} See histograms for usage. The histograms are implemented using HdrHistogram, and the CSV result is what that library generates.
-| Element | Parent | Type | Description | -| :--- | :--- | :--- | :--- | -| config | | Object | Root element for /state/v1/config. | -| generation | config | Number | The generation number is the number for the config that is active in the application. | -| message | config | String | An info or error message. | -| version | | String | Vespa version. | -| time | | Number | Epoch in microseconds. | -| status | | Object | | -| code | status | String | Service status code - one of: up down initializing Containers with the [query API](/en/querying/query-api) enabled return `initializing` while waiting for content nodes to start, see [example](https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA). `up` means that the service is fully up. Assume status `down` if no response. Refer to [StateMonitor](https://github.com/vespa-engine/vespa/blob/master/container-disc/src/main/java/com/yahoo/container/jdisc/state/StateMonitor.java) for implementation. | -| message | status | String | Message is optional - it is normally empty if the service is up, while it is set to a textual reason for why it is unavailable, if so. | -| metrics | | Object | Snapshot of metric values. | -| snapshot | metrics | Object | Time period for metrics snapshot. | -| from | snapshot | Number | Epoch in seconds, with microseconds fraction. | -| to | snapshot | Number | Epoch in seconds, with microseconds fraction. | -| values | metrics | Array | Array of metric objects. | -| name | values | String | Metric name. | -| description | values | String | Textual description of the metric. | -| dimensions | values | Object | Set of dimension name/value pairs. | -| values | values | Object | Set of metric values. | -| average | values | Number | Average metric value, typically *sum* divided by *count* . | -| sum | values | Number | Sum of metric values in snapshot. | -| count | values | Number | Number of times metric has been set. For instance in a metric counting number of operations done, it will give the number of operations added for that snapshot period. For a value metric, for instance latency of operations, the count will give how many times latencies have been added to the metric. | -| last | values | Number | Last metric value. | -| max | values | Number | Max metric value in snapshot. | -| min | values | Number | Min metric value in snapshot. | -| rate | values | Number | Metric rate: *count* divided by *snapshot interval* . | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementParentTypeDescription
configObjectRoot element for /state/v1/config.
generationconfigNumberThe generation number is the number for the config that is active in the application.
messageconfigStringAn info or error message.
versionStringVespa version.
timeNumberEpoch in microseconds.
statusObject
codestatusStringService status code - one of: up down initializing Containers with the query API enabled return {`initializing`} while waiting for content nodes to start, see example. {`up`} means that the service is fully up. Assume status {`down`} if no response. Refer to StateMonitor for implementation.
messagestatusStringMessage is optional - it is normally empty if the service is up, while it is set to a textual reason for why it is unavailable, if so.
metricsObjectSnapshot of metric values.
snapshotmetricsObjectTime period for metrics snapshot.
fromsnapshotNumberEpoch in seconds, with microseconds fraction.
tosnapshotNumberEpoch in seconds, with microseconds fraction.
valuesmetricsArrayArray of metric objects.
namevaluesStringMetric name.
descriptionvaluesStringTextual description of the metric.
dimensionsvaluesObjectSet of dimension name/value pairs.
valuesvaluesObjectSet of metric values.
averagevaluesNumberAverage metric value, typically *sum* divided by *count* .
sumvaluesNumberSum of metric values in snapshot.
countvaluesNumberNumber of times metric has been set. For instance in a metric counting number of operations done, it will give the number of operations added for that snapshot period. For a value metric, for instance latency of operations, the count will give how many times latencies have been added to the metric.
lastvaluesNumberLast metric value.
maxvaluesNumberMax metric value in snapshot.
minvaluesNumberMin metric value in snapshot.
ratevaluesNumberMetric rate: *count* divided by *snapshot interval* .
diff --git a/mintlify-docs/en/reference/applications/application-packages.mdx b/mintlify-docs/en/reference/applications/application-packages.mdx index 3d781ce0b6..088fc9960e 100644 --- a/mintlify-docs/en/reference/applications/application-packages.mdx +++ b/mintlify-docs/en/reference/applications/application-packages.mdx @@ -5,34 +5,123 @@ sidebarTitle: "Application packages" This is the [application package](/en/basics/applications) reference. An application package is the deployment unit in Vespa. To deploy an application, create an application package and [vespa deploy](/en/clients/vespa-cli#deployment) or use the [deploy API](/en/reference/api/deploy-v2). The application package is a directory of files and subdirectories: -| Directory/file | Required | Description | -| --- | --- | --- | -| [services.xml](/en/reference/applications/services/services) | Yes | Describes which services to run where, and their main configuration. | -| [hosts.xml](/en/reference/applications/hosts) | No | Vespa Cloud: Not used. See node counts in [services.xml](/en/reference/applications/services/services).

Self-managed: The mapping from logical nodes to actual hosts. | -| [deployment.xml](/en/reference/applications/deployment) | Yes, for Vespa Cloud | Specifies which environments and regions the application is deployed to during automated application deployment, as which application instances.

This file also specifies other deployment-related configurations like [cloud accounts](/en/operations/enclave/enclave) and [private endpoints](/en/operations/private-endpoints).

The file is required when deploying to the [prod environment](/en/operations/environments#prod) - it is ignored (with some exceptions) when deploying to the *dev* environment. | -| [validation-overrides.xml](/en/reference/applications/validation-overrides) | No | Override, allowing this package to deploy even if it fails validation. | -| [.vespaignore](/en/applications/vespaignore) | No | Contains a list of path patterns that should be excluded from the `application.zip` deployed to Vespa. | -| [models](/en/reference/ranking/model-files)/ | No | Machine-learned models in the application package. Refer to [stateless model evaluation](/en/ranking/stateless-model-evaluation), [Tensorflow](/en/ranking/tensorflow), [Onnx](/en/ranking/onnx), [XGBoost](/en/ranking/xgboost), and [LightGBM](/en/ranking/lightgbm). | -| [schemas](/en/basics/schemas)/ | No | Contains the \*.sd files describing the document types of the application and how they should be queried and processed. | -| [schemas/\[schema\]](/en/reference/schemas/schemas#rank-profile)/ | No | Contains \*.profile files defining [rank profiles](/en/basics/ranking#rank-profiles). This is an alternative to defining rank profiles inside the schema. | -| [security/clients.pem](/en/security/guide) | Yes, for Vespa Cloud | PEM encoded X.509 certificates for data plane access. See the [security guide](/en/security/guide) for how to generate and use. | -| [components](/en/applications/components)/ | No | Contains \*.jar files containing searcher(s) for the JDisc Container. | -| [rules](/en/reference/querying/semantic-rules)/ | No | Contains \*.sr files containing rule bases for semantic recognition and translation of the query | -| [search/query-profiles](/en/reference/querying/query-profiles)/ | No | Contains \*.xml files containing a named set of search request parameters with values | -| [constants](/en/ranking/tensor-user-guide#constant-tensors)/ | No | Constant tensors | -| [tests](/en/reference/applications/testing)/ | No | Test files for automated tests | -| ext/ | No | Files that are guaranteed to be ignored by Vespa: They are excluded when processing the application package and cannot be referenced from any other element in it. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Directory/fileRequiredDescription
services.xmlYesDescribes which services to run where, and their main configuration.
hosts.xmlNoVespa Cloud: Not used. See node counts in services.xml.

Self-managed: The mapping from logical nodes to actual hosts.
deployment.xmlYes, for Vespa CloudSpecifies which environments and regions the application is deployed to during automated application deployment, as which application instances.

This file also specifies other deployment-related configurations like cloud accounts and private endpoints.

The file is required when deploying to the prod environment - it is ignored (with some exceptions) when deploying to the *dev* environment.
validation-overrides.xmlNoOverride, allowing this package to deploy even if it fails validation.
.vespaignoreNoContains a list of path patterns that should be excluded from the {`application.zip`} deployed to Vespa.
models/NoMachine-learned models in the application package. Refer to stateless model evaluation, Tensorflow, Onnx, XGBoost, and LightGBM.
schemas/NoContains the *.sd files describing the document types of the application and how they should be queried and processed.
schemas/[schema]/NoContains *.profile files defining rank profiles. This is an alternative to defining rank profiles inside the schema.
security/clients.pemYes, for Vespa CloudPEM encoded X.509 certificates for data plane access. See the security guide for how to generate and use.
components/NoContains *.jar files containing searcher(s) for the JDisc Container.
rules/NoContains *.sr files containing rule bases for semantic recognition and translation of the query
search/query-profiles/NoContains *.xml files containing a named set of search request parameters with values
constants/NoConstant tensors
tests/NoTest files for automated tests
ext/NoFiles that are guaranteed to be ignored by Vespa: They are excluded when processing the application package and cannot be referenced from any other element in it.
Additional files and directories can be placed anywhere in the application package. These will be not be processed explicitly by Vespa when deploying the application package (i.e. they will only be considered if they are referred to from within the application package), but there is no guarantee to how these might be processed in a future release. To extend the application package in a way that is guaranteed to be ignored by Vespa in all future releases, use the *ext/* directory. ## Deploy -| Command | Description | -| --- | --- | -| **upload** | Uploads an application package to the config server. Normally not used, as *prepare* includes *upload* | -| **prepare** | 1. Verifies that a configuration server is up and running

2. Uploads the application to the configuration server, which stores it in *`$VESPA_HOME/var/db/vespa/config_server/serverdb/tenants/default/sessions/[sessionid]`*. *\[sessionid\]* increases for each *prepare*\-call. The config server also stores the application in a [ZooKeeper](/en/operations/self-managed/configuration-server.html) instance at */config/v2/tenants/default/sessions/\[sessionid\]* - this distributes the application to all config servers

3. Creates metadata about the deployed the applications package (which user deployed it, which directory was it deployed from and at what time was it deployed) and stores it in *...sessions/\[sessionid\]/.applicationMetaData*

4. Verifies that the application package contains the required files and performs a consistency check

5. Validates the xml config files using the [schema](https://github.com/vespa-engine/vespa/tree/master/config-model/src/main/resources/schema), found in *`$VESPA_HOME/share/vespa/schema`*

6. Checks if there are config changes between the active application and this prepared application that require actions like restart or re-feed (like changes to [schemas](/en/basics/schemas)). These actions are returned as part of the prepare step in the [deployment API](/en/reference/api/deploy-v2#prepare-session).
This prevents breaking changes to production - also read about [validation overrides](/en/reference/applications/validation-overrides)

7. Distributes constant tensors and bundles with [components](/en/applications/components) to nodes using [file distribution](/en/applications/deployment#file-distribution). Files are downloaded to *`$VESPA_HOME/var/db/vespa/filedistribution`*, URL download starts downloading to *`$VESPA_HOME/var/db/vespa/download`* | -| **activate** | 1. Waits for prepare to complete

2. Activates new configuration version

3. Signals to containers to load new bundles - read more in [container components](/en/applications/components) | -| **fetch** | Use *fetch* to download the active application package | + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandDescription
**upload**Uploads an application package to the config server. Normally not used, as *prepare* includes *upload*
**prepare**1. Verifies that a configuration server is up and running

2. Uploads the application to the configuration server, which stores it in *{`$VESPA_HOME/var/db/vespa/config_server/serverdb/tenants/default/sessions/[sessionid]`}*. *[sessionid]* increases for each *prepare*-call. The config server also stores the application in a ZooKeeper instance at */config/v2/tenants/default/sessions/[sessionid]* - this distributes the application to all config servers

3. Creates metadata about the deployed the applications package (which user deployed it, which directory was it deployed from and at what time was it deployed) and stores it in *...sessions/[sessionid]/.applicationMetaData*

4. Verifies that the application package contains the required files and performs a consistency check

5. Validates the xml config files using the schema, found in *{`$VESPA_HOME/share/vespa/schema`}*

6. Checks if there are config changes between the active application and this prepared application that require actions like restart or re-feed (like changes to schemas). These actions are returned as part of the prepare step in the deployment API.
This prevents breaking changes to production - also read about validation overrides

7. Distributes constant tensors and bundles with components to nodes using file distribution. Files are downloaded to *{`$VESPA_HOME/var/db/vespa/filedistribution`}*, URL download starts downloading to *{`$VESPA_HOME/var/db/vespa/download`}*
**activate**1. Waits for prepare to complete

2. Activates new configuration version

3. Signals to containers to load new bundles - read more in container components
**fetch**Use *fetch* to download the active application package
An application package can be zipped for deployment: diff --git a/mintlify-docs/en/reference/applications/components.mdx b/mintlify-docs/en/reference/applications/components.mdx index c5160b3ac7..5710301f80 100644 --- a/mintlify-docs/en/reference/applications/components.mdx +++ b/mintlify-docs/en/reference/applications/components.mdx @@ -18,16 +18,48 @@ See the [example](/en/operations/metrics#example-qa) for common questions about Vespa defined various component types (superclasses) for common tasks: -| Component type | Description | -| --- | --- | -| **Request handler** | [Request handlers](/en/applications/request-handlers) allow applications to implement arbitrary HTTP APIs. A request handler accepts a request and returns a response. Custom request handlers are subclasses of [ThreadedHttpRequestHandler](https://javadoc.io/doc/com.yahoo.vespa/container-disc/latest/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.html). | -| **Processor** | The [processing framework](/en/applications/processing) can be used to create general composable synchronous request-response systems. Searchers and search chains are an instantiation (through subclasses) of this general framework for a specific domain. Processors are invoked synchronously and the response is a tree of arbitrary data elements. Custom output formats can be defined by adding [renderers](#renderers). | -| **Renderer** | Renderers convert a Response (or query Result) into a serialized form sent over the network. Renderers are subclasses of [com.yahoo.processing.rendering.Renderer](https://github.com/vespa-engine/vespa/blob/master/container-disc/src/main/java/com/yahoo/processing/rendering/Renderer.java). | -| **Searcher** | Searchers processes Queries and their Results. Since they are synchronous, they can issue multiple queries serially or in parallel to e.g. implement federation or decorate queries with information fetched from a content cluster. Searchers are composed into *search chains* defined in services.xml. A query request selects a particular search chain which implements the logic of that query. [Read more](/en/applications/searchers). | -| **Document processor** | Document processors processes incoming document operations. Similar to Searchers and Processors they can be composed in chains, but document processors are asynchronous. [Read more](/en/applications/document-processors). | -| **Binding** | A binding matches a request URI to the correct [filter chain](#filter) or [request handler](#request-handlers), and route outgoing requests to the correct [client](#client). For instance, the binding *http://\*/\** would match any HTTP request, while *http://\*/processing* would only match that specific path. If several bindings match, the most specific one is chosen.

**Server binding**
A server binding is a rule for matching incoming requests to the correct request handler, basically the JDisc building block for implementing RESTful APIs.

**Client binding**
A client binding is a pattern which is used to match requests originating inside the container, e.g. when doing federation, to a client provider. That is, it is a rule which determines what code should handle a given outgoing request. \| | -| **Filter** | A filter is a lightweight request checker. It may set some specific request property, or it may do security checking and simply block requests missing some mandatory property or header. | -| **Client** | Clients, or client providers, are implementations of clients for different protocols, or special rules for given protocols. When a JDisc application acts as a client, e.g. fetches a web page from another host, it is a client provider that handles the transaction. Bindings are used, as with request handlers and filters, to choose the correct client, matching protocol, server, etc., and then hands off the request to the client provider. There is no problem in using arbitrary other types of clients for external services in processors and request handlers. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Component typeDescription
**Request handler**Request handlers allow applications to implement arbitrary HTTP APIs. A request handler accepts a request and returns a response. Custom request handlers are subclasses of ThreadedHttpRequestHandler.
**Processor**The processing framework can be used to create general composable synchronous request-response systems. Searchers and search chains are an instantiation (through subclasses) of this general framework for a specific domain. Processors are invoked synchronously and the response is a tree of arbitrary data elements. Custom output formats can be defined by adding renderers.
**Renderer**Renderers convert a Response (or query Result) into a serialized form sent over the network. Renderers are subclasses of com.yahoo.processing.rendering.Renderer.
**Searcher**Searchers processes Queries and their Results. Since they are synchronous, they can issue multiple queries serially or in parallel to e.g. implement federation or decorate queries with information fetched from a content cluster. Searchers are composed into *search chains* defined in services.xml. A query request selects a particular search chain which implements the logic of that query. Read more.
**Document processor**Document processors processes incoming document operations. Similar to Searchers and Processors they can be composed in chains, but document processors are asynchronous. Read more.
**Binding**A binding matches a request URI to the correct filter chain or request handler, and route outgoing requests to the correct client. For instance, the binding *http://*/** would match any HTTP request, while *http://*/processing* would only match that specific path. If several bindings match, the most specific one is chosen.

**Server binding**
A server binding is a rule for matching incoming requests to the correct request handler, basically the JDisc building block for implementing RESTful APIs.

**Client binding**
A client binding is a pattern which is used to match requests originating inside the container, e.g. when doing federation, to a client provider. That is, it is a rule which determines what code should handle a given outgoing request. |
**Filter**A filter is a lightweight request checker. It may set some specific request property, or it may do security checking and simply block requests missing some mandatory property or header.
**Client**Clients, or client providers, are implementations of clients for different protocols, or special rules for given protocols. When a JDisc application acts as a client, e.g. fetches a web page from another host, it is a client provider that handles the transaction. Bindings are used, as with request handlers and filters, to choose the correct client, matching protocol, server, etc., and then hands off the request to the client provider. There is no problem in using arbitrary other types of clients for external services in processors and request handlers.
## Component configurations @@ -51,28 +83,96 @@ If building an application with custom HTTP APIs, for instance arbitrary REST AP These components are available from Vespa for [injection](/en/applications/dependency-injection) into applications in various contexts: -| Component | Description | -|---|---| -| **Always available** | | -| [AthenzIdentityProvider](https://github.com/vespa-engine/vespa/blob/master/container-disc/src/main/java/com/yahoo/container/jdisc/athenz/AthenzIdentityProvider.java) | Provides the application's Athenz-identity and gives access to identity/role certificate and tokens. | -| [BertBaseEmbedder](https://github.com/vespa-engine/vespa/blob/master/model-integration/src/main/java/ai/vespa/embedding/BertBaseEmbedder.java) | A BERT-Base compatible embedder, see [BertBase embedder](/en/rag/embedding#bert-embedder). | -| [ConfigInstance](https://github.com/vespa-engine/vespa/blob/master/config-lib/src/main/java/com/yahoo/config/ConfigInstance.java) | Configuration is injected into components as `ConfigInstance` components - see [configuring components](/en/applications/configuring-components). | -| [Executor](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executor.html) | Default threadpool for processing requests in threaded request handler | -| [Linguistics](https://github.com/vespa-engine/vespa/blob/master/linguistics/src/main/java/com/yahoo/language/Linguistics.java) | Inject a Linguistics component like [SimpleLinguistics](https://github.com/vespa-engine/vespa/blob/master/linguistics/src/main/java/com/yahoo/language/simple/SimpleLinguistics.java) or provide a custom implementation - see [linguistics](/en/linguistics/linguistics). | -| [Metric](https://github.com/vespa-engine/vespa/blob/master/jdisc_core/src/main/java/com/yahoo/jdisc/Metric.java) | Jdisc core interface for metrics. Required by all subclasses of ThreadedRequestHandler. | -| [MetricReceiver](https://github.com/vespa-engine/vespa/blob/master/container-disc/src/main/java/com/yahoo/metrics/simple/MetricReceiver.java) | Use to emit metrics from a component. Find an example in the [metrics](/en/operations/metrics#metrics-from-custom-components) guide. | -| [ModelsEvaluator](https://github.com/vespa-engine/vespa/blob/master/model-evaluation/src/main/java/ai/vespa/models/evaluation/ModelsEvaluator.java) | Evaluates machine-learned models added to Vespa applications and available as config form. | -| [SentencePieceEmbedder](https://github.com/vespa-engine/vespa/blob/master/linguistics-components/src/main/java/com/yahoo/language/sentencepiece/SentencePieceEmbedder.java) | A native Java implementation of SentencePiece, see [SentencePiece embedder](/en/reference/rag/embedding#sentencepiece-embedder). | -| [VespaCurator](https://github.com/vespa-engine/vespa/blob/master/zkfacade/src/main/java/com/yahoo/vespa/curator/api/VespaCurator.java) | A client for ZooKeeper. For use in container clusters that have ZooKeeper enabled. See [using ZooKeeper](/en/applications/using-zookeeper). | -| [VipStatus](https://github.com/vespa-engine/vespa/blob/master/container-disc/src/main/java/com/yahoo/container/handler/VipStatus.java) | Use this to gain control over the service status (up/down) to be emitted from this container. | -| [WordPieceEmbedder](https://github.com/vespa-engine/vespa/blob/master/linguistics-components/src/main/java/com/yahoo/language/wordpiece/WordPieceEmbedder.java) | An implementation of the WordPiece embedder, usually used with BERT models. Refer to [WordPiece embedder](/en/reference/rag/embedding#wordpiece-embedder). | -| [SystemInfo](https://github.com/vespa-engine/vespa/blob/master/hosted-zone-api/src/main/java/ai/vespa/cloud/SystemInfo.java) | Vespa Cloud: Provides information about the environment the component is running in. [Read more](/en/applications/components#the-systeminfo-injectable-component). | -| **Available in containers having `search`** | | -| [DocumentAccess](https://github.com/vespa-engine/vespa/blob/master/documentapi/src/main/java/com/yahoo/documentapi/DocumentAccess.java) | To use the [Document API](/en/writing/document-api-guide). | -| [ExecutionFactory](https://github.com/vespa-engine/vespa/blob/master/container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java) | To execute new queries from code. [Read more](/en/applications/web-services#queries). | -| [Map``](https://github.com/vespa-engine/vespa/blob/master/model-evaluation/src/main/java/ai/vespa/models/evaluation/Model.java) | Use to inject a set of Models, see [Stateless Model Evaluation](/en/ranking/stateless-model-evaluation). | -| **Available in containers having `document-api` or `document-processing`** | | -| [DocumentAccess](https://github.com/vespa-engine/vespa/blob/master/documentapi/src/main/java/com/yahoo/documentapi/DocumentAccess.java) | To use the [Document API](/en/writing/document-api-guide). | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentDescription
**Always available**
AthenzIdentityProviderProvides the application's Athenz-identity and gives access to identity/role certificate and tokens.
BertBaseEmbedderA BERT-Base compatible embedder, see BertBase embedder.
ConfigInstanceConfiguration is injected into components as {`ConfigInstance`} components - see configuring components.
ExecutorDefault threadpool for processing requests in threaded request handler
LinguisticsInject a Linguistics component like SimpleLinguistics or provide a custom implementation - see linguistics.
MetricJdisc core interface for metrics. Required by all subclasses of ThreadedRequestHandler.
MetricReceiverUse to emit metrics from a component. Find an example in the metrics guide.
ModelsEvaluatorEvaluates machine-learned models added to Vespa applications and available as config form.
SentencePieceEmbedderA native Java implementation of SentencePiece, see SentencePiece embedder.
VespaCuratorA client for ZooKeeper. For use in container clusters that have ZooKeeper enabled. See using ZooKeeper.
VipStatusUse this to gain control over the service status (up/down) to be emitted from this container.
WordPieceEmbedderAn implementation of the WordPiece embedder, usually used with BERT models. Refer to WordPiece embedder.
SystemInfoVespa Cloud: Provides information about the environment the component is running in. Read more.
**Available in containers having {`search`}**
DocumentAccessTo use the Document API.
ExecutionFactoryTo execute new queries from code. Read more.
Map{``}Use to inject a set of Models, see Stateless Model Evaluation.
**Available in containers having {`document-api`} or {`document-processing`}**
DocumentAccessTo use the Document API.
## Component Versioning diff --git a/mintlify-docs/en/reference/applications/config-files.mdx b/mintlify-docs/en/reference/applications/config-files.mdx index 57270f6f39..e34f3fbb8c 100644 --- a/mintlify-docs/en/reference/applications/config-files.mdx +++ b/mintlify-docs/en/reference/applications/config-files.mdx @@ -32,17 +32,52 @@ camelCase in parameter names is recommended for readability. Supported types for variables in the *.def* file: -| int | 32 bit signed integer value | -| --- | --- | -| long | 64 bit signed integer value | -| double | 64 bit IEEE float value | -| enum | Enumerated types. A set of strings representing the valid values for the parameter, e.g:

`foo enum {BAR, BAZ, QUUX} default=BAR` | -| bool | A boolean (true/false) value | -| string | A String value. Default values must be enclosed in quotation marks (" "), and any internal quotation marks must be escaped by backslash. Likewise, newlines must be escaped to `\n` | -| path | A path to a physical file or directory in the application package. This makes it possible to access files from the application package in container components. The path is relative to the root of the [application package](/en/basics/applications). A path parameter cannot have a default value, but may be optional (using the *optional* keyword after the type). An optional path does not have to be set, in which case it will be an empty value. The content will be available as a `java.nio.file.Path` instance when the component accessing this config is constructed, or an `Optional` if the *optional* keyword is used. | -| url | Similar to `path`, an arbitrary URL of a file that should be downloaded and made available to container components. The file content will be available as a java.io.File instance when the component accessing this config is constructed. Note that if the file takes a long time to download, it will also take a long time for the container to come up with the configuration referencing it. See also the [note about changing contents for such a url](/en/applications/configuring-components#adding-files-to-the-component-configuration). | -| model | A pointer to a machine-learned model. This can be a model-id, url or path, and multiple of these can be specified as a single config value, where one is used depending on the deployment environment:

• If a model-id is specified and the application is deployed on Vespa Cloud, the model-id is used.
• Otherwise, if a URL is specified, it is used.
• Otherwise, path is used.

You may also use remote URLs protected by bearer-token authentication by supplying the optional `secret-ref` attribute. See [using private Huggingface models](/en/reference/rag/embedding#private-model-hub).

On the receiving side, this config value is simply represented as a file path regardless of how it is resolved. This makes it easy to refer to models in multiple ways such that the appropriate one is used depending on the context. The special syntax for setting these config values is documented in [adding files to the configuration](/en/applications/configuring-components#adding-files-to-the-component-configuration). | -| reference | A config id to another configuration (only for internal vespa usage) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int32 bit signed integer value
long64 bit signed integer value
double64 bit IEEE float value
enumEnumerated types. A set of strings representing the valid values for the parameter, e.g:

{`foo enum {BAR, BAZ, QUUX} default=BAR`}
boolA boolean (true/false) value
stringA String value. Default values must be enclosed in quotation marks (" "), and any internal quotation marks must be escaped by backslash. Likewise, newlines must be escaped to {`\\n`}
pathA path to a physical file or directory in the application package. This makes it possible to access files from the application package in container components. The path is relative to the root of the application package. A path parameter cannot have a default value, but may be optional (using the *optional* keyword after the type). An optional path does not have to be set, in which case it will be an empty value. The content will be available as a {`java.nio.file.Path`} instance when the component accessing this config is constructed, or an {`Optional`} if the *optional* keyword is used.
urlSimilar to {`path`}, an arbitrary URL of a file that should be downloaded and made available to container components. The file content will be available as a java.io.File instance when the component accessing this config is constructed. Note that if the file takes a long time to download, it will also take a long time for the container to come up with the configuration referencing it. See also the note about changing contents for such a url.
modelA pointer to a machine-learned model. This can be a model-id, url or path, and multiple of these can be specified as a single config value, where one is used depending on the deployment environment:

• If a model-id is specified and the application is deployed on Vespa Cloud, the model-id is used.
• Otherwise, if a URL is specified, it is used.
• Otherwise, path is used.

You may also use remote URLs protected by bearer-token authentication by supplying the optional {`secret-ref`} attribute. See using private Huggingface models.

On the receiving side, this config value is simply represented as a file path regardless of how it is resolved. This makes it easy to refer to models in multiple ways such that the appropriate one is used depending on the context. The special syntax for setting these config values is documented in adding files to the configuration.
referenceA config id to another configuration (only for internal vespa usage)
### Structs @@ -83,11 +118,28 @@ complexMap{}.nestedMap{}.name string `services.xml`has four types of elements: -| individual service elements | (e.g. *searcher*, *handler*, *searchnode*) - creates a service, but has no child elements that create services | -| --- | --- | -| **service group elements** | (e.g. *content*, *container*, *document-processing* - creates a group of services and can have all types of child elements | -| **dedicated config elements** | (e.g. *accesslog*) - configures a service or a group of services and can only have other dedicated config elements as children | -| **generic config elements** | always named *config* | + + + + + + + + + + + + + + + + + + + + + +
individual service elements(e.g. *searcher*, *handler*, *searchnode*) - creates a service, but has no child elements that create services
**service group elements**(e.g. *content*, *container*, *document-processing* - creates a group of services and can have all types of child elements
**dedicated config elements**(e.g. *accesslog*) - configures a service or a group of services and can only have other dedicated config elements as children
**generic config elements**always named *config*
Generic config elements can be added to most elements that lead to one or more services being created - i.e. service group elements and individual service elements. The config is then applied to all services created by that element and all descendant elements. diff --git a/mintlify-docs/en/reference/applications/deployment.mdx b/mintlify-docs/en/reference/applications/deployment.mdx index 26b112cb3a..45771bde52 100644 --- a/mintlify-docs/en/reference/applications/deployment.mdx +++ b/mintlify-docs/en/reference/applications/deployment.mdx @@ -70,21 +70,63 @@ Some of the elements can be declared *either* under the `` root, **o The root element. -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| version | Yes | 1.0 | -| major-version | No | The major version number this application is valid for. | -| cloud-account | No | Account to deploy to with [Vespa Cloud Enclave](/en/operations/enclave/enclave). | + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
versionYes1.0
major-versionNoThe major version number this application is valid for.
cloud-accountNoAccount to deploy to with Vespa Cloud Enclave.
## instance In `` or `` (which must be a direct descendant of the root). An instance of the application; several of these may be simultaneously deployed in the same zone. If no `` is specified, all children of the root are implicitly children of an `` with `id="default"`, as in the simple example at the top. -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| id | Yes | The unique name of the instance. | -| tags | No | Space-separated tags which can be referenced to make [deployment variants](/en/operations/deployment-variants). | -| cloud-account | No | Account to deploy to with [Vespa Cloud Enclave](/en/operations/enclave/enclave). Overrides parent's use of cloud-account. | + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
idYesThe unique name of the instance.
tagsNoSpace-separated tags which can be referenced to make deployment variants.
cloud-accountNoAccount to deploy to with Vespa Cloud Enclave. Overrides parent's use of cloud-account.
## block-change @@ -96,16 +138,57 @@ Any combination of the attributes below can be specified. Changes on a given dat This tag must be placed after any `` and `` tags, and before ``. It can be declared multiple times. -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| revision | No, default `true` | Set to `false` to allow application deployments | -| version | No, default `true` | Set to `false` to allow Vespa platform upgrades | -| maintenance | No, default `false` | Set to `true` to disallow Vespa maintenance operations. This is best effort, maintenance can still happen (e.g. for security reasons). The block window for maintenance should be open at least 10% of the time calculated over a week, that is, at least 17 hours per week. | -| days | No, default `mon-sun` | List of days this block is effective - a comma-separated list of single days or day intervals where the start and end day are separated by a dash and are inclusive. Each day is identified by its english name or three-letter abbreviation. | -| hours | No, default `0-23` | List of hours this block is effective - a comma-separated list of single hours or hour intervals where the start and end hour are separated by a dash and are inclusive. Each hour is identified by a number in the range 0 to 23. | -| time-zone | No, default UTC | The name of the time zone used to interpret the hours attribute. Time zones are full names or short forms, when the latter is unambiguous. See [ZoneId.of](https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html#of-java.lang.String-) for the full spec of acceptable values. | -| from-date | No | The inclusive starting date of this block (ISO-8601, `YYYY-MM-DD`). | -| to-date | No | The inclusive ending date of this block (ISO-8601, `YYYY-MM-DD`). | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
revisionNo, default {`true`}Set to {`false`} to allow application deployments
versionNo, default {`true`}Set to {`false`} to allow Vespa platform upgrades
maintenanceNo, default {`false`}Set to {`true`} to disallow Vespa maintenance operations. This is best effort, maintenance can still happen (e.g. for security reasons). The block window for maintenance should be open at least 10% of the time calculated over a week, that is, at least 17 hours per week.
daysNo, default {`mon-sun`}List of days this block is effective - a comma-separated list of single days or day intervals where the start and end day are separated by a dash and are inclusive. Each day is identified by its english name or three-letter abbreviation.
hoursNo, default {`0-23`}List of hours this block is effective - a comma-separated list of single hours or hour intervals where the start and end hour are separated by a dash and are inclusive. Each hour is identified by a number in the range 0 to 23.
time-zoneNo, default UTCThe name of the time zone used to interpret the hours attribute. Time zones are full names or short forms, when the latter is unambiguous. See ZoneId.of for the full spec of acceptable values.
from-dateNoThe inclusive starting date of this block (ISO-8601, {`YYYY-MM-DD`}).
to-dateNoThe inclusive ending date of this block (ISO-8601, {`YYYY-MM-DD`}).
The below example blocks all changes on weekends, and blocks revisions outside working hours, in the PST time zone: @@ -119,6 +202,16 @@ The below example blocks all changes on weekends, and blocks revisions outside w time-zone="America/Los_Angeles"/> ``` +To block *only* maintenance operations, `revision` and `version` must be explicitly set to `false`, since they default to `true`. The below example blocks maintenance during working hours, while still allowing application deployments and platform upgrades at any time: + +```xml + +``` + The below example blocks: - all changes on Sundays starting on 2022-03-01 @@ -141,10 +234,29 @@ The below example blocks: In ``, **or** ``. Configures scheduled backups of production content clusters. When present, backups will be created at the specified frequency. Must be placed after any `` and `` tags, and before ``. -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| frequency | Yes | A positive integer with a suffix `h` (hours) or `d` (days), e.g. `12h` or `7d`. Minimum 1h. | -| granularity | No, default `cluster` | • `cluster`: all content nodes in the cluster

• `group`: all content nodes in a single group | +Note that the first backup is not created immediately when this element is added. A cluster becomes eligible for its first backup only once a content node has been running for at least one full `frequency` interval; subsequent backups then follow at the configured frequency. See [Automated Backups](/en/operations/data-management#backup) for details. + + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
frequencyYesA positive integer with a suffix {`h`} (hours) or {`d`} (days), e.g. {`24h`} or {`7d`}. Minimum 24h.
granularityNo, default {`cluster`}{`cluster`}: all content nodes in the cluster

{`group`}: all content nodes in a single group
Backup activity does not affect service availability, but has costs in terms of performance. You can use `granularity` to control the tradeoff between backup and restoration speed. @@ -181,34 +293,115 @@ Tags declared at the `` level apply to all instances. Tags at the `< The `` element contains one or more `` children. Each `` has two mandatory attributes: -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| key | Yes | The tag key. Must be non-empty. Allowed characters and maximum length depend on the target cloud; see [per-cloud rules](#resource-tags-per-cloud-rules) below. The `vai_` prefix is reserved for internal use. | -| value | Yes | The tag value. Must be non-empty. May contain [template variables](#resource-tags-template-variables). Allowed characters and maximum length depend on the target cloud; see [per-cloud rules](#resource-tags-per-cloud-rules) below. | + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
keyYesThe tag key. Must be non-empty. Allowed characters and maximum length depend on the target cloud; see per-cloud rules below. The {`vai_`} prefix is reserved for internal use.
valueYesThe tag value. Must be non-empty. May contain template variables. Allowed characters and maximum length depend on the target cloud; see per-cloud rules below.
The maximum number of tags per instance (after merging deployment-level and instance-level tags) depends on the cloud; see [per-cloud rules](#resource-tags-per-cloud-rules) below. **Per-cloud rules.** Allowed characters and length limits vary by cloud provider. A single deployment can span multiple clouds, so tags are validated against the rules of each target cloud at deploy time. If a tag is valid for AWS but not for GCP, the deployment will succeed in AWS regions but fail in GCP regions. -| Constraint | AWS | Azure | GCP | -| :--- | :--- | :--- | :--- | -| Key characters | `[a-zA-Z0-9 +-=._:/@]` | Unicode, except `< > % & \ ? /` | `[a-z][a-z0-9_-]*` (must start with lowercase letter) | -| Value characters | `[a-zA-Z0-9 +-=._:/@]` | No restrictions | `[a-z0-9_-]*` | -| Key max length | 128 | 512 | 63 | -| Value max length | 256 | 256 | 63 | -| Max tags | 50 | 50 | 64 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstraintAWSAzureGCP
Key characters{`[a-zA-Z0-9 +-=._:/@]`}Unicode, except {`< > % & \\ ? /`}{`[a-z][a-z0-9_-]*`} (must start with lowercase letter)
Value characters{`[a-zA-Z0-9 +-=._:/@]`}No restrictions{`[a-z0-9_-]*`}
Key max length12851263
Value max length25625663
Max tags505064
**Template variables.** Tag values may reference the following template variables. Resolved values are always lowercased regardless of cloud. Template-variable placeholders are excluded when checking per-cloud character rules, so only the literal parts of the value are validated. Referencing an unknown variable causes the deployment to fail. Variables can be combined, e.g. `value="${environment}-${clustertype}"`. -| Variable | Description | -| :--- | :--- | -| `${tenant}` | The tenant name, e.g. `mytenant`. | -| `${application}` | The application name, e.g. `myapp`. | -| `${instance}` | The instance name, e.g. `default`, `beta`. | -| `${environment}` | The deployment environment, e.g. `prod`, `dev`. | -| `${region}` | The deployment region, e.g. `aws-us-east-1c`. | -| `${clustername}` | The cluster ID from [services.xml](/en/reference/applications/services/services), e.g. `default`, `music`. | -| `${clustertype}` | The Vespa cluster type: `container`, `content`, or `admin`. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableDescription
{`\${tenant}`}The tenant name, e.g. {`mytenant`}.
{`\${application}`}The application name, e.g. {`myapp`}.
{`\${instance}`}The instance name, e.g. {`default`}, {`beta`}.
{`\${environment}`}The deployment environment, e.g. {`prod`}, {`dev`}.
{`\${region}`}The deployment region, e.g. {`aws-us-east-1c`}.
{`\${clustername}`}The cluster ID from services.xml, e.g. {`default`}, {`music`}.
{`\${clustertype}`}The Vespa cluster type: {`container`}, {`content`}, or {`admin`}.
**Reconciliation.** Tags are applied to virtual machines and attached disks. When tags are changed, added, or removed in *deployment.xml*, the existing resources are updated by a background reconciliation process. Tags that were previously applied by Vespa Cloud but are no longer listed are removed from the resources. Tags added manually by the tenant in the cloud console are preserved. @@ -216,61 +409,199 @@ The maximum number of tags per instance (after merging deployment-level and inst In ``, or ``. Determines the strategy for upgrading the application, or one of its instances. By default, application revision changes deploy independently of platform upgrades, and an application revision can catch up to and pass an ongoing platform upgrade. See the `rollout` attribute below to change this behavior. -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| rollout | No, default `simultaneous` | • `separate`: When a revision catches up to a platform upgrade, it stays behind, unless the upgrade alone fails.

• `leading`: When a revision catches up to a platform upgrade, they fuse and roll out together.

• `simultaneous` is the default, and favors revision roll-out. Revision changes deploy independently of platform upgrades. When a revision catches up to a platform upgrade, it joins, and then passes the upgrade. | -| revision-target | No, default `latest` | • `latest` is the default. When rolling out a new revision to an instance, the latest available revision is chosen.

• `next` trades speed for smaller changes. When rolling out a new revision to an instance, the next available revision is chosen.

The available revisions for an instance are revisions which are not yet deployed, or revisions which have rolled out in previous instances. | -| revision-change | No, default `when-failing` | • `always` is the most aggressive setting. A new, available revision may always replace the one which is currently rolling out.

• `when-failing` is the default. A new, available revision may replace the one which is currently rolling out if this is failing.

• `when-clear` is the most conservative setting. A new, available revision may never replace one which is currently rolling out.

Revision targets will never automatically change inside [revision block window](#block-change), but may be set by manual intervention at any time. | -| max-risk | No, default `0` | May only be used with `revision-change="when-clear"` and `revision-target="next"`. The maximum amount of *risk* to roll out per new revision target. The default of `0` results in the next build always being chosen, while a higher value allows skipping intermediate builds, as long as the cumulative risk does not exceed what is configured here. | -| min-risk | No, default `0` | Must be less than or equal to the configured `max-risk`. The minimum amount of *risk* to start rolling out a new revision. The default of `0` results in a new revision rolling out as soon as anything is ready, while a higher value lets the system wait until enough cumulative risk is available. This can be used to avoid blocking a lengthy deployment process with trivial changes. | -| max-idle-hours | No, default `8` | May only be used when `min-risk` is specified, and greater than `0`. The maximum number of hours to wait for enough cumulative risk to be available, before rolling out a new revision. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
rolloutNo, default {`simultaneous`}{`separate`}: When a revision catches up to a platform upgrade, it stays behind, unless the upgrade alone fails.

{`leading`}: When a revision catches up to a platform upgrade, they fuse and roll out together.

{`simultaneous`} is the default, and favors revision roll-out. Revision changes deploy independently of platform upgrades. When a revision catches up to a platform upgrade, it joins, and then passes the upgrade.
revision-targetNo, default {`latest`}{`latest`} is the default. When rolling out a new revision to an instance, the latest available revision is chosen.

{`next`} trades speed for smaller changes. When rolling out a new revision to an instance, the next available revision is chosen.

The available revisions for an instance are revisions which are not yet deployed, or revisions which have rolled out in previous instances.
revision-changeNo, default {`when-failing`}{`always`} is the most aggressive setting. A new, available revision may always replace the one which is currently rolling out.

{`when-failing`} is the default. A new, available revision may replace the one which is currently rolling out if this is failing.

{`when-clear`} is the most conservative setting. A new, available revision may never replace one which is currently rolling out.

Revision targets will never automatically change inside revision block window, but may be set by manual intervention at any time.
max-riskNo, default {`0`}May only be used with {`revision-change="when-clear"`} and {`revision-target="next"`}. The maximum amount of *risk* to roll out per new revision target. The default of {`0`} results in the next build always being chosen, while a higher value allows skipping intermediate builds, as long as the cumulative risk does not exceed what is configured here.
min-riskNo, default {`0`}Must be less than or equal to the configured {`max-risk`}. The minimum amount of *risk* to start rolling out a new revision. The default of {`0`} results in a new revision rolling out as soon as anything is ready, while a higher value lets the system wait until enough cumulative risk is available. This can be used to avoid blocking a lengthy deployment process with trivial changes.
max-idle-hoursNo, default {`8`}May only be used when {`min-risk`} is specified, and greater than {`0`}. The maximum number of hours to wait for enough cumulative risk to be available, before rolling out a new revision.
## test Meaning depends on where it is located: -| Parent | Description | -| :--- | :--- | -| `` `` | If present, the application is deployed to the [`test`](/en/operations/environments#test) environment, and system tested there, even if no prod zones are deployed to. Also, when specified, system tests *must* be present in the application test package. See guides for [getting to production](/en/operations/production-deployment).

If present in an `` element, system tests are run for that specific instance before any production deployments of the instance may proceed — otherwise, previous system tests for any instance are acceptable. | -| `` `` `` | If present, production tests are run against the production region with id contained in this element. A test must be *after* a corresponding [region](#region) element. When specified, production tests *must* be preset in the application test package. See guides for [getting to production](/en/operations/production-deployment). | - -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| cloud-account | No | For [system tests](/en/operations/automated-deployments#system-tests) only: account to deploy to with [Vespa Cloud Enclave](/en/operations/enclave/enclave). Overrides parent's use of cloud-account. Cloud account *must not* be specified for [production tests](/en/operations/automated-deployments#production-tests), which always run in the account of the corresponding deployment. | + + + + + + + + + + + + + + + + + +
ParentDescription
{``} {``}If present, the application is deployed to the {`test`} environment, and system tested there, even if no prod zones are deployed to. Also, when specified, system tests *must* be present in the application test package. See guides for getting to production.

If present in an {``} element, system tests are run for that specific instance before any production deployments of the instance may proceed — otherwise, previous system tests for any instance are acceptable.
{``} {``} {``}If present, production tests are run against the production region with id contained in this element. A test must be *after* a corresponding region element. When specified, production tests *must* be preset in the application test package. See guides for getting to production.
+ + + + + + + + + + + + + + + + +
AttributeMandatoryValues
cloud-accountNoFor system tests only: account to deploy to with Vespa Cloud Enclave. Overrides parent's use of cloud-account. Cloud account *must not* be specified for production tests, which always run in the account of the corresponding deployment.
## staging In ``, or ``. If present, the application is deployed to the [`staging`](/en/operations/environments#staging) environment, and tested there, even if no prod zones are deployed to. If present in an `` element, staging tests are run for that specific instance before any production deployments of the instance may proceed — otherwise, previous staging tests for any instance are acceptable. When specified, staging tests *must* be preset in the application test package. See guides for [getting to production](/en/operations/production-deployment). -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| cloud-account | No | Account to deploy to with [Vespa Cloud Enclave](/en/operations/enclave/enclave). Overrides parent's use of cloud-account. | + + + + + + + + + + + + + + + +
AttributeMandatoryValues
cloud-accountNoAccount to deploy to with Vespa Cloud Enclave. Overrides parent's use of cloud-account.
## prod In ``, **or** in ``. If present, the application is deployed to the production regions listed inside this element, under the specified instance, after deployments and tests in the `test` and `staging` environments. -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| cloud-account | No | Account to deploy to with [Vespa Cloud Enclave](/en/operations/enclave/enclave). Overrides parent's use of cloud-account. | + + + + + + + + + + + + + + + +
AttributeMandatoryValues
cloud-accountNoAccount to deploy to with Vespa Cloud Enclave. Overrides parent's use of cloud-account.
## region -In ``, ``, ``, or ``. The application is deployed to the production [region](/en/operations/zones) with id contained in this element. +In ``, ``, ``, or ``. The application is deployed to the production [region](/en/operations/zones) identified by the `name` attribute. + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
nameYesThe region identifier, e.g. aws-us-east-1c. See zones for the list of available regions. Mandatory unless the region name is specified in the element body, but this is not compatible with specifying <availability-zone> children.
fractionNoOnly when this region is inside a group: The fractional membership in the group.
cloud-accountNoAccount to deploy to with Enclave. Overrides parent's use of cloud-account.
+ +### availability-zone + +In ``. The element body must be one of the availability zone identifiers listed in [zones](/en/operations/zones). At least one availability zone *must* be specified when deploying to a production region that supports more than one availability zone. The application instance will be spread out evenly across these availability zones for resiliency. See [availability zones](/en/operations/az) for more. + +Example: -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| fraction | No | Only when this region is inside a group: The fractional membership in the group. | -| cloud-account | No | Account to deploy to with [Enclave](/en/operations/enclave/enclave). Overrides parent's use of cloud-account. | +```xml + + use1-az1 + use1-az2 + +``` ## dev In ``. Optionally used to control deployment settings for the [dev environment](/en/operations/environments). This can be used specify a different cloud account, tags, and private endpoints. -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| tags | No | Space-separated tags which can be referenced to make [deployment variants](/en/operations/deployment-variants). | -| cloud-account | No | Account to deploy to with [Vespa Cloud Enclave](/en/operations/enclave/enclave). Overrides parent's use of cloud-account. | + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
tagsNoSpace-separated tags which can be referenced to make deployment variants.
cloud-accountNoAccount to deploy to with Vespa Cloud Enclave. Overrides parent's use of cloud-account.
## delay @@ -357,10 +688,27 @@ In `` or ``. Specifies a global endpoint for this application. ``` -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| id | No | The identifier for the endpoint. This will be part of the endpoint name that is generated. If not specified, the endpoint will be the default global endpoint for the application. | -| container-id | Yes | The id of the [container cluster](/en/reference/applications/services/container) to which requests to the global endpoint is forwarded. | + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
idNoThe identifier for the endpoint. This will be part of the endpoint name that is generated. If not specified, the endpoint will be the default global endpoint for the application.
container-idYesThe id of the container cluster to which requests to the global endpoint is forwarded.
Global endpoints are implemented using Route 53 and healthchecks, to keep active zones in rotation. See [BCP](#bcp) for advanced configurations. @@ -377,11 +725,32 @@ In `` or ``, with `type='zone'`. Used to disable public zone e ``` -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| type | Yes | Private endpoints are specified with `type='zone'`. | -| container-id | Yes | The id of the [container cluster](/en/reference/applications/services/container) to disable public endpoints for. | -| enabled | No | Whether a public endpoint for this container cluster should be enabled; default `true`. | + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
typeYesPrivate endpoints are specified with {`type='zone'`}.
container-idYesThe id of the container cluster to disable public endpoints for.
enabledNoWhether a public endpoint for this container cluster should be enabled; default {`true`}.
## endpoint (private) @@ -400,11 +769,32 @@ In `` or ``, with `type='private'`. Specifies a private endpoi ``` -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| type | Yes | Private endpoints are specified with `type='private'`. | -| container-id | Yes | The id of the [container cluster](/en/reference/applications/services/container) to which requests to the private endpoint service is forwarded. | -| auth-method | No | The authentication method to use with this [private endpoint](/en/operations/private-endpoints). Must be either `mtls` or `token`. Defaults to mTLS if not included. | + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
typeYesPrivate endpoints are specified with {`type='private'`}.
container-idYesThe id of the container cluster to which requests to the private endpoint service is forwarded.
auth-methodNoThe authentication method to use with this private endpoint. Must be either {`mtls`} or {`token`}. Defaults to mTLS if not included.
## allow @@ -422,11 +812,32 @@ In ``. Allows a principal identified by the URN to set ``` -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| with | Yes | The private endpoint access type; must be `aws-private-link` or `gcp-service-connect`. | -| arn | Maybe | Must be specified with `aws-private-link`. See [AWS documentation](https://docs.aws.amazon.com/vpc/latest/privatelink/configure-endpoint-service.html) for more details. | -| project | Maybe | Must be specified with `gcp-service-connect`. See [GCP documentation](https://cloud.google.com/vpc/docs/configure-private-service-connect-services) for more details. | + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValues
withYesThe private endpoint access type; must be {`aws-private-link`} or {`gcp-service-connect`}.
arnMaybeMust be specified with {`aws-private-link`}. See AWS documentation for more details.
projectMaybeMust be specified with {`gcp-service-connect`}. See GCP documentation for more details.
## bcp @@ -436,9 +847,22 @@ If a bcp element is specified at the root, and explicit instances are used, that See [BCP test](https://cloud.vespa.ai/en/reference/bcp-test.html?_gl=1*1lsxxnq*_gcl_au*ODE0ODM4MTI2LjE3Nzk3MjQ3OTY) for a procedure to verify that your BCP configuration is correct. -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| deadline | No | The max time after a region becomes unreachable until the other regions in its BCP group must be able to handle the traffic of it, given as a number of minutes followed by 'm', 'h' or 'd' (for minutes, hours or days). The default deadline is 0: Regions must at all times have capacity to handle BCP traffic immediately.

By providing a deadline, autoscaling can avoid the cost of provisioning additional resources for BCP capacity if it predicts that it can grow to handle the traffic faster than the deadline in a given cluster.

This is the default deadline to be used for all groups that don't specify one themselves. | + + + + + + + + + + + + + + + +
AttributeMandatoryValues
deadlineNoThe max time after a region becomes unreachable until the other regions in its BCP group must be able to handle the traffic of it, given as a number of minutes followed by 'm', 'h' or 'd' (for minutes, hours or days). The default deadline is 0: Regions must at all times have capacity to handle BCP traffic immediately.

By providing a deadline, autoscaling can avoid the cost of provisioning additional resources for BCP capacity if it predicts that it can grow to handle the traffic faster than the deadline in a given cluster.

This is the default deadline to be used for all groups that don't specify one themselves.
Example: @@ -468,6 +892,19 @@ A region may have fractional membership in multiple groups, meaning it will hand A group may also define global endpoints for the region members in the group. This is exactly the same as defining the endpoint separately and repeating the regions of the group under the endpoint. Endpoints under a group cannot contain explicit region sub-elements. -| Attribute | Mandatory | Values | -| :--- | :--- | :--- | -| deadline | No | The deadline of this BCP group. See deadline on the BCP element. | + + + + + + + + + + + + + + + +
AttributeMandatoryValues
deadlineNoThe deadline of this BCP group. See deadline on the BCP element.
diff --git a/mintlify-docs/en/reference/applications/services/admin.mdx b/mintlify-docs/en/reference/applications/services/admin.mdx index 2effffbaba..7a2bed3ca9 100644 --- a/mintlify-docs/en/reference/applications/services/admin.mdx +++ b/mintlify-docs/en/reference/applications/services/admin.mdx @@ -25,36 +25,122 @@ admin [version] logging ``` -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **version** | required | number | | 2.0 | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**version**requirednumber2.0
## adminserver The configured node will be the default administration node in your Vespa system, which means that unless configured otherwise all administrative services - i.e. the log server, the configuration server, the slobrok, and so on - will run on this node. Use [configservers](#configservers), [logserver](#logserver), [slobroks](#slobroks) elements if you need to specify baseport or jvm options for any of these services. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **hostalias** | required | string | | | -| **baseport** | optional | number | | | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**hostalias**requiredstring
**baseport**optionalnumber
## cluster-controllers Container for one or more [cluster-controller](#cluster-controller) elements. When having one or more [content](/en/reference/applications/services/content) clusters, configuring at least one cluster controller is required. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **standalone-zookeeper** | optional | true/false | false | Will by default share the ZooKeeper instance with configserver. If configured to true a separate ZooKeeper instance will be configured and started on the set of nodes where you run cluster controller on. The set of cluster controllers nodes cannot overlap with the set of nodes where config server is running. If this setting is changed from false to true in a running system, all previous cluster state information will be lost as the underlying ZooKeeper changes. Cluster controllers will re-discover the state, but nodes that have been manually set as down will again be considered to be up. | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**standalone-zookeeper**optionaltrue/falsefalseWill by default share the ZooKeeper instance with configserver. If configured to true a separate ZooKeeper instance will be configured and started on the set of nodes where you run cluster controller on. The set of cluster controllers nodes cannot overlap with the set of nodes where config server is running. If this setting is changed from false to true in a running system, all previous cluster state information will be lost as the underlying ZooKeeper changes. Cluster controllers will re-discover the state, but nodes that have been manually set as down will again be considered to be up.
## cluster-controller Specifies a host on which to run the [Cluster Controller](/en/content/content-nodes#cluster-controller) service. The Cluster Controller manages the state of the cluster in order to provide elasticity and failure detection. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **hostalias** | required | string | | | -| **baseport** | optional | number | | | -| **jvm-options** | optional | string | | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**hostalias**requiredstring
**baseport**optionalnumber
**jvm-options**optionalstring
## configservers @@ -64,21 +150,79 @@ Container for one or more `configserver` elements. Specifies a host on which to run the [Configuration Server](/en/operations/self-managed/configuration-server) service. If contained directly below `` you may only have one, so if you need to configure multiple instances of this service, contain them within the [``](#configservers) element. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **hostalias** | required | string | | | -| **baseport** | optional | number | | | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**hostalias**requiredstring
**baseport**optionalnumber
## logserver Specifies a host on which to run the [Vespa Log Server](/en/reference/operations/log-files#log-server) service. If not specified, the logserver is placed on the [adminserver](#adminserver), like in the [example](https://github.com/vespa-engine/sample-apps/blob/master/examples/operations/multinode-HA/services.xml). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **hostalias** | required | string | | | -| **baseport** | optional | number | | | -| **jvm-options** | optional | string | | | -| **jvm-gc-options** | optional | string | | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**hostalias**requiredstring
**baseport**optionalnumber
**jvm-options**optionalstring
**jvm-gc-options**optionalstring
Example: @@ -94,10 +238,33 @@ This is a container for one or more `slobrok` elements. Specifies a host on which to run the [Service Location Broker (slobrok)](/en/operations/self-managed/slobrok) service. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **hostalias** | required | string | | | -| **baseport** | optional | number | | | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**hostalias**requiredstring
**baseport**optionalnumber
## monitoring @@ -107,9 +274,20 @@ Settings for how to pass metrics to a monitoring service - see [monitoring](/en/ ``` -||| -| --- | --- | -| systemname | The name of the application in question in the monitoring system, default is "vespa" | + + + + + + + + + + + + + +
systemnameThe name of the application in question in the monitoring system, default is "vespa"
## logging @@ -151,25 +329,76 @@ Configure a metrics consumer. The metrics contained in this element will be expo Add `metric` and/or `metric-set` children. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The name of the consumer to export metrics to. | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe name of the consumer to export metrics to.
## metric-set Include a pre-defined set of metrics to the consumer. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The id of the metric set to include. Built-in metric sets are:

• `default`
• `Vespa` | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe id of the metric set to include. Built-in metric sets are:

{`default`}
{`Vespa`}
## metric Configure a metric. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The name of the metric as defined in custom code or in [process metrics api](/en/reference/api/state-v1#state-v1-metrics) | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe name of the metric as defined in custom code or in process metrics api
Note that metric id needs to include the metric specific suffix, e.g. *.average*. @@ -190,10 +419,33 @@ The per process metrics api endpoint */state/v1/metrics* also includes a descrip Specifies that the metrics from this consumer should be forwarded to CloudWatch. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **region** | required | string | | Your AWS region | -| **namespace** | required | string | | The metrics namespace in CloudWatch | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**region**requiredstringYour AWS region
**namespace**requiredstringThe metrics namespace in CloudWatch
Example: @@ -207,7 +459,30 @@ Example: Specifies that a profile from a shared-credentials file should be used for authentication to CloudWatch. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **file** | required | string | | The path to the shared-credentials file | -| **profile** | optional | string | default | The profile in the shared-credentials file | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**file**requiredstringThe path to the shared-credentials file
**profile**optionalstringdefaultThe profile in the shared-credentials file
diff --git a/mintlify-docs/en/reference/applications/services/container.mdx b/mintlify-docs/en/reference/applications/services/container.mdx index e04a73654b..5c1221b511 100644 --- a/mintlify-docs/en/reference/applications/services/container.mdx +++ b/mintlify-docs/en/reference/applications/services/container.mdx @@ -91,10 +91,33 @@ Example: Contained in [``](/en/reference/applications/services/services). Each container tag specifies a separate container cluster. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **version** | required | number | | 1.0 in this version of Vespa | -| **id** | required | string | | the id of this cluster | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**version**requirednumber1.0 in this version of Vespa
**id**requiredstringthe id of this cluster
## handler @@ -103,11 +126,40 @@ The `handler` element holds the configuration of a request handler. For each `bi - `binding` For JDisc request handlers, add this server binding to this handler. - [`component`](#component) for injecting another component. Must be a declaration of a new component, not a reference. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The component ID | -| **class** | optional | string | | The class of the handler, defaults to id | -| **bundle** | optional | string | | The bundle to load the handler from: The name in `` in pom.xml. Defaults to class or id (if no class is given) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe component ID
**class**optionalstringThe class of the handler, defaults to id
**bundle**optionalstringThe bundle to load the handler from: The name in {``} in pom.xml. Defaults to class or id (if no class is given)
Example: @@ -132,11 +184,40 @@ The URI to map a Handler to. Multiple elements are allowed. See example above. The `server` element holds the configuration of a JDisc server provider. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The component ID | -| **class** | optional | string | | The class of the server, defaults to id | -| **bundle** | optional | string | | The bundle to load the server from: The name in `` in the pom.xml. Defaults to class or id (if no class is given). | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe component ID
**class**optionalstringThe class of the server, defaults to id
**bundle**optionalstringThe bundle to load the server from: The name in {``} in the pom.xml. Defaults to class or id (if no class is given).
Example: @@ -171,26 +252,83 @@ Vespa Cloud only. The `clients` element is a parent element for [client](#client Vespa Cloud only. Child element of [clients](#clients). Use to configure security credentials for a container cluster, using [certificate](#certificate) and/or [token](#token). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The client ID | -| **permissions** | required | string | | Permissions, see the [security guide](/en/security/guide#permissions). One of:

• `read`
• `write`
• `read,write` | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe client ID
**permissions**requiredstringPermissions, see the security guide. One of:

{`read`}
{`write`}
{`read,write`}
## certificate Vespa Cloud only. Child element of [client](#client). Configure certificates using the *file* attribute. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **file** | required | string | | Path to the certificate file, see the [security guide](/en/security/guide#configuring-mtls). | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**file**requiredstringPath to the certificate file, see the security guide.
## token Vespa Cloud only. Child element of [client](#client). Configure tokens using the *id* attribute. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | Token ID, see the [security guide](/en/security/guide#configuring-tokens). | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringToken ID, see the security guide.
## components @@ -202,11 +340,40 @@ The `component` element holds the configuration of a [generic component](/en/app Nested [`component`](#component) child elements can be added for injecting specific component instances. This is useful if there is more than one declared component of the same Java class. Refer to [Injecting components](/en/applications/dependency-injection) for details and examples. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The component ID | -| **class** | optional | string | | The class of the component, defaults to id | -| **bundle** | optional | string | | The bundle to load the component from: The name in `` in the pom.xml. Defaults to class or id (if no class is given). | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe component ID
**class**optionalstringThe class of the component, defaults to id
**bundle**optionalstringThe bundle to load the component from: The name in {``} in the pom.xml. Defaults to class or id (if no class is given).
Example: @@ -218,20 +385,103 @@ Example: Use to enable [Document API](../../api/api.html) operations to a container cluster. Children elements: -| Name | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **binding** | optional | string | http://\*/ | The URI to map the document-api handlers to. Multiple bindings are valid. Must end with a '/'. Note that each document-api handler will get its individual binding by adding a suffix, e.g. the feed handler will add 'feed/', the remove handler will add 'remove/' and so on. Example:

``
`http://*/document-api/`
`https://*/document-api/`
`
`

With these configured bindings, the feed handler will be available at `http://*/document-api/feed/` and `https://*/document-api/feed/`. For other handlers, just replace 'feed/' with the appropriate suffix, e.g. 'get/', 'remove/' etc. | -| **abortondocumenterror** | optional | true/false | true | Controls whether to abort the entire feed or not if a document-related error occurs, i.e. if a document contains an unknown field. Setting this field to `true` will abort the feed on such errors, while setting it to `false` will cause Vespa to simply skip to the next document in the feed. Note that malformed XML in the input will abort the feed regardless of this setting. | -| **maxpendingbytes** | optional | number | | The maximum number of pending bytes. If `` is 0 and this is set to 0, this defaults to 100 MB. If `` is more than 0, and this is set to 0, the send-window is only limited by number of messages sent, not the memory footprint. | -| **maxpendingdocs** | optional | number | | The maximum number of pending documents the client can have. By default, the client will dynamically adjust the window size based on the latency of the performed operations. If the parameter is set, dynamic window sizing will be turned off in favor of the configured value. | -| **mbusport** | optional | number | | Set the MessageBus port | -| **retrydelay** | optional | double | 1.0 | Delay in seconds between retries | -| **retryenabled** | optional | true/false | | Enable or disable retrying documents that have failed. | -| **route** | optional | string | default | Set the route to feed documents to | -| **timeout** | optional | double | 180.0 | Set the timeout value in seconds for an operation | -| **tracelevel** | optional | 0-9 | 0 | Configure the level of which to trace messages sent. The higher the level, the more detailed descriptions. | -| **ignore-undefined-fields** | optional | true/false | false | Set to true to ignore undefined fields in document API operations and let such operations complete successfully, rather than fail. A [response header is returned](/en/reference/api/document-v1#x-vespa-ignored-fields) when field operations are ignored. | -| **max-document-size** | optional | string | 100MiB | Specifies the maximum size of a document operation request accepted by the container, measured as the uncompressed size of the request body. The limit applies to all document types in the container cluster. A request larger than this limit will be rejected by the container before the operation is forwarded to the content cluster.

Valid values are numbers including a unit (e.g. *10MiB*) and the value must be between 1MiB and 2048MiB (inclusive). Values will be rounded to the nearest MiB, so using MiB as a unit is preferable.

The value should normally not exceed the smallest [max-document-size](/en/reference/applications/services/content#max-document-size) configured in any content cluster that this container feeds to; a deployment warning is emitted otherwise.

Example:

```xml ```
```10MiB```
``` + + + Name + Required + Value + Default + Description + + + + + **binding** + optional + string + http://*/ + The URI to map the document-api handlers to. Multiple bindings are valid. Must end with a '/'. Note that each document-api handler will get its individual binding by adding a suffix, e.g. the feed handler will add 'feed/', the remove handler will add 'remove/' and so on. Example:

{``}
{`http://*/document-api/`}
{`https://*/document-api/`}
{`
`}

With these configured bindings, the feed handler will be available at {`http://*/document-api/feed/`} and {`https://*/document-api/feed/`}. For other handlers, just replace 'feed/' with the appropriate suffix, e.g. 'get/', 'remove/' etc. + + + **abortondocumenterror** + optional + true/false + true + Controls whether to abort the entire feed or not if a document-related error occurs, i.e. if a document contains an unknown field. Setting this field to {`true`} will abort the feed on such errors, while setting it to {`false`} will cause Vespa to simply skip to the next document in the feed. Note that malformed XML in the input will abort the feed regardless of this setting. + + + **maxpendingbytes** + optional + number + + The maximum number of pending bytes. If {``} is 0 and this is set to 0, this defaults to 100 MB. If {``} is more than 0, and this is set to 0, the send-window is only limited by number of messages sent, not the memory footprint. + + + **maxpendingdocs** + optional + number + + The maximum number of pending documents the client can have. By default, the client will dynamically adjust the window size based on the latency of the performed operations. If the parameter is set, dynamic window sizing will be turned off in favor of the configured value. + + + **mbusport** + optional + number + + Set the MessageBus port + + + **retrydelay** + optional + double + 1.0 + Delay in seconds between retries + + + **retryenabled** + optional + true/false + + Enable or disable retrying documents that have failed. + + + **route** + optional + string + default + Set the route to feed documents to + + + **timeout** + optional + double + 180.0 + Set the timeout value in seconds for an operation + + + **tracelevel** + optional + 0-9 + 0 + Configure the level of which to trace messages sent. The higher the level, the more detailed descriptions. + + + **ignore-undefined-fields** + optional + true/false + false + Set to true to ignore undefined fields in document API operations and let such operations complete successfully, rather than fail. A response header is returned when field operations are ignored. + + + **max-document-size** + optional + string + 100MiB + Specifies the maximum size of a document operation request accepted by the container, measured as the uncompressed size of the request body. The limit applies to all document types in the container cluster. A request larger than this limit will be rejected by the container before the operation is forwarded to the content cluster.

Valid values are numbers including a unit (e.g. *10MiB*) and the value must be between 1MiB and 2048MiB (inclusive). Values will be rounded to the nearest MiB, so using MiB as a unit is preferable.

The value should normally not exceed the smallest max-document-size configured in any content cluster that this container feeds to; a deployment warning is emitted otherwise.

Example:

{``}{`xml `}{``}
{``}{`10MiB`}{``}
{``}{`{``} + + + Example: @@ -256,9 +506,26 @@ Example: Configures resources used for model inference in the container, for example [embedders](/en/rag/embedding), [local LLMs](/en/rag/local-llms), and [stateless model evaluation](/en/ranking/stateless-model-evaluation). -| Element | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **memory** | optional | string | auto-estimated | Container memory reserved for model inference, covering both model weights and inference requests. This memory is subtracted from the memory available to the JVM heap on the same node.

When not set, Vespa estimates the required inference memory automatically. The automatic estimate can be inaccurate for some models and workloads, which may lead to out-of-memory errors. Set this element explicitly to override the estimate. | + + + + + + + + + + + + + + + + + + + +
ElementRequiredValueDefaultDescription
**memory**optionalstringauto-estimatedContainer memory reserved for model inference, covering both model weights and inference requests. This memory is subtracted from the memory available to the JVM heap on the same node.

When not set, Vespa estimates the required inference memory automatically. The automatic estimate can be inaccurate for some models and workloads, which may lead to out-of-memory errors. Set this element explicitly to override the estimate.
Example: @@ -303,23 +570,93 @@ Configures properties of the accesslog. The default type is `json` that will giv Access logging can be disabled by setting the type to `disabled`. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **type** | optional | string | json | The accesslog type: *json*, *vespa* or *disabled* | -| **fileNamePattern** | required\* | string | `JsonAccessLog..%Y%m%d%H%M%S` | File name pattern. \* Note: Optional when *type* is *disabled* | -| **symlinkName** | optional | string | `JsonAccessLog.` | Symlink name | -| **rotationInterval** | optional | string | 0 60 ... | Rotation interval | -| **rotationScheme** | optional | string | date | Valid values are *date* or *sequence* | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**type**optionalstringjsonThe accesslog type: *json*, *vespa* or *disabled*
**fileNamePattern**required*string{`JsonAccessLog..%Y%m%d%H%M%S`}File name pattern. * Note: Optional when *type* is *disabled*
**symlinkName**optionalstring{`JsonAccessLog.`}Symlink name
**rotationInterval**optionalstring0 60 ...Rotation interval
**rotationScheme**optionalstringdateValid values are *date* or *sequence*
### request-content The `request-content` element is a child of `accesslog` and configures logging of request content. Multiple `request-content` elements can be specified to log different request paths with different configurations. -| Element | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **samples-per-second** | required | double | | Probabilistic sample rate per second | -| **path-prefix**| required | string | | URI path prefix to match for logging | -| **max-bytes** | required | integer | | Maximum size in bytes to log, only prefix will be kept for larger requests | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementRequiredValueDefaultDescription
**samples-per-second**requireddoubleProbabilistic sample rate per second
**path-prefix**requiredstringURI path prefix to match for logging
**max-bytes**requiredintegerMaximum size in bytes to log, only prefix will be kept for larger requests
Example: @@ -341,9 +678,26 @@ Example: Allows including XML snippets contained in external files. All files from all listed directories will be included. All files must have the same outer tag as they were referred from, i.e. search, document-processing or processing. The path must be relative to the application package root, and must never point outside the package. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **dir** | required | string | | The directory to include files from. File inclusion order is undefined. | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**dir**requiredstringThe directory to include files from. File inclusion order is undefined.
Example: @@ -357,11 +711,40 @@ See [nodes](/en/reference/applications/services/services#nodes) in the general s Additional container cluster specific attributes: -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **allocated-memory** | optional | percentage | | **Deprecated:** See [jvm](#jvm). | -| **jvm-options** | optional | string | | **Deprecated:** See [jvm](#jvm). | -| **jvm-gc-options** | optional | string | | **Deprecated:** See [jvm](#jvm). | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**allocated-memory**optionalpercentage**Deprecated:** See jvm.
**jvm-options**optionalstring**Deprecated:** See jvm.
**jvm-gc-options**optionalstring**Deprecated:** See jvm.
## environment-variables @@ -382,11 +765,40 @@ Example: JVM settings for container nodes. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **allocated-memory** | optional | percentage | | Memory to allocate to each JVM instance as a percentage of available memory. Must be an integer percentage followed by *%* | -| **options** | optional | string | | Generic JVM options | -| **gc-options** | optional | string | | JVM GC options. Garbage Collector specific parameters | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**allocated-memory**optionalpercentageMemory to allocate to each JVM instance as a percentage of available memory. Must be an integer percentage followed by *%*
**options**optionalstringGeneric JVM options
**gc-options**optionalstringJVM GC options. Garbage Collector specific parameters
Example where 50% of the node total memory is used as the Max heap size of the JVM: @@ -406,16 +818,56 @@ Use to access secrets configured in Vespa Cloud - refer to the [secret store](/e The `secret-store` element holds configuration for custom implementations. Contains one or more `group` elements. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **type** | required | string | | Value: "oath-ckms" | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**type**requiredstringValue: "oath-ckms"
## group -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **name** | required | string | | Key group name | -| **environment** | required | string | | Value one of: "alpha" "corp" "prod" "aws" "aws\_stage" | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**name**requiredstringKey group name
**environment**requiredstringValue one of: "alpha" "corp" "prod" "aws" "aws_stage"
Example: @@ -439,9 +891,26 @@ Specifies configuration for the default thread pool in the container. All parame The number of permanent threads relative to number of vCPU cores. Default value is `2`. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **max** | optional | number | 100 | The maximum number of threads relative to vCPU cores. Value must be greater than or equal to ``. | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**max**optionalnumber100The maximum number of threads relative to vCPU cores. Value must be greater than or equal to {``}.
### queue diff --git a/mintlify-docs/en/reference/applications/services/content.mdx b/mintlify-docs/en/reference/applications/services/content.mdx index 8d86c8012d..ffd7bce1b3 100644 --- a/mintlify-docs/en/reference/applications/services/content.mdx +++ b/mintlify-docs/en/reference/applications/services/content.mdx @@ -119,10 +119,33 @@ The root element of a Content cluster definition. Creates a content cluster. A c Contained in [services](/en/reference/applications/services/services). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **version** | required | number | | 1.0 in this version of Vespa | -| **id** | required for multiple clusters | string | | Name of the content cluster. If none is supplied, the cluster name will be `content`. Cluster names must be unique within the application, if multiple clusters are configured, the name must be set for all but one at minimum.

**Note:**

Renaming a cluster is the same as dropping the current cluster and adding a new one. This makes data unavailable or lost, depending on hosting model. Deploying with a changed cluster id will therefore fail with a validation override requirement: `Content cluster 'music' is removed. This will cause loss of all data in this cluster. To allow this add content-cluster-removal to validation-overrides.xml, see /en/reference//en/reference/applications/validation-overrides`.
| + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**version**requirednumber1.0 in this version of Vespa
**id**required for multiple clustersstringName of the content cluster. If none is supplied, the cluster name will be {`content`}. Cluster names must be unique within the application, if multiple clusters are configured, the name must be set for all but one at minimum.

**Note:**

Renaming a cluster is the same as dropping the current cluster and adding a new one. This makes data unavailable or lost, depending on hosting model. Deploying with a changed cluster id will therefore fail with a validation override requirement: {`Content cluster 'music' is removed. This will cause loss of all data in this cluster. To allow this add content-cluster-removal to validation-overrides.xml, see /en/reference//en/reference/applications/validation-overrides`}.
Subelements: @@ -140,11 +163,40 @@ Subelements: Contained in [content](#content). Defines which document types should be routed to this content cluster using the default route, and what documents should be kept in the cluster if the garbage collector runs. Read more on [expiring documents](/en/schemas/documents#document-expiry). Also have some backend specific configuration for whether documents should be searchable or not. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **selection** | optional | string | | A [document selection](/en/reference/writing/document-selector-language), restricting documents that are routed to this cluster. Defaults to a selection expression matching everything.

This selection can be specified to match document identifier specifics that are *independent* of document types. For restrictions that apply only to a *specific* document type, this must be done within that particular document type's [document](#document) element. Trying to use document type references in this selection makes an error during deployment. The selection given here will be merged with per-document type selections specified within document tags, if any, meaning that any document in the cluster must match *both* selections to be accepted and kept.

This feature is primarily used to [expire documents](/en/schemas/documents#document-expiry). | -| **garbage-collection** | optional | true / false | false | If true, regularly verify the documents stored in the cluster to see if they belong in the cluster, and delete them if not. If false, garbage collection is not run. | -| **garbage-collection-interval** | optional | integer | 3600 | Time (in seconds) between garbage collection cycles. Note that the deletion of documents is spread over this interval, so more resources will be used for deleting a set of documents with a small interval than with a larger interval. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**selection**optionalstringA document selection, restricting documents that are routed to this cluster. Defaults to a selection expression matching everything.

This selection can be specified to match document identifier specifics that are *independent* of document types. For restrictions that apply only to a *specific* document type, this must be done within that particular document type's document element. Trying to use document type references in this selection makes an error during deployment. The selection given here will be merged with per-document type selections specified within document tags, if any, meaning that any document in the cluster must match *both* selections to be accepted and kept.

This feature is primarily used to expire documents.
**garbage-collection**optionaltrue / falsefalseIf true, regularly verify the documents stored in the cluster to see if they belong in the cluster, and delete them if not. If false, garbage collection is not run.
**garbage-collection-interval**optionalinteger3600Time (in seconds) between garbage collection cycles. Note that the deletion of documents is spread over this interval, so more resources will be used for deleting a set of documents with a small interval than with a larger interval.
Subelements: @@ -155,21 +207,79 @@ Subelements: Contained in [documents](#documents). The document type to be routed to this content cluster. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **type** | required | string | | [Document type name](/en/reference/schemas/schemas#document) | -| **mode** | required | index / store-only / streaming | | The mode of storing and indexing. Refer to [streaming search](/en/performance/streaming-search) for *store-only*, as documents are stored the same way for both cases.

Changing mode requires an *indexing-mode-change* [validation override](/en/reference/applications/validation-overrides), and documents must be re-fed. | -| **selection** | optional | string | | A [document selection](/en/reference/writing/document-selector-language), restricting documents that are routed to this cluster. Defaults to a selection expression matching everything.

This selection must apply to fields in *this document type only*. Selection will be merged together with selection for other types and global selection from [documents](#documents) to form a full expression for what documents belong to this cluster. | -| **global** | optional | true / false | false | Set to *true* to distribute all documents of this type to all nodes in the content cluster it is defined.

Fields in global documents can be imported into documents to implement joins - read more in [parent/child](/en/schemas/parent-child). Vespa will detect when a new (or outdated) node is added to the cluster and prevent it from taking part in searches until it has received all global documents.

Changing from *false* to *true* or vice versa requires a *global-document-change* [validation override](/en/reference/applications/validation-overrides). First, [stop services](/en/operations/self-managed/admin-procedures#vespa-start-stop-restart) on all content nodes. Then, deploy with the validation override. Finally, [start services](/en/operations/self-managed/admin-procedures#vespa-start-stop-restart) on all content nodes.

**Note:**

*global* is only supported for *mode="index"*.
| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**type**requiredstringDocument type name
**mode**requiredindex / store-only / streamingThe mode of storing and indexing. Refer to streaming search for *store-only*, as documents are stored the same way for both cases.

Changing mode requires an *indexing-mode-change* validation override, and documents must be re-fed.
**selection**optionalstringA document selection, restricting documents that are routed to this cluster. Defaults to a selection expression matching everything.

This selection must apply to fields in *this document type only*. Selection will be merged together with selection for other types and global selection from documents to form a full expression for what documents belong to this cluster.
**global**optionaltrue / falsefalseSet to *true* to distribute all documents of this type to all nodes in the content cluster it is defined.

Fields in global documents can be imported into documents to implement joins - read more in parent/child. Vespa will detect when a new (or outdated) node is added to the cluster and prevent it from taking part in searches until it has received all global documents.

Changing from *false* to *true* or vice versa requires a *global-document-change* validation override. First, stop services on all content nodes. Then, deploy with the validation override. Finally, start services on all content nodes.

**Note:**

*global* is only supported for *mode="index"*.
## document-processing Contained in [documents](#documents). Vespa Search specific configuration for which document processing cluster and chain to run index preprocessing. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **cluster** | optional | string | Container cluster on content node | Name of a [document-processing](/en/reference/applications/services/docproc) container cluster that does index preprocessing. Use cluster to specify an alternative cluster, other than the default cluster on content nodes. | -| **chain** | optional | string | `indexing` chain | A document processing chain in the container cluster specified by *cluster* to use for index preprocessing. The chain must inherit the `indexing` chain. | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**cluster**optionalstringContainer cluster on content nodeName of a document-processing container cluster that does index preprocessing. Use cluster to specify an alternative cluster, other than the default cluster on content nodes.
**chain**optionalstring{`indexing`} chainA document processing chain in the container cluster specified by *cluster* to use for index preprocessing. The chain must inherit the {`indexing`} chain.
Example - the container cluster enables [document-processing](/en/reference/applications/services/docproc), referred to by the content cluster: @@ -220,6 +330,8 @@ Note the [document-api](/en/reference/applications/services/container#document-a Contained in [content](#content). The minimum total data copies the cluster will maintain. This can be set instead of (or in addition to) redundancy to ensure that a minimum number of copies are always maintained regardless of other configuration. +On Vespa Cloud, this results in a [redundancy](#redundancy) of at least ceil(min-redundancy / groups) per group; self-managed, a total redundancy of at least min-redundancy. Settings that refer to redundancy, such as [searchable-copies](#searchable-copies), use this derived value. As each group holds at least one full copy, the actual copy count can exceed min-redundancy: on Vespa Cloud, min-redundancy 2 with 3 groups gives 3 copies. + `min-redundancy` can be changed without node restart - replicas will be added or removed automatically. ### min-redundancy and groups @@ -267,20 +379,72 @@ Contained in [nodes](/en/reference/applications/services/services#nodes) or [gro Additional node attributes for content nodes: -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| distribution-key | required | integer | | The unique data distribution id of this node. This **must** remain unchanged for the host's lifetime. Distribution keys of a fresh system should be contiguous and start from zero.

Distribution keys are used to identify nodes and groups for the [distribution algorithm](/en/content/idealstate). If a node changes distribution key, the distribution algorithm regards it as a new node, so buckets are redistributed. | -| capacity | optional | double | 1 | **Deprecated:**

Capacity of this node, relative to other nodes. A node with capacity 2 will get double the data and feed requests of a node with capacity 1. This feature is deprecated and expert mode only. Don't use in production, Vespa assumes homogenous cluster capacity.
| -| baseport | optional | integer | | baseport The first port in the port range allocated by this node. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
distribution-keyrequiredintegerThe unique data distribution id of this node. This **must** remain unchanged for the host's lifetime. Distribution keys of a fresh system should be contiguous and start from zero.

Distribution keys are used to identify nodes and groups for the distribution algorithm. If a node changes distribution key, the distribution algorithm regards it as a new node, so buckets are redistributed.
capacityoptionaldouble1 **Deprecated:**

Capacity of this node, relative to other nodes. A node with capacity 2 will get double the data and feed requests of a node with capacity 1. This feature is deprecated and expert mode only. Don't use in production, Vespa assumes homogenous cluster capacity.
baseportoptionalintegerbaseport The first port in the port range allocated by this node.
## group Contained in [content](#content) or [group](#group) - groups can be nested. Defines the [hierarchical structure](/en/content/elasticity#grouped-distribution) of the cluster. Can not be used in conjunction with the [nodes](/en/reference/applications/services/services#nodes) element. Groups can contain other groups or nodes, but not both. There can only be a single level of leaf groups under the top group. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **distribution-key** | required | integer | | Sets the distribution key of a group. It is not allowed to change this for a given group. Group distribution keys only need to be unique among groups that share the same parent group. | -| **name** | required | string | | The name of the group, used for access from status pages and the like. | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**distribution-key**requiredintegerSets the distribution key of a group. It is not allowed to change this for a given group. Group distribution keys only need to be unique among groups that share the same parent group.
**name**requiredstringThe name of the group, used for access from status pages and the like.
**Important:** @@ -294,9 +458,26 @@ See [Vespa Serving Scaling Guide](/en/performance/sizing-search) for when to con Contained in [group](#group). Defines the data distribution to subgroups of this group. *distribution* should not be in the lowest level group containing storage nodes, as here the ideal state algorithm is used directly. In higher level groups, *distribution* is mandatory. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **partitions** | required if there are subgroups in the group | string | | String conforming to the partition specification:

Partition specification    Description

\*   Distribute all copies over 1 of N groups
1\|\*    Distribute all copies over 2 of N groups
1\|1\|\*   Distribute all copies over 3 of N groups | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**partitions**required if there are subgroups in the groupstringString conforming to the partition specification:

Partition specification &emsp;&emsp; Description

* &emsp;&emsp;Distribute all copies over 1 of N groups
1|* &emsp;&emsp; Distribute all copies over 2 of N groups
1|1|* &emsp;&emsp;Distribute all copies over 3 of N groups
The partition specification is used to evenly distribute content copies across groups. Set a number or `*` per group separated by pipes (e.g. `1|*` for two groups). See [sample deployment configurations](/en/operations/self-managed/sizing-examples). @@ -310,7 +491,15 @@ Contained in [engine](#engine). If specified, the content cluster will use the P ## searchable-copies -Contained in [proton](#proton). Default value is 2, or [redundancy](#redundancy), if lower. If set to less than redundancy, only some of the stored copies are ready for searching at any time. This means that node failures causes temporary data unavailability while the alternate copies are being indexed for search. The benefit is using less memory, trading off availability during transitions. Refer to [bucket move](/en/content/proton#bucket-move). +Contained in [proton](#proton). The number of data copies that are indexed (*ready*) and hence searchable. + +Vespa Cloud: Searchable copies *per group*, capped at [redundancy](#redundancy). Default 1 with multiple groups, otherwise 2 (or redundancy, if lower). + +Self-managed: The total searchable copies, divided evenly across groups - must be divisible by the number of groups. Default 2 or the number of groups if higher, or 1 if redundancy is 1. + +In clusters using only [streaming search](/en/performance/streaming-search) there is no index, so a searchable copy costs no extra resources - the default is redundancy, making failover instant. + +If set to less than redundancy, only some of the stored copies are ready for searching at any time. This means that node failures causes temporary data unavailability while the alternate copies are being indexed for search. The benefit is using less memory, trading off availability during transitions. Refer to [bucket move](/en/content/proton#bucket-move). If updating documents or using [document selection](#documents) for garbage collection, consider setting [fast-access](/en/reference/schemas/schemas#attribute) on the subset of attribute fields used for this to make sure that these attributes are always kept in memory for fast access. Note that this is only useful if `searchable-copies` is less than `redundancy`. Read more in [proton](/en/content/proton). @@ -320,24 +509,76 @@ If updating documents or using [document selection](#documents) for garbage coll Contained in [proton](#proton), optional. Tune settings for the search nodes in a content cluster - sub-element: -| Element | Required | Quantity | -| --- | --- | --- | -| [searchnode](#searchnode) | No | Zero or one | + + + + + + + + + + + + + + + +
ElementRequiredQuantity
searchnodeNoZero or one
## searchnode Contained in [tuning](#tuning-proton), optional. Tune settings for search nodes in a content cluster - sub-elements: -| Element | Required | Quantity | -| --- | --- | --- | -| [lidspace](#lidspace) | No | Zero or one | -| | -| [requestthreads](#requestthreads) | No | Zero or one | -| [flushstrategy](#flushstrategy) | No | Zero or one | -| [initialize](#initialize) | No | Zero or one | -| [feeding](#feeding) | No | Zero or one | -| [index](#index) | No | Zero or one | -| [summary](#summary) | No | Zero or one | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementRequiredQuantity
lidspaceNoZero or one
requestthreadsNoZero or one
flushstrategyNoZero or one
initializeNoZero or one
feedingNoZero or one
indexNoZero or one
summaryNoZero or one
```xml @@ -357,11 +598,36 @@ Contained in [tuning](#tuning-proton), optional. Tune settings for search nodes Contained in [searchnode](#searchnode), optional. Tune the number of request threads used on a content node, see [thread-configuration](/en/performance/sizing-search#thread-configuration) for details. Sub-elements: -| Element | Required | Default | Description | -| --- | --- | --- | --- | -| **search** | Optional | **Vespa Cloud:** min(vcpu\*4 + persearch - 1, vcpu\*persearch) **Self-hosted:** 64. | Total size of the match engine thread pool. Together with `persearch`, this determines the maximum number of queries that can execute concurrently: `search / persearch`. See the [Vespa serving scaling guide](/en/performance/sizing-search#thread-configuration) for sizing guidance. | -| **persearch** | Optional | 1 | Maximum number of threads used per search. A higher value reduces the time queries spend in query evaluation, except time spent in ANN which is single-threaded. This number of threads is held for each query for the duration of the query, also when much of the time is spent on single-threaded operations. See the [Vespa serving scaling guide](/en/performance/sizing-search) for an introduction of using multiple threads per search per node to reduce query latency. Number of threads per search can be adjusted down per *rank-profile* using [num-threads-per-search](/en/reference/schemas/schemas#num-threads-per-search). | -| **summary** | Optional | **Vespa Cloud:** vcpu **Self-hosted:** 16 | Number of summary threads. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementRequiredDefaultDescription
**search**Optional**Vespa Cloud:** min(vcpu*4 + persearch - 1, vcpu*persearch) **Self-hosted:** 64.Total size of the match engine thread pool. Together with {`persearch`}, this determines the maximum number of queries that can execute concurrently: {`search / persearch`}. See the Vespa serving scaling guide for sizing guidance.
**persearch**Optional1Maximum number of threads used per search. A higher value reduces the time queries spend in query evaluation, except time spent in ANN which is single-threaded. This number of threads is held for each query for the duration of the query, also when much of the time is spent on single-threaded operations. See the Vespa serving scaling guide for an introduction of using multiple threads per search per node to reduce query latency. Number of threads per search can be adjusted down per *rank-profile* using num-threads-per-search.
**summary**Optional**Vespa Cloud:** vcpu **Self-hosted:** 16Number of summary threads.
```xml @@ -591,10 +857,33 @@ $$ L_{p r o t o n} = L_{c l u s t e r} + \frac{1 - L_{c l u s t e r}}{2} $$ -| Element | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **disk** | optional | float \[0, 1\] | 0.9 | Fraction of total space on the disk partition used before put and update operations are rejected | -| **memory** | optional | float \[0, 1\] | 0.9 | Fraction of physical memory that can be resident memory in anonymous mapping by proton before put and update operations are rejected | + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementRequiredValueDefaultDescription
**disk**optionalfloat [0, 1]0.9Fraction of total space on the disk partition used before put and update operations are rejected
**memory**optionalfloat [0, 1]0.9Fraction of physical memory that can be resident memory in anonymous mapping by proton before put and update operations are rejected
Example: @@ -651,11 +940,40 @@ Contained in [content](#content), optional. Optional tuning parameters are: [buc Contained in [tuning](#tuning). The [bucket](/en/content/buckets) is the fundamental unit of distribution and management in a content cluster. Buckets are auto-split, no need to configure for most applications. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **max-documents** | optional | integer | 1024 | Maximum number of documents per content bucket. Buckets are split in two if they have more documents than this. Keep this value below 16K. | -| **max-size** | optional | integer | 32MiB | Maximum size (in bytes) of a bucket. This is the sum of the serialized size of all documents kept in the bucket. Buckets are split in two if they have a larger size than this. Keep this value below 100 MiB. | -| **minimum-bits** | optional | integer | | Override the ideal distribution bit count configured for this cluster. Prefer to use the [distribution type](#distribution_type) setting instead if the default distribution bit count does not fit the cluster. This variable is intended for testing and to work around possible distribution bit issues. Most users should not need this option. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**max-documents**optionalinteger1024Maximum number of documents per content bucket. Buckets are split in two if they have more documents than this. Keep this value below 16K.
**max-size**optionalinteger32MiBMaximum size (in bytes) of a bucket. This is the sum of the serialized size of all documents kept in the bucket. Buckets are split in two if they have a larger size than this. Keep this value below 100 MiB.
**minimum-bits**optionalintegerOverride the ideal distribution bit count configured for this cluster. Prefer to use the distribution type setting instead if the default distribution bit count does not fit the cluster. This variable is intended for testing and to work around possible distribution bit issues. Most users should not need this option.
## min-node-ratio-per-group @@ -687,9 +1005,26 @@ This configuration can be changed live as the system is running and altered limi Contained in [tuning](#tuning). Tune the distribution algorithm used in the cluster. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **type** | optional | loose \| strict \| legacy | loose | When the number of a nodes configured in a system changes over certain limits, the system will automatically trigger major redistributions of documents. This is to ensure that the number of buckets is appropriate for the number of nodes in the cluster. This enum value specifies how aggressive the system should be in triggering such distribution changes.

The default of `loose` strikes a balance between rarely altering the distribution of the cluster and keeping the skew in document distribution low. It is recommended that you use the default mode unless you have empirically observed that it causes too much skew in load or document distribution.

Note that specifying `minimum-bits` under [bucket-splitting](#bucket-splitting) overrides this setting and effectively "locks" the distribution in place. | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**type**optionalloose | strict | legacylooseWhen the number of a nodes configured in a system changes over certain limits, the system will automatically trigger major redistributions of documents. This is to ensure that the number of buckets is appropriate for the number of nodes in the cluster. This enum value specifies how aggressive the system should be in triggering such distribution changes.

The default of {`loose`} strikes a balance between rarely altering the distribution of the cluster and keeping the skew in document distribution low. It is recommended that you use the default mode unless you have empirically observed that it causes too much skew in load or document distribution.

Note that specifying {`minimum-bits`} under bucket-splitting overrides this setting and effectively "locks" the distribution in place.
## max-document-size @@ -709,10 +1044,33 @@ Example: Contained in [tuning](#tuning). Defines throttling parameters for bucket merge operations. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **max-per-node** | optional | number | | Maximum number of parallel active bucket merge operations. | -| **max-queue-size** | optional | number | | Maximum size of the merge bucket queue, before reporting BUSY back to the distributors. | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**max-per-node**optionalnumberMaximum number of parallel active bucket merge operations.
**max-queue-size**optionalnumberMaximum size of the merge bucket queue, before reporting BUSY back to the distributors.
## persistence-threads @@ -722,19 +1080,65 @@ Contained in [tuning](#tuning). Defines the number of persistence threads per pa Contained in [tuning](#tuning). Tuning parameters for visitor operations. Might contain [max-concurrent](#max-concurrent). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **thread-count** | optional | number | | The maximum number of threads in which to execute visitor operations. A higher number of threads may increase performance, but may use more memory. | -| **max-queue-size** | optional | number | | Maximum size of the pending visitor queue, before reporting BUSY back to the distributors. | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**thread-count**optionalnumberThe maximum number of threads in which to execute visitor operations. A higher number of threads may increase performance, but may use more memory.
**max-queue-size**optionalnumberMaximum size of the pending visitor queue, before reporting BUSY back to the distributors.
## max-concurrent Contained in [visitors](#visitors). Defines how many visitors can be active concurrently on each storage node. The number allowed depends on priority - lower priority visitors should not block higher priority visitors completely. To implement this, specify a fixed and a variable number. The maximum active is calculated by adjusting the variable component using the priority, and adding the fixed component. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **fixed** | optional | number | [16](https://github.com/vespa-engine/vespa/blob/master/storage/src/vespa/storage/visiting/stor-visitor.def) | The fixed component of the maximum active count | -| **variable** | optional | number | [64](https://github.com/vespa-engine/vespa/blob/master/storage/src/vespa/storage/visiting/stor-visitor.def) | The variable component of the maximum active count | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**fixed**optionalnumber16The fixed component of the maximum active count
**variable**optionalnumber64The variable component of the maximum active count
## resource-limits @@ -746,10 +1150,33 @@ Contained in [tuning](#tuning). Specifies resource limits used to decide whether The content nodes require resource headroom to handle extra documents as part of re-distribution during node failure, and spikes when running [maintenance jobs](/en/content/proton#proton-maintenance-jobs). Tuning these limits should be done with extreme care, and setting them too high might lead to permanent data loss. They are best left untouched, using the defaults, and cannot be set in Vespa Cloud.
-| Element | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **disk** | optional | float \[0, 1\] | 0.8 | Fraction of total space on the disk partition used on a content node before feed is blocked | -| **memory** | optional | float \[0, 1\] | 0.8/0.75 | Fraction of physical memory that can be resident memory in anonymous mapping on a content node before feed is blocked. Total physical memory is sampled as the minimum of `sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE)` and the cgroup (v1 or v2) memory limit. Nodes with 8 Gib or less memory in Vespa Cloud has a limit of 0.75. | + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementRequiredValueDefaultDescription
**disk**optionalfloat [0, 1]0.8Fraction of total space on the disk partition used on a content node before feed is blocked
**memory**optionalfloat [0, 1]0.8/0.75Fraction of physical memory that can be resident memory in anonymous mapping on a content node before feed is blocked. Total physical memory is sampled as the minimum of {`sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE)`} and the cgroup (v1 or v2) memory limit. Nodes with 8 Gib or less memory in Vespa Cloud has a limit of 0.75.
Example - in the content tag: ```xml @@ -765,24 +1192,118 @@ Example - in the content tag: Contained in [tuning](#tuning). Tune the query dispatch behavior - child elements: -| Element | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **max-hits-per-partition** | optional | Integer | No capping: Return all | Maximum number of hits to return from a content node. By default, a query returns the requested number of hits + offset from every content node to the container. The container orders the hits globally according to the query, then discards all hits beyond the number requested.

In a system with a large fan-out, this consumes network bandwidth and the container nodes easily network saturated. Containers will also sort and discard more hits than optimal.

When there are sufficiently many search nodes, assuming an even distribution of the hits, it suffices to only return a fraction of the request number of hits from each node. Note that changing this number will have global ordering impact. See *top-k-probability* below for improving performance with fewer hits. | -| **dispatch-policy | optional** | adaptive / best-of-random-2 / round-robin | adaptive | With [grouped distribution](/en/performance/sizing-search#data-distribution): Configure policy for choosing which group shall receive the next query request. Coverage requirements is considered when choosing a group. Note that multiphase requests that requires or benefits from hitting the same group in all phases are always hashed.

**adaptive**
Measures latency, preferring lower latency groups, selecting group `i` has a probability proportional to 1 / (latency for group `i`).

**best-of-random-2**
Selects 2 random groups and selects the one with the lowest latency.

**round-robin**
Selects groups in a round-robin manner, giving fair distribution of queries to each group. | -| **prioritize-availability** | optional | Boolean | true | With [grouped distribution](/en/performance/sizing-search#data-distribution): If true, or by default, all groups that are within min-active-docs-coverage of the **median** of the document count of other groups will be used to service queries. If set to false, only groups within min-active-docs-coverage of the **max** document count will be used, with the consequence that full coverage is prioritized over availability when multiple groups are lacking content, since the remaining groups may not be able to service the full query load. | -| **min-active-docs-coverage** | optional | A float percentage | 97 | With [grouped distribution](/en/performance/sizing-search#data-distribution): The percentage of active documents a group must have, relative to the median across all groups in the content cluster, to be considered active for serving queries. Because of measurement timing differences, it is not advisable to tune this above 99 percent. | -| **top-k-probability** | optional | Double | 0.9999 | Probability that the top K hits will be the globally best. Based on this probability, the dispatcher will fetch enough hits from each node to achieve this. The only way to guarantee a probability of 1.0 is to fetch K hits from each partition. However, by reducing the probability from 1.0 to 0.99999, one can significantly reduce number of hits fetched and save both bandwidth and latency. The number of hits to fetch from each partition is computed as:

$$ q = \frac{k}{n} + q T \left(\right. p , 30 \left.\right) \times \sqrt{k \times \frac{1}{n} \times \left(\right. 1 - \frac{1}{n} \left.\right)} $$

where qT is a Student's t-distribution. With n=10 partitions, k=200 hits and p=0.99999, only 45 hits per partition is needed, as opposed to 200 when p=1.0.

Use this option to reduce network and container cpu/memory in clusters with many nodes per group - see [Vespa Serving Scaling Guide](/en/performance/sizing-search). | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementRequiredValueDefaultDescription
**max-hits-per-partition**optionalIntegerNo capping: Return allMaximum number of hits to return from a content node. By default, a query returns the requested number of hits + offset from every content node to the container. The container orders the hits globally according to the query, then discards all hits beyond the number requested.

In a system with a large fan-out, this consumes network bandwidth and the container nodes easily network saturated. Containers will also sort and discard more hits than optimal.

When there are sufficiently many search nodes, assuming an even distribution of the hits, it suffices to only return a fraction of the request number of hits from each node. Note that changing this number will have global ordering impact. See *top-k-probability* below for improving performance with fewer hits.
**dispatch-policyoptional**adaptive / best-of-random-2 / round-robinadaptiveWith grouped distribution: Configure policy for choosing which group shall receive the next query request. Coverage requirements is considered when choosing a group. Note that multiphase requests that requires or benefits from hitting the same group in all phases are always hashed.

**adaptive**
Measures latency, preferring lower latency groups, selecting group {`i`} has a probability proportional to 1 / (latency for group {`i`}).

**best-of-random-2**
Selects 2 random groups and selects the one with the lowest latency.

**round-robin**
Selects groups in a round-robin manner, giving fair distribution of queries to each group.
**prioritize-availability**optionalBooleantrueWith grouped distribution: If true, or by default, all groups that are within min-active-docs-coverage of the **median** of the document count of other groups will be used to service queries. If set to false, only groups within min-active-docs-coverage of the **max** document count will be used, with the consequence that full coverage is prioritized over availability when multiple groups are lacking content, since the remaining groups may not be able to service the full query load.
**min-active-docs-coverage**optionalA float percentage97With grouped distribution: The percentage of active documents a group must have, relative to the median across all groups in the content cluster, to be considered active for serving queries. Because of measurement timing differences, it is not advisable to tune this above 99 percent.
**top-k-probability**optionalDouble0.9999Probability that the top K hits will be the globally best. Based on this probability, the dispatcher will fetch enough hits from each node to achieve this. The only way to guarantee a probability of 1.0 is to fetch K hits from each partition. However, by reducing the probability from 1.0 to 0.99999, one can significantly reduce number of hits fetched and save both bandwidth and latency. The number of hits to fetch from each partition is computed as:

$$ q = \frac{k}{n} + q T \left(\right. p , 30 \left.\right) \times \sqrt{k \times \frac{1}{n} \times \left(\right. 1 - \frac{1}{n} \left.\right)} $$

where qT is a Student's t-distribution. With n=10 partitions, k=200 hits and p=0.99999, only 45 hits per partition is needed, as opposed to 200 when p=1.0.

Use this option to reduce network and container cpu/memory in clusters with many nodes per group - see Vespa Serving Scaling Guide.
## cluster-controller Contained in [tuning](#tuning). Tuning parameters for the cluster controller managing this cluster - child elements: -| Element | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **init-progress-time** | optional | | | If the initialization progress count have not been altered for this amount of seconds, the node is assumed to have deadlocked and is set down. Note that initialization may actually be prioritized lower now, so setting a low value here might cause false positives. Though if it is set down for wrong reason, when it will finish initialization and then be set up again. | -| **transition-time** | optional | | [storage\_transition\_time](https://github.com/vespa-engine/vespa/blob/master/configdefinitions/src/vespa/fleetcontroller.def) [distributor\_transition\_time](https://github.com/vespa-engine/vespa/blob/master/configdefinitions/src/vespa/fleetcontroller.def) | The transition time states how long (in seconds) a node will be in maintenance mode during what looks like a controlled restart. Keeping a node in maintenance mode during a restart allows a restart without the cluster trying to create new copies of all the data immediately. If the node has not started or got back up within the transition time, the node is set down, in which case, new full bucket copies will be created. Note separate defaults for distributor and storage (i.e. search) nodes. | -| **max-premature-crashes** | optional | | [max\_premature\_crashes](https://github.com/vespa-engine/vespa/blob/master/configdefinitions/src/vespa/fleetcontroller.def) | The maximum number of crashes allowed before a content node is permanently set down by the cluster controller. If the node has a stable up or down state for more than the *stable-state-period*, the crash count is reset. However, resetting the count will not re-enable the node again if it has been disabled - restart the cluster controller to reset. | -| **stable-state-period** | optional | | [stable\_state\_time\_period](https://github.com/vespa-engine/vespa/blob/master/configdefinitions/src/vespa/fleetcontroller.def) | If a content node's state doesn't change for this many seconds, it's state is considered *stable*, clearing the premature crash count. | -| **min-distributor-up-ratio** | optional | | [min\_distributor\_up\_ratio](https://github.com/vespa-engine/vespa/blob/master/configdefinitions/src/vespa/fleetcontroller.def) | The minimum ratio of distributors that are required to be *up* for the cluster state to be *up*. | -| **min-storage-up-ratio** | optional | | [min\_storage\_up\_ratio](https://github.com/vespa-engine/vespa/blob/master/configdefinitions/src/vespa/fleetcontroller.def) | The minimum ratio of content nodes that are required to be *up* for the cluster state to be *up*. | -| **groups-allowed-down-ratio** | optional | | [groups-allowed-down-ratio](https://github.com/vespa-engine/vespa/blob/master/configdefinitions/src/vespa/fleetcontroller.def) | A ratio for the number of content groups that are allowed to be down simultaneously. A value of 0.5 means that 50% of the groups are allowed to be down. The default is to allow only one group to be down at a time. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementRequiredValueDefaultDescription
**init-progress-time**optionalIf the initialization progress count have not been altered for this amount of seconds, the node is assumed to have deadlocked and is set down. Note that initialization may actually be prioritized lower now, so setting a low value here might cause false positives. Though if it is set down for wrong reason, when it will finish initialization and then be set up again.
**transition-time**optionalstorage_transition_time distributor_transition_timeThe transition time states how long (in seconds) a node will be in maintenance mode during what looks like a controlled restart. Keeping a node in maintenance mode during a restart allows a restart without the cluster trying to create new copies of all the data immediately. If the node has not started or got back up within the transition time, the node is set down, in which case, new full bucket copies will be created. Note separate defaults for distributor and storage (i.e. search) nodes.
**max-premature-crashes**optionalmax_premature_crashesThe maximum number of crashes allowed before a content node is permanently set down by the cluster controller. If the node has a stable up or down state for more than the *stable-state-period*, the crash count is reset. However, resetting the count will not re-enable the node again if it has been disabled - restart the cluster controller to reset.
**stable-state-period**optionalstable_state_time_periodIf a content node's state doesn't change for this many seconds, it's state is considered *stable*, clearing the premature crash count.
**min-distributor-up-ratio**optionalmin_distributor_up_ratioThe minimum ratio of distributors that are required to be *up* for the cluster state to be *up*.
**min-storage-up-ratio**optionalmin_storage_up_ratioThe minimum ratio of content nodes that are required to be *up* for the cluster state to be *up*.
**groups-allowed-down-ratio**optionalgroups-allowed-down-ratioA ratio for the number of content groups that are allowed to be down simultaneously. A value of 0.5 means that 50% of the groups are allowed to be down. The default is to allow only one group to be down at a time.
diff --git a/mintlify-docs/en/reference/applications/services/docproc.mdx b/mintlify-docs/en/reference/applications/services/docproc.mdx index 7788a531d1..0b9dbd9b60 100644 --- a/mintlify-docs/en/reference/applications/services/docproc.mdx +++ b/mintlify-docs/en/reference/applications/services/docproc.mdx @@ -36,16 +36,75 @@ container The root element of the *document-processing* configuration model. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **numnodesperclient** | optional | | | **Deprecated:** Ignored and deprecated, will be removed in Vespa 9.

Set to some number below the amount of nodes in the cluster to limit how many nodes a single client can connect to. If you have many clients, this can reduce the memory usage on both document-processing and client nodes. | -| **preferlocalnode** | optional | | false | **Deprecated:** Ignored and deprecated, will be removed in Vespa 9.

Set to always prefer sending to a document-processing node running on the same host as the client. You should use this if you are running a client on each document-processing node. | -| **maxmessagesinqueue** | | | | | -| **maxqueuebytesize** | | | | **Deprecated:** Ignored and deprecated, will be removed in Vespa 9. | -| **maxqueuewait** | optional | | | The maximum number of seconds a message should wait in queue before being processed. Docproc will adapt its queue size to adhere to this. If the queue is full, new messages will be replied to with SESSION\_BUSY. | -| **maxconcurrentfactor** | | | | | -| **documentexpansionfactor** | optional | | | | -| **containercorememory** | | | | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**numnodesperclient**optional**Deprecated:** Ignored and deprecated, will be removed in Vespa 9.

Set to some number below the amount of nodes in the cluster to limit how many nodes a single client can connect to. If you have many clients, this can reduce the memory usage on both document-processing and client nodes.
**preferlocalnode**optionalfalse**Deprecated:** Ignored and deprecated, will be removed in Vespa 9.

Set to always prefer sending to a document-processing node running on the same host as the client. You should use this if you are running a client on each document-processing node.
**maxmessagesinqueue**
**maxqueuebytesize****Deprecated:** Ignored and deprecated, will be removed in Vespa 9.
**maxqueuewait**optionalThe maximum number of seconds a message should wait in queue before being processed. Docproc will adapt its queue size to adhere to this. If the queue is full, new messages will be replied to with SESSION_BUSY.
**maxconcurrentfactor**
**documentexpansionfactor**optional
**containercorememory**
## Document Processor elements @@ -68,15 +127,68 @@ Optional sub-elements: For more information on provides, before and after, see [Chained components](/en/applications/chaining). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| class | | | | | -| bundle | | | | | -| id | required | | | The component id of the documentprocessor instance. | -| idref | | | | | -| provides | optional | | | A space-separated list of names that represents what this documentprocessor produces. | -| before | optional | | | A space-separated list of phase or provided names. Phases or documentprocessors providing these names will be placed later in the docproc chain than this document processor. | -| after | optional | | | A space-separated list of phase or provided names. Phases or documentprocessors providing these names will be placed earlier in the docproc chain than this document processor. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
class
bundle
idrequiredThe component id of the documentprocessor instance.
idref
providesoptionalA space-separated list of names that represents what this documentprocessor produces.
beforeoptionalA space-separated list of phase or provided names. Phases or documentprocessors providing these names will be placed later in the docproc chain than this document processor.
afteroptionalA space-separated list of phase or provided names. Phases or documentprocessors providing these names will be placed earlier in the docproc chain than this document processor.
### documentprocessor @@ -90,11 +202,40 @@ Defines a documentprocessor instance of a user specified class. ``` -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| id | required | | | The component id of the documentprocessor instance. | -| class | optional | | | A component specification containing the name of the class to instantiate to create the document processor instance. If missing, copied from id. | -| bundle | optional | | | The bundle containing the class: The name in `` in pom.xml. If a bundle is not specified, the bundle containing document processors bundled with Vespa is used. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
idrequiredThe component id of the documentprocessor instance.
classoptionalA component specification containing the name of the class to instantiate to create the document processor instance. If missing, copied from id.
bundleoptionalThe bundle containing the class: The name in {``} in pom.xml. If a bundle is not specified, the bundle containing document processors bundled with Vespa is used.
## Docproc chain elements diff --git a/mintlify-docs/en/reference/applications/services/http.mdx b/mintlify-docs/en/reference/applications/services/http.mdx index 28222eee42..73a159ea9a 100644 --- a/mintlify-docs/en/reference/applications/services/http.mdx +++ b/mintlify-docs/en/reference/applications/services/http.mdx @@ -71,12 +71,47 @@ Example: The definition of a http server. Configure the server using [jdisc.http.connector.def](https://github.com/vespa-engine/vespa/blob/master/container-disc/src/main/resources/configdefinitions/jdisc.http.jdisc.http.connector.def). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The component ID | -| **port** | optional | number | The web services port of the [environment variables](/en/operations/self-managed/files-processes-and-ports#environment-variables) | Server port | -| **default-request-chain** | optional | string | | The default request chain to use for unmatched requests | -| **default-response-chain** | optional | string | | The default response chain to use for unmatched requests | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe component ID
**port**optionalnumberThe web services port of the environment variablesServer port
**default-request-chain**optionalstringThe default request chain to use for unmatched requests
**default-response-chain**optionalstringThe default response chain to use for unmatched requests
Example: @@ -120,10 +155,33 @@ Comma-separated list of TLS cipher suites to enable. The specified ciphers must Setup TLS on the HTTP server through a programmatic Java interface. The specified class must implement the [SslProvider](https://javadoc.io/doc/com.yahoo.vespa/container-disc/latest/com/yahoo/jdisc/http/SslProvider.html) interface. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **class** | required | string | | The class name | -| **bundle** | required | string | | The bundle name | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**class**requiredstringThe class name
**bundle**requiredstringThe bundle name
## filtering @@ -154,9 +212,26 @@ Example: ``` -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **strict-mode** | optional | boolean | true | When set to true, all requests must match a filter. For any requests not matching, an HTTP 403 response is returned. | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**strict-mode**optionalbooleantrueWhen set to true, all requests must match a filter. For any requests not matching, an HTTP 403 response is returned.
## binding @@ -173,13 +248,54 @@ The definition of a single filter, for referencing when defining chains. If a si Security\[Request/Response\]Filters are automatically wrapped in Security\[Request/Response\]FilterChains. This makes them behave like regular Request/Response filters with respect to chaining. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The component ID | -| **class** | optional | string | id | The class of the component, defaults to id | -| **bundle** | optional | string | id or class | The bundle to load the component from, defaults to class or id (if no class is given) | -| **before** | optional | string | | Space separated list of phases and/or filters which should succeed this phase | -| **class** | optional | string | id | Space separated list of phases and/or filters which should precede this phase | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe component ID
**class**optionalstringidThe class of the component, defaults to id
**bundle**optionalstringid or classThe bundle to load the component from, defaults to class or id (if no class is given)
**before**optionalstringSpace separated list of phases and/or filters which should succeed this phase
**class**optionalstringidSpace separated list of phases and/or filters which should precede this phase
Sub-elements: @@ -222,10 +338,33 @@ Only used to configure filters that are configured with `com.yahoo.jdisc.http.fi Defines a chain of request filters or response filters, respectively. A chain is a set ordered by dependencies. Dependencies are expressed through phases, which may depend upon other phases, or filters. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **inherits** | | string | | A space separated list of chains this chain should include the contents of | -| **excludes** | | string | | A space separated list of filters (contained in an inherited chain) this chain should not include | + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**inherits**stringA space separated list of chains this chain should include the contents of
**excludes**stringA space separated list of filters (contained in an inherited chain) this chain should not include
Sub-elements: @@ -278,11 +417,40 @@ A filter the chain under definition should exclude from the chain or chains it i Defines a phase, which is a checkpoint to help order filters. Filters and other phases may depend on a phase to be able to make assumptions about the order of filters. Contained in [chain](#chain). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The ID, or name, which other phases and filters may depend upon as a [successor](#before) or [predecessor](#after) | -| **before** | optional | string | | Space separated list of phases and/or filters which should succeed this phase | -| **after** | optional | string | | Space separated list of phases and/or filters which should precede this phase | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe ID, or name, which other phases and filters may depend upon as a successor or predecessor
**before**optionalstringSpace separated list of phases and/or filters which should succeed this phase
**after**optionalstringSpace separated list of phases and/or filters which should precede this phase
Sub-elements: diff --git a/mintlify-docs/en/reference/applications/services/processing.mdx b/mintlify-docs/en/reference/applications/services/processing.mdx index 4c06a854e1..a747ae738c 100644 --- a/mintlify-docs/en/reference/applications/services/processing.mdx +++ b/mintlify-docs/en/reference/applications/services/processing.mdx @@ -51,13 +51,54 @@ The URI to map the ProcessingHandler to. The default binding is `http://*/proces The definition of a single processor, for referencing when defining chains. If a single processor is to be used in multiple chains, it is cleaner to define it directly under `processing` and then refer to it with `idref`, than defining it inline separately for each chain. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The component ID | -| **class** | optional | string | | The class of the component, defaults to id | -| **bundle** | optional | string | | The bundle to load the component from, defaults to class or id (if no class is given) | -| **before** | optional | string | | Space separated list of phases and/or processors which should succeed this processor | -| **after** | optional | string | | Space separated list of phases and/or processors which should precede this processor | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe component ID
**class**optionalstringThe class of the component, defaults to id
**bundle**optionalstringThe bundle to load the component from, defaults to class or id (if no class is given)
**before**optionalstringSpace separated list of phases and/or processors which should succeed this processor
**after**optionalstringSpace separated list of phases and/or processors which should precede this processor
Example: @@ -69,11 +110,40 @@ Example: The definition of a renderer, for use by a Handler. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The component ID | -| **class** | optional | string | | The class of the component, defaults to id | -| **bundle** | optional | string | | The bundle to load the component from, defaults to class or id (if no class is given) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe component ID
**class**optionalstringThe class of the component, defaults to id
**bundle**optionalstringThe bundle to load the component from, defaults to class or id (if no class is given)
Example: @@ -85,9 +155,26 @@ Example: Reference to or inline definition of a processor in a chain. If inlining, same as [processor](#processor) - if referring to, use *idref* attribute: -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **idref** | | string | | Reference to the definition of this processor. | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**idref**stringReference to the definition of this processor.
Example: @@ -111,15 +198,68 @@ An element for defining a chain of [processors](/en/reference/applications/servi Searcher, Document processing and Processing chains can be modified at runtime without restarts. Modification includes adding/removing processors in chains and changing names of chains and processors. Make the change and [deploy](/en/basics/applications#deploying-applications). Some changes require a container restart, refer to [reconfiguring document processing](/en/applications/document-processors#reconfiguring-document-processing). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **idref** | | string | | A reference to a defined chain. Mutually exclusive with *id*. If *idref* is used, no other attributes apply. | -| **id** | required | string | | The chain ID. Required unless *idref* is used | -| **inherits** | optional | string | | A space-separated list of chains this chain should include the contents of - see example below. | -| **excludes** | optional | string | | A space-separated list of processors (contained in an inherited chain) this chain should not include. The exclusion is done before any consolidation of component references when inheriting chains. Example:

` `excludes="idOfProc1 idOfProc2">`
``
`
` | -| **class** | optional | string | | | -| **name** | | | | | -| **documentprocessors** | | | | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**idref**stringA reference to a defined chain. Mutually exclusive with *id*. If *idref* is used, no other attributes apply.
**id**requiredstringThe chain ID. Required unless *idref* is used
**inherits**optionalstringA space-separated list of chains this chain should include the contents of - see example below.
**excludes**optionalstringA space-separated list of processors (contained in an inherited chain) this chain should not include. The exclusion is done before any consolidation of component references when inheriting chains. Example:

{`
{`excludes="idOfProc1 idOfProc2">`}
{``}
{`
`}
**class**optionalstring
**name**
**documentprocessors**
## inherits @@ -145,11 +285,40 @@ Exclude components from inherited chains. Defines a phase, which is a named checkpoint to help order components inside a chain. Components and other phases may depend on a phase to be able to make assumptions about the order of components. Refer to the [Chained components](/en/applications/chaining) guide. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The ID, or name, which other phases and processors may depend upon as a [successor](#before) or [predecessor](#after). | -| **before** | optional | string | | Space-separated list of phases and/or processors which should succeed this phase | -| **after** | optional | string | | Space-separated list of phases and/or processors which should precede this phase | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe ID, or name, which other phases and processors may depend upon as a successor or predecessor.
**before**optionalstringSpace-separated list of phases and/or processors which should succeed this phase
**after**optionalstringSpace-separated list of phases and/or processors which should precede this phase
Optional sub-elements: diff --git a/mintlify-docs/en/reference/applications/services/search.mdx b/mintlify-docs/en/reference/applications/services/search.mdx index 404951c16e..9d74fbfa3b 100644 --- a/mintlify-docs/en/reference/applications/services/search.mdx +++ b/mintlify-docs/en/reference/applications/services/search.mdx @@ -52,14 +52,61 @@ A searcher definition causes the creation of exactly one searcher instance. This Searcher definition: -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The component id of the searcher instance. For inner searchers, the id must be unique inside the search chain. For outer searchers, the id must be unique. An inner searcher is not permitted to have the same id as an outer searcher. | -| **class** | optional | | | A component specification containing the name of the class to instantiate to create the searcher instance. If missing, copied from id | -| **bundle** | optional | | | A component specification containing the bundle symbolic name and version used to select the bundle: The name in `` in pom.xml. The class is loaded from this bundle. If no bundle is specified, it defaults to the bundle containing the searchers bundled with Vespa. | -| **provides** | optional | | | A space-separated list of names that represents what this searcher produces. For more information on provides, before and after, see [chained components](/en/applications/chaining) | -| **before** | optional | | | A space-separated list of phase or provided names. Phases or searchers providing these names will be placed later in the search chain than this searcher | -| **after** | optional | | | A space-separated list of phase or provided names. Phases or searchers providing these names will be placed earlier in the search chain than this searcher | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe component id of the searcher instance. For inner searchers, the id must be unique inside the search chain. For outer searchers, the id must be unique. An inner searcher is not permitted to have the same id as an outer searcher.
**class**optionalA component specification containing the name of the class to instantiate to create the searcher instance. If missing, copied from id
**bundle**optionalA component specification containing the bundle symbolic name and version used to select the bundle: The name in {``} in pom.xml. The class is loaded from this bundle. If no bundle is specified, it defaults to the bundle containing the searchers bundled with Vespa.
**provides**optionalA space-separated list of names that represents what this searcher produces. For more information on provides, before and after, see chained components
**before**optionalA space-separated list of phase or provided names. Phases or searchers providing these names will be placed later in the search chain than this searcher
**after**optionalA space-separated list of phase or provided names. Phases or searchers providing these names will be placed earlier in the search chain than this searcher
Example: @@ -71,9 +118,26 @@ Example: Searcher reference: -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **idref** | required | string | | Reference to a searcher definition | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**idref**requiredstringReference to a searcher definition
Example: @@ -126,11 +190,40 @@ Contained in [source](#source) or [provider](#provider). Specifies *how* a feder When federating to a source or provider, the federation searcher per default uses the federation options from the search chain. If a [source reference](#source-reference) contains federation options, it overrides the options of the search chain when used from the enclosing federation searcher. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **timeout** | optional | number | | The minimum number of seconds or milliseconds (if ms is present) the federation searcher waits for the federated search chain executing the query | -| **requestTimeout** | optional | number | | The minimum number of seconds or milliseconds (if ms is present) the search chain executing the query should continue execution. In some cases it is useful to set this higher than the timeout, such that a chain can keep waiting for requested data longer than the query is waiting for the chain. This allows queries to populate caches within the search chain even though populating the caches requires waiting longer than the query timeout | -| **optional** | optional | true/false | false | Determines if the federation searcher should wait for this search chain at all. Normally, it only waits for mandatory (i.e. not optional) search chains, and when they are done, cancels the remaining search chains that are not finished. If all the search chains federated to are optional, all of them will be treated as mandatory. All search chains are per default mandatory | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**timeout**optionalnumberThe minimum number of seconds or milliseconds (if ms is present) the federation searcher waits for the federated search chain executing the query
**requestTimeout**optionalnumberThe minimum number of seconds or milliseconds (if ms is present) the search chain executing the query should continue execution. In some cases it is useful to set this higher than the timeout, such that a chain can keep waiting for requested data longer than the query is waiting for the chain. This allows queries to populate caches within the search chain even though populating the caches requires waiting longer than the query timeout
**optional**optionaltrue/falsefalseDetermines if the federation searcher should wait for this search chain at all. Normally, it only waits for mandatory (i.e. not optional) search chains, and when they are done, cancels the remaining search chains that are not finished. If all the search chains federated to are optional, all of them will be treated as mandatory. All search chains are per default mandatory
Example: @@ -142,11 +235,40 @@ Example: The definition of a [search result renderer](/en/applications/result-renderers). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | The component ID | -| **class** | optional | string | | The class of the component, defaults to id | -| **bundle** | optional | string | | The bundle to load the component from: The name in `` in your pom.xml. If no bundle is given, the bundle containing renderers provided by Vespa is used. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringThe component ID
**class**optionalstringThe class of the component, defaults to id
**bundle**optionalstringThe bundle to load the component from: The name in {``} in your pom.xml. If no bundle is given, the bundle containing renderers provided by Vespa is used.
Example: @@ -232,19 +354,65 @@ Each searcher reference must match the *type* of the searcher definition. So for A provider is a search chain responsible for talking to an external service. Everything covered in [chain](#chain) is also valid for providers. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **id** | required | string | | ID | -| **excludes** | optional | | | | -| **type** | optional | local | | Determines which searchers are implicitly added to this search chain to talk to the external service. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**id**requiredstringID
**excludes**optional
**type**optionallocalDetermines which searchers are implicitly added to this search chain to talk to the external service.
### local provider Local providers are providers with the type set to *local*, accessing a local Vespa cluster (i.e. a content cluster in the same application). -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **cluster** | required | string | | The name of the local cluster. | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**cluster**requiredstringThe name of the local cluster.
```xml @@ -287,9 +455,26 @@ Optional sub-elements: The number of permanent threads relative to number of vCPU cores. Default value is `10`. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| **max** | optional | number | equal to `` | The maximum number of threads relative to vCPU cores. Value must be greater than or equal to ``. | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
**max**optionalnumberequal to {``}The maximum number of threads relative to vCPU cores. Value must be greater than or equal to {``}.
### queue diff --git a/mintlify-docs/en/reference/applications/services/services.mdx b/mintlify-docs/en/reference/applications/services/services.mdx index d16fa3c11b..6064990cc8 100644 --- a/mintlify-docs/en/reference/applications/services/services.mdx +++ b/mintlify-docs/en/reference/applications/services/services.mdx @@ -17,9 +17,26 @@ Elements: ## `` -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| version | required | number | | 1.0 in this version of Vespa | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
versionrequirednumber1.0 in this version of Vespa
Optional subelements (one or more of *container* or *content* is required): @@ -39,12 +56,42 @@ The *nodes* element configures the hardware resources of a cluster, and so is us It is possible to specify both to make an application package work in both environments, and it is always possible to deploy either type for development on the other: When the nodes tag has Vespa Cloud content it is interpreted as a single-node cluster in a self-hosted environment and vice versa. -| Attribute | type | Default | Description | -| --- | --- | --- | --- | -| **count** | integer or range | | Vespa Cloud: The number of nodes of the cluster. | -| **exclusive** | boolean | false | Optional. Vespa Cloud: If true these nodes will never be placed on shared hosts even when this would otherwise be allowed (which is only for content nodes in some environments). When nodes are allocated exclusively, the resources must match the resources of the host exactly. | -| **groups** | integer or range | | Vespa Cloud content nodes only, optional: Integer or range. Sets the number of groups into which content nodes should be divided. Each group will have an equal share of the nodes, and one or more complete copies of the corpus and index, and each query will be routed to just one group - see [grouped distribution](/en/content/elasticity#grouped-distribution). This allows scaling to a higher query load than is possible with just a single group. | -| **group-size** | integer or range | | Vespa Cloud content nodes only, optional: Integer or range where either value can be skipped (replaced by an empty string) to create a one-sided limit. This can be set as an alternative to explicitly setting `groups`: The group sizes used will always be within these limits (inclusive), for any `count`. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributetypeDefaultDescription
**count**integer or rangeVespa Cloud: The number of nodes of the cluster.
**exclusive**booleanfalseOptional. Vespa Cloud: If true these nodes will never be placed on shared hosts even when this would otherwise be allowed (which is only for content nodes in some environments). When nodes are allocated exclusively, the resources must match the resources of the host exactly.
**groups**integer or rangeVespa Cloud content nodes only, optional: Integer or range. Sets the number of groups into which content nodes should be divided. Each group will have an equal share of the nodes, and one or more complete copies of the corpus and index, and each query will be routed to just one group - see grouped distribution. This allows scaling to a higher query load than is possible with just a single group.
**group-size**integer or rangeVespa Cloud content nodes only, optional: Integer or range where either value can be skipped (replaced by an empty string) to create a one-sided limit. This can be set as an alternative to explicitly setting {`groups`}: The group sizes used will always be within these limits (inclusive), for any {`count`}.
If neither *groups* nor *group-size* is set, all nodes belong to a single group. Read more in [topology](/en/performance/topology-and-resizing). @@ -58,14 +105,60 @@ The resources must match a node flavor in [AWS](/en/performance/instance-types/a **Subelements:** [``](#gpu) -| Attribute | type | Default | Description | -| --- | --- | --- | --- | -| **vcpu** | float or range | 2 | CPU (virtual threads) | -| **memory** | float or range, each followed by a byte unit, such as "Gb" | 8 Gb in container clusters, 16 Gb in content clusters | Memory | -| **disk** | float or range, each followed by a byte unit, such as "Gb" | 50 in container clusters, 300 in content clusters | Disk space. To fit core dumps/heap dumps, the disk space should be larger than 3 x memory size for content nodes, 2 x memory size for container nodes. If disk size is not explicitly specified, Vespa Cloud chooses a default disk size. The default may be automatically increased to satisfy the minimum disk-to-memory ratio. When both disk and memory are explicitly specified, Vespa Cloud enforces the same minimum ratios. | -| **storage-type** | string (enum) | `any` | The type of storage to use. This is useful to specify local storage when network storage provides insufficient io operations or too noisy io performance:

• `local`: Node-local storage is required.
• `remote`: Network storage must be used.
• `any`: Both remote or local storage may be used. | -| **disk-speed** | string (enum) | `fast` | The required disk speed category:

• `fast`: SSD-like disk speed is required
• `slow`: This is sized for spinning disk speed
• `any`: Performance does not depend on disk speed (often suitable for container clusters). | -| **architecture** | string (enum) | `any` | Node CPU architecture:

• `x86_64`
• `arm64`
• `any`: Use any of the available architectures. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributetypeDefaultDescription
**vcpu**float or range2CPU (virtual threads)
**memory**float or range, each followed by a byte unit, such as "Gb"8 Gb in container clusters, 16 Gb in content clustersMemory
**disk**float or range, each followed by a byte unit, such as "Gb"50 in container clusters, 300 in content clustersDisk space. To fit core dumps/heap dumps, the disk space should be larger than 3 x memory size for content nodes, 2 x memory size for container nodes. If disk size is not explicitly specified, Vespa Cloud chooses a default disk size. The default may be automatically increased to satisfy the minimum disk-to-memory ratio. When both disk and memory are explicitly specified, Vespa Cloud enforces the same minimum ratios.
**storage-type**string (enum){`any`}The type of storage to use. This is useful to specify local storage when network storage provides insufficient io operations or too noisy io performance:

{`local`}: Node-local storage is required.
{`remote`}: Network storage must be used.
{`any`}: Both remote or local storage may be used.
**disk-speed**string (enum){`fast`}The required disk speed category:

{`fast`}: SSD-like disk speed is required
{`slow`}: This is sized for spinning disk speed
{`any`}: Performance does not depend on disk speed (often suitable for container clusters).
**architecture**string (enum){`any`}Node CPU architecture:

{`x86_64`}
{`arm64`}
{`any`}: Use any of the available architectures.
**max-cost-factor**float >= 1.0{`1.0`}Used to allow provisioning of machine types larger than what's specified by these resources when no exactly matching types are currently available for provisioning. This number specifies the max oversize of a provisioned host measured in list price. For example, if this is set to 2, up to twice as costly machines as required may be provisioned.

Exact matches are always preferred when available, and the system will migrate to exactly matching resources in the background as they become available. This has no impact on the resources available to the container node of the Vespa cluster, which will always match the resource spec. This can only be set on enclave deployed applications.
Ranges are expressed by the syntax `[lower-limit, upper-limit]`; Both limits are inclusive. Any value set as a range will be [autoscaled](/en/operations/autoscaling). @@ -73,9 +166,26 @@ Ranges are expressed by the syntax `[lower-limit, upper-limit]`; Both limits are Under [nodes](#nodes) on self-managed systems: Specifies a node that should be a member in the cluster. -| Attribute | Required | Value | Default | Description | -| --- | --- | --- | --- | --- | -| hostalias | required | string | | a host name which must be mapped to a full hostname in [hosts.xml](/en/reference/applications/hosts) | + + + + + + + + + + + + + + + + + + + +
AttributeRequiredValueDefaultDescription
hostaliasrequiredstringa host name which must be mapped to a full hostname in hosts.xml
## `` @@ -86,10 +196,27 @@ Limitations: - Available in AWS zones only - Valid for container clusters only -| Attribute | type | Description | -| --- | --- | --- | -| **count** | integer | Number of GPUs | -| **memory** | integer, followed by a byte unit, such as "Gb" | Amount of memory per GPU. Total amount of GPU memory available is this number multiplied by `count`. | + + + + + + + + + + + + + + + + + + + + +
AttributetypeDescription
**count**integerNumber of GPUs
**memory**integer, followed by a byte unit, such as "Gb"Amount of memory per GPU. Total amount of GPU memory available is this number multiplied by {`count`}.
Example: diff --git a/mintlify-docs/en/reference/applications/testing-java.mdx b/mintlify-docs/en/reference/applications/testing-java.mdx index 643fd6b5f5..946075629a 100644 --- a/mintlify-docs/en/reference/applications/testing-java.mdx +++ b/mintlify-docs/en/reference/applications/testing-java.mdx @@ -18,12 +18,42 @@ The [testing documentation](/en/applications/testing) defines three test scenari $ mvn test -D test.categories=system -D vespa.test.config=/path-to/test-config.json ``` -| Category | Annotation | JUnit tag | Description | -| --- | --- | --- | --- | -| System test | @SystemTest | system | Independent, functional tests | -| Staging setup | @StagingSetup | staging-setup | Set state before upgrade | -| Staging test | @StagingTest | staging | Verify state after upgrade | -| Production test | @ProductionTest | production | Verify domain specific metrics | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryAnnotationJUnit tagDescription
System test@SystemTestsystemIndependent, functional tests
Staging setup@StagingSetupstaging-setupSet state before upgrade
Staging test@StagingTeststagingVerify state after upgrade
Production test@ProductionTestproductionVerify domain specific metrics
For an example including system and staging tests, check out the [sample application test suite](https://github.com/vespa-cloud/examples/tree/main/CI-CD/production-deployment-with-tests-java). diff --git a/mintlify-docs/en/reference/applications/testing.mdx b/mintlify-docs/en/reference/applications/testing.mdx index ef55b355cc..e1eb8b19aa 100644 --- a/mintlify-docs/en/reference/applications/testing.mdx +++ b/mintlify-docs/en/reference/applications/testing.mdx @@ -13,12 +13,37 @@ See the [testing guide](/en/applications/testing) for examples of how to run the The [testing documentation](/en/applications/testing) defines three test scenarios, comprised of four test code categories. For basic HTTP tests, the category of a test is defined by its placement in the application tests directory: -| Category | Directory | Description | -| --- | --- | --- | -| System test | tests/system-test/ | Independent, functional tests | -| Staging setup | tests/staging-setup/ | Set state before upgrade | -| Staging test | tests/staging-test/ | Verify state after upgrade | -| Production test | tests/production-test/ | Verify domain specific metrics | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryDirectoryDescription
System testtests/system-test/Independent, functional tests
Staging setuptests/staging-setup/Set state before upgrade
Staging testtests/staging-test/Verify state after upgrade
Production testtests/production-test/Verify domain specific metrics
**Note:** @@ -126,19 +151,96 @@ Each `.json` file directly under any of the directories listed above describes o A full list of fields, with description: -| Name | Parent | Type | Default | Description | -| --- | --- | --- | --- | --- | -| name | root step | string | file name, step *n* | Name used for display purposes in the test report. The file name is used by default for the test, while the 1-indexed "step n" is used for steps. | -| defaults | root | object | | Default settings for all steps in this test. May be overridden in each step. | -| steps | root | array | | The non-empty list of steps that constitute this test. | -| request | step | object | | A specification of a request to send, to Vespa, or to an external service. | -| cluster | defaults request | string | | The name of the Vespa cluster to send a request to, as specified in [services.xml](/en/reference/applications/services/services). If this is not specified, and the application has a single container cluster, this is used. | -| method | request | string | "GET" | The HTTP method to use for a request. | -| uri | request | string | "/search/" | When this is path + (encoded) query, the host is determined by the specified cluster; otherwise, it must be an absolute URI (with scheme), and its host is used. Query parameters specified here override those specified in the defaults. | -| parameters | defaults request | string object | | HTTP request query parameters. The values should not be encoded. These are merged with parameters from the specified URI, and override those specified in the defaults. If the value is a string, it must be a relative file reference to a parameters object. | -| body | request response | string object | | The body for a request, or the partial body (see [matching](#json-matching)) for a response. If the value is a string, it must be a relative file reference to a JSON object to be used in its place. | -| response | step | object | | A specification for assertions to make on the body of the HTTP response obtained by executing the HTTP request in the same step. | -| code | response | number | 200 | The status code the response should have. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameParentTypeDefaultDescription
nameroot stepstringfile name, step *n*Name used for display purposes in the test report. The file name is used by default for the test, while the 1-indexed "step n" is used for steps.
defaultsrootobjectDefault settings for all steps in this test. May be overridden in each step.
stepsrootarrayThe non-empty list of steps that constitute this test.
requeststepobjectA specification of a request to send, to Vespa, or to an external service.
clusterdefaults requeststringThe name of the Vespa cluster to send a request to, as specified in services.xml. If this is not specified, and the application has a single container cluster, this is used.
methodrequeststring"GET"The HTTP method to use for a request.
urirequeststring"/search/"When this is path + (encoded) query, the host is determined by the specified cluster; otherwise, it must be an absolute URI (with scheme), and its host is used. Query parameters specified here override those specified in the defaults.
parametersdefaults requeststring objectHTTP request query parameters. The values should not be encoded. These are merged with parameters from the specified URI, and override those specified in the defaults. If the value is a string, it must be a relative file reference to a parameters object.
bodyrequest responsestring objectThe body for a request, or the partial body (see matching) for a response. If the value is a string, it must be a relative file reference to a JSON object to be used in its place.
responsestepobjectA specification for assertions to make on the body of the HTTP response obtained by executing the HTTP request in the same step.
coderesponsenumber200The status code the response should have.
### JSON matching diff --git a/mintlify-docs/en/reference/applications/validation-overrides.mdx b/mintlify-docs/en/reference/applications/validation-overrides.mdx index a627fe2b30..edb28cc9f1 100644 --- a/mintlify-docs/en/reference/applications/validation-overrides.mdx +++ b/mintlify-docs/en/reference/applications/validation-overrides.mdx @@ -34,10 +34,27 @@ Any number of `allow` tags is permissible. Example: An `allow` tag disables a particular validation for a limited time and contains a single validation id. `allow` tags with unknown ids are ignored. -| Attribute | Mandatory | Value | -| --- | --- | --- | -| until | Yes | The last day this change is allowed, as a ISO-8601-format date in UTC, e.g. 2016-01-30. Dates may at most be 30 days in the future, but should be as close to now as possible for safety, while allowing time for review and propagation to all deployed zones. `allow`\-tags with dates in the past are ignored. | -| comment | No | Text explaining the reason for the change to humans. | + + + + + + + + + + + + + + + + + + + + +
AttributeMandatoryValue
untilYesThe last day this change is allowed, as a ISO-8601-format date in UTC, e.g. 2016-01-30. Dates may at most be 30 days in the future, but should be as close to now as possible for safety, while allowing time for review and propagation to all deployed zones. {`allow`}-tags with dates in the past are ignored.
commentNoText explaining the reason for the change to humans.
## List of validation overrides diff --git a/mintlify-docs/en/reference/clients/vespa-cli/vespa_auth_cert.mdx b/mintlify-docs/en/reference/clients/vespa-cli/vespa_auth_cert.mdx index 8641303e63..18a6786944 100644 --- a/mintlify-docs/en/reference/clients/vespa-cli/vespa_auth_cert.mdx +++ b/mintlify-docs/en/reference/clients/vespa-cli/vespa_auth_cert.mdx @@ -49,9 +49,11 @@ $ vespa auth cert -a my-tenant.my-app.my-instance path/to/application/package ### Options ```bash - -f, --force Force overwrite of existing certificate and private key - -h, --help help for cert - -N, --no-add Do not add certificate to the application package + -f, --force Force changes without prompting (overwrite when creating, prune when pruning) + -h, --help help for cert + --new-key Appends a new certificate if certificate already exists. Useful for rotating credentials + -N, --no-add Do not add certificate to the application package + --prune-old Remove all but the newest certificate from the certificate file. Useful after completing credential rotation ``` ### Options inherited from parent commands diff --git a/mintlify-docs/en/reference/operations/log-files.mdx b/mintlify-docs/en/reference/operations/log-files.mdx index ff37b5841b..94ee1e8e11 100644 --- a/mintlify-docs/en/reference/operations/log-files.mdx +++ b/mintlify-docs/en/reference/operations/log-files.mdx @@ -19,26 +19,87 @@ Log files are in a machine-readable log format, made more human-readable by [ves time host pid service component level message ``` -| Log field | Description | -| --- | --- | -| *time* | Time in seconds since 1970-01-01 UTC, with optional fractional seconds after. E.g. 1102675319.726342 | -| *host* | The hostname of the machine that produced this log entry | -| *pid* | The process id, and an optional thread-id of the process/thread that logged the message | -| *service* | The Vespa service name of the logger | -| *component* | The component name that logged. An application may have multiple subcomponents with their own component names, usually starts with the name of the binary | -| *level* | One of fatal, error, warning, info, config, event, debug, or spam | -| *message* | The log message itself. All dangerous characters are escaped (CR, NL, TAB, \\, ASCII < 32 and ASCII 128..159) | - -| Log level | Description | -| --- | --- | -| *fatal* | Fatal error messages. The application must exit immediately, and restarting it will not help | -| *error* | Error messages. These are serious, the application cannot function correctly | -| *warning* | Warnings - the application may be able to continue, but the situation should be looked into | -| *info* | Informational messages that are not reporting error conditions, but should still be useful to the operator | -| *config* | Configuration settings | -| *event* | [Machine-readable events](#log-events). May contain information about processes starting and stopping, and various metrics | -| *debug* | Debug messages - normally suppressed | -| *spam* | Low-level debug messages, normally suppressed. Generates massive amounts of logs when enabled | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Log fieldDescription
*time*Time in seconds since 1970-01-01 UTC, with optional fractional seconds after. E.g. 1102675319.726342
*host*The hostname of the machine that produced this log entry
*pid*The process id, and an optional thread-id of the process/thread that logged the message
*service*The Vespa service name of the logger
*component*The component name that logged. An application may have multiple subcomponents with their own component names, usually starts with the name of the binary
*level*One of fatal, error, warning, info, config, event, debug, or spam
*message*The log message itself. All dangerous characters are escaped (CR, NL, TAB, \, ASCII < 32 and ASCII 128..159)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Log levelDescription
*fatal*Fatal error messages. The application must exit immediately, and restarting it will not help
*error*Error messages. These are serious, the application cannot function correctly
*warning*Warnings - the application may be able to continue, but the situation should be looked into
*info*Informational messages that are not reporting error conditions, but should still be useful to the operator
*config*Configuration settings
*event*Machine-readable events. May contain information about processes starting and stopping, and various metrics
*debug*Debug messages - normally suppressed
*spam*Low-level debug messages, normally suppressed. Generates massive amounts of logs when enabled
## Controlling log levels @@ -56,16 +117,48 @@ Metrics are used to report on internal variables detailing the processing perfor Each event has an event *type*, a *version* and an optional *payload*. In the log format, event types are expressed as a single word, versions as a simple integer, and the payload as a set of *key=value* pairs. The event payload is backslash-quoted just like log messages are in general. This means that events may be double-quoted during transport. Double-quote delimiters are not supported. -| Event | Description | -| --- | --- | -| starting | Payload: *`name=`*

This event is sent by processes when they are about to start another process. Typical for, but not limited to, shell scripts. This event is not required to track processes, but is useful in cases where a sub-process may fail during startup. Example:

`starting container for default/container.0` | -| started | Payload: *`name=`*

The *started* event is sent by a service that just started up. Example:

`started/1 name="vespa-proton"` | -| stopping | Payload: *`name= why=`*

The *stopping* event is sent by a process that is about to exit. Example:

`stopping/1 name="vespa-proton" why="clean shutdown"` | -| stopped | Payload: *`name= pid= exitcode=`*

This event is sent by a process monitoring when a sub-process exits. Example:

`stopped/1 name="vespa-proton" pid=14523 exitcode=0` | -| crash | Payload: *`name= pit= signal=`*

Submitted by a process monitoring a sub-process when the sub-process crashes (dumps core etc.). Example:

`crash/1 name="vespa-proton" pid=12345 signal=11` | -| count | Payload: *`name= value=`*

General event for counts - for tracking any type of counter metric. The *name* is specific to each library/application. Counters are assumed to increase with time, counting the number of events since the program was started. Example:

`count/1 name="queries" value=10` | -| value | Payload: *`name= value=`*

General event for values - for tracking any type of value metric. *Value is for values that cannot be counts*. Typical values are queue lengths, transaction frequencies and so on. Example:

`value/1 name="peak_qps" value=200` | -| state | Payload: *`name= value=`*

General event for components in a process. *value* contains a string with more detailed information on what has happened. Note that the format and content of such strings can change between releases. Example:

`state/1 name="transactionlog.replay.start" value="{"domain":"test","serialnum":{"first":1,"last":1000}}"` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EventDescription
startingPayload: *{`name=`}*

This event is sent by processes when they are about to start another process. Typical for, but not limited to, shell scripts. This event is not required to track processes, but is useful in cases where a sub-process may fail during startup. Example:

{`starting container for default/container.0`}
startedPayload: *{`name=`}*

The *started* event is sent by a service that just started up. Example:

{`started/1 name="vespa-proton"`}
stoppingPayload: *{`name= why=`}*

The *stopping* event is sent by a process that is about to exit. Example:

{`stopping/1 name="vespa-proton" why="clean shutdown"`}
stoppedPayload: *{`name= pid= exitcode=`}*

This event is sent by a process monitoring when a sub-process exits. Example:

{`stopped/1 name="vespa-proton" pid=14523 exitcode=0`}
crashPayload: *{`name= pit= signal=`}*

Submitted by a process monitoring a sub-process when the sub-process crashes (dumps core etc.). Example:

{`crash/1 name="vespa-proton" pid=12345 signal=11`}
countPayload: *{`name= value=`}*

General event for counts - for tracking any type of counter metric. The *name* is specific to each library/application. Counters are assumed to increase with time, counting the number of events since the program was started. Example:

{`count/1 name="queries" value=10`}
valuePayload: *{`name= value=`}*

General event for values - for tracking any type of value metric. *Value is for values that cannot be counts*. Typical values are queue lengths, transaction frequencies and so on. Example:

{`value/1 name="peak_qps" value=200`}
statePayload: *{`name= value=`}*

General event for components in a process. *value* contains a string with more detailed information on what has happened. Note that the format and content of such strings can change between releases. Example:

{`state/1 name="transactionlog.replay.start" value="{"domain":"test","serialnum":{"first":1,"last":1000}}"`}
## Logd diff --git a/mintlify-docs/en/reference/operations/metrics/clustercontroller.mdx b/mintlify-docs/en/reference/operations/metrics/clustercontroller.mdx index 100611b171..dcc5a5e9f3 100644 --- a/mintlify-docs/en/reference/operations/metrics/clustercontroller.mdx +++ b/mintlify-docs/en/reference/operations/metrics/clustercontroller.mdx @@ -3,28 +3,129 @@ title: "ClusterController Metrics" sidebarTitle: "Cluster controller metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| cluster-controller.down.count | node | Number of content nodes down | -| cluster-controller.initializing.count | node | Number of content nodes initializing | -| cluster-controller.maintenance.count | node | Number of content nodes in maintenance | -| cluster-controller.retired.count | node | Number of content nodes that are retired | -| cluster-controller.stopping.count | node | Number of content nodes currently stopping | -| cluster-controller.up.count | node | Number of content nodes up | -| cluster-controller.cluster-state-change.count | node | Number of nodes changing state | -| cluster-controller.nodes-not-converged | node | Number of nodes not converging to the latest cluster state version | -| cluster-controller.stored-document-count | document | Total number of unique documents stored in the cluster | -| cluster-controller.stored-document-bytes | byte | Combined byte size of all unique documents stored in the cluster (not including replication) | -| cluster-controller.cluster-buckets-out-of-sync-ratio | fraction | Ratio of buckets in the cluster currently in need of syncing | -| cluster-controller.busy-tick-time-ms | millisecond | Time busy | -| cluster-controller.idle-tick-time-ms | millisecond | Time idle | -| cluster-controller.work-ms | millisecond | Time used for actual work | -| cluster-controller.is-master | binary | 1 if this cluster controller is currently the master, or 0 if not | -| cluster-controller.remote-task-queue.size | operation | Number of remote tasks queued | -| cluster-controller.node-event.count | operation | Number of node events | -| cluster-controller.resource\_usage.nodes\_above\_limit | node | The number of content nodes above resource limit, blocking feed | -| cluster-controller.resource\_usage.max\_memory\_utilization | fraction | Current memory utilisation, for content node with the highest value | -| cluster-controller.resource\_usage.max\_disk\_utilization | fraction | Current disk space utilisation, for content node with the highest value | -| cluster-controller.resource\_usage.memory\_limit | fraction | Memory space limit as a fraction of available memory | -| cluster-controller.resource\_usage.disk\_limit | fraction | Disk space limit as a fraction of available disk space | -| reindexing.progress | fraction | Re-indexing progress | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitDescription
cluster-controller.down.countnodeNumber of content nodes down
cluster-controller.initializing.countnodeNumber of content nodes initializing
cluster-controller.maintenance.countnodeNumber of content nodes in maintenance
cluster-controller.retired.countnodeNumber of content nodes that are retired
cluster-controller.stopping.countnodeNumber of content nodes currently stopping
cluster-controller.up.countnodeNumber of content nodes up
cluster-controller.cluster-state-change.countnodeNumber of nodes changing state
cluster-controller.nodes-not-convergednodeNumber of nodes not converging to the latest cluster state version
cluster-controller.stored-document-countdocumentTotal number of unique documents stored in the cluster
cluster-controller.stored-document-bytesbyteCombined byte size of all unique documents stored in the cluster (not including replication)
cluster-controller.cluster-buckets-out-of-sync-ratiofractionRatio of buckets in the cluster currently in need of syncing
cluster-controller.busy-tick-time-msmillisecondTime busy
cluster-controller.idle-tick-time-msmillisecondTime idle
cluster-controller.work-msmillisecondTime used for actual work
cluster-controller.is-masterbinary1 if this cluster controller is currently the master, or 0 if not
cluster-controller.remote-task-queue.sizeoperationNumber of remote tasks queued
cluster-controller.node-event.countoperationNumber of node events
cluster-controller.resource_usage.nodes_above_limitnodeThe number of content nodes above resource limit, blocking feed
cluster-controller.resource_usage.max_memory_utilizationfractionCurrent memory utilisation, for content node with the highest value
cluster-controller.resource_usage.max_disk_utilizationfractionCurrent disk space utilisation, for content node with the highest value
cluster-controller.resource_usage.memory_limitfractionMemory space limit as a fraction of available memory
cluster-controller.resource_usage.disk_limitfractionDisk space limit as a fraction of available disk space
reindexing.progressfractionRe-indexing progress
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/configserver.mdx b/mintlify-docs/en/reference/operations/metrics/configserver.mdx index 99806dcd36..c35e7cc134 100644 --- a/mintlify-docs/en/reference/operations/metrics/configserver.mdx +++ b/mintlify-docs/en/reference/operations/metrics/configserver.mdx @@ -3,144 +3,709 @@ title: "ConfigServer Metrics" sidebarTitle: "Configserver metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| configserver.requests | request | Number of requests processed | -| configserver.failedRequests | request | Number of requests that failed | -| configserver.latency | millisecond | Time to complete requests | -| configserver.cacheConfigElems | item | Time to complete requests | -| configserver.cacheChecksumElems | item | Number of checksum elements in the cache | -| configserver.hosts | node | The number of nodes being served configuration from the config server cluster | -| configserver.tenants | instance | The number of tenants being served configuration from the config server cluster | -| configserver.applications | instance | The number of applications being served configuration from the config server cluster | -| configserver.delayedResponses | response | Number of delayed responses | -| configserver.sessionChangeErrors | session | Number of session change errors | -| configserver.unknownHostRequests | request | Config requests from unknown hosts | -| configserver.newSessions | session | New config sessions | -| configserver.preparedSessions | session | Prepared config sessions | -| configserver.activeSessions | session | Active config sessions | -| configserver.inactiveSessions | session | Inactive config sessions | -| configserver.addedSessions | session | Added config sessions | -| configserver.removedSessions | session | Removed config sessions | -| configserver.rpcServerWorkQueueSize | item | Number of elements in the RPC server work queue | -| maintenanceDeployment.transientFailure | operation | Number of maintenance deployments that failed with a transient failure | -| maintenanceDeployment.failure | operation | Number of maintenance deployments that failed with a permanent failure | -| maintenanceDeployment.reason | operation | Reason for maintenance deployment | -| maintenance.successFactorDeviation | fraction | Configserver: Maintenance Success Factor Deviation | -| maintenance.duration | millisecond | Configserver: Maintenance Duration | -| maintenance.congestion | failure | Configserver: Maintenance Congestion | -| configserver.zkConnectionLost | connection | Number of ZooKeeper connections lost | -| configserver.zkReconnected | connection | Number of ZooKeeper reconnections | -| configserver.zkConnected | node | Number of ZooKeeper nodes connected | -| configserver.zkSuspended | node | Number of ZooKeeper nodes suspended | -| configserver.zkZNodes | node | Number of ZooKeeper nodes present | -| configserver.zkAvgLatency | millisecond | Average latency for ZooKeeper requests | -| configserver.zkMaxLatency | millisecond | Max latency for ZooKeeper requests | -| configserver.zkConnections | connection | Number of ZooKeeper connections | -| configserver.zkOutstandingRequests | request | Number of ZooKeeper requests in flight | -| orchestrator.lock.acquire-latency | second | Time to acquire zookeeper lock | -| orchestrator.lock.acquire-success | operation | Number of times zookeeper lock has been acquired successfully | -| orchestrator.lock.acquire-timedout | operation | Number of times zookeeper lock couldn't be acquired within timeout | -| orchestrator.lock.acquire | operation | Number of attempts to acquire zookeeper lock | -| orchestrator.lock.acquired | operation | Number of times zookeeper lock was acquired | -| orchestrator.lock.hold-latency | second | Time zookeeper lock was held before it was released | -| nodes.active | node | The number of active nodes in a cluster | -| nodes.nonActive | node | The number of non-active nodes in a cluster | -| nodes.nonActiveFraction | node | The fraction of non-active nodes vs total nodes in a cluster | -| nodes.exclusiveSwitchFraction | fraction | The fraction of nodes in a cluster on exclusive network switches | -| nodes.emptyExclusive | node | The number of exclusive hosts that do not have any nodes allocated to them | -| nodes.expired.deprovisioned | node | The number of deprovisioned nodes that have expired | -| nodes.expired.dirty | node | The number of dirty nodes that have expired | -| nodes.expired.inactive | node | The number of inactive nodes that have expired | -| nodes.expired.provisioned | node | The number of provisioned nodes that have expired | -| nodes.expired.reserved | node | The number of reserved nodes that have expired | -| cluster.cost | dollar\_per\_hour | The cost of the nodes allocated to a certain cluster, in $/hr | -| cluster.load.ideal.cpu | fraction | The ideal cpu load of a certain cluster | -| cluster.load.ideal.memory | fraction | The ideal memory load of a certain cluster | -| cluster.load.ideal.disk | fraction | The ideal disk load of a certain cluster | -| cluster.load.peak.cpu | fraction | The peak cpu load in the period considered of a certain cluster | -| cluster.load.peak.memory | fraction | The peak memory load in the period considered of a certain cluster | -| cluster.load.peak.disk | fraction | The peak disk load in the period considered of a certain cluster | -| cluster.backup.age | fraction | Age of the most recent cluster backup as a fraction of the backup interval | -| cluster.snapshot.busySeconds | second | The maximum time a snapshot has been busy (creating or restoring) for a cluster | -| zone.working | binary | The value 1 if zone is considered healthy, 0 if not. This is decided by considering the number of non-active nodes vs the number of active nodes in a zone | -| cache.nodeObject.hitRate | fraction | The fraction of cache hits vs cache lookups for the node object cache | -| cache.nodeObject.evictionCount | item | The number of cache elements evicted from the node object cache | -| cache.nodeObject.size | item | The number of cache elements in the node object cache | -| cache.curator.hitRate | fraction | The fraction of cache hits vs cache lookups for the curator cache | -| cache.curator.evictionCount | item | The number of cache elements evicted from the curator cache | -| cache.curator.size | item | The number of cache elements in the curator cache | -| wantedRestartGeneration | generation | Wanted restart generation for tenant node | -| currentRestartGeneration | generation | Current restart generation for tenant node | -| wantToRestart | binary | One if node wants to restart, zero if not | -| wantedRebootGeneration | generation | Wanted reboot generation for tenant node | -| currentRebootGeneration | generation | Current reboot generation for tenant node | -| wantToReboot | binary | One if node wants to reboot, zero if not | -| retired | binary | One if node is retired, zero if not | -| wantedVespaVersion | version | Wanted vespa version for the node, in the form MINOR.PATCH. Major version is not included here | -| currentVespaVersion | version | Current vespa version for the node, in the form MINOR.PATCH. Major version is not included here | -| wantToChangeVespaVersion | binary | One if node want to change Vespa version, zero if not | -| hasWireguardKey | binary | One if node has a WireGuard key, zero if not | -| wantToRetire | binary | One if node wants to retire, zero if not | -| wantToDeprovision | binary | One if node wants to be deprovisioned, zero if not | -| failReport | binary | One if there is a fail report for the node, zero if not | -| suspended | binary | One if the node is suspended, zero if not | -| suspendedSeconds | second | The number of seconds the node has been suspended | -| activeSeconds | second | The number of seconds the node has been active | -| numberOfServicesUp | instance | The number of services confirmed to be running on a node | -| numberOfServicesNotChecked | instance | The number of services supposed to run on a node, that has not checked | -| numberOfServicesDown | instance | The number of services confirmed to not be running on a node | -| someServicesDown | binary | One if one or more services has been confirmed to not run on a node, zero if not | -| numberOfServicesUnknown | instance | The number of services the config server does not know is running on a node | -| nodeFailerBadNode | binary | One if the node is failed due to being bad, zero if not | -| downInNodeRepo | binary | One if the node is registered as being down in the node repository, zero if not | -| numberOfServices | instance | Number of services supposed to run on a node | -| lockAttempt.acquireMaxActiveLatency | second | Maximum duration for keeping a lock, ending during the metrics snapshot, or still being kept at the end or this snapshot period | -| lockAttempt.acquireHz | operation\_per\_second | Average number of locks acquired per second the snapshot period | -| lockAttempt.acquireLoad | operation | Average number of locks held concurrently during the snapshot period | -| lockAttempt.lockedLatency | second | Longest lock duration in the snapshot period | -| lockAttempt.lockedLoad | operation | Average number of locks held concurrently during the snapshot period | -| lockAttempt.acquireTimedOut | operation | Number of locking attempts that timed out during the snapshot period | -| lockAttempt.deadlock | operation | Number of lock grab deadlocks detected during the snapshot period | -| lockAttempt.errors | operation | Number of other lock related errors detected during the snapshot period | -| hostedVespa.docker.totalCapacityCpu | vcpu | Total number of VCPUs on tenant hosts managed by hosted Vespa in a zone | -| hostedVespa.docker.totalCapacityMem | gigabyte | Total amount of memory on tenant hosts managed by hosted Vespa in a zone | -| hostedVespa.docker.totalCapacityDisk | gigabyte | Total amount of disk space on tenant hosts managed by hosted Vespa in a zone | -| hostedVespa.docker.freeCapacityCpu | vcpu | Total number of free VCPUs on tenant hosts managed by hosted Vespa in a zone | -| hostedVespa.docker.freeCapacityMem | gigabyte | Total amount of free memory on tenant hosts managed by hosted Vespa in a zone | -| hostedVespa.docker.freeCapacityDisk | gigabyte | Total amount of free disk space on tenant hosts managed by hosted Vespa in a zone | -| hostedVespa.docker.allocatedCapacityCpu | vcpu | Total number of allocated VCPUs on tenant hosts managed by hosted Vespa in a zone | -| hostedVespa.docker.allocatedCapacityMem | gigabyte | Total amount of allocated memory on tenant hosts managed by hosted Vespa in a zone | -| hostedVespa.docker.allocatedCapacityDisk | gigabyte | Total amount of allocated disk space on tenant hosts managed by hosted Vespa in a zone | -| hostedVespa.pendingRedeployments | task | The number of hosted Vespa re-deployments pending | -| hostedVespa.docker.skew | fraction | A number in the range 0..1 indicating how well allocated resources are balanced with availability on hosts | -| hostedVespa.activeHosts | host | The number of managed hosts that are in state "active" | -| hostedVespa.breakfixedHosts | host | The number of managed hosts that are in state "breakfixed" | -| hostedVespa.deprovisionedHosts | host | The number of managed hosts that are in state "deprovisioned" | -| hostedVespa.dirtyHosts | host | The number of managed hosts that are in state "dirty" | -| hostedVespa.failedHosts | host | The number of managed hosts that are in state "failed" | -| hostedVespa.inactiveHosts | host | The number of managed hosts that are in state "inactive" | -| hostedVespa.parkedHosts | host | The number of managed hosts that are in state "parked" | -| hostedVespa.provisionedHosts | host | The number of managed hosts that are in state "provisioned" | -| hostedVespa.readyHosts | host | The number of managed hosts that are in state "ready" | -| hostedVespa.reservedHosts | host | The number of managed hosts that are in state "reserved" | -| hostedVespa.activeNodes | host | The number of managed nodes that are in state "active" | -| hostedVespa.breakfixedNodes | host | The number of managed nodes that are in state "breakfixed" | -| hostedVespa.deprovisionedNodes | host | The number of managed nodes that are in state "deprovisioned" | -| hostedVespa.dirtyNodes | host | The number of managed nodes that are in state "dirty" | -| hostedVespa.failedNodes | host | The number of managed nodes that are in state "failed" | -| hostedVespa.inactiveNodes | host | The number of managed nodes that are in state "inactive" | -| hostedVespa.parkedNodes | host | The number of managed nodes that are in state "parked" | -| hostedVespa.provisionedNodes | host | The number of managed nodes that are in state "provisioned" | -| hostedVespa.readyNodes | host | The number of managed nodes that are in state "ready" | -| hostedVespa.reservedNodes | host | The number of managed nodes that are in state "reserved" | -| overcommittedHosts | host | The number of hosts with over-committed resources | -| spareHostCapacity | host | The number of spare hosts | -| throttledHostFailures | host | Number of host failures stopped due to throttling | -| throttledNodeFailures | host | Number of node failures stopped due to throttling | -| nodeFailThrottling | binary | Metric indicating when node failure throttling is active. The value 1 means active, 0 means inactive | -| clusterAutoscaled | operation | Number of times a cluster has been rescaled by the autoscaler | -| clusterAutoscaleDuration | second | The currently predicted duration of a rescaling of this cluster | -| deployment.prepareMillis | millisecond | Duration of deployment preparations | -| deployment.activateMillis | millisecond | Duration of deployment activations | -| throttledHostProvisioning | binary | Value 1 if host provisioning is throttled, 0 if not | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitDescription
configserver.requestsrequestNumber of requests processed
configserver.failedRequestsrequestNumber of requests that failed
configserver.latencymillisecondTime to complete requests
configserver.cacheConfigElemsitemTime to complete requests
configserver.cacheChecksumElemsitemNumber of checksum elements in the cache
configserver.hostsnodeThe number of nodes being served configuration from the config server cluster
configserver.tenantsinstanceThe number of tenants being served configuration from the config server cluster
configserver.applicationsinstanceThe number of applications being served configuration from the config server cluster
configserver.delayedResponsesresponseNumber of delayed responses
configserver.sessionChangeErrorssessionNumber of session change errors
configserver.unknownHostRequestsrequestConfig requests from unknown hosts
configserver.newSessionssessionNew config sessions
configserver.preparedSessionssessionPrepared config sessions
configserver.activeSessionssessionActive config sessions
configserver.inactiveSessionssessionInactive config sessions
configserver.addedSessionssessionAdded config sessions
configserver.removedSessionssessionRemoved config sessions
configserver.rpcServerWorkQueueSizeitemNumber of elements in the RPC server work queue
maintenanceDeployment.transientFailureoperationNumber of maintenance deployments that failed with a transient failure
maintenanceDeployment.failureoperationNumber of maintenance deployments that failed with a permanent failure
maintenanceDeployment.reasonoperationReason for maintenance deployment
maintenance.successFactorDeviationfractionConfigserver: Maintenance Success Factor Deviation
maintenance.durationmillisecondConfigserver: Maintenance Duration
maintenance.congestionfailureConfigserver: Maintenance Congestion
configserver.zkConnectionLostconnectionNumber of ZooKeeper connections lost
configserver.zkReconnectedconnectionNumber of ZooKeeper reconnections
configserver.zkConnectednodeNumber of ZooKeeper nodes connected
configserver.zkSuspendednodeNumber of ZooKeeper nodes suspended
configserver.zkZNodesnodeNumber of ZooKeeper nodes present
configserver.zkAvgLatencymillisecondAverage latency for ZooKeeper requests
configserver.zkMaxLatencymillisecondMax latency for ZooKeeper requests
configserver.zkConnectionsconnectionNumber of ZooKeeper connections
configserver.zkOutstandingRequestsrequestNumber of ZooKeeper requests in flight
orchestrator.lock.acquire-latencysecondTime to acquire zookeeper lock
orchestrator.lock.acquire-successoperationNumber of times zookeeper lock has been acquired successfully
orchestrator.lock.acquire-timedoutoperationNumber of times zookeeper lock couldn't be acquired within timeout
orchestrator.lock.acquireoperationNumber of attempts to acquire zookeeper lock
orchestrator.lock.acquiredoperationNumber of times zookeeper lock was acquired
orchestrator.lock.hold-latencysecondTime zookeeper lock was held before it was released
nodes.activenodeThe number of active nodes in a cluster
nodes.nonActivenodeThe number of non-active nodes in a cluster
nodes.nonActiveFractionnodeThe fraction of non-active nodes vs total nodes in a cluster
nodes.exclusiveSwitchFractionfractionThe fraction of nodes in a cluster on exclusive network switches
nodes.emptyExclusivenodeThe number of exclusive hosts that do not have any nodes allocated to them
nodes.expired.deprovisionednodeThe number of deprovisioned nodes that have expired
nodes.expired.dirtynodeThe number of dirty nodes that have expired
nodes.expired.inactivenodeThe number of inactive nodes that have expired
nodes.expired.provisionednodeThe number of provisioned nodes that have expired
nodes.expired.reservednodeThe number of reserved nodes that have expired
cluster.costdollar_per_hourThe cost of the nodes allocated to a certain cluster, in $/hr
cluster.load.ideal.cpufractionThe ideal cpu load of a certain cluster
cluster.load.ideal.memoryfractionThe ideal memory load of a certain cluster
cluster.load.ideal.diskfractionThe ideal disk load of a certain cluster
cluster.load.peak.cpufractionThe peak cpu load in the period considered of a certain cluster
cluster.load.peak.memoryfractionThe peak memory load in the period considered of a certain cluster
cluster.load.peak.diskfractionThe peak disk load in the period considered of a certain cluster
cluster.backup.agefractionAge of the most recent cluster backup as a fraction of the backup interval
cluster.snapshot.busySecondssecondThe maximum time a snapshot has been busy (creating or restoring) for a cluster
zone.workingbinaryThe value 1 if zone is considered healthy, 0 if not. This is decided by considering the number of non-active nodes vs the number of active nodes in a zone
cache.nodeObject.hitRatefractionThe fraction of cache hits vs cache lookups for the node object cache
cache.nodeObject.evictionCountitemThe number of cache elements evicted from the node object cache
cache.nodeObject.sizeitemThe number of cache elements in the node object cache
cache.curator.hitRatefractionThe fraction of cache hits vs cache lookups for the curator cache
cache.curator.evictionCountitemThe number of cache elements evicted from the curator cache
cache.curator.sizeitemThe number of cache elements in the curator cache
wantedRestartGenerationgenerationWanted restart generation for tenant node
currentRestartGenerationgenerationCurrent restart generation for tenant node
wantToRestartbinaryOne if node wants to restart, zero if not
wantedRebootGenerationgenerationWanted reboot generation for tenant node
currentRebootGenerationgenerationCurrent reboot generation for tenant node
wantToRebootbinaryOne if node wants to reboot, zero if not
retiredbinaryOne if node is retired, zero if not
wantedVespaVersionversionWanted vespa version for the node, in the form MINOR.PATCH. Major version is not included here
currentVespaVersionversionCurrent vespa version for the node, in the form MINOR.PATCH. Major version is not included here
wantToChangeVespaVersionbinaryOne if node want to change Vespa version, zero if not
hasWireguardKeybinaryOne if node has a WireGuard key, zero if not
wantToRetirebinaryOne if node wants to retire, zero if not
wantToDeprovisionbinaryOne if node wants to be deprovisioned, zero if not
failReportbinaryOne if there is a fail report for the node, zero if not
suspendedbinaryOne if the node is suspended, zero if not
suspendedSecondssecondThe number of seconds the node has been suspended
activeSecondssecondThe number of seconds the node has been active
numberOfServicesUpinstanceThe number of services confirmed to be running on a node
numberOfServicesNotCheckedinstanceThe number of services supposed to run on a node, that has not checked
numberOfServicesDowninstanceThe number of services confirmed to not be running on a node
someServicesDownbinaryOne if one or more services has been confirmed to not run on a node, zero if not
numberOfServicesUnknowninstanceThe number of services the config server does not know is running on a node
nodeFailerBadNodebinaryOne if the node is failed due to being bad, zero if not
downInNodeRepobinaryOne if the node is registered as being down in the node repository, zero if not
numberOfServicesinstanceNumber of services supposed to run on a node
lockAttempt.acquireMaxActiveLatencysecondMaximum duration for keeping a lock, ending during the metrics snapshot, or still being kept at the end or this snapshot period
lockAttempt.acquireHzoperation_per_secondAverage number of locks acquired per second the snapshot period
lockAttempt.acquireLoadoperationAverage number of locks held concurrently during the snapshot period
lockAttempt.lockedLatencysecondLongest lock duration in the snapshot period
lockAttempt.lockedLoadoperationAverage number of locks held concurrently during the snapshot period
lockAttempt.acquireTimedOutoperationNumber of locking attempts that timed out during the snapshot period
lockAttempt.deadlockoperationNumber of lock grab deadlocks detected during the snapshot period
lockAttempt.errorsoperationNumber of other lock related errors detected during the snapshot period
hostedVespa.docker.totalCapacityCpuvcpuTotal number of VCPUs on tenant hosts managed by hosted Vespa in a zone
hostedVespa.docker.totalCapacityMemgigabyteTotal amount of memory on tenant hosts managed by hosted Vespa in a zone
hostedVespa.docker.totalCapacityDiskgigabyteTotal amount of disk space on tenant hosts managed by hosted Vespa in a zone
hostedVespa.docker.freeCapacityCpuvcpuTotal number of free VCPUs on tenant hosts managed by hosted Vespa in a zone
hostedVespa.docker.freeCapacityMemgigabyteTotal amount of free memory on tenant hosts managed by hosted Vespa in a zone
hostedVespa.docker.freeCapacityDiskgigabyteTotal amount of free disk space on tenant hosts managed by hosted Vespa in a zone
hostedVespa.docker.allocatedCapacityCpuvcpuTotal number of allocated VCPUs on tenant hosts managed by hosted Vespa in a zone
hostedVespa.docker.allocatedCapacityMemgigabyteTotal amount of allocated memory on tenant hosts managed by hosted Vespa in a zone
hostedVespa.docker.allocatedCapacityDiskgigabyteTotal amount of allocated disk space on tenant hosts managed by hosted Vespa in a zone
hostedVespa.pendingRedeploymentstaskThe number of hosted Vespa re-deployments pending
hostedVespa.docker.skewfractionA number in the range 0..1 indicating how well allocated resources are balanced with availability on hosts
hostedVespa.activeHostshostThe number of managed hosts that are in state "active"
hostedVespa.breakfixedHostshostThe number of managed hosts that are in state "breakfixed"
hostedVespa.deprovisionedHostshostThe number of managed hosts that are in state "deprovisioned"
hostedVespa.dirtyHostshostThe number of managed hosts that are in state "dirty"
hostedVespa.failedHostshostThe number of managed hosts that are in state "failed"
hostedVespa.inactiveHostshostThe number of managed hosts that are in state "inactive"
hostedVespa.parkedHostshostThe number of managed hosts that are in state "parked"
hostedVespa.provisionedHostshostThe number of managed hosts that are in state "provisioned"
hostedVespa.readyHostshostThe number of managed hosts that are in state "ready"
hostedVespa.reservedHostshostThe number of managed hosts that are in state "reserved"
hostedVespa.activeNodeshostThe number of managed nodes that are in state "active"
hostedVespa.breakfixedNodeshostThe number of managed nodes that are in state "breakfixed"
hostedVespa.deprovisionedNodeshostThe number of managed nodes that are in state "deprovisioned"
hostedVespa.dirtyNodeshostThe number of managed nodes that are in state "dirty"
hostedVespa.failedNodeshostThe number of managed nodes that are in state "failed"
hostedVespa.inactiveNodeshostThe number of managed nodes that are in state "inactive"
hostedVespa.parkedNodeshostThe number of managed nodes that are in state "parked"
hostedVespa.provisionedNodeshostThe number of managed nodes that are in state "provisioned"
hostedVespa.readyNodeshostThe number of managed nodes that are in state "ready"
hostedVespa.reservedNodeshostThe number of managed nodes that are in state "reserved"
overcommittedHostshostThe number of hosts with over-committed resources
spareHostCapacityhostThe number of spare hosts
throttledHostFailureshostNumber of host failures stopped due to throttling
throttledNodeFailureshostNumber of node failures stopped due to throttling
nodeFailThrottlingbinaryMetric indicating when node failure throttling is active. The value 1 means active, 0 means inactive
clusterAutoscaledoperationNumber of times a cluster has been rescaled by the autoscaler
clusterAutoscaleDurationsecondThe currently predicted duration of a rescaling of this cluster
deployment.prepareMillismillisecondDuration of deployment preparations
deployment.activateMillismillisecondDuration of deployment activations
throttledHostProvisioningbinaryValue 1 if host provisioning is throttled, 0 if not
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/container.mdx b/mintlify-docs/en/reference/operations/metrics/container.mdx index 82471e658b..0652db2495 100644 --- a/mintlify-docs/en/reference/operations/metrics/container.mdx +++ b/mintlify-docs/en/reference/operations/metrics/container.mdx @@ -3,204 +3,1009 @@ title: "Container Metrics" sidebarTitle: "Container metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| http.status.1xx | response | Number of responses with a 1xx status | -| http.status.2xx | response | Number of responses with a 2xx status | -| http.status.3xx | response | Number of responses with a 3xx status | -| http.status.4xx | response | Number of responses with a 4xx status | -| http.status.5xx | response | Number of responses with a 5xx status | -| application\_generation | version | The currently live application config generation (aka session id) | -| in\_service | binary | This will have the value 1 if the node is in service, 0 if not. | -| jdisc.gc.count | operation | Number of JVM garbage collections done | -| jdisc.gc.ms | millisecond | Time spent in JVM garbage collection | -| jdisc.jvm | version | JVM runtime version | -| cpu | thread | Container service CPU pressure | -| jdisc.memory\_mappings | operation | JDISC Memory mappings | -| jdisc.open\_file\_descriptors | item | JDISC Open file descriptors | -| jdisc.thread\_pool.unhandled\_exceptions | thread | Number of exceptions thrown by tasks | -| jdisc.thread\_pool.work\_queue.capacity | thread | Capacity of the task queue | -| jdisc.thread\_pool.work\_queue.size | thread | Size of the task queue | -| jdisc.thread\_pool.rejected\_tasks | thread | Number of tasks rejected by the thread pool | -| jdisc.thread\_pool.size | thread | Size of the thread pool | -| jdisc.thread\_pool.max\_allowed\_size | thread | The maximum allowed number of threads in the pool | -| jdisc.thread\_pool.active\_threads | thread | Number of threads that are active | -| jdisc.deactivated\_containers.total | item | JDISC Deactivated container instances | -| jdisc.deactivated\_containers.with\_retained\_refs.last | item | JDISC Deactivated container nodes with retained refs | -| jdisc.application.failed\_component\_graphs | item | JDISC Application failed component graphs | -| jdisc.application.component\_graph.creation\_time\_millis | millisecond | JDISC Application component graph creation time | -| jdisc.application.component\_graph.reconfigurations | item | JDISC Application component graph reconfigurations | -| jdisc.singleton.is\_active | item | JDISC Singleton is active | -| jdisc.singleton.activation.count | operation | JDISC Singleton activations | -| jdisc.singleton.activation.failure.count | operation | JDISC Singleton activation failures | -| jdisc.singleton.activation.millis | millisecond | JDISC Singleton activation time | -| jdisc.singleton.deactivation.count | operation | JDISC Singleton deactivations | -| jdisc.singleton.deactivation.failure.count | operation | JDISC Singleton deactivation failures | -| jdisc.singleton.deactivation.millis | millisecond | JDISC Singleton deactivation time | -| jdisc.http.ssl.handshake.failure.missing\_client\_cert | operation | JDISC HTTP SSL Handshake failures due to missing client certificate | -| jdisc.http.ssl.handshake.failure.expired\_client\_cert | operation | JDISC HTTP SSL Handshake failures due to expired client certificate | -| jdisc.http.ssl.handshake.failure.invalid\_client\_cert | operation | JDISC HTTP SSL Handshake failures due to invalid client certificate | -| jdisc.http.ssl.handshake.failure.incompatible\_protocols | operation | JDISC HTTP SSL Handshake failures due to incompatible protocols | -| jdisc.http.ssl.handshake.failure.incompatible\_chifers | operation | JDISC HTTP SSL Handshake failures due to incompatible chifers | -| jdisc.http.ssl.handshake.failure.connection\_closed | operation | JDISC HTTP SSL Handshake failures due to connection closed | -| jdisc.http.ssl.handshake.failure.unknown | operation | JDISC HTTP SSL Handshake failures for unknown reason | -| jdisc.http.latency | millisecond | Request latency including the HTTP layer | -| jdisc.http.time\_to\_first\_byte | millisecond | Time from request has been received by the server until the first byte is returned to the client | -| jdisc.http.request.prematurely\_closed | request | HTTP requests prematurely closed | -| jdisc.http.request.requests\_per\_connection | request | HTTP requests per connection | -| jdisc.http.request.uri\_length | byte | HTTP URI length | -| jdisc.http.request.content\_size | byte | HTTP request content size | -| jdisc.http.requests | request | HTTP requests | -| jdisc.http.requests.status | request | Number of requests to the built-in status handler | -| jdisc.http.filter.rule.blocked\_requests | request | Number of requests blocked by filter | -| jdisc.http.filter.rule.allowed\_requests | request | Number of requests allowed by filter | -| jdisc.http.filtering.request.handled | request | Number of filtering requests handled | -| jdisc.http.filtering.request.unhandled | request | Number of filtering requests unhandled | -| jdisc.http.filtering.response.handled | request | Number of filtering responses handled | -| jdisc.http.filtering.response.unhandled | request | Number of filtering responses unhandled | -| jdisc.http.handler.unhandled\_exceptions | request | Number of unhandled exceptions in handler | -| jdisc.tls.capability\_checks.succeeded | operation | Number of TLS capability checks succeeded | -| jdisc.tls.capability\_checks.failed | operation | Number of TLS capability checks failed | -| jdisc.http.jetty.threadpool.thread.max | thread | Configured maximum number of threads | -| jdisc.http.jetty.threadpool.thread.min | thread | Configured minimum number of threads | -| jdisc.http.jetty.threadpool.thread.reserved | thread | Configured number of reserved threads or -1 for heuristic | -| jdisc.http.jetty.threadpool.thread.busy | thread | Number of threads executing internal and transient jobs | -| jdisc.http.jetty.threadpool.thread.idle | thread | Number of idle threads | -| jdisc.http.jetty.threadpool.thread.total | thread | Current number of threads | -| jdisc.http.jetty.threadpool.queue.size | thread | Current size of the job queue | -| jdisc.http.jetty.http\_compliance.violation | failure | Number of HTTP compliance violations | -| serverNumOpenConnections | connection | The number of currently open connections | -| serverNumConnections | connection | The total number of connections opened | -| serverBytesReceived | byte | The number of bytes received by the server | -| serverBytesSent | byte | The number of bytes sent from the server | -| handled.requests | operation | The number of requests handled per metrics snapshot | -| handled.latency | millisecond | The time used for handling requests, excluding HTTP layer and rendering | -| httpapi\_latency | millisecond | Duration for requests to the HTTP document APIs | -| httpapi\_pending | operation | Document operations pending execution | -| httpapi\_num\_operations | operation | Total number of document operations performed | -| httpapi\_num\_updates | operation | Document update operations performed | -| httpapi\_num\_removes | operation | Document remove operations performed | -| httpapi\_num\_puts | operation | Document put operations performed | -| httpapi\_ops\_per\_sec | operation\_per\_second | Document operations per second | -| httpapi\_succeeded | operation | Document operations that succeeded | -| httpapi\_failed | operation | Document operations that failed | -| httpapi\_parse\_error | operation | Document operations that failed due to document parse errors | -| httpapi\_condition\_not\_met | operation | Document operations not applied due to condition not met | -| httpapi\_not\_found | operation | Document operations not applied due to document not found | -| httpapi\_failed\_unknown | operation | Document operations failed by unknown cause | -| httpapi\_failed\_timeout | operation | Document operations failed by timeout | -| httpapi\_failed\_insufficient\_storage | operation | Document operations failed by insufficient storage | -| httpapi\_queued\_operations | operation | Document operations queued for execution in /document/v1 API handler | -| httpapi\_queued\_bytes | byte | Total operation bytes queued for execution in /document/v1 API handler | -| httpapi\_queued\_age | second | Age in seconds of the oldest operation in the queue for /document/v1 API handler | -| httpapi\_mbus\_window\_size | operation | The window size of Messagebus's dynamic throttle policy for /document/v1 API handler | -| mem.heap.total | byte | Total available heap memory | -| mem.heap.free | byte | Free heap memory | -| mem.heap.used | byte | Currently used heap memory | -| mem.direct.total | byte | Total available direct memory | -| mem.direct.free | byte | Currently free direct memory | -| mem.direct.used | byte | Direct memory currently used | -| mem.direct.count | byte | Number of direct memory allocations | -| mem.native.total | byte | Total available native memory | -| mem.native.free | byte | Currently free native memory | -| mem.native.used | byte | Native memory currently used | -| athenz-tenant-cert.expiry.seconds | second | Time remaining until Athenz tenant certificate expires | -| container-iam-role.expiry.seconds | second | Time remaining until IAM role expires | -| peak\_qps | query\_per\_second | The highest number of qps for a second for this metrics snapshot | -| search\_connections | connection | Number of search connections | -| feed.operations | operation | Number of document feed operations | -| feed.latency | millisecond | Feed latency | -| feed.http-requests | operation | Feed HTTP requests | -| queries | operation | Query volume | -| query\_container\_latency | millisecond | The query execution time consumed in the container | -| query\_latency | millisecond | The overall query latency as observed by the container cluster, excluding HTTP layer and rendering | -| query\_timeout | millisecond | The amount of time allowed for query execution, from the client | -| failed\_queries | operation | The number of failed queries | -| degraded\_queries | operation | The number of degraded queries, e.g. due to some content nodes not responding in time | -| hits\_per\_query | hit\_per\_query | The number of hits returned | -| query\_hit\_offset | hit | The offset for hits returned | -| documents\_covered | document | The combined number of documents considered during query evaluation | -| documents\_total | document | The number of documents to be evaluated if all requests had been fully executed | -| documents\_target\_total | document | The target number of total documents to be evaluated when all data is in sync | -| jdisc.render.latency | nanosecond | The time used by the container to render responses | -| query\_item\_count | item | The number of query items (terms, phrases, etc.) | -| docproc.proctime | millisecond | Time spent processing document | -| docproc.documents | document | Number of processed documents | -| totalhits\_per\_query | hit\_per\_query | The total number of documents found to match queries | -| empty\_results | operation | Number of queries matching no documents | -| requestsOverQuota | operation | The number of requests rejected due to exceeding quota | -| relevance.at\_1 | score | The relevance of hit number 1 | -| relevance.at\_3 | score | The relevance of hit number 3 | -| relevance.at\_10 | score | The relevance of hit number 10 | -| error.timeout | operation | Requests that timed out | -| error.backends\_oos | operation | Requests that failed due to no available backends nodes | -| error.plugin\_failure | operation | Requests that failed due to plugin failure | -| error.backend\_communication\_error | operation | Requests that failed due to backend communication error | -| error.empty\_document\_summaries | operation | Requests that failed due to missing document summaries | -| error.illegal\_query | operation | Requests that failed due to illegal queries | -| error.invalid\_query\_parameter | operation | Requests that failed due to invalid query parameters | -| error.internal\_server\_error | operation | Requests that failed due to internal server error | -| error.misconfigured\_server | operation | Requests that failed due to misconfigured server | -| error.invalid\_query\_transformation | operation | Requests that failed due to invalid query transformation | -| error.results\_with\_errors | operation | The number of queries with error payload | -| error.unspecified | operation | Requests that failed for an unspecified reason | -| error.unhandled\_exception | operation | Requests that failed due to an unhandled exception | -| serverRejectedRequests | operation | Deprecated. Use jdisc.thread\_pool.rejected\_tasks instead. | -| serverThreadPoolSize | thread | Deprecated. Use jdisc.thread\_pool.size instead. | -| serverActiveThreads | thread | Deprecated. Use jdisc.thread\_pool.active\_threads instead. | -| jrt.transport.tls-certificate-verification-failures | failure | TLS certificate verification failures | -| jrt.transport.peer-authorization-failures | failure | TLS peer authorization failures | -| jrt.transport.server.tls-connections-established | connection | TLS server connections established | -| jrt.transport.client.tls-connections-established | connection | TLS client connections established | -| jrt.transport.server.unencrypted-connections-established | connection | Unencrypted server connections established | -| jrt.transport.client.unencrypted-connections-established | connection | Unencrypted client connections established | -| max\_query\_latency | millisecond | Deprecated. Use query\_latency.max instead | -| mean\_query\_latency | millisecond | Deprecated. Use the expression (query\_latency.sum / query\_latency.count) instead | -| jdisc.http.filter.athenz.accepted\_requests | request | Number of requests accepted by the AthenzAuthorization filter | -| jdisc.http.filter.athenz.rejected\_requests | request | Number of requests rejected by the AthenzAuthorization filter | -| jdisc.http.filter.athenz.grid\_requests | request | Number of grid requests | -| serverConnectionsOpenMax | connection | Maximum number of open connections | -| serverConnectionDurationMax | millisecond | Longest duration a connection is kept open | -| serverConnectionDurationMean | millisecond | Average duration a connection is kept open | -| serverConnectionDurationStdDev | millisecond | Standard deviation of open connection duration | -| serverNumRequests | request | Number of requests | -| serverNumSuccessfulResponses | request | Number of successful responses | -| serverNumFailedResponses | request | Number of failed responses | -| serverNumSuccessfulResponseWrites | request | Number of successful response writes | -| serverNumFailedResponseWrites | request | Number of failed response writes | -| serverStartedMillis | millisecond | Time since the service was started | -| embedder.latency | millisecond | Time spent creating an embedding | -| embedder.sequence\_length | item | Number of tokens in the input sequence | -| embedder.request.count | request | Number of embedder API requests | -| embedder.request.failure.count | request | Number of failed embedder API requests | -| embedder.batch.size | item | Number of items in each dispatched batch | -| embedder.batch.queue\_time | millisecond | Time spent waiting in queue before batch dispatch | -| embedder.batch.count | operation | Number of batch dispatches | -| inference.pending | item | Number of pending inference requests in a queue | -| inference.request.rate | operation\_per\_second | Successful inference requests per second | -| inference.failure.rate | operation\_per\_second | Failed inference requests per second | -| inference.request.latency | millisecond | Average inference request latency | -| inference.queue.latency | millisecond | Average inference queue latency | -| inference.compute.latency | millisecond | Average inference compute latency | -| inference.queue\_compute.ratio | ratio | Ratio of inference queue time to compute time | -| jvm.buffer.count | buffer | An estimate of the number of buffers in the pool | -| jvm.buffer.memory.used | byte | An estimate of the memory that the Java virtual machine is using for this buffer pool | -| jvm.buffer.total.capacity | byte | An estimate of the total capacity of the buffers in this pool | -| jvm.classes.loaded | class | The number of classes that are currently loaded in the Java virtual machine | -| jvm.classes.unloaded | class | The total number of classes unloaded since the Java virtual machine has started execution | -| jvm.gc.concurrent.phase.time | second | Time spent in concurrent phase | -| jvm.gc.live.data.size | byte | Size of long-lived heap memory pool after reclamation | -| jvm.gc.max.data.size | byte | Max size of long-lived heap memory pool | -| jvm.gc.memory.allocated | byte | Incremented for an increase in the size of the (young) heap memory pool after one GC to before the next | -| jvm.gc.memory.promoted | byte | Count of positive increases in the size of the old generation memory pool before GC to after GC | -| jvm.gc.overhead | percentage | An approximation of the percent of CPU time used by GC activities | -| jvm.gc.pause | second | Time spent in GC pause | -| jvm.memory.committed | byte | The amount of memory in bytes that is committed for the Java virtual machine to use | -| jvm.memory.max | byte | The maximum amount of memory in bytes that can be used for memory management | -| jvm.memory.usage.after.gc | percentage | The percentage of long-lived heap pool used after the last GC event | -| jvm.memory.used | byte | The amount of used memory | -| jvm.threads.daemon | thread | The current number of live daemon threads | -| jvm.threads.live | thread | The current number of live threads including both daemon and non-daemon threads | -| jvm.threads.peak | thread | The peak live thread count since the Java virtual machine started or peak was reset | -| jvm.threads.started | thread | The total number of application threads started in the JVM | -| jvm.threads.states | thread | The current number of threads (in each state) | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitDescription
http.status.1xxresponseNumber of responses with a 1xx status
http.status.2xxresponseNumber of responses with a 2xx status
http.status.3xxresponseNumber of responses with a 3xx status
http.status.4xxresponseNumber of responses with a 4xx status
http.status.5xxresponseNumber of responses with a 5xx status
application_generationversionThe currently live application config generation (aka session id)
in_servicebinaryThis will have the value 1 if the node is in service, 0 if not.
jdisc.gc.countoperationNumber of JVM garbage collections done
jdisc.gc.msmillisecondTime spent in JVM garbage collection
jdisc.jvmversionJVM runtime version
cputhreadContainer service CPU pressure
jdisc.memory_mappingsoperationJDISC Memory mappings
jdisc.open_file_descriptorsitemJDISC Open file descriptors
jdisc.thread_pool.unhandled_exceptionsthreadNumber of exceptions thrown by tasks
jdisc.thread_pool.work_queue.capacitythreadCapacity of the task queue
jdisc.thread_pool.work_queue.sizethreadSize of the task queue
jdisc.thread_pool.rejected_tasksthreadNumber of tasks rejected by the thread pool
jdisc.thread_pool.sizethreadSize of the thread pool
jdisc.thread_pool.max_allowed_sizethreadThe maximum allowed number of threads in the pool
jdisc.thread_pool.active_threadsthreadNumber of threads that are active
jdisc.deactivated_containers.totalitemJDISC Deactivated container instances
jdisc.deactivated_containers.with_retained_refs.lastitemJDISC Deactivated container nodes with retained refs
jdisc.application.failed_component_graphsitemJDISC Application failed component graphs
jdisc.application.component_graph.creation_time_millismillisecondJDISC Application component graph creation time
jdisc.application.component_graph.reconfigurationsitemJDISC Application component graph reconfigurations
jdisc.singleton.is_activeitemJDISC Singleton is active
jdisc.singleton.activation.countoperationJDISC Singleton activations
jdisc.singleton.activation.failure.countoperationJDISC Singleton activation failures
jdisc.singleton.activation.millismillisecondJDISC Singleton activation time
jdisc.singleton.deactivation.countoperationJDISC Singleton deactivations
jdisc.singleton.deactivation.failure.countoperationJDISC Singleton deactivation failures
jdisc.singleton.deactivation.millismillisecondJDISC Singleton deactivation time
jdisc.http.ssl.handshake.failure.missing_client_certoperationJDISC HTTP SSL Handshake failures due to missing client certificate
jdisc.http.ssl.handshake.failure.expired_client_certoperationJDISC HTTP SSL Handshake failures due to expired client certificate
jdisc.http.ssl.handshake.failure.invalid_client_certoperationJDISC HTTP SSL Handshake failures due to invalid client certificate
jdisc.http.ssl.handshake.failure.incompatible_protocolsoperationJDISC HTTP SSL Handshake failures due to incompatible protocols
jdisc.http.ssl.handshake.failure.incompatible_chifersoperationJDISC HTTP SSL Handshake failures due to incompatible chifers
jdisc.http.ssl.handshake.failure.connection_closedoperationJDISC HTTP SSL Handshake failures due to connection closed
jdisc.http.ssl.handshake.failure.unknownoperationJDISC HTTP SSL Handshake failures for unknown reason
jdisc.http.latencymillisecondRequest latency including the HTTP layer
jdisc.http.time_to_first_bytemillisecondTime from request has been received by the server until the first byte is returned to the client
jdisc.http.request.prematurely_closedrequestHTTP requests prematurely closed
jdisc.http.request.requests_per_connectionrequestHTTP requests per connection
jdisc.http.request.uri_lengthbyteHTTP URI length
jdisc.http.request.content_sizebyteHTTP request content size
jdisc.http.requestsrequestHTTP requests
jdisc.http.requests.statusrequestNumber of requests to the built-in status handler
jdisc.http.filter.rule.blocked_requestsrequestNumber of requests blocked by filter
jdisc.http.filter.rule.allowed_requestsrequestNumber of requests allowed by filter
jdisc.http.filtering.request.handledrequestNumber of filtering requests handled
jdisc.http.filtering.request.unhandledrequestNumber of filtering requests unhandled
jdisc.http.filtering.response.handledrequestNumber of filtering responses handled
jdisc.http.filtering.response.unhandledrequestNumber of filtering responses unhandled
jdisc.http.handler.unhandled_exceptionsrequestNumber of unhandled exceptions in handler
jdisc.tls.capability_checks.succeededoperationNumber of TLS capability checks succeeded
jdisc.tls.capability_checks.failedoperationNumber of TLS capability checks failed
jdisc.http.jetty.threadpool.thread.maxthreadConfigured maximum number of threads
jdisc.http.jetty.threadpool.thread.minthreadConfigured minimum number of threads
jdisc.http.jetty.threadpool.thread.reservedthreadConfigured number of reserved threads or -1 for heuristic
jdisc.http.jetty.threadpool.thread.busythreadNumber of threads executing internal and transient jobs
jdisc.http.jetty.threadpool.thread.idlethreadNumber of idle threads
jdisc.http.jetty.threadpool.thread.totalthreadCurrent number of threads
jdisc.http.jetty.threadpool.queue.sizethreadCurrent size of the job queue
jdisc.http.jetty.http_compliance.violationfailureNumber of HTTP compliance violations
serverNumOpenConnectionsconnectionThe number of currently open connections
serverNumConnectionsconnectionThe total number of connections opened
serverBytesReceivedbyteThe number of bytes received by the server
serverBytesSentbyteThe number of bytes sent from the server
handled.requestsoperationThe number of requests handled per metrics snapshot
handled.latencymillisecondThe time used for handling requests, excluding HTTP layer and rendering
httpapi_latencymillisecondDuration for requests to the HTTP document APIs
httpapi_pendingoperationDocument operations pending execution
httpapi_num_operationsoperationTotal number of document operations performed
httpapi_num_updatesoperationDocument update operations performed
httpapi_num_removesoperationDocument remove operations performed
httpapi_num_putsoperationDocument put operations performed
httpapi_ops_per_secoperation_per_secondDocument operations per second
httpapi_succeededoperationDocument operations that succeeded
httpapi_failedoperationDocument operations that failed
httpapi_parse_erroroperationDocument operations that failed due to document parse errors
httpapi_condition_not_metoperationDocument operations not applied due to condition not met
httpapi_not_foundoperationDocument operations not applied due to document not found
httpapi_failed_unknownoperationDocument operations failed by unknown cause
httpapi_failed_timeoutoperationDocument operations failed by timeout
httpapi_failed_insufficient_storageoperationDocument operations failed by insufficient storage
httpapi_queued_operationsoperationDocument operations queued for execution in /document/v1 API handler
httpapi_queued_bytesbyteTotal operation bytes queued for execution in /document/v1 API handler
httpapi_queued_agesecondAge in seconds of the oldest operation in the queue for /document/v1 API handler
httpapi_mbus_window_sizeoperationThe window size of Messagebus's dynamic throttle policy for /document/v1 API handler
mem.heap.totalbyteTotal available heap memory
mem.heap.freebyteFree heap memory
mem.heap.usedbyteCurrently used heap memory
mem.direct.totalbyteTotal available direct memory
mem.direct.freebyteCurrently free direct memory
mem.direct.usedbyteDirect memory currently used
mem.direct.countbyteNumber of direct memory allocations
mem.native.totalbyteTotal available native memory
mem.native.freebyteCurrently free native memory
mem.native.usedbyteNative memory currently used
athenz-tenant-cert.expiry.secondssecondTime remaining until Athenz tenant certificate expires
container-iam-role.expiry.secondssecondTime remaining until IAM role expires
peak_qpsquery_per_secondThe highest number of qps for a second for this metrics snapshot
search_connectionsconnectionNumber of search connections
feed.operationsoperationNumber of document feed operations
feed.latencymillisecondFeed latency
feed.http-requestsoperationFeed HTTP requests
queriesoperationQuery volume
query_container_latencymillisecondThe query execution time consumed in the container
query_latencymillisecondThe overall query latency as observed by the container cluster, excluding HTTP layer and rendering
query_timeoutmillisecondThe amount of time allowed for query execution, from the client
failed_queriesoperationThe number of failed queries
degraded_queriesoperationThe number of degraded queries, e.g. due to some content nodes not responding in time
hits_per_queryhit_per_queryThe number of hits returned
query_hit_offsethitThe offset for hits returned
documents_covereddocumentThe combined number of documents considered during query evaluation
documents_totaldocumentThe number of documents to be evaluated if all requests had been fully executed
documents_target_totaldocumentThe target number of total documents to be evaluated when all data is in sync
jdisc.render.latencynanosecondThe time used by the container to render responses
query_item_countitemThe number of query items (terms, phrases, etc.)
docproc.proctimemillisecondTime spent processing document
docproc.documentsdocumentNumber of processed documents
totalhits_per_queryhit_per_queryThe total number of documents found to match queries
empty_resultsoperationNumber of queries matching no documents
requestsOverQuotaoperationThe number of requests rejected due to exceeding quota
relevance.at_1scoreThe relevance of hit number 1
relevance.at_3scoreThe relevance of hit number 3
relevance.at_10scoreThe relevance of hit number 10
error.timeoutoperationRequests that timed out
error.backends_oosoperationRequests that failed due to no available backends nodes
error.plugin_failureoperationRequests that failed due to plugin failure
error.backend_communication_erroroperationRequests that failed due to backend communication error
error.empty_document_summariesoperationRequests that failed due to missing document summaries
error.illegal_queryoperationRequests that failed due to illegal queries
error.invalid_query_parameteroperationRequests that failed due to invalid query parameters
error.internal_server_erroroperationRequests that failed due to internal server error
error.misconfigured_serveroperationRequests that failed due to misconfigured server
error.invalid_query_transformationoperationRequests that failed due to invalid query transformation
error.results_with_errorsoperationThe number of queries with error payload
error.unspecifiedoperationRequests that failed for an unspecified reason
error.unhandled_exceptionoperationRequests that failed due to an unhandled exception
serverRejectedRequestsoperationDeprecated. Use jdisc.thread_pool.rejected_tasks instead.
serverThreadPoolSizethreadDeprecated. Use jdisc.thread_pool.size instead.
serverActiveThreadsthreadDeprecated. Use jdisc.thread_pool.active_threads instead.
jrt.transport.tls-certificate-verification-failuresfailureTLS certificate verification failures
jrt.transport.peer-authorization-failuresfailureTLS peer authorization failures
jrt.transport.server.tls-connections-establishedconnectionTLS server connections established
jrt.transport.client.tls-connections-establishedconnectionTLS client connections established
jrt.transport.server.unencrypted-connections-establishedconnectionUnencrypted server connections established
jrt.transport.client.unencrypted-connections-establishedconnectionUnencrypted client connections established
max_query_latencymillisecondDeprecated. Use query_latency.max instead
mean_query_latencymillisecondDeprecated. Use the expression (query_latency.sum / query_latency.count) instead
jdisc.http.filter.athenz.accepted_requestsrequestNumber of requests accepted by the AthenzAuthorization filter
jdisc.http.filter.athenz.rejected_requestsrequestNumber of requests rejected by the AthenzAuthorization filter
jdisc.http.filter.athenz.grid_requestsrequestNumber of grid requests
serverConnectionsOpenMaxconnectionMaximum number of open connections
serverConnectionDurationMaxmillisecondLongest duration a connection is kept open
serverConnectionDurationMeanmillisecondAverage duration a connection is kept open
serverConnectionDurationStdDevmillisecondStandard deviation of open connection duration
serverNumRequestsrequestNumber of requests
serverNumSuccessfulResponsesrequestNumber of successful responses
serverNumFailedResponsesrequestNumber of failed responses
serverNumSuccessfulResponseWritesrequestNumber of successful response writes
serverNumFailedResponseWritesrequestNumber of failed response writes
serverStartedMillismillisecondTime since the service was started
embedder.latencymillisecondTime spent creating an embedding
embedder.sequence_lengthitemNumber of tokens in the input sequence
embedder.request.countrequestNumber of embedder API requests
embedder.request.failure.countrequestNumber of failed embedder API requests
embedder.batch.sizeitemNumber of items in each dispatched batch
embedder.batch.queue_timemillisecondTime spent waiting in queue before batch dispatch
embedder.batch.countoperationNumber of batch dispatches
inference.pendingitemNumber of pending inference requests in a queue
inference.request.rateoperation_per_secondSuccessful inference requests per second
inference.failure.rateoperation_per_secondFailed inference requests per second
inference.request.latencymillisecondAverage inference request latency
inference.queue.latencymillisecondAverage inference queue latency
inference.compute.latencymillisecondAverage inference compute latency
inference.queue_compute.ratioratioRatio of inference queue time to compute time
jvm.buffer.countbufferAn estimate of the number of buffers in the pool
jvm.buffer.memory.usedbyteAn estimate of the memory that the Java virtual machine is using for this buffer pool
jvm.buffer.total.capacitybyteAn estimate of the total capacity of the buffers in this pool
jvm.classes.loadedclassThe number of classes that are currently loaded in the Java virtual machine
jvm.classes.unloadedclassThe total number of classes unloaded since the Java virtual machine has started execution
jvm.gc.concurrent.phase.timesecondTime spent in concurrent phase
jvm.gc.live.data.sizebyteSize of long-lived heap memory pool after reclamation
jvm.gc.max.data.sizebyteMax size of long-lived heap memory pool
jvm.gc.memory.allocatedbyteIncremented for an increase in the size of the (young) heap memory pool after one GC to before the next
jvm.gc.memory.promotedbyteCount of positive increases in the size of the old generation memory pool before GC to after GC
jvm.gc.overheadpercentageAn approximation of the percent of CPU time used by GC activities
jvm.gc.pausesecondTime spent in GC pause
jvm.memory.committedbyteThe amount of memory in bytes that is committed for the Java virtual machine to use
jvm.memory.maxbyteThe maximum amount of memory in bytes that can be used for memory management
jvm.memory.usage.after.gcpercentageThe percentage of long-lived heap pool used after the last GC event
jvm.memory.usedbyteThe amount of used memory
jvm.threads.daemonthreadThe current number of live daemon threads
jvm.threads.livethreadThe current number of live threads including both daemon and non-daemon threads
jvm.threads.peakthreadThe peak live thread count since the Java virtual machine started or peak was reset
jvm.threads.startedthreadThe total number of application threads started in the JVM
jvm.threads.statesthreadThe current number of threads (in each state)
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/default-metric-set.mdx b/mintlify-docs/en/reference/operations/metrics/default-metric-set.mdx index 6b1fb53344..a10b4d1558 100644 --- a/mintlify-docs/en/reference/operations/metrics/default-metric-set.mdx +++ b/mintlify-docs/en/reference/operations/metrics/default-metric-set.mdx @@ -7,96 +7,471 @@ This document provides reference documentation for the Default metric set, inclu ## ClusterController Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| cluster-controller.down.count | node | last, max | Number of content nodes down | -| cluster-controller.maintenance.count | node | last, max | Number of content nodes in maintenance | -| cluster-controller.up.count | node | last, max | Number of content nodes up | -| cluster-controller.is-master | binary | last, max | 1 if this cluster controller is currently the master, or 0 if not | -| cluster-controller.resource\_usage.nodes\_above\_limit | node | last, max | The number of content nodes above resource limit, blocking feed | -| cluster-controller.resource\_usage.max\_memory\_utilization | fraction | last, max | Current memory utilisation, for content node with the highest value | -| cluster-controller.resource\_usage.max\_disk\_utilization | fraction | last, max | Current disk space utilisation, for content node with the highest value | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
cluster-controller.down.countnodelast, maxNumber of content nodes down
cluster-controller.maintenance.countnodelast, maxNumber of content nodes in maintenance
cluster-controller.up.countnodelast, maxNumber of content nodes up
cluster-controller.is-masterbinarylast, max1 if this cluster controller is currently the master, or 0 if not
cluster-controller.resource_usage.nodes_above_limitnodelast, maxThe number of content nodes above resource limit, blocking feed
cluster-controller.resource_usage.max_memory_utilizationfractionlast, maxCurrent memory utilisation, for content node with the highest value
cluster-controller.resource_usage.max_disk_utilizationfractionlast, maxCurrent disk space utilisation, for content node with the highest value
## Container Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| http.status.1xx | response | rate | Number of responses with a 1xx status | -| http.status.2xx | response | rate | Number of responses with a 2xx status | -| http.status.3xx | response | rate | Number of responses with a 3xx status | -| http.status.4xx | response | rate | Number of responses with a 4xx status | -| http.status.5xx | response | rate | Number of responses with a 5xx status | -| jdisc.gc.ms | millisecond | average, max | Time spent in JVM garbage collection | -| jdisc.thread\_pool.work\_queue.capacity | thread | max | Capacity of the task queue | -| jdisc.thread\_pool.work\_queue.size | thread | count, max, min, sum | Size of the task queue | -| jdisc.thread\_pool.size | thread | max | Size of the thread pool | -| jdisc.thread\_pool.active\_threads | thread | count, max, min, sum | Number of threads that are active | -| jdisc.application.failed\_component\_graphs | item | rate | JDISC Application failed component graphs | -| jdisc.singleton.is\_active | item | last, max | JDISC Singleton is active | -| jdisc.http.ssl.handshake.failure.missing\_client\_cert | operation | rate | JDISC HTTP SSL Handshake failures due to missing client certificate | -| jdisc.http.ssl.handshake.failure.incompatible\_protocols | operation | rate | JDISC HTTP SSL Handshake failures due to incompatible protocols | -| jdisc.http.ssl.handshake.failure.incompatible\_chifers | operation | rate | JDISC HTTP SSL Handshake failures due to incompatible chifers | -| jdisc.http.ssl.handshake.failure.unknown | operation | rate | JDISC HTTP SSL Handshake failures for unknown reason | -| jdisc.http.latency | millisecond | count, max, sum | Request latency including the HTTP layer | -| mem.heap.free | byte | average | Free heap memory | -| athenz-tenant-cert.expiry.seconds | second | last, max, min | Time remaining until Athenz tenant certificate expires | -| feed.operations | operation | rate | Number of document feed operations | -| feed.latency | millisecond | count, sum | Feed latency | -| queries | operation | rate | Query volume | -| query\_latency | millisecond | average, count, max, sum | The overall query latency as observed by the container cluster, excluding HTTP layer and rendering | -| failed\_queries | operation | rate | The number of failed queries | -| degraded\_queries | operation | rate | The number of degraded queries, e.g. due to some content nodes not responding in time | -| hits\_per\_query | hit\_per\_query | average, count, max, sum | The number of hits returned | -| docproc.documents | document | sum | Number of processed documents | -| totalhits\_per\_query | hit\_per\_query | average, count, max, sum | The total number of documents found to match queries | -| serverActiveThreads | thread | average | Deprecated. Use jdisc.thread\_pool.active\_threads instead. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
http.status.1xxresponserateNumber of responses with a 1xx status
http.status.2xxresponserateNumber of responses with a 2xx status
http.status.3xxresponserateNumber of responses with a 3xx status
http.status.4xxresponserateNumber of responses with a 4xx status
http.status.5xxresponserateNumber of responses with a 5xx status
jdisc.gc.msmillisecondaverage, maxTime spent in JVM garbage collection
jdisc.thread_pool.work_queue.capacitythreadmaxCapacity of the task queue
jdisc.thread_pool.work_queue.sizethreadcount, max, min, sumSize of the task queue
jdisc.thread_pool.sizethreadmaxSize of the thread pool
jdisc.thread_pool.active_threadsthreadcount, max, min, sumNumber of threads that are active
jdisc.application.failed_component_graphsitemrateJDISC Application failed component graphs
jdisc.singleton.is_activeitemlast, maxJDISC Singleton is active
jdisc.http.ssl.handshake.failure.missing_client_certoperationrateJDISC HTTP SSL Handshake failures due to missing client certificate
jdisc.http.ssl.handshake.failure.incompatible_protocolsoperationrateJDISC HTTP SSL Handshake failures due to incompatible protocols
jdisc.http.ssl.handshake.failure.incompatible_chifersoperationrateJDISC HTTP SSL Handshake failures due to incompatible chifers
jdisc.http.ssl.handshake.failure.unknownoperationrateJDISC HTTP SSL Handshake failures for unknown reason
jdisc.http.latencymillisecondcount, max, sumRequest latency including the HTTP layer
mem.heap.freebyteaverageFree heap memory
athenz-tenant-cert.expiry.secondssecondlast, max, minTime remaining until Athenz tenant certificate expires
feed.operationsoperationrateNumber of document feed operations
feed.latencymillisecondcount, sumFeed latency
queriesoperationrateQuery volume
query_latencymillisecondaverage, count, max, sumThe overall query latency as observed by the container cluster, excluding HTTP layer and rendering
failed_queriesoperationrateThe number of failed queries
degraded_queriesoperationrateThe number of degraded queries, e.g. due to some content nodes not responding in time
hits_per_queryhit_per_queryaverage, count, max, sumThe number of hits returned
docproc.documentsdocumentsumNumber of processed documents
totalhits_per_queryhit_per_queryaverage, count, max, sumThe total number of documents found to match queries
serverActiveThreadsthreadaverageDeprecated. Use jdisc.thread_pool.active_threads instead.
## Distributor Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| vds.distributor.docsstored | document | average | Number of documents stored in all buckets controlled by this distributor | -| vds.bouncer.clock\_skew\_aborts | operation | count | Number of client operations that were aborted due to clock skew between sender and receiver exceeding acceptable range | + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
vds.distributor.docsstoreddocumentaverageNumber of documents stored in all buckets controlled by this distributor
vds.bouncer.clock_skew_abortsoperationcountNumber of client operations that were aborted due to clock skew between sender and receiver exceeding acceptable range
## NodeAdmin Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| endpoint.certificate.expiry.seconds | second | N/A | Time until node endpoint certificate expires | -| node-certificate.expiry.seconds | second | N/A | Time until node certificate expires | + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
endpoint.certificate.expiry.secondssecondN/ATime until node endpoint certificate expires
node-certificate.expiry.secondssecondN/ATime until node certificate expires
## SearchNode Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| content.proton.documentdb.documents.total | document | last, max | The total number of documents in this documents db (ready + not-ready) | -| content.proton.documentdb.documents.ready | document | last, max | The number of ready documents in this document db | -| content.proton.documentdb.documents.active | document | last, max | The number of active / searchable documents in this document db | -| content.proton.documentdb.disk\_usage | byte | last | The total disk usage (in bytes) for this document db | -| content.proton.documentdb.memory\_usage.allocated\_bytes | byte | last | The number of allocated bytes | -| content.proton.search\_protocol.query.latency | second | average, count, max, sum | Query request latency (seconds) | -| content.proton.search\_protocol.docsum.latency | second | average, count, max, sum | Docsum request latency (seconds) | -| content.proton.search\_protocol.docsum.requested\_documents | document | rate | Total requested document summaries | -| content.proton.resource\_usage.disk | fraction | average | The relative amount of disk used by this content node (transient usage not included, value in the range \[0, 1\]). Same value as reported to the cluster controller | -| content.proton.resource\_usage.memory | fraction | average | The relative amount of memory used by this content node (transient usage not included, value in the range \[0, 1\]). Same value as reported to the cluster controller | -| content.proton.resource\_usage.feeding\_blocked | binary | last, max | Whether feeding is blocked due to resource limits being reached (value is either 0 or 1) | -| content.proton.transactionlog.disk\_usage | byte | last | The disk usage (in bytes) of the transaction log | -| content.proton.documentdb.matching.docs\_matched | document | rate | Number of documents matched | -| content.proton.documentdb.matching.docs\_reranked | document | rate | Number of documents re-ranked (second phase) | -| content.proton.documentdb.matching.rank\_profile.query\_latency | second | average, count, max, sum | Total average latency (sec) when matching and ranking a query | -| content.proton.documentdb.matching.rank\_profile.query\_setup\_time | second | average, count, max, sum | Average time (sec) spent setting up and tearing down queries | -| content.proton.documentdb.matching.rank\_profile.rerank\_time | second | average, count, max, sum | Average time (sec) spent on 2nd phase ranking | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
content.proton.documentdb.documents.totaldocumentlast, maxThe total number of documents in this documents db (ready + not-ready)
content.proton.documentdb.documents.readydocumentlast, maxThe number of ready documents in this document db
content.proton.documentdb.documents.activedocumentlast, maxThe number of active / searchable documents in this document db
content.proton.documentdb.disk_usagebytelastThe total disk usage (in bytes) for this document db
content.proton.documentdb.memory_usage.allocated_bytesbytelastThe number of allocated bytes
content.proton.search_protocol.query.latencysecondaverage, count, max, sumQuery request latency (seconds)
content.proton.search_protocol.docsum.latencysecondaverage, count, max, sumDocsum request latency (seconds)
content.proton.search_protocol.docsum.requested_documentsdocumentrateTotal requested document summaries
content.proton.resource_usage.diskfractionaverageThe relative amount of disk used by this content node (transient usage not included, value in the range [0, 1]). Same value as reported to the cluster controller
content.proton.resource_usage.memoryfractionaverageThe relative amount of memory used by this content node (transient usage not included, value in the range [0, 1]). Same value as reported to the cluster controller
content.proton.resource_usage.feeding_blockedbinarylast, maxWhether feeding is blocked due to resource limits being reached (value is either 0 or 1)
content.proton.transactionlog.disk_usagebytelastThe disk usage (in bytes) of the transaction log
content.proton.documentdb.matching.docs_matcheddocumentrateNumber of documents matched
content.proton.documentdb.matching.docs_rerankeddocumentrateNumber of documents re-ranked (second phase)
content.proton.documentdb.matching.rank_profile.query_latencysecondaverage, count, max, sumTotal average latency (sec) when matching and ranking a query
content.proton.documentdb.matching.rank_profile.query_setup_timesecondaverage, count, max, sumAverage time (sec) spent setting up and tearing down queries
content.proton.documentdb.matching.rank_profile.rerank_timesecondaverage, count, max, sumAverage time (sec) spent on 2nd phase ranking
## Sentinel Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| sentinel.totalRestarts | restart | last, max, sum | Total number of service restarts done by the sentinel since the sentinel was started | + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
sentinel.totalRestartsrestartlast, max, sumTotal number of service restarts done by the sentinel since the sentinel was started
## Storage Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| vds.filestor.allthreads.put.count | operation | rate | Number of requests processed. | -| vds.filestor.allthreads.remove.count | operation | rate | Number of requests processed. | -| vds.filestor.allthreads.update.count | request | rate | Number of requests processed. | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
vds.filestor.allthreads.put.countoperationrateNumber of requests processed.
vds.filestor.allthreads.remove.countoperationrateNumber of requests processed.
vds.filestor.allthreads.update.countrequestrateNumber of requests processed.
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/distributor.mdx b/mintlify-docs/en/reference/operations/metrics/distributor.mdx index 6c43274241..a214f453d7 100644 --- a/mintlify-docs/en/reference/operations/metrics/distributor.mdx +++ b/mintlify-docs/en/reference/operations/metrics/distributor.mdx @@ -3,226 +3,1119 @@ title: "Distributor Metrics" sidebarTitle: "Distributor metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| vds.idealstate.buckets\_rechecking | bucket | The number of buckets that we are rechecking for ideal state operations | -| vds.idealstate.idealstate\_diff | bucket | A number representing the current difference from the ideal state. This is a number that decreases steadily as the system is getting closer to the ideal state | -| vds.idealstate.buckets\_toofewcopies | bucket | The number of buckets the distributor controls that have less than the desired redundancy | -| vds.idealstate.buckets\_toomanycopies | bucket | The number of buckets the distributor controls that have more than the desired redundancy | -| vds.idealstate.buckets | bucket | The number of buckets the distributor controls | -| vds.idealstate.buckets\_notrusted | bucket | The number of buckets that have no trusted copies. | -| vds.idealstate.bucket\_replicas\_moving\_out | bucket | Bucket replicas that should be moved out, e.g. retirement case or node added to cluster that has higher ideal state priority. | -| vds.idealstate.bucket\_replicas\_copying\_out | bucket | Bucket replicas that should be copied out, e.g. node is in ideal state but might have to provide data other nodes in a merge | -| vds.idealstate.bucket\_replicas\_copying\_in | bucket | Bucket replicas that should be copied in, e.g. node does not have a replica for a bucket that it is in ideal state for | -| vds.idealstate.bucket\_replicas\_syncing | bucket | Bucket replicas that need syncing due to mismatching metadata | -| vds.idealstate.max\_observed\_time\_since\_last\_gc\_sec | second | Maximum time (in seconds) since GC was last successfully run for a bucket. Aggregated max value across all buckets on the distributor. | -| vds.idealstate.delete\_bucket.done\_ok | operation | The number of operations successfully performed | -| vds.idealstate.delete\_bucket.done\_failed | operation | The number of operations that failed | -| vds.idealstate.delete\_bucket.pending | operation | The number of operations pending | -| vds.idealstate.delete\_bucket.blocked | operation | The number of operations blocked by blocking operation starter | -| vds.idealstate.delete\_bucket.throttled | operation | The number of operations throttled by throttling operation starter | -| vds.idealstate.merge\_bucket.done\_ok | operation | The number of operations successfully performed | -| vds.idealstate.merge\_bucket.done\_failed | operation | The number of operations that failed | -| vds.idealstate.merge\_bucket.pending | operation | The number of operations pending | -| vds.idealstate.merge\_bucket.blocked | operation | The number of operations blocked by blocking operation starter | -| vds.idealstate.merge\_bucket.throttled | operation | The number of operations throttled by throttling operation starter | -| vds.idealstate.merge\_bucket.source\_only\_copy\_changed | operation | The number of merge operations where source-only copy changed | -| vds.idealstate.merge\_bucket.source\_only\_copy\_delete\_blocked | operation | The number of merge operations where delete of unchanged source-only copies was blocked | -| vds.idealstate.merge\_bucket.source\_only\_copy\_delete\_failed | operation | The number of merge operations where delete of unchanged source-only copies failed | -| vds.idealstate.split\_bucket.done\_ok | operation | The number of operations successfully performed | -| vds.idealstate.split\_bucket.done\_failed | operation | The number of operations that failed | -| vds.idealstate.split\_bucket.pending | operation | The number of operations pending | -| vds.idealstate.split\_bucket.blocked | operation | The number of operations blocked by blocking operation starter | -| vds.idealstate.split\_bucket.throttled | operation | The number of operations throttled by throttling operation starter | -| vds.idealstate.join\_bucket.done\_ok | operation | The number of operations successfully performed | -| vds.idealstate.join\_bucket.done\_failed | operation | The number of operations that failed | -| vds.idealstate.join\_bucket.pending | operation | The number of operations pending | -| vds.idealstate.join\_bucket.blocked | operation | The number of operations blocked by blocking operation starter | -| vds.idealstate.join\_bucket.throttled | operation | The number of operations throttled by throttling operation starter | -| vds.idealstate.garbage\_collection.done\_ok | operation | The number of operations successfully performed | -| vds.idealstate.garbage\_collection.done\_failed | operation | The number of operations that failed | -| vds.idealstate.garbage\_collection.pending | operation | The number of operations pending | -| vds.idealstate.garbage\_collection.documents\_removed | document | Number of documents removed by GC operations | -| vds.idealstate.garbage\_collection.blocked | operation | The number of operations blocked by blocking operation starter | -| vds.idealstate.garbage\_collection.throttled | operation | The number of operations throttled by throttling operation starter | -| vds.distributor.puts.latency | millisecond | The latency of put operations | -| vds.distributor.puts.ok | operation | The number of successful put operations performed | -| vds.distributor.puts.failures.total | operation | Sum of all failures | -| vds.distributor.puts.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.puts.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.puts.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.puts.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.puts.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.puts.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.puts.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.puts.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.puts.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.puts.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.puts.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.removes.latency | millisecond | The latency of remove operations | -| vds.distributor.removes.ok | operation | The number of successful removes operations performed | -| vds.distributor.removes.failures.total | operation | Sum of all failures | -| vds.distributor.removes.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.removes.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.removes.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.removes.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.removes.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.removes.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.removes.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.removes.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.removes.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.removes.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.removes.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.updates.latency | millisecond | The latency of update operations | -| vds.distributor.updates.ok | operation | The number of successful updates operations performed | -| vds.distributor.updates.failures.total | operation | Sum of all failures | -| vds.distributor.updates.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.updates.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.updates.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.updates.diverging\_timestamp\_updates | operation | Number of updates that report they were performed against divergent version timestamps on different replicas | -| vds.distributor.updates.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.updates.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.updates.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.updates.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.updates.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.updates.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.updates.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.updates.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.updates.fast\_path\_restarts | operation | Number of safe path (write repair) updates that were restarted as fast path updates because all replicas returned documents with the same timestamp in the initial read phase | -| vds.distributor.removelocations.ok | operation | The number of successful removelocations operations performed | -| vds.distributor.removelocations.failures.total | operation | Sum of all failures | -| vds.distributor.removelocations.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.removelocations.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.removelocations.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.removelocations.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.removelocations.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.removelocations.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.removelocations.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.removelocations.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.removelocations.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.removelocations.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.removelocations.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.removelocations.latency | millisecond | The average latency of removelocations operations | -| vds.distributor.gets.latency | millisecond | The average latency of gets operations | -| vds.distributor.gets.ok | operation | The number of successful gets operations performed | -| vds.distributor.gets.failures.total | operation | Sum of all failures | -| vds.distributor.gets.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.gets.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.gets.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.gets.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.gets.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.gets.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.gets.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.gets.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.gets.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.gets.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.gets.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.visitor.latency | millisecond | The average latency of visitor operations | -| vds.distributor.visitor.ok | operation | The number of successful visitor operations performed | -| vds.distributor.visitor.failures.total | operation | Sum of all failures | -| vds.distributor.visitor.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.visitor.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.visitor.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.visitor.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.visitor.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.visitor.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.visitor.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.visitor.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.visitor.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.visitor.bytes\_per\_visitor | operation | The number of bytes visited on content nodes as part of a single client visitor command | -| vds.distributor.visitor.docs\_per\_visitor | operation | The number of documents visited on content nodes as part of a single client visitor command | -| vds.distributor.visitor.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.visitor.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.docsstored | document | Number of documents stored in all buckets controlled by this distributor | -| vds.distributor.bytesstored | byte | Number of bytes stored in all buckets controlled by this distributor | -| metricmanager.periodichooklatency | millisecond | Time in ms used to update a single periodic hook | -| metricmanager.resetlatency | millisecond | Time in ms used to reset all metrics. | -| metricmanager.sleeptime | millisecond | Time in ms worker thread is sleeping | -| metricmanager.snapshothooklatency | millisecond | Time in ms used to update a single snapshot hook | -| metricmanager.snapshotlatency | millisecond | Time in ms used to take a snapshot | -| vds.distributor.activate\_cluster\_state\_processing\_time | millisecond | Elapsed time where the distributor thread is blocked on merging pending bucket info into its bucket database upon activating a cluster state | -| vds.distributor.bucket\_db.memory\_usage.allocated\_bytes | byte | The number of allocated bytes | -| vds.distributor.bucket\_db.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) | -| vds.distributor.bucket\_db.memory\_usage.onhold\_bytes | byte | The number of bytes on hold | -| vds.distributor.bucket\_db.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) | -| vds.distributor.getbucketlists.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.getbucketlists.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.getbucketlists.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.getbucketlists.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.getbucketlists.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.getbucketlists.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.getbucketlists.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.getbucketlists.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.getbucketlists.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.getbucketlists.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.getbucketlists.failures.total | operation | Total number of failures | -| vds.distributor.getbucketlists.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.getbucketlists.latency | millisecond | The average latency of getbucketlists operations | -| vds.distributor.getbucketlists.ok | operation | The number of successful getbucketlists operations performed | -| vds.distributor.recoverymodeschedulingtime | millisecond | Time spent scheduling operations in recovery mode after receiving new cluster state | -| vds.distributor.set\_cluster\_state\_processing\_time | millisecond | Elapsed time where the distributor thread is blocked on processing its bucket database upon receiving a new cluster state | -| vds.distributor.state\_transition\_time | millisecond | Time it takes to complete a cluster state transition. If a state transition is preempted before completing, its elapsed time is counted as part of the total time spent for the final, completed state transition | -| vds.distributor.stats.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.stats.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.stats.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.stats.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.stats.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.stats.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.stats.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.stats.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.stats.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.stats.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.stats.failures.total | operation | The total number of failures | -| vds.distributor.stats.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.stats.latency | millisecond | The average latency of stats operations | -| vds.distributor.stats.ok | operation | The number of successful stats operations performed | -| vds.distributor.update\_gets.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.update\_gets.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.update\_gets.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.update\_gets.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.update\_gets.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.update\_gets.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.update\_gets.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.update\_gets.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.update\_gets.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.update\_gets.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.update\_gets.failures.total | operation | The total number of failures | -| vds.distributor.update\_gets.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.update\_gets.latency | millisecond | The average latency of update\_gets operations | -| vds.distributor.update\_gets.ok | operation | The number of successful update\_gets operations performed | -| vds.distributor.update\_metadata\_gets.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.update\_metadata\_gets.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.update\_metadata\_gets.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.update\_metadata\_gets.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.update\_metadata\_gets.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.update\_metadata\_gets.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.update\_metadata\_gets.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.update\_metadata\_gets.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.update\_metadata\_gets.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.update\_metadata\_gets.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.update\_metadata\_gets.failures.total | operation | The total number of failures | -| vds.distributor.update\_metadata\_gets.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.update\_metadata\_gets.latency | millisecond | The average latency of update\_metadata\_gets operations | -| vds.distributor.update\_metadata\_gets.ok | operation | The number of successful update\_metadata\_gets operations performed | -| vds.distributor.update\_puts.failures.busy | operation | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.update\_puts.failures.concurrent\_mutations | operation | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.update\_puts.failures.inconsistent\_bucket | operation | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.update\_puts.failures.notconnected | operation | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.update\_puts.failures.notfound | operation | The number of operations that failed because the document did not exist | -| vds.distributor.update\_puts.failures.notready | operation | The number of operations discarded because distributor was not ready | -| vds.distributor.update\_puts.failures.safe\_time\_not\_reached | operation | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.update\_puts.failures.storagefailure | operation | The number of operations that failed in storage | -| vds.distributor.update\_puts.failures.test\_and\_set\_failed | operation | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.update\_puts.failures.timeout | operation | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.update\_puts.failures.total | operation | The total number of put failures | -| vds.distributor.update\_puts.failures.wrongdistributor | operation | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.update\_puts.latency | millisecond | The average latency of update\_puts operations | -| vds.distributor.update\_puts.ok | operation | The number of successful update\_puts operations performed | -| vds.distributor.mutating\_op\_memory\_usage | byte | Estimated amount of memory used by active mutating operations across all distributor stripes, in bytes | -| vds.idealstate.nodes\_per\_merge | node | The number of nodes involved in a single merge operation. | -| vds.idealstate.set\_bucket\_state.blocked | operation | The number of operations blocked by blocking operation starter | -| vds.idealstate.set\_bucket\_state.done\_failed | operation | The number of operations that failed | -| vds.idealstate.set\_bucket\_state.done\_ok | operation | The number of operations successfully performed | -| vds.idealstate.set\_bucket\_state.pending | operation | The number of operations pending | -| vds.idealstate.set\_bucket\_state.throttled | operation | The number of operations throttled by throttling operation starter | -| vds.bouncer.clock\_skew\_aborts | operation | Number of client operations that were aborted due to clock skew between sender and receiver exceeding acceptable range | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitDescription
vds.idealstate.buckets_recheckingbucketThe number of buckets that we are rechecking for ideal state operations
vds.idealstate.idealstate_diffbucketA number representing the current difference from the ideal state. This is a number that decreases steadily as the system is getting closer to the ideal state
vds.idealstate.buckets_toofewcopiesbucketThe number of buckets the distributor controls that have less than the desired redundancy
vds.idealstate.buckets_toomanycopiesbucketThe number of buckets the distributor controls that have more than the desired redundancy
vds.idealstate.bucketsbucketThe number of buckets the distributor controls
vds.idealstate.buckets_notrustedbucketThe number of buckets that have no trusted copies.
vds.idealstate.bucket_replicas_moving_outbucketBucket replicas that should be moved out, e.g. retirement case or node added to cluster that has higher ideal state priority.
vds.idealstate.bucket_replicas_copying_outbucketBucket replicas that should be copied out, e.g. node is in ideal state but might have to provide data other nodes in a merge
vds.idealstate.bucket_replicas_copying_inbucketBucket replicas that should be copied in, e.g. node does not have a replica for a bucket that it is in ideal state for
vds.idealstate.bucket_replicas_syncingbucketBucket replicas that need syncing due to mismatching metadata
vds.idealstate.max_observed_time_since_last_gc_secsecondMaximum time (in seconds) since GC was last successfully run for a bucket. Aggregated max value across all buckets on the distributor.
vds.idealstate.delete_bucket.done_okoperationThe number of operations successfully performed
vds.idealstate.delete_bucket.done_failedoperationThe number of operations that failed
vds.idealstate.delete_bucket.pendingoperationThe number of operations pending
vds.idealstate.delete_bucket.blockedoperationThe number of operations blocked by blocking operation starter
vds.idealstate.delete_bucket.throttledoperationThe number of operations throttled by throttling operation starter
vds.idealstate.merge_bucket.done_okoperationThe number of operations successfully performed
vds.idealstate.merge_bucket.done_failedoperationThe number of operations that failed
vds.idealstate.merge_bucket.pendingoperationThe number of operations pending
vds.idealstate.merge_bucket.blockedoperationThe number of operations blocked by blocking operation starter
vds.idealstate.merge_bucket.throttledoperationThe number of operations throttled by throttling operation starter
vds.idealstate.merge_bucket.source_only_copy_changedoperationThe number of merge operations where source-only copy changed
vds.idealstate.merge_bucket.source_only_copy_delete_blockedoperationThe number of merge operations where delete of unchanged source-only copies was blocked
vds.idealstate.merge_bucket.source_only_copy_delete_failedoperationThe number of merge operations where delete of unchanged source-only copies failed
vds.idealstate.split_bucket.done_okoperationThe number of operations successfully performed
vds.idealstate.split_bucket.done_failedoperationThe number of operations that failed
vds.idealstate.split_bucket.pendingoperationThe number of operations pending
vds.idealstate.split_bucket.blockedoperationThe number of operations blocked by blocking operation starter
vds.idealstate.split_bucket.throttledoperationThe number of operations throttled by throttling operation starter
vds.idealstate.join_bucket.done_okoperationThe number of operations successfully performed
vds.idealstate.join_bucket.done_failedoperationThe number of operations that failed
vds.idealstate.join_bucket.pendingoperationThe number of operations pending
vds.idealstate.join_bucket.blockedoperationThe number of operations blocked by blocking operation starter
vds.idealstate.join_bucket.throttledoperationThe number of operations throttled by throttling operation starter
vds.idealstate.garbage_collection.done_okoperationThe number of operations successfully performed
vds.idealstate.garbage_collection.done_failedoperationThe number of operations that failed
vds.idealstate.garbage_collection.pendingoperationThe number of operations pending
vds.idealstate.garbage_collection.documents_removeddocumentNumber of documents removed by GC operations
vds.idealstate.garbage_collection.blockedoperationThe number of operations blocked by blocking operation starter
vds.idealstate.garbage_collection.throttledoperationThe number of operations throttled by throttling operation starter
vds.distributor.puts.latencymillisecondThe latency of put operations
vds.distributor.puts.okoperationThe number of successful put operations performed
vds.distributor.puts.failures.totaloperationSum of all failures
vds.distributor.puts.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.puts.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.puts.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.puts.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.puts.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.puts.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.puts.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.puts.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.puts.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.puts.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.puts.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.removes.latencymillisecondThe latency of remove operations
vds.distributor.removes.okoperationThe number of successful removes operations performed
vds.distributor.removes.failures.totaloperationSum of all failures
vds.distributor.removes.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.removes.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.removes.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.removes.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.removes.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.removes.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.removes.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.removes.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.removes.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.removes.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.removes.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.updates.latencymillisecondThe latency of update operations
vds.distributor.updates.okoperationThe number of successful updates operations performed
vds.distributor.updates.failures.totaloperationSum of all failures
vds.distributor.updates.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.updates.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.updates.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.updates.diverging_timestamp_updatesoperationNumber of updates that report they were performed against divergent version timestamps on different replicas
vds.distributor.updates.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.updates.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.updates.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.updates.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.updates.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.updates.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.updates.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.updates.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.updates.fast_path_restartsoperationNumber of safe path (write repair) updates that were restarted as fast path updates because all replicas returned documents with the same timestamp in the initial read phase
vds.distributor.removelocations.okoperationThe number of successful removelocations operations performed
vds.distributor.removelocations.failures.totaloperationSum of all failures
vds.distributor.removelocations.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.removelocations.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.removelocations.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.removelocations.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.removelocations.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.removelocations.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.removelocations.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.removelocations.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.removelocations.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.removelocations.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.removelocations.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.removelocations.latencymillisecondThe average latency of removelocations operations
vds.distributor.gets.latencymillisecondThe average latency of gets operations
vds.distributor.gets.okoperationThe number of successful gets operations performed
vds.distributor.gets.failures.totaloperationSum of all failures
vds.distributor.gets.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.gets.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.gets.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.gets.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.gets.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.gets.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.gets.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.gets.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.gets.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.gets.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.gets.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.visitor.latencymillisecondThe average latency of visitor operations
vds.distributor.visitor.okoperationThe number of successful visitor operations performed
vds.distributor.visitor.failures.totaloperationSum of all failures
vds.distributor.visitor.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.visitor.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.visitor.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.visitor.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.visitor.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.visitor.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.visitor.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.visitor.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.visitor.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.visitor.bytes_per_visitoroperationThe number of bytes visited on content nodes as part of a single client visitor command
vds.distributor.visitor.docs_per_visitoroperationThe number of documents visited on content nodes as part of a single client visitor command
vds.distributor.visitor.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.visitor.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.docsstoreddocumentNumber of documents stored in all buckets controlled by this distributor
vds.distributor.bytesstoredbyteNumber of bytes stored in all buckets controlled by this distributor
metricmanager.periodichooklatencymillisecondTime in ms used to update a single periodic hook
metricmanager.resetlatencymillisecondTime in ms used to reset all metrics.
metricmanager.sleeptimemillisecondTime in ms worker thread is sleeping
metricmanager.snapshothooklatencymillisecondTime in ms used to update a single snapshot hook
metricmanager.snapshotlatencymillisecondTime in ms used to take a snapshot
vds.distributor.activate_cluster_state_processing_timemillisecondElapsed time where the distributor thread is blocked on merging pending bucket info into its bucket database upon activating a cluster state
vds.distributor.bucket_db.memory_usage.allocated_bytesbyteThe number of allocated bytes
vds.distributor.bucket_db.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes)
vds.distributor.bucket_db.memory_usage.onhold_bytesbyteThe number of bytes on hold
vds.distributor.bucket_db.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes)
vds.distributor.getbucketlists.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.getbucketlists.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.getbucketlists.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.getbucketlists.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.getbucketlists.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.getbucketlists.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.getbucketlists.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.getbucketlists.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.getbucketlists.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.getbucketlists.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.getbucketlists.failures.totaloperationTotal number of failures
vds.distributor.getbucketlists.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.getbucketlists.latencymillisecondThe average latency of getbucketlists operations
vds.distributor.getbucketlists.okoperationThe number of successful getbucketlists operations performed
vds.distributor.recoverymodeschedulingtimemillisecondTime spent scheduling operations in recovery mode after receiving new cluster state
vds.distributor.set_cluster_state_processing_timemillisecondElapsed time where the distributor thread is blocked on processing its bucket database upon receiving a new cluster state
vds.distributor.state_transition_timemillisecondTime it takes to complete a cluster state transition. If a state transition is preempted before completing, its elapsed time is counted as part of the total time spent for the final, completed state transition
vds.distributor.stats.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.stats.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.stats.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.stats.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.stats.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.stats.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.stats.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.stats.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.stats.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.stats.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.stats.failures.totaloperationThe total number of failures
vds.distributor.stats.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.stats.latencymillisecondThe average latency of stats operations
vds.distributor.stats.okoperationThe number of successful stats operations performed
vds.distributor.update_gets.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.update_gets.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.update_gets.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.update_gets.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.update_gets.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.update_gets.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.update_gets.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.update_gets.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.update_gets.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.update_gets.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.update_gets.failures.totaloperationThe total number of failures
vds.distributor.update_gets.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.update_gets.latencymillisecondThe average latency of update_gets operations
vds.distributor.update_gets.okoperationThe number of successful update_gets operations performed
vds.distributor.update_metadata_gets.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.update_metadata_gets.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.update_metadata_gets.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.update_metadata_gets.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.update_metadata_gets.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.update_metadata_gets.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.update_metadata_gets.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.update_metadata_gets.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.update_metadata_gets.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.update_metadata_gets.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.update_metadata_gets.failures.totaloperationThe total number of failures
vds.distributor.update_metadata_gets.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.update_metadata_gets.latencymillisecondThe average latency of update_metadata_gets operations
vds.distributor.update_metadata_gets.okoperationThe number of successful update_metadata_gets operations performed
vds.distributor.update_puts.failures.busyoperationThe number of messages from storage that failed because the storage node was busy
vds.distributor.update_puts.failures.concurrent_mutationsoperationThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.update_puts.failures.inconsistent_bucketoperationThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.update_puts.failures.notconnectedoperationThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.update_puts.failures.notfoundoperationThe number of operations that failed because the document did not exist
vds.distributor.update_puts.failures.notreadyoperationThe number of operations discarded because distributor was not ready
vds.distributor.update_puts.failures.safe_time_not_reachedoperationThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.update_puts.failures.storagefailureoperationThe number of operations that failed in storage
vds.distributor.update_puts.failures.test_and_set_failedoperationThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.update_puts.failures.timeoutoperationThe number of operations that failed because the operation timed out towards storage
vds.distributor.update_puts.failures.totaloperationThe total number of put failures
vds.distributor.update_puts.failures.wrongdistributoroperationThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.update_puts.latencymillisecondThe average latency of update_puts operations
vds.distributor.update_puts.okoperationThe number of successful update_puts operations performed
vds.distributor.mutating_op_memory_usagebyteEstimated amount of memory used by active mutating operations across all distributor stripes, in bytes
vds.idealstate.nodes_per_mergenodeThe number of nodes involved in a single merge operation.
vds.idealstate.set_bucket_state.blockedoperationThe number of operations blocked by blocking operation starter
vds.idealstate.set_bucket_state.done_failedoperationThe number of operations that failed
vds.idealstate.set_bucket_state.done_okoperationThe number of operations successfully performed
vds.idealstate.set_bucket_state.pendingoperationThe number of operations pending
vds.idealstate.set_bucket_state.throttledoperationThe number of operations throttled by throttling operation starter
vds.bouncer.clock_skew_abortsoperationNumber of client operations that were aborted due to clock skew between sender and receiver exceeding acceptable range
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/logd.mdx b/mintlify-docs/en/reference/operations/metrics/logd.mdx index 0d44881d57..aeb682d05f 100644 --- a/mintlify-docs/en/reference/operations/metrics/logd.mdx +++ b/mintlify-docs/en/reference/operations/metrics/logd.mdx @@ -3,6 +3,19 @@ title: "Logd Metrics" sidebarTitle: "Logd metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| logd.processed.lines | item | Number of log lines processed | \ No newline at end of file + + + + + + + + + + + + + + + +
NameUnitDescription
logd.processed.linesitemNumber of log lines processed
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/metric-units.mdx b/mintlify-docs/en/reference/operations/metrics/metric-units.mdx index 44d87ff7c9..7ecc103aa2 100644 --- a/mintlify-docs/en/reference/operations/metrics/metric-units.mdx +++ b/mintlify-docs/en/reference/operations/metrics/metric-units.mdx @@ -3,55 +3,213 @@ title: "Metric Units Reference" sidebarTitle: "Metric units" --- -| Unit | Description | -| --- | --- | -| binary | Zero or one. Zero typically indicate "false" while one indicate "true" | -| bucket | A chunk of documents managed by a distributor service | -| buffer | A buffer | -| byte | A collection of 8 bits | -| byte/second | A unit of storage capable of holding 8 bits | -| class | A instance of a Java class | -| connection | A link used for communication between a client and a server | -| context switch | A context switch | -| deployment | A deployment on hosted Vespa | -| distance | A number describing the distance of two tensors | -| document | Vespa document, a collection of fields defined in a schema file | -| documentid | A unique document identifier | -| dollar | US dollar | -| dollar/hour | Total current cost of the cluster in $/hr | -| failure | Failures, typically for requests, operations or nodes | -| file | Data file stored on the disk on a node | -| fraction | A value in the range \[0..1\]. Higher values can occur for some metrics, but would indicate the value is outside the allowed range. | -| ratio | A dimensionless ratio between two values. | -| generation | Typically, generation of configuration or application package | -| gigabyte | One billion bytes | -| graph node | A node in a graph | -| hit | Document that meets the filtering/restriction criteria specified by a given query | -| hit/query | Number of hits per query over a period of time | -| host | Bare metal computer that contain nodes | -| instance | Typically, tenant or application | -| item | Object or unit maintained in e.g. a queue | -| millisecond | Millisecond, 1/1000 of a second | -| nanosecond | Nanosecond, 1/1000.000.000 of a second | -| node | (Virtual) computer that is part of a Vespa cluster | -| packet | Collection of data transmitted over the network as a single unit | -| operation | A clearly defined task | -| operation/second | Number of operations per second | -| percentage | A number expressed as a fraction of 100, normally in the range \[0..100\]. | -| query | A request for matching, grouping and/or scoring documents stored in Vespa | -| query/second | Number of queries per second. | -| record | A collection of information, typically a set of key/value, e.g. stored in a transaction log | -| request | A request sent from a client to a server | -| response | A response from a server to a client, typically as a response to a request | -| restart | A service or node restarts | -| routing rotation | Routing rotation | -| score | Relevance score for a document | -| second | Time span of 1 second | -| seconds since epoch | Seconds since Unix Epoch | -| session | A set of operations taking place during one connection or as part of a higher level operation | -| task | Piece of work executed by a server, e.g. to perform back-ground data maintenance | -| tenant | Tenant that owns zero or more applications in a managed Vespa system | -| thread | Computer thread for executing e.g. tasks, operations or queries | -| vcpu | Virtual CPU | -| version | Software or config version | -| wakeup | Computer thread wake-ups for doing some work | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
UnitDescription
binaryZero or one. Zero typically indicate "false" while one indicate "true"
bucketA chunk of documents managed by a distributor service
bufferA buffer
byteA collection of 8 bits
byte/secondA unit of storage capable of holding 8 bits
classA instance of a Java class
connectionA link used for communication between a client and a server
context switchA context switch
deploymentA deployment on hosted Vespa
distanceA number describing the distance of two tensors
documentVespa document, a collection of fields defined in a schema file
documentidA unique document identifier
dollarUS dollar
dollar/hourTotal current cost of the cluster in $/hr
failureFailures, typically for requests, operations or nodes
fileData file stored on the disk on a node
fractionA value in the range [0..1]. Higher values can occur for some metrics, but would indicate the value is outside the allowed range.
ratioA dimensionless ratio between two values.
generationTypically, generation of configuration or application package
gigabyteOne billion bytes
graph nodeA node in a graph
hitDocument that meets the filtering/restriction criteria specified by a given query
hit/queryNumber of hits per query over a period of time
hostBare metal computer that contain nodes
instanceTypically, tenant or application
itemObject or unit maintained in e.g. a queue
millisecondMillisecond, 1/1000 of a second
nanosecondNanosecond, 1/1000.000.000 of a second
node(Virtual) computer that is part of a Vespa cluster
packetCollection of data transmitted over the network as a single unit
operationA clearly defined task
operation/secondNumber of operations per second
percentageA number expressed as a fraction of 100, normally in the range [0..100].
queryA request for matching, grouping and/or scoring documents stored in Vespa
query/secondNumber of queries per second.
recordA collection of information, typically a set of key/value, e.g. stored in a transaction log
requestA request sent from a client to a server
responseA response from a server to a client, typically as a response to a request
restartA service or node restarts
routing rotationRouting rotation
scoreRelevance score for a document
secondTime span of 1 second
seconds since epochSeconds since Unix Epoch
sessionA set of operations taking place during one connection or as part of a higher level operation
taskPiece of work executed by a server, e.g. to perform back-ground data maintenance
tenantTenant that owns zero or more applications in a managed Vespa system
threadComputer thread for executing e.g. tasks, operations or queries
vcpuVirtual CPU
versionSoftware or config version
wakeupComputer thread wake-ups for doing some work
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/metrics.mdx b/mintlify-docs/en/reference/operations/metrics/metrics.mdx index f8a3230d02..dd306d11a2 100644 --- a/mintlify-docs/en/reference/operations/metrics/metrics.mdx +++ b/mintlify-docs/en/reference/operations/metrics/metrics.mdx @@ -14,17 +14,52 @@ Metrics are collected over a time period so a metric reading must aggregate indi The following aggregators are available: -| Aggregator name (metric suffix) | Explanation | -| :--- | :--- | -| 95percentile | The 95 percentile of samples in the period | -| 99percentile | The 99 percentile of samples in the period | -| average | The average of samples in the period | -| count | The count of samples in the period | -| last | The last value sampled in the period | -| max | The max value sampled in the period | -| min | The min value sampled in the period | -| rate | The count of samples divided by the length of the period in seconds | -| sum | The sum of the sampled values in the period | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Aggregator name (metric suffix)Explanation
95percentileThe 95 percentile of samples in the period
99percentileThe 99 percentile of samples in the period
averageThe average of samples in the period
countThe count of samples in the period
lastThe last value sampled in the period
maxThe max value sampled in the period
minThe min value sampled in the period
rateThe count of samples divided by the length of the period in seconds
sumThe sum of the sampled values in the period
### Metric sets defined in Vespa diff --git a/mintlify-docs/en/reference/operations/metrics/nodeadmin.mdx b/mintlify-docs/en/reference/operations/metrics/nodeadmin.mdx index c1332f564a..54c09b786c 100644 --- a/mintlify-docs/en/reference/operations/metrics/nodeadmin.mdx +++ b/mintlify-docs/en/reference/operations/metrics/nodeadmin.mdx @@ -3,7 +3,24 @@ title: "NodeAdmin Metrics" sidebarTitle: "Node Admin metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| endpoint.certificate.expiry.seconds | second | Time until node endpoint certificate expires | -| node-certificate.expiry.seconds | second | Time until node certificate expires | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + +
NameUnitDescription
endpoint.certificate.expiry.secondssecondTime until node endpoint certificate expires
node-certificate.expiry.secondssecondTime until node certificate expires
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/searchnode.mdx b/mintlify-docs/en/reference/operations/metrics/searchnode.mdx index 8a1a98d66c..7eaab79a59 100644 --- a/mintlify-docs/en/reference/operations/metrics/searchnode.mdx +++ b/mintlify-docs/en/reference/operations/metrics/searchnode.mdx @@ -3,261 +3,1294 @@ title: "SearchNode Metrics" sidebarTitle: "Search node metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| content.proton.config.generation | version | The oldest config generation used by this search node | -| content.proton.documentdb.documents.total | document | The total number of documents in this documents db (ready + not-ready) | -| content.proton.documentdb.documents.ready | document | The number of ready documents in this document db | -| content.proton.documentdb.documents.active | document | The number of active / searchable documents in this document db | -| content.proton.documentdb.documents.removed | document | The number of removed documents in this document db | -| content.proton.documentdb.index.docs\_in\_memory | document | Number of documents in memory index | -| content.proton.documentdb.disk\_usage | byte | The total disk usage (in bytes) for this document db | -| content.proton.documentdb.memory\_usage.allocated\_bytes | byte | The number of allocated bytes | -| content.proton.documentdb.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.memory\_usage.onhold\_bytes | byte | The number of bytes on hold | -| content.proton.documentdb.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.heart\_beat\_age | second | How long ago (in seconds) heart beat maintenance job was run | -| content.proton.docsum.count | request | Docsum requests handled | -| content.proton.docsum.docs | document | Total docsums returned | -| content.proton.docsum.latency | millisecond | Docsum request latency | -| content.proton.search\_protocol.query.latency | second | Query request latency (seconds) | -| content.proton.search\_protocol.query.request\_size | byte | Query request size (network bytes) | -| content.proton.search\_protocol.query.reply\_size | byte | Query reply size (network bytes) | -| content.proton.search\_protocol.docsum.latency | second | Docsum request latency (seconds) | -| content.proton.search\_protocol.docsum.request\_size | byte | Docsum request size (network bytes) | -| content.proton.search\_protocol.docsum.reply\_size | byte | Docsum reply size (network bytes) | -| content.proton.search\_protocol.docsum.requested\_documents | document | Total requested document summaries | -| content.proton.executor.proton.queuesize | task | Size of executor proton task queue | -| content.proton.executor.proton.accepted | task | Number of executor proton accepted tasks | -| content.proton.executor.proton.wakeups | wakeup | Number of times an executor proton worker thread has been woken up | -| content.proton.executor.proton.utilization | fraction | Ratio of time the executor proton worker threads has been active | -| content.proton.executor.proton.rejected | task | Number of rejected tasks | -| content.proton.executor.flush.queuesize | task | Size of executor flush task queue | -| content.proton.executor.flush.accepted | task | Number of accepted executor flush tasks | -| content.proton.executor.flush.wakeups | wakeup | Number of times an executor flush worker thread has been woken up | -| content.proton.executor.flush.utilization | fraction | Ratio of time the executor flush worker threads has been active | -| content.proton.executor.flush.rejected | task | Number of rejected tasks | -| content.proton.executor.match.queuesize | task | Size of executor match task queue | -| content.proton.executor.match.accepted | task | Number of accepted executor match tasks | -| content.proton.executor.match.wakeups | wakeup | Number of times an executor match worker thread has been woken up | -| content.proton.executor.match.utilization | fraction | Ratio of time the executor match worker threads has been active | -| content.proton.executor.match.rejected | task | Number of rejected tasks | -| content.proton.executor.docsum.queuesize | task | Size of executor docsum task queue | -| content.proton.executor.docsum.accepted | task | Number of executor accepted docsum tasks | -| content.proton.executor.docsum.wakeups | wakeup | Number of times an executor docsum worker thread has been woken up | -| content.proton.executor.docsum.utilization | fraction | Ratio of time the executor docsum worker threads has been active | -| content.proton.executor.docsum.rejected | task | Number of rejected tasks | -| content.proton.executor.shared.queuesize | task | Size of executor shared task queue | -| content.proton.executor.shared.accepted | task | Number of executor shared accepted tasks | -| content.proton.executor.shared.wakeups | wakeup | Number of times an executor shared worker thread has been woken up | -| content.proton.executor.shared.utilization | fraction | Ratio of time the executor shared worker threads has been active | -| content.proton.executor.shared.rejected | task | Number of rejected tasks | -| content.proton.executor.warmup.queuesize | task | Size of executor warmup task queue | -| content.proton.executor.warmup.accepted | task | Number of accepted executor warmup tasks | -| content.proton.executor.warmup.wakeups | wakeup | Number of times a warmup executor worker thread has been woken up | -| content.proton.executor.warmup.utilization | fraction | Ratio of time the executor warmup worker threads has been active | -| content.proton.executor.warmup.rejected | task | Number of rejected tasks | -| content.proton.executor.field\_writer.queuesize | task | Size of executor field writer task queue | -| content.proton.executor.field\_writer.accepted | task | Number of accepted executor field writer tasks | -| content.proton.executor.field\_writer.wakeups | wakeup | Number of times an executor field writer worker thread has been woken up | -| content.proton.executor.field\_writer.utilization | fraction | Ratio of time the executor fieldwriter worker threads has been active | -| content.proton.executor.field\_writer.saturation | fraction | Ratio indicating the max saturation of underlying worker threads. A higher saturation than utilization indicates a bottleneck in one of the worker threads. | -| content.proton.executor.field\_writer.rejected | task | Number of rejected tasks | -| content.proton.documentdb.job.total | fraction | The job load average total of all job metrics | -| content.proton.documentdb.job.attribute\_flush | fraction | Flushing of attribute vector(s) to disk | -| content.proton.documentdb.job.memory\_index\_flush | fraction | Flushing of memory index to disk | -| content.proton.documentdb.job.disk\_index\_fusion | fraction | Fusion of disk indexes | -| content.proton.documentdb.job.document\_store\_flush | fraction | Flushing of document store to disk | -| content.proton.documentdb.job.document\_store\_compact | fraction | Compaction of document store on disk | -| content.proton.documentdb.job.bucket\_move | fraction | Moving of buckets between 'ready' and 'notready' sub databases | -| content.proton.documentdb.job.lid\_space\_compact | fraction | Compaction of lid space in document meta store and attribute vectors | -| content.proton.documentdb.job.removed\_documents\_prune | fraction | Pruning of removed documents in 'removed' sub database | -| content.proton.documentdb.threading\_service.master.queuesize | task | Size of threading service master task queue | -| content.proton.documentdb.threading\_service.master.accepted | task | Number of accepted threading service master tasks | -| content.proton.documentdb.threading\_service.master.wakeups | wakeup | Number of times a threading service master worker thread has been woken up | -| content.proton.documentdb.threading\_service.master.utilization | fraction | Ratio of time the threading service master worker threads has been active | -| content.proton.documentdb.threading\_service.master.rejected | task | Number of rejected tasks | -| content.proton.documentdb.threading\_service.index.queuesize | task | Size of threading service index task queue | -| content.proton.documentdb.threading\_service.index.accepted | task | Number of accepted threading service index tasks | -| content.proton.documentdb.threading\_service.index.wakeups | wakeup | Number of times a threading service index worker thread has been woken up | -| content.proton.documentdb.threading\_service.index.utilization | fraction | Ratio of time the threading service index worker threads has been active | -| content.proton.documentdb.threading\_service.index.rejected | task | Number of rejected tasks | -| content.proton.documentdb.threading\_service.summary.queuesize | task | Size of threading service summary task queue | -| content.proton.documentdb.threading\_service.summary.accepted | task | Number of accepted threading service summary tasks | -| content.proton.documentdb.threading\_service.summary.wakeups | wakeup | Number of times a threading service summary worker thread has been woken up | -| content.proton.documentdb.threading\_service.summary.utilization | fraction | Ratio of time the threading service summary worker threads has been active | -| content.proton.documentdb.threading\_service.summary.rejected | task | Number of rejected tasks | -| content.proton.documentdb.threading\_service.attribute\_field\_writer.accepted | task | Number of accepted tasks | -| content.proton.documentdb.threading\_service.attribute\_field\_writer.queuesize | task | Size of task queue | -| content.proton.documentdb.threading\_service.attribute\_field\_writer.rejected | task | Number of rejected tasks | -| content.proton.documentdb.threading\_service.attribute\_field\_writer.utilization | fraction | Ratio of time the worker threads has been active | -| content.proton.documentdb.threading\_service.attribute\_field\_writer.wakeups | wakeup | Number of times a worker thread has been woken up | -| content.proton.documentdb.threading\_service.index\_field\_inverter.accepted | task | Number of accepted tasks | -| content.proton.documentdb.threading\_service.index\_field\_inverter.queuesize | task | Size of task queue | -| content.proton.documentdb.threading\_service.index\_field\_inverter.rejected | task | Number of rejected tasks | -| content.proton.documentdb.threading\_service.index\_field\_inverter.utilization | fraction | Ratio of time the worker threads has been active | -| content.proton.documentdb.threading\_service.index\_field\_inverter.wakeups | wakeup | Number of times a worker thread has been woken up | -| content.proton.documentdb.threading\_service.index\_field\_writer.accepted | task | Number of accepted tasks | -| content.proton.documentdb.threading\_service.index\_field\_writer.queuesize | task | Size of task queue | -| content.proton.documentdb.threading\_service.index\_field\_writer.rejected | task | Number of rejected tasks | -| content.proton.documentdb.threading\_service.index\_field\_writer.utilization | fraction | Ratio of time the worker threads has been active | -| content.proton.documentdb.threading\_service.index\_field\_writer.wakeups | wakeup | Number of times a worker thread has been woken up | -| content.proton.documentdb.ready.lid\_space.lid\_bloat\_factor | fraction | The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid\_limit - used\_lids) / lid\_limit) | -| content.proton.documentdb.ready.lid\_space.lid\_fragmentation\_factor | fraction | The fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest\_used\_lid - used\_lids) / highest\_used\_lid) | -| content.proton.documentdb.ready.lid\_space.lid\_limit | documentid | The size of the allocated lid space | -| content.proton.documentdb.ready.lid\_space.highest\_used\_lid | documentid | The highest used lid | -| content.proton.documentdb.ready.lid\_space.used\_lids | documentid | The number of lids used | -| content.proton.documentdb.ready.lid\_space.lowest\_free\_lid | documentid | The lowest free local document id | -| content.proton.documentdb.notready.lid\_space.lid\_bloat\_factor | fraction | The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid\_limit - used\_lids) / lid\_limit) | -| content.proton.documentdb.notready.lid\_space.lid\_fragmentation\_factor | fraction | The fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest\_used\_lid - used\_lids) / highest\_used\_lid) | -| content.proton.documentdb.notready.lid\_space.lid\_limit | documentid | The size of the allocated lid space | -| content.proton.documentdb.notready.lid\_space.highest\_used\_lid | documentid | The highest used lid | -| content.proton.documentdb.notready.lid\_space.used\_lids | documentid | The number of lids used | -| content.proton.documentdb.notready.lid\_space.lowest\_free\_lid | documentid | The lowest free local document id | -| content.proton.documentdb.removed.lid\_space.lid\_bloat\_factor | fraction | The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid\_limit - used\_lids) / lid\_limit) | -| content.proton.documentdb.removed.lid\_space.lid\_fragmentation\_factor | fraction | The fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest\_used\_lid - used\_lids) / highest\_used\_lid) | -| content.proton.documentdb.removed.lid\_space.lid\_limit | documentid | The size of the allocated lid space | -| content.proton.documentdb.removed.lid\_space.highest\_used\_lid | documentid | The highest used lid | -| content.proton.documentdb.removed.lid\_space.used\_lids | documentid | The number of lids used | -| content.proton.documentdb.removed.lid\_space.lowest\_free\_lid | documentid | The lowest free local document id | -| content.proton.documentdb.bucket\_move.buckets\_pending | bucket | The number of buckets left to move | -| content.proton.resource\_usage.disk | fraction | The relative amount of disk used by this content node (transient usage not included, value in the range \[0, 1\]). Same value as reported to the cluster controller | -| content.proton.resource\_usage.disk\_usage.total | fraction | The total relative amount of disk used by this content node (value in the range \[0, 1\]) | -| content.proton.resource\_usage.disk\_usage.total\_utilization | fraction | The relative amount of disk used compared to the content node disk resource limit | -| content.proton.resource\_usage.disk\_usage.transient | fraction | The relative amount of transient disk used by this content node (value in the range \[0, 1\]) | -| content.proton.resource\_usage.disk\_usage.reserved | fraction | The relative amount of reserved disk space for this content node (value in the range \[0, 1\]) | -| content.proton.resource\_usage.disk\_usage.used\_and\_reserved | fraction | The relative amount of disk used and reserved disk space by this content node (transient usage not included, value in the range \[0, 1\]) | -| content.proton.resource\_usage.memory | fraction | The relative amount of memory used by this content node (transient usage not included, value in the range \[0, 1\]). Same value as reported to the cluster controller | -| content.proton.resource\_usage.memory\_usage.total | fraction | The total relative amount of memory used by this content node (value in the range \[0, 1\]) | -| content.proton.resource\_usage.memory\_usage.total\_utilization | fraction | The relative amount of memory used compared to the content node memory resource limit | -| content.proton.resource\_usage.memory\_usage.transient | fraction | The relative amount of transient memory used by this content node (value in the range \[0, 1\]) | -| content.proton.resource\_usage.memory\_mappings | file | The number of memory mapped files | -| content.proton.resource\_usage.open\_file\_descriptors | file | The number of open files | -| content.proton.resource\_usage.feeding\_blocked | binary | Whether feeding is blocked due to resource limits being reached (value is either 0 or 1) | -| content.proton.resource\_usage.malloc\_arena | byte | Size of malloc arena | -| content.proton.documentdb.attribute.resource\_usage.address\_space | fraction | The max relative address space used among components in all attribute vectors in this document db (value in the range \[0, 1\]) | -| content.proton.documentdb.attribute.resource\_usage.feeding\_blocked | binary | Whether feeding is blocked due to attribute resource limits being reached (value is either 0 or 1) | -| content.proton.documentdb.attribute.memory\_usage.allocated\_bytes | byte | The number of allocated bytes | -| content.proton.documentdb.attribute.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.attribute.memory\_usage.onhold\_bytes | byte | The number of bytes on hold | -| content.proton.documentdb.attribute.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.resource\_usage.cpu\_util.setup | fraction | cpu used by system init and (re-)configuration | -| content.proton.resource\_usage.cpu\_util.read | fraction | cpu used by reading data from the system | -| content.proton.resource\_usage.cpu\_util.write | fraction | cpu used by writing data to the system | -| content.proton.resource\_usage.cpu\_util.compact | fraction | cpu used by internal data re-structuring | -| content.proton.resource\_usage.cpu\_util.other | fraction | cpu used by work not classified as a specific category | -| content.proton.transactionlog.entries | record | The current number of entries in the transaction log | -| content.proton.transactionlog.disk\_usage | byte | The disk usage (in bytes) of the transaction log | -| content.proton.transactionlog.replay\_time | second | The replay time (in seconds) of the transaction log during start-up | -| content.proton.documentdb.ready.document\_store.disk\_usage | byte | Disk space usage in bytes | -| content.proton.documentdb.ready.document\_store.disk\_bloat | byte | Disk space bloat in bytes | -| content.proton.documentdb.ready.document\_store.max\_bucket\_spread | fraction | Max bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file) | -| content.proton.documentdb.ready.document\_store.memory\_usage.allocated\_bytes | byte | The number of allocated bytes | -| content.proton.documentdb.ready.document\_store.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.ready.document\_store.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.ready.document\_store.memory\_usage.onhold\_bytes | byte | The number of bytes on hold | -| content.proton.documentdb.notready.document\_store.disk\_usage | byte | Disk space usage in bytes | -| content.proton.documentdb.notready.document\_store.disk\_bloat | byte | Disk space bloat in bytes | -| content.proton.documentdb.notready.document\_store.max\_bucket\_spread | fraction | Max bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file) | -| content.proton.documentdb.notready.document\_store.memory\_usage.allocated\_bytes | byte | The number of allocated bytes | -| content.proton.documentdb.notready.document\_store.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.notready.document\_store.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.notready.document\_store.memory\_usage.onhold\_bytes | byte | The number of bytes on hold | -| content.proton.documentdb.removed.document\_store.disk\_usage | byte | Disk space usage in bytes | -| content.proton.documentdb.removed.document\_store.disk\_bloat | byte | Disk space bloat in bytes | -| content.proton.documentdb.removed.document\_store.max\_bucket\_spread | fraction | Max bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file) | -| content.proton.documentdb.removed.document\_store.memory\_usage.allocated\_bytes | byte | The number of allocated bytes | -| content.proton.documentdb.removed.document\_store.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.removed.document\_store.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.removed.document\_store.memory\_usage.onhold\_bytes | byte | The number of bytes on hold | -| content.proton.documentdb.ready.document\_store.cache.elements | item | Number of elements in the cache | -| content.proton.documentdb.ready.document\_store.cache.memory\_usage | byte | Memory usage of the cache (in bytes) | -| content.proton.documentdb.ready.document\_store.cache.hit\_rate | fraction | Rate of hits in the cache compared to number of lookups | -| content.proton.documentdb.ready.document\_store.cache.lookups | operation | Number of lookups in the cache (hits + misses) | -| content.proton.documentdb.ready.document\_store.cache.invalidations | operation | Number of invalidations (erased elements) in the cache. | -| content.proton.documentdb.notready.document\_store.cache.elements | item | Number of elements in the cache | -| content.proton.documentdb.notready.document\_store.cache.memory\_usage | byte | Memory usage of the cache (in bytes) | -| content.proton.documentdb.notready.document\_store.cache.hit\_rate | fraction | Rate of hits in the cache compared to number of lookups | -| content.proton.documentdb.notready.document\_store.cache.lookups | operation | Number of lookups in the cache (hits + misses) | -| content.proton.documentdb.notready.document\_store.cache.invalidations | operation | Number of invalidations (erased elements) in the cache. | -| content.proton.documentdb.removed.document\_store.cache.elements | item | Number of elements in the cache | -| content.proton.documentdb.removed.document\_store.cache.hit\_rate | fraction | Rate of hits in the cache compared to number of lookups | -| content.proton.documentdb.removed.document\_store.cache.invalidations | item | Number of invalidations (erased elements) in the cache. | -| content.proton.documentdb.removed.document\_store.cache.lookups | operation | Number of lookups in the cache (hits + misses) | -| content.proton.documentdb.removed.document\_store.cache.memory\_usage | byte | Memory usage of the cache (in bytes) | -| content.proton.documentdb.ready.attribute.memory\_usage.allocated\_bytes | byte | The number of allocated bytes | -| content.proton.documentdb.ready.attribute.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.ready.attribute.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.ready.attribute.memory\_usage.onhold\_bytes | byte | The number of bytes on hold | -| content.proton.documentdb.ready.attribute.disk\_usage | byte | Disk space usage (in bytes) of the flushed snapshot of this attribute for this document type | -| content.proton.documentdb.notready.attribute.memory\_usage.allocated\_bytes | byte | The number of allocated bytes | -| content.proton.documentdb.notready.attribute.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.notready.attribute.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.notready.attribute.memory\_usage.onhold\_bytes | byte | The number of bytes on hold | -| content.proton.index.cache.postinglist.elements | item | Number of elements in the cache. Contains disk index posting list files across all document types | -| content.proton.index.cache.postinglist.memory\_usage | byte | Memory usage of the cache (in bytes). Contains disk index posting list files across all document types | -| content.proton.index.cache.postinglist.hit\_rate | fraction | Rate of hits in the cache compared to number of lookups. Contains disk index posting list files across all document types | -| content.proton.index.cache.postinglist.lookups | operation | Number of lookups in the cache (hits + misses). Contains disk index posting list files across all document types | -| content.proton.index.cache.postinglist.invalidations | operation | Number of invalidations (erased elements) in the cache. Contains disk index posting list files across all document types | -| content.proton.index.cache.bitvector.elements | item | Number of elements in the cache. Contains disk index bitvector files across all document types | -| content.proton.index.cache.bitvector.memory\_usage | byte | Memory usage of the cache (in bytes). Contains disk index bitvector files across all document types | -| content.proton.index.cache.bitvector.hit\_rate | fraction | Rate of hits in the cache compared to number of lookups. Contains disk index bitvector files across all document types | -| content.proton.index.cache.bitvector.lookups | operation | Number of lookups in the cache (hits + misses). Contains disk index bitvector files across all document types | -| content.proton.index.cache.bitvector.invalidations | operation | Number of invalidations (erased elements) in the cache. Contains disk index bitvector files across all document types | -| content.proton.documentdb.index.memory\_usage.allocated\_bytes | byte | The number of allocated bytes for the memory index for this document type | -| content.proton.documentdb.index.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) for the memory index for this document type | -| content.proton.documentdb.index.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) for the memory index for this document type | -| content.proton.documentdb.index.memory\_usage.onhold\_bytes | byte | The number of bytes on hold for the memory index for this document type | -| content.proton.documentdb.index.disk\_usage | byte | Disk space usage (in bytes) of all disk indexes for this document type | -| content.proton.documentdb.index.indexes | item | Number of disk or memory indexes | -| content.proton.documentdb.index.io.search.read\_bytes | byte | Bytes read from disk index posting list and bitvector files as part of search for this document type | -| content.proton.documentdb.index.io.search.cached\_read\_bytes | byte | Bytes read from cached disk index posting list and bitvector files as part of search for this document type | -| content.proton.documentdb.ready.index.memory\_usage.allocated\_bytes | byte | The number of allocated bytes for this index field in the memory index for this document type | -| content.proton.documentdb.ready.index.disk\_usage | byte | Disk space usage (in bytes) of this index field in all disk indexes for this document type | -| content.proton.documentdb.matching.queries | query | Number of queries executed | -| content.proton.documentdb.matching.soft\_doomed\_queries | query | Number of queries hitting the soft timeout | -| content.proton.documentdb.matching.query\_latency | second | Total average latency (sec) when matching and ranking a query | -| content.proton.documentdb.matching.query\_setup\_time | second | Average time (sec) spent setting up and tearing down queries | -| content.proton.documentdb.matching.docs\_matched | document | Number of documents matched | -| content.proton.documentdb.matching.docs\_ranked | document | Number of documents ranked (first phase) | -| content.proton.documentdb.matching.docs\_reranked | document | Number of documents re-ranked (second phase) | -| content.proton.documentdb.matching.exact\_nns\_distances\_computed | distance | Number of distances computed in exact nearest-neighbor search | -| content.proton.documentdb.matching.approximate\_nns\_distances\_computed | distance | Number of distances computed in approximate nearest-neighbor search | -| content.proton.documentdb.matching.approximate\_nns\_nodes\_visited | graph\_node | Number of nodes visited in approximate nearest-neighbor search | -| content.proton.documentdb.matching.rank\_profile.queries | query | Number of queries executed | -| content.proton.documentdb.matching.rank\_profile.soft\_doomed\_queries | query | Number of queries hitting the soft timeout | -| content.proton.documentdb.matching.rank\_profile.soft\_doom\_factor | fraction | Factor used to compute soft-timeout | -| content.proton.documentdb.matching.rank\_profile.query\_latency | second | Total average latency (sec) when matching and ranking a query | -| content.proton.documentdb.matching.rank\_profile.query\_setup\_time | second | Average time (sec) spent setting up and tearing down queries | -| content.proton.documentdb.matching.rank\_profile.grouping\_time | second | Average time (sec) spent on grouping | -| content.proton.documentdb.matching.rank\_profile.rerank\_time | second | Average time (sec) spent on 2nd phase ranking | -| content.proton.documentdb.matching.rank\_profile.docs\_matched | document | Number of documents matched | -| content.proton.documentdb.matching.rank\_profile.docs\_ranked | document | Number of documents ranked (first phase) | -| content.proton.documentdb.matching.rank\_profile.docs\_reranked | document | Number of documents re-ranked (second phase) | -| content.proton.documentdb.matching.rank\_profile.exact\_nns\_distances\_computed | distance | Number of distances computed in exact nearest-neighbor search | -| content.proton.documentdb.matching.rank\_profile.approximate\_nns\_distances\_computed | distance | Number of distances computed in approximate nearest-neighbor search | -| content.proton.documentdb.matching.rank\_profile.approximate\_nns\_nodes\_visited | graph\_node | Number of nodes visited in approximate nearest-neighbor search | -| content.proton.documentdb.matching.rank\_profile.limited\_queries | query | Number of queries limited in match phase | -| content.proton.documentdb.matching.rank\_profile.docid\_partition.active\_time | second | Time (sec) spent doing actual work | -| content.proton.documentdb.matching.rank\_profile.docid\_partition.docs\_matched | document | Number of documents matched | -| content.proton.documentdb.matching.rank\_profile.docid\_partition.docs\_ranked | document | Number of documents ranked (first phase) | -| content.proton.documentdb.matching.rank\_profile.docid\_partition.docs\_reranked | document | Number of documents re-ranked (second phase) | -| content.proton.documentdb.matching.rank\_profile.docid\_partition.wait\_time | second | Time (sec) spent waiting for other external threads and resources | -| content.proton.documentdb.matching.rank\_profile.match\_time | second | Average time (sec) for matching a query (1st phase) | -| content.proton.documentdb.feeding.commit.operations | operation | Number of operations included in a commit | -| content.proton.documentdb.feeding.commit.latency | second | Latency for commit in seconds | -| content.proton.session\_cache.grouping.num\_cached | session | Number of currently cached sessions | -| content.proton.session\_cache.grouping.num\_dropped | session | Number of dropped cached sessions | -| content.proton.session\_cache.grouping.num\_insert | session | Number of inserted sessions | -| content.proton.session\_cache.grouping.num\_pick | session | Number if picked sessions | -| content.proton.session\_cache.grouping.num\_timedout | session | Number of timed out sessions | -| content.proton.session\_cache.search.num\_cached | session | Number of currently cached sessions | -| content.proton.session\_cache.search.num\_dropped | session | Number of dropped cached sessions | -| content.proton.session\_cache.search.num\_insert | session | Number of inserted sessions | -| content.proton.session\_cache.search.num\_pick | session | Number if picked sessions | -| content.proton.session\_cache.search.num\_timedout | session | Number of timed out sessions | -| metricmanager.periodichooklatency | millisecond | Time in ms used to update a single periodic hook | -| metricmanager.resetlatency | millisecond | Time in ms used to reset all metrics. | -| metricmanager.sleeptime | millisecond | Time in ms worker thread is sleeping | -| metricmanager.snapshothooklatency | millisecond | Time in ms used to update a single snapshot hook | -| metricmanager.snapshotlatency | millisecond | Time in ms used to take a snapshot | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitDescription
content.proton.config.generationversionThe oldest config generation used by this search node
content.proton.documentdb.documents.totaldocumentThe total number of documents in this documents db (ready + not-ready)
content.proton.documentdb.documents.readydocumentThe number of ready documents in this document db
content.proton.documentdb.documents.activedocumentThe number of active / searchable documents in this document db
content.proton.documentdb.documents.removeddocumentThe number of removed documents in this document db
content.proton.documentdb.index.docs_in_memorydocumentNumber of documents in memory index
content.proton.documentdb.disk_usagebyteThe total disk usage (in bytes) for this document db
content.proton.documentdb.memory_usage.allocated_bytesbyteThe number of allocated bytes
content.proton.documentdb.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.memory_usage.onhold_bytesbyteThe number of bytes on hold
content.proton.documentdb.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.heart_beat_agesecondHow long ago (in seconds) heart beat maintenance job was run
content.proton.docsum.countrequestDocsum requests handled
content.proton.docsum.docsdocumentTotal docsums returned
content.proton.docsum.latencymillisecondDocsum request latency
content.proton.search_protocol.query.latencysecondQuery request latency (seconds)
content.proton.search_protocol.query.request_sizebyteQuery request size (network bytes)
content.proton.search_protocol.query.reply_sizebyteQuery reply size (network bytes)
content.proton.search_protocol.docsum.latencysecondDocsum request latency (seconds)
content.proton.search_protocol.docsum.request_sizebyteDocsum request size (network bytes)
content.proton.search_protocol.docsum.reply_sizebyteDocsum reply size (network bytes)
content.proton.search_protocol.docsum.requested_documentsdocumentTotal requested document summaries
content.proton.executor.proton.queuesizetaskSize of executor proton task queue
content.proton.executor.proton.acceptedtaskNumber of executor proton accepted tasks
content.proton.executor.proton.wakeupswakeupNumber of times an executor proton worker thread has been woken up
content.proton.executor.proton.utilizationfractionRatio of time the executor proton worker threads has been active
content.proton.executor.proton.rejectedtaskNumber of rejected tasks
content.proton.executor.flush.queuesizetaskSize of executor flush task queue
content.proton.executor.flush.acceptedtaskNumber of accepted executor flush tasks
content.proton.executor.flush.wakeupswakeupNumber of times an executor flush worker thread has been woken up
content.proton.executor.flush.utilizationfractionRatio of time the executor flush worker threads has been active
content.proton.executor.flush.rejectedtaskNumber of rejected tasks
content.proton.executor.match.queuesizetaskSize of executor match task queue
content.proton.executor.match.acceptedtaskNumber of accepted executor match tasks
content.proton.executor.match.wakeupswakeupNumber of times an executor match worker thread has been woken up
content.proton.executor.match.utilizationfractionRatio of time the executor match worker threads has been active
content.proton.executor.match.rejectedtaskNumber of rejected tasks
content.proton.executor.docsum.queuesizetaskSize of executor docsum task queue
content.proton.executor.docsum.acceptedtaskNumber of executor accepted docsum tasks
content.proton.executor.docsum.wakeupswakeupNumber of times an executor docsum worker thread has been woken up
content.proton.executor.docsum.utilizationfractionRatio of time the executor docsum worker threads has been active
content.proton.executor.docsum.rejectedtaskNumber of rejected tasks
content.proton.executor.shared.queuesizetaskSize of executor shared task queue
content.proton.executor.shared.acceptedtaskNumber of executor shared accepted tasks
content.proton.executor.shared.wakeupswakeupNumber of times an executor shared worker thread has been woken up
content.proton.executor.shared.utilizationfractionRatio of time the executor shared worker threads has been active
content.proton.executor.shared.rejectedtaskNumber of rejected tasks
content.proton.executor.warmup.queuesizetaskSize of executor warmup task queue
content.proton.executor.warmup.acceptedtaskNumber of accepted executor warmup tasks
content.proton.executor.warmup.wakeupswakeupNumber of times a warmup executor worker thread has been woken up
content.proton.executor.warmup.utilizationfractionRatio of time the executor warmup worker threads has been active
content.proton.executor.warmup.rejectedtaskNumber of rejected tasks
content.proton.executor.field_writer.queuesizetaskSize of executor field writer task queue
content.proton.executor.field_writer.acceptedtaskNumber of accepted executor field writer tasks
content.proton.executor.field_writer.wakeupswakeupNumber of times an executor field writer worker thread has been woken up
content.proton.executor.field_writer.utilizationfractionRatio of time the executor fieldwriter worker threads has been active
content.proton.executor.field_writer.saturationfractionRatio indicating the max saturation of underlying worker threads. A higher saturation than utilization indicates a bottleneck in one of the worker threads.
content.proton.executor.field_writer.rejectedtaskNumber of rejected tasks
content.proton.documentdb.job.totalfractionThe job load average total of all job metrics
content.proton.documentdb.job.attribute_flushfractionFlushing of attribute vector(s) to disk
content.proton.documentdb.job.memory_index_flushfractionFlushing of memory index to disk
content.proton.documentdb.job.disk_index_fusionfractionFusion of disk indexes
content.proton.documentdb.job.document_store_flushfractionFlushing of document store to disk
content.proton.documentdb.job.document_store_compactfractionCompaction of document store on disk
content.proton.documentdb.job.bucket_movefractionMoving of buckets between 'ready' and 'notready' sub databases
content.proton.documentdb.job.lid_space_compactfractionCompaction of lid space in document meta store and attribute vectors
content.proton.documentdb.job.removed_documents_prunefractionPruning of removed documents in 'removed' sub database
content.proton.documentdb.threading_service.master.queuesizetaskSize of threading service master task queue
content.proton.documentdb.threading_service.master.acceptedtaskNumber of accepted threading service master tasks
content.proton.documentdb.threading_service.master.wakeupswakeupNumber of times a threading service master worker thread has been woken up
content.proton.documentdb.threading_service.master.utilizationfractionRatio of time the threading service master worker threads has been active
content.proton.documentdb.threading_service.master.rejectedtaskNumber of rejected tasks
content.proton.documentdb.threading_service.index.queuesizetaskSize of threading service index task queue
content.proton.documentdb.threading_service.index.acceptedtaskNumber of accepted threading service index tasks
content.proton.documentdb.threading_service.index.wakeupswakeupNumber of times a threading service index worker thread has been woken up
content.proton.documentdb.threading_service.index.utilizationfractionRatio of time the threading service index worker threads has been active
content.proton.documentdb.threading_service.index.rejectedtaskNumber of rejected tasks
content.proton.documentdb.threading_service.summary.queuesizetaskSize of threading service summary task queue
content.proton.documentdb.threading_service.summary.acceptedtaskNumber of accepted threading service summary tasks
content.proton.documentdb.threading_service.summary.wakeupswakeupNumber of times a threading service summary worker thread has been woken up
content.proton.documentdb.threading_service.summary.utilizationfractionRatio of time the threading service summary worker threads has been active
content.proton.documentdb.threading_service.summary.rejectedtaskNumber of rejected tasks
content.proton.documentdb.threading_service.attribute_field_writer.acceptedtaskNumber of accepted tasks
content.proton.documentdb.threading_service.attribute_field_writer.queuesizetaskSize of task queue
content.proton.documentdb.threading_service.attribute_field_writer.rejectedtaskNumber of rejected tasks
content.proton.documentdb.threading_service.attribute_field_writer.utilizationfractionRatio of time the worker threads has been active
content.proton.documentdb.threading_service.attribute_field_writer.wakeupswakeupNumber of times a worker thread has been woken up
content.proton.documentdb.threading_service.index_field_inverter.acceptedtaskNumber of accepted tasks
content.proton.documentdb.threading_service.index_field_inverter.queuesizetaskSize of task queue
content.proton.documentdb.threading_service.index_field_inverter.rejectedtaskNumber of rejected tasks
content.proton.documentdb.threading_service.index_field_inverter.utilizationfractionRatio of time the worker threads has been active
content.proton.documentdb.threading_service.index_field_inverter.wakeupswakeupNumber of times a worker thread has been woken up
content.proton.documentdb.threading_service.index_field_writer.acceptedtaskNumber of accepted tasks
content.proton.documentdb.threading_service.index_field_writer.queuesizetaskSize of task queue
content.proton.documentdb.threading_service.index_field_writer.rejectedtaskNumber of rejected tasks
content.proton.documentdb.threading_service.index_field_writer.utilizationfractionRatio of time the worker threads has been active
content.proton.documentdb.threading_service.index_field_writer.wakeupswakeupNumber of times a worker thread has been woken up
content.proton.documentdb.ready.lid_space.lid_bloat_factorfractionThe bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid_limit - used_lids) / lid_limit)
content.proton.documentdb.ready.lid_space.lid_fragmentation_factorfractionThe fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest_used_lid - used_lids) / highest_used_lid)
content.proton.documentdb.ready.lid_space.lid_limitdocumentidThe size of the allocated lid space
content.proton.documentdb.ready.lid_space.highest_used_liddocumentidThe highest used lid
content.proton.documentdb.ready.lid_space.used_lidsdocumentidThe number of lids used
content.proton.documentdb.ready.lid_space.lowest_free_liddocumentidThe lowest free local document id
content.proton.documentdb.notready.lid_space.lid_bloat_factorfractionThe bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid_limit - used_lids) / lid_limit)
content.proton.documentdb.notready.lid_space.lid_fragmentation_factorfractionThe fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest_used_lid - used_lids) / highest_used_lid)
content.proton.documentdb.notready.lid_space.lid_limitdocumentidThe size of the allocated lid space
content.proton.documentdb.notready.lid_space.highest_used_liddocumentidThe highest used lid
content.proton.documentdb.notready.lid_space.used_lidsdocumentidThe number of lids used
content.proton.documentdb.notready.lid_space.lowest_free_liddocumentidThe lowest free local document id
content.proton.documentdb.removed.lid_space.lid_bloat_factorfractionThe bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid_limit - used_lids) / lid_limit)
content.proton.documentdb.removed.lid_space.lid_fragmentation_factorfractionThe fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest_used_lid - used_lids) / highest_used_lid)
content.proton.documentdb.removed.lid_space.lid_limitdocumentidThe size of the allocated lid space
content.proton.documentdb.removed.lid_space.highest_used_liddocumentidThe highest used lid
content.proton.documentdb.removed.lid_space.used_lidsdocumentidThe number of lids used
content.proton.documentdb.removed.lid_space.lowest_free_liddocumentidThe lowest free local document id
content.proton.documentdb.bucket_move.buckets_pendingbucketThe number of buckets left to move
content.proton.resource_usage.diskfractionThe relative amount of disk used by this content node (transient usage not included, value in the range [0, 1]). Same value as reported to the cluster controller
content.proton.resource_usage.disk_usage.totalfractionThe total relative amount of disk used by this content node (value in the range [0, 1])
content.proton.resource_usage.disk_usage.total_utilizationfractionThe relative amount of disk used compared to the content node disk resource limit
content.proton.resource_usage.disk_usage.transientfractionThe relative amount of transient disk used by this content node (value in the range [0, 1])
content.proton.resource_usage.disk_usage.reservedfractionThe relative amount of reserved disk space for this content node (value in the range [0, 1])
content.proton.resource_usage.disk_usage.used_and_reservedfractionThe relative amount of disk used and reserved disk space by this content node (transient usage not included, value in the range [0, 1])
content.proton.resource_usage.memoryfractionThe relative amount of memory used by this content node (transient usage not included, value in the range [0, 1]). Same value as reported to the cluster controller
content.proton.resource_usage.memory_usage.totalfractionThe total relative amount of memory used by this content node (value in the range [0, 1])
content.proton.resource_usage.memory_usage.total_utilizationfractionThe relative amount of memory used compared to the content node memory resource limit
content.proton.resource_usage.memory_usage.transientfractionThe relative amount of transient memory used by this content node (value in the range [0, 1])
content.proton.resource_usage.memory_mappingsfileThe number of memory mapped files
content.proton.resource_usage.open_file_descriptorsfileThe number of open files
content.proton.resource_usage.feeding_blockedbinaryWhether feeding is blocked due to resource limits being reached (value is either 0 or 1)
content.proton.resource_usage.malloc_arenabyteSize of malloc arena
content.proton.documentdb.attribute.resource_usage.address_spacefractionThe max relative address space used among components in all attribute vectors in this document db (value in the range [0, 1])
content.proton.documentdb.attribute.resource_usage.feeding_blockedbinaryWhether feeding is blocked due to attribute resource limits being reached (value is either 0 or 1)
content.proton.documentdb.attribute.memory_usage.allocated_bytesbyteThe number of allocated bytes
content.proton.documentdb.attribute.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.attribute.memory_usage.onhold_bytesbyteThe number of bytes on hold
content.proton.documentdb.attribute.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes)
content.proton.resource_usage.cpu_util.setupfractioncpu used by system init and (re-)configuration
content.proton.resource_usage.cpu_util.readfractioncpu used by reading data from the system
content.proton.resource_usage.cpu_util.writefractioncpu used by writing data to the system
content.proton.resource_usage.cpu_util.compactfractioncpu used by internal data re-structuring
content.proton.resource_usage.cpu_util.otherfractioncpu used by work not classified as a specific category
content.proton.transactionlog.entriesrecordThe current number of entries in the transaction log
content.proton.transactionlog.disk_usagebyteThe disk usage (in bytes) of the transaction log
content.proton.transactionlog.replay_timesecondThe replay time (in seconds) of the transaction log during start-up
content.proton.documentdb.ready.document_store.disk_usagebyteDisk space usage in bytes
content.proton.documentdb.ready.document_store.disk_bloatbyteDisk space bloat in bytes
content.proton.documentdb.ready.document_store.max_bucket_spreadfractionMax bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file)
content.proton.documentdb.ready.document_store.memory_usage.allocated_bytesbyteThe number of allocated bytes
content.proton.documentdb.ready.document_store.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.ready.document_store.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.ready.document_store.memory_usage.onhold_bytesbyteThe number of bytes on hold
content.proton.documentdb.notready.document_store.disk_usagebyteDisk space usage in bytes
content.proton.documentdb.notready.document_store.disk_bloatbyteDisk space bloat in bytes
content.proton.documentdb.notready.document_store.max_bucket_spreadfractionMax bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file)
content.proton.documentdb.notready.document_store.memory_usage.allocated_bytesbyteThe number of allocated bytes
content.proton.documentdb.notready.document_store.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.notready.document_store.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.notready.document_store.memory_usage.onhold_bytesbyteThe number of bytes on hold
content.proton.documentdb.removed.document_store.disk_usagebyteDisk space usage in bytes
content.proton.documentdb.removed.document_store.disk_bloatbyteDisk space bloat in bytes
content.proton.documentdb.removed.document_store.max_bucket_spreadfractionMax bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file)
content.proton.documentdb.removed.document_store.memory_usage.allocated_bytesbyteThe number of allocated bytes
content.proton.documentdb.removed.document_store.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.removed.document_store.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.removed.document_store.memory_usage.onhold_bytesbyteThe number of bytes on hold
content.proton.documentdb.ready.document_store.cache.elementsitemNumber of elements in the cache
content.proton.documentdb.ready.document_store.cache.memory_usagebyteMemory usage of the cache (in bytes)
content.proton.documentdb.ready.document_store.cache.hit_ratefractionRate of hits in the cache compared to number of lookups
content.proton.documentdb.ready.document_store.cache.lookupsoperationNumber of lookups in the cache (hits + misses)
content.proton.documentdb.ready.document_store.cache.invalidationsoperationNumber of invalidations (erased elements) in the cache.
content.proton.documentdb.notready.document_store.cache.elementsitemNumber of elements in the cache
content.proton.documentdb.notready.document_store.cache.memory_usagebyteMemory usage of the cache (in bytes)
content.proton.documentdb.notready.document_store.cache.hit_ratefractionRate of hits in the cache compared to number of lookups
content.proton.documentdb.notready.document_store.cache.lookupsoperationNumber of lookups in the cache (hits + misses)
content.proton.documentdb.notready.document_store.cache.invalidationsoperationNumber of invalidations (erased elements) in the cache.
content.proton.documentdb.removed.document_store.cache.elementsitemNumber of elements in the cache
content.proton.documentdb.removed.document_store.cache.hit_ratefractionRate of hits in the cache compared to number of lookups
content.proton.documentdb.removed.document_store.cache.invalidationsitemNumber of invalidations (erased elements) in the cache.
content.proton.documentdb.removed.document_store.cache.lookupsoperationNumber of lookups in the cache (hits + misses)
content.proton.documentdb.removed.document_store.cache.memory_usagebyteMemory usage of the cache (in bytes)
content.proton.documentdb.ready.attribute.memory_usage.allocated_bytesbyteThe number of allocated bytes
content.proton.documentdb.ready.attribute.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.ready.attribute.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.ready.attribute.memory_usage.onhold_bytesbyteThe number of bytes on hold
content.proton.documentdb.ready.attribute.disk_usagebyteDisk space usage (in bytes) of the flushed snapshot of this attribute for this document type
content.proton.documentdb.notready.attribute.memory_usage.allocated_bytesbyteThe number of allocated bytes
content.proton.documentdb.notready.attribute.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.notready.attribute.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.notready.attribute.memory_usage.onhold_bytesbyteThe number of bytes on hold
content.proton.index.cache.postinglist.elementsitemNumber of elements in the cache. Contains disk index posting list files across all document types
content.proton.index.cache.postinglist.memory_usagebyteMemory usage of the cache (in bytes). Contains disk index posting list files across all document types
content.proton.index.cache.postinglist.hit_ratefractionRate of hits in the cache compared to number of lookups. Contains disk index posting list files across all document types
content.proton.index.cache.postinglist.lookupsoperationNumber of lookups in the cache (hits + misses). Contains disk index posting list files across all document types
content.proton.index.cache.postinglist.invalidationsoperationNumber of invalidations (erased elements) in the cache. Contains disk index posting list files across all document types
content.proton.index.cache.bitvector.elementsitemNumber of elements in the cache. Contains disk index bitvector files across all document types
content.proton.index.cache.bitvector.memory_usagebyteMemory usage of the cache (in bytes). Contains disk index bitvector files across all document types
content.proton.index.cache.bitvector.hit_ratefractionRate of hits in the cache compared to number of lookups. Contains disk index bitvector files across all document types
content.proton.index.cache.bitvector.lookupsoperationNumber of lookups in the cache (hits + misses). Contains disk index bitvector files across all document types
content.proton.index.cache.bitvector.invalidationsoperationNumber of invalidations (erased elements) in the cache. Contains disk index bitvector files across all document types
content.proton.documentdb.index.memory_usage.allocated_bytesbyteThe number of allocated bytes for the memory index for this document type
content.proton.documentdb.index.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes) for the memory index for this document type
content.proton.documentdb.index.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes) for the memory index for this document type
content.proton.documentdb.index.memory_usage.onhold_bytesbyteThe number of bytes on hold for the memory index for this document type
content.proton.documentdb.index.disk_usagebyteDisk space usage (in bytes) of all disk indexes for this document type
content.proton.documentdb.index.indexesitemNumber of disk or memory indexes
content.proton.documentdb.index.io.search.read_bytesbyteBytes read from disk index posting list and bitvector files as part of search for this document type
content.proton.documentdb.index.io.search.cached_read_bytesbyteBytes read from cached disk index posting list and bitvector files as part of search for this document type
content.proton.documentdb.ready.index.memory_usage.allocated_bytesbyteThe number of allocated bytes for this index field in the memory index for this document type
content.proton.documentdb.ready.index.disk_usagebyteDisk space usage (in bytes) of this index field in all disk indexes for this document type
content.proton.documentdb.matching.queriesqueryNumber of queries executed
content.proton.documentdb.matching.soft_doomed_queriesqueryNumber of queries hitting the soft timeout
content.proton.documentdb.matching.query_latencysecondTotal average latency (sec) when matching and ranking a query
content.proton.documentdb.matching.query_setup_timesecondAverage time (sec) spent setting up and tearing down queries
content.proton.documentdb.matching.docs_matcheddocumentNumber of documents matched
content.proton.documentdb.matching.docs_rankeddocumentNumber of documents ranked (first phase)
content.proton.documentdb.matching.docs_rerankeddocumentNumber of documents re-ranked (second phase)
content.proton.documentdb.matching.exact_nns_distances_computeddistanceNumber of distances computed in exact nearest-neighbor search
content.proton.documentdb.matching.approximate_nns_distances_computeddistanceNumber of distances computed in approximate nearest-neighbor search
content.proton.documentdb.matching.approximate_nns_nodes_visitedgraph_nodeNumber of nodes visited in approximate nearest-neighbor search
content.proton.documentdb.matching.rank_profile.queriesqueryNumber of queries executed
content.proton.documentdb.matching.rank_profile.soft_doomed_queriesqueryNumber of queries hitting the soft timeout
content.proton.documentdb.matching.rank_profile.soft_doom_factorfractionFactor used to compute soft-timeout
content.proton.documentdb.matching.rank_profile.query_latencysecondTotal average latency (sec) when matching and ranking a query
content.proton.documentdb.matching.rank_profile.query_setup_timesecondAverage time (sec) spent setting up and tearing down queries
content.proton.documentdb.matching.rank_profile.grouping_timesecondAverage time (sec) spent on grouping
content.proton.documentdb.matching.rank_profile.rerank_timesecondAverage time (sec) spent on 2nd phase ranking
content.proton.documentdb.matching.rank_profile.docs_matcheddocumentNumber of documents matched
content.proton.documentdb.matching.rank_profile.docs_rankeddocumentNumber of documents ranked (first phase)
content.proton.documentdb.matching.rank_profile.docs_rerankeddocumentNumber of documents re-ranked (second phase)
content.proton.documentdb.matching.rank_profile.exact_nns_distances_computeddistanceNumber of distances computed in exact nearest-neighbor search
content.proton.documentdb.matching.rank_profile.approximate_nns_distances_computeddistanceNumber of distances computed in approximate nearest-neighbor search
content.proton.documentdb.matching.rank_profile.approximate_nns_nodes_visitedgraph_nodeNumber of nodes visited in approximate nearest-neighbor search
content.proton.documentdb.matching.rank_profile.limited_queriesqueryNumber of queries limited in match phase
content.proton.documentdb.matching.rank_profile.docid_partition.active_timesecondTime (sec) spent doing actual work
content.proton.documentdb.matching.rank_profile.docid_partition.docs_matcheddocumentNumber of documents matched
content.proton.documentdb.matching.rank_profile.docid_partition.docs_rankeddocumentNumber of documents ranked (first phase)
content.proton.documentdb.matching.rank_profile.docid_partition.docs_rerankeddocumentNumber of documents re-ranked (second phase)
content.proton.documentdb.matching.rank_profile.docid_partition.wait_timesecondTime (sec) spent waiting for other external threads and resources
content.proton.documentdb.matching.rank_profile.match_timesecondAverage time (sec) for matching a query (1st phase)
content.proton.documentdb.feeding.commit.operationsoperationNumber of operations included in a commit
content.proton.documentdb.feeding.commit.latencysecondLatency for commit in seconds
content.proton.session_cache.grouping.num_cachedsessionNumber of currently cached sessions
content.proton.session_cache.grouping.num_droppedsessionNumber of dropped cached sessions
content.proton.session_cache.grouping.num_insertsessionNumber of inserted sessions
content.proton.session_cache.grouping.num_picksessionNumber if picked sessions
content.proton.session_cache.grouping.num_timedoutsessionNumber of timed out sessions
content.proton.session_cache.search.num_cachedsessionNumber of currently cached sessions
content.proton.session_cache.search.num_droppedsessionNumber of dropped cached sessions
content.proton.session_cache.search.num_insertsessionNumber of inserted sessions
content.proton.session_cache.search.num_picksessionNumber if picked sessions
content.proton.session_cache.search.num_timedoutsessionNumber of timed out sessions
metricmanager.periodichooklatencymillisecondTime in ms used to update a single periodic hook
metricmanager.resetlatencymillisecondTime in ms used to reset all metrics.
metricmanager.sleeptimemillisecondTime in ms worker thread is sleeping
metricmanager.snapshothooklatencymillisecondTime in ms used to update a single snapshot hook
metricmanager.snapshotlatencymillisecondTime in ms used to take a snapshot
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/sentinel.mdx b/mintlify-docs/en/reference/operations/metrics/sentinel.mdx index 4c1985740d..4f98ccacbd 100644 --- a/mintlify-docs/en/reference/operations/metrics/sentinel.mdx +++ b/mintlify-docs/en/reference/operations/metrics/sentinel.mdx @@ -3,9 +3,34 @@ title: "Sentinel Metrics" sidebarTitle: "Sentinel metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| sentinel.restarts | restart | Number of service restarts done by the sentinel | -| sentinel.totalRestarts | restart | Total number of service restarts done by the sentinel since the sentinel was started | -| sentinel.uptime | second | Time the sentinel has been running | -| sentinel.running | instance | Number of services the sentinel has running currently | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitDescription
sentinel.restartsrestartNumber of service restarts done by the sentinel
sentinel.totalRestartsrestartTotal number of service restarts done by the sentinel since the sentinel was started
sentinel.uptimesecondTime the sentinel has been running
sentinel.runninginstanceNumber of services the sentinel has running currently
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/slobrok.mdx b/mintlify-docs/en/reference/operations/metrics/slobrok.mdx index f2c226b470..293f234597 100644 --- a/mintlify-docs/en/reference/operations/metrics/slobrok.mdx +++ b/mintlify-docs/en/reference/operations/metrics/slobrok.mdx @@ -3,10 +3,39 @@ title: "Slobrok Metrics" sidebarTitle: "Slobrok metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| slobrok.heartbeats.failed | request | Number of heartbeat requests failed | -| slobrok.requests.register | request | Number of register requests received | -| slobrok.requests.mirror | request | Number of mirroring requests received | -| slobrok.requests.admin | request | Number of administrative requests received | -| slobrok.missing.consensus | second | Number of seconds without full consensus with all other brokers | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitDescription
slobrok.heartbeats.failedrequestNumber of heartbeat requests failed
slobrok.requests.registerrequestNumber of register requests received
slobrok.requests.mirrorrequestNumber of mirroring requests received
slobrok.requests.adminrequestNumber of administrative requests received
slobrok.missing.consensussecondNumber of seconds without full consensus with all other brokers
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/storage.mdx b/mintlify-docs/en/reference/operations/metrics/storage.mdx index 8d91e4280a..40e96ade97 100644 --- a/mintlify-docs/en/reference/operations/metrics/storage.mdx +++ b/mintlify-docs/en/reference/operations/metrics/storage.mdx @@ -3,213 +3,1054 @@ title: "Storage Metrics" sidebarTitle: "Storage metrics" --- -| Name | Unit | Description | -| --- | --- | --- | -| vds.datastored.alldisks.buckets | bucket | Number of buckets managed | -| vds.datastored.alldisks.docs | document | Number of documents stored | -| vds.datastored.alldisks.bytes | byte | Number of bytes stored | -| vds.datastored.alldisks.activebuckets | bucket | Number of active buckets on the node | -| vds.datastored.alldisks.readybuckets | bucket | Number of ready buckets on the node | -| vds.visitor.allthreads.averagevisitorlifetime | millisecond | Average lifetime of a visitor | -| vds.visitor.allthreads.averagequeuewait | millisecond | Average time an operation spends in input queue. | -| vds.visitor.allthreads.queuesize | operation | Size of input message queue. | -| vds.visitor.allthreads.completed | operation | Number of visitors completed | -| vds.visitor.allthreads.created | operation | Number of visitors created. | -| vds.visitor.allthreads.failed | operation | Number of visitors failed | -| vds.visitor.allthreads.averagemessagesendtime | millisecond | Average time it takes for messages to be sent to their target (and be replied to) | -| vds.visitor.allthreads.averageprocessingtime | millisecond | Average time used to process visitor requests | -| vds.visitor.allthreads.aborted | instance | Number of visitors aborted. | -| vds.visitor.allthreads.averagevisitorcreationtime | millisecond | Average time spent creating a visitor instance | -| vds.visitor.allthreads.destination\_failure\_replies | instance | Number of failure replies received from the visitor destination | -| vds.filestor.queuesize | operation | Size of input message queue. | -| vds.filestor.averagequeuewait | millisecond | Average time an operation spends in input queue. | -| vds.filestor.active\_operations.size | operation | Number of concurrent active operations | -| vds.filestor.active\_operations.latency | millisecond | Latency (in ms) for completed operations | -| vds.filestor.throttle\_window\_size | operation | Current size of async operation throttler window size | -| vds.filestor.throttle\_waiting\_threads | thread | Number of threads waiting to acquire a throttle token | -| vds.filestor.throttle\_active\_tokens | instance | Current number of active throttle tokens | -| vds.filestor.allthreads.mergemetadatareadlatency | millisecond | Time spent in a merge step to check metadata of current node to see what data it has. | -| vds.filestor.allthreads.mergedatareadlatency | millisecond | Time spent in a merge step to read data other nodes need. | -| vds.filestor.allthreads.mergedatawritelatency | millisecond | Time spent in a merge step to write data needed to current node. | -| vds.filestor.allthreads.mergeavgdatareceivedneeded | byte | Amount of data transferred from previous node in chain that we needed to apply locally. | -| vds.filestor.allthreads.mergebuckets.count | request | Number of requests processed. | -| vds.filestor.allthreads.mergebuckets.failed | request | Number of failed requests. | -| vds.filestor.allthreads.mergebuckets.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.mergelatencytotal | millisecond | Latency of total merge operation, from master node receives it, until merge is complete and master node replies. | -| vds.filestor.allthreads.merge\_put\_latency | millisecond | Latency of individual puts that are part of merge operations | -| vds.filestor.allthreads.merge\_remove\_latency | millisecond | Latency of individual removes that are part of merge operations | -| vds.filestor.allstripes.throttled\_rpc\_direct\_dispatches | instance | Number of times an RPC thread could not directly dispatch an async operation directly to Proton because it was disallowed by the throttle policy | -| vds.filestor.allstripes.throttled\_persistence\_thread\_polls | instance | Number of times a persistence thread could not immediately dispatch a queued async operation because it was disallowed by the throttle policy | -| vds.filestor.allstripes.timeouts\_waiting\_for\_throttle\_token | instance | Number of times a persistence thread timed out waiting for an available throttle policy token | -| vds.filestor.allstripes.averagequeuewait | millisecond | Average time an operation spends in input queue. | -| vds.filestor.allthreads.put.count | operation | Number of requests processed. | -| vds.filestor.allthreads.put.failed | operation | Number of failed requests. | -| vds.filestor.allthreads.put.test\_and\_set\_failed | operation | Number of operations that were skipped due to a test-and-set condition not met | -| vds.filestor.allthreads.put.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.put.request\_size | byte | Size of requests, in bytes | -| vds.filestor.allthreads.remove.count | operation | Number of requests processed. | -| vds.filestor.allthreads.remove.failed | operation | Number of failed requests. | -| vds.filestor.allthreads.remove.test\_and\_set\_failed | operation | Number of operations that were skipped due to a test-and-set condition not met | -| vds.filestor.allthreads.remove.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.remove.request\_size | byte | Size of requests, in bytes | -| vds.filestor.allthreads.remove.not\_found | request | Number of requests that could not be completed due to source document not found. | -| vds.filestor.allthreads.get.count | operation | Number of requests processed. | -| vds.filestor.allthreads.get.failed | operation | Number of failed requests. | -| vds.filestor.allthreads.get.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.get.request\_size | byte | Size of requests, in bytes | -| vds.filestor.allthreads.get.not\_found | request | Number of requests that could not be completed due to source document not found. | -| vds.filestor.allthreads.update.count | request | Number of requests processed. | -| vds.filestor.allthreads.update.failed | request | Number of failed requests. | -| vds.filestor.allthreads.update.test\_and\_set\_failed | request | Number of requests that were skipped due to a test-and-set condition not met | -| vds.filestor.allthreads.update.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.update.request\_size | byte | Size of requests, in bytes | -| vds.filestor.allthreads.update.latency\_read | millisecond | Latency of the source read in the request. | -| vds.filestor.allthreads.update.not\_found | request | Number of requests that could not be completed due to source document not found. | -| vds.filestor.allthreads.createiterator.count | request | Number of requests processed. | -| vds.filestor.allthreads.createiterator.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.createiterator.failed | request | Number of failed requests. | -| vds.filestor.allthreads.visit.count | request | Number of requests processed. | -| vds.filestor.allthreads.visit.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.visit.docs | document | Number of entries read per iterate call | -| vds.filestor.allthreads.visit.failed | request | Number of failed requests. | -| vds.filestor.allthreads.remove\_location.count | request | Number of requests processed. | -| vds.filestor.allthreads.remove\_location.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.remove\_location.failed | request | Number of failed requests. | -| vds.filestor.allthreads.splitbuckets.count | request | Number of requests processed. | -| vds.filestor.allthreads.splitbuckets.failed | request | Number of failed requests. | -| vds.filestor.allthreads.splitbuckets.latency | request | Latency of successful requests. | -| vds.filestor.allthreads.joinbuckets.count | request | Number of requests processed. | -| vds.filestor.allthreads.joinbuckets.failed | request | Number of failed requests. | -| vds.filestor.allthreads.joinbuckets.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.deletebuckets.count | request | Number of requests processed. | -| vds.filestor.allthreads.deletebuckets.failed | request | Number of failed requests. | -| vds.filestor.allthreads.deletebuckets.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.remove\_by\_gid.count | request | Number of requests processed. | -| vds.filestor.allthreads.remove\_by\_gid.failed | request | Number of failed requests. | -| vds.filestor.allthreads.remove\_by\_gid.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.setbucketstates.count | request | Number of requests processed. | -| vds.filestor.allthreads.setbucketstates.failed | request | Number of failed requests. | -| vds.filestor.allthreads.setbucketstates.latency | millisecond | Latency of successful requests. | -| vds.mergethrottler.averagequeuewaitingtime | millisecond | Time merges spent in the throttler queue | -| vds.mergethrottler.queuesize | instance | Length of merge queue | -| vds.mergethrottler.active\_window\_size | instance | Number of merges active within the pending window size | -| vds.mergethrottler.estimated\_merge\_memory\_usage | byte | An estimated upper bound of the memory usage (in bytes) of the merges currently in the active window | -| vds.mergethrottler.bounced\_due\_to\_back\_pressure | instance | Number of merges bounced due to resource exhaustion back-pressure | -| vds.mergethrottler.locallyexecutedmerges.ok | instance | The number of successful merges for 'locallyexecutedmerges' | -| vds.mergethrottler.locallyexecutedmerges.failures.aborted | operation | The number of merges that failed because the storage node was (most likely) shutting down | -| vds.mergethrottler.locallyexecutedmerges.failures.bucketnotfound | operation | The number of operations that failed because the bucket did not exist | -| vds.mergethrottler.locallyexecutedmerges.failures.busy | operation | The number of merges that failed because the storage node was busy | -| vds.mergethrottler.locallyexecutedmerges.failures.exists | operation | The number of merges that were rejected due to a merge operation for their bucket already being processed | -| vds.mergethrottler.locallyexecutedmerges.failures.notready | operation | The number of merges discarded because distributor was not ready | -| vds.mergethrottler.locallyexecutedmerges.failures.other | operation | The number of other failures | -| vds.mergethrottler.locallyexecutedmerges.failures.rejected | operation | The number of merges that were rejected | -| vds.mergethrottler.locallyexecutedmerges.failures.timeout | operation | The number of merges that failed because they timed out towards storage | -| vds.mergethrottler.locallyexecutedmerges.failures.total | operation | Sum of all failures | -| vds.mergethrottler.locallyexecutedmerges.failures.wrongdistribution | operation | The number of merges that were discarded (flushed) because they were initiated at an older cluster state than the current | -| vds.mergethrottler.mergechains.ok | operation | The number of successful merges for 'mergechains' | -| vds.mergethrottler.mergechains.failures.busy | operation | The number of merges that failed because the storage node was busy | -| vds.mergethrottler.mergechains.failures.total | operation | Sum of all failures | -| vds.mergethrottler.mergechains.failures.exists | operation | The number of merges that were rejected due to a merge operation for their bucket already being processed | -| vds.mergethrottler.mergechains.failures.notready | operation | The number of merges discarded because distributor was not ready | -| vds.mergethrottler.mergechains.failures.other | operation | The number of other failures | -| vds.mergethrottler.mergechains.failures.rejected | operation | The number of merges that were rejected | -| vds.mergethrottler.mergechains.failures.timeout | operation | The number of merges that failed because they timed out towards storage | -| vds.mergethrottler.mergechains.failures.wrongdistribution | operation | The number of merges that were discarded (flushed) because they were initiated at an older cluster state than the current | -| vds.server.network.tls-handshakes-failed | operation | Number of client or server connection attempts that failed during TLS handshaking | -| vds.server.network.peer-authorization-failures | failure | Number of TLS connection attempts failed due to bad or missing peer certificate credentials | -| vds.server.network.client.tls-connections-established | connection | Number of secure mTLS connections established | -| vds.server.network.server.tls-connections-established | connection | Number of secure mTLS connections established | -| vds.server.network.client.insecure-connections-established | connection | Number of insecure (plaintext) connections established | -| vds.server.network.server.insecure-connections-established | connection | Number of insecure (plaintext) connections established | -| vds.server.network.tls-connections-broken | connection | Number of TLS connections broken due to failures during frame encoding or decoding | -| vds.server.network.failed-tls-config-reloads | failure | Number of times background reloading of TLS config has failed | -| vds.bouncer.unavailable\_node\_aborts | operation | Number of operations that were aborted due to the node (or target bucket space) being unavailable | -| vds.changedbucketownershiphandler.avg\_abort\_processing\_time | millisecond | Average time spent aborting operations for changed buckets | -| vds.changedbucketownershiphandler.external\_load\_ops\_aborted | operation | Number of outdated external load operations aborted | -| vds.changedbucketownershiphandler.ideal\_state\_ops\_aborted | operation | Number of outdated ideal state operations aborted | -| vds.communication.bucket\_space\_mapping\_failures | operation | Number of messages that could not be resolved to a known bucket space | -| vds.communication.convertfailures | operation | Number of messages that failed to get converted to storage API messages | -| vds.communication.exceptionmessageprocesstime | millisecond | Time transport thread uses to process a single message that fails with an exception thrown into communication manager | -| vds.communication.messageprocesstime | millisecond | Time transport thread uses to process a single message | -| vds.communication.messagequeue | item | Size of input message queue. | -| vds.communication.sendcommandlatency | millisecond | Average ms used to send commands to MBUS | -| vds.communication.sendreplylatency | millisecond | Average ms used to send replies to MBUS | -| vds.communication.toolittlememory | operation | Number of messages failed due to too little memory available | -| vds.datastored.bucket\_space.active\_buckets | bucket | Number of active buckets in the bucket space | -| vds.datastored.bucket\_space.bucket\_db.memory\_usage.allocated\_bytes | byte | The number of allocated bytes | -| vds.datastored.bucket\_space.bucket\_db.memory\_usage.dead\_bytes | byte | The number of dead bytes (`<=` used\_bytes) | -| vds.datastored.bucket\_space.bucket\_db.memory\_usage.onhold\_bytes | byte | The number of bytes on hold | -| vds.datastored.bucket\_space.bucket\_db.memory\_usage.used\_bytes | byte | The number of used bytes (`<=` allocated\_bytes) | -| vds.datastored.bucket\_space.buckets\_total | bucket | Total number buckets present in the bucket space (ready + not ready) | -| vds.datastored.bucket\_space.entries | document | Number of entries (documents + tombstones) stored in the bucket space | -| vds.datastored.bucket\_space.bytes | byte | Bytes stored across all documents in the bucket space | -| vds.datastored.bucket\_space.docs | document | Documents stored in the bucket space | -| vds.datastored.bucket\_space.ready\_buckets | bucket | Number of ready buckets in the bucket space | -| vds.datastored.fullbucketinfolatency | millisecond | Amount of time spent to process a full bucket info request | -| vds.datastored.fullbucketinforeqsize | node | Amount of distributors answered at once in full bucket info requests. | -| vds.datastored.simplebucketinforeqsize | bucket | Amount of buckets returned in simple bucket info requests | -| vds.filestor.allthreads.applybucketdiff.count | request | Number of requests processed. | -| vds.filestor.allthreads.applybucketdiff.failed | request | Number of failed requests. | -| vds.filestor.allthreads.applybucketdiff.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.applybucketdiffreply | request | Number of applybucketdiff replies that have been processed. | -| vds.filestor.allthreads.bucketfixed | bucket | Number of times bucket has been fixed because of corruption | -| vds.filestor.allthreads.bucketverified.count | request | Number of requests processed. | -| vds.filestor.allthreads.bucketverified.failed | request | Number of failed requests. | -| vds.filestor.allthreads.bucketverified.latency | request | Latency of successful requests. | -| vds.filestor.allthreads.bytesmerged | byte | Total number of bytes merged into this node. | -| vds.filestor.allthreads.createbuckets.count | request | Number of requests processed. | -| vds.filestor.allthreads.createbuckets.failed | request | Number of failed requests. | -| vds.filestor.allthreads.createbuckets.latency | request | Latency of successful requests. | -| vds.filestor.allthreads.failedoperations | operation | Number of operations throwing exceptions. | -| vds.filestor.allthreads.getbucketdiff.count | request | Number of requests processed. | -| vds.filestor.allthreads.getbucketdiff.failed | request | Number of failed requests. | -| vds.filestor.allthreads.getbucketdiff.latency | request | Latency of successful requests. | -| vds.filestor.allthreads.getbucketdiffreply | request | Number of getbucketdiff replies that have been processed. | -| vds.filestor.allthreads.internaljoin.count | request | Number of requests processed. | -| vds.filestor.allthreads.internaljoin.failed | request | Number of failed requests. | -| vds.filestor.allthreads.internaljoin.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.movedbuckets.count | request | Number of requests processed. | -| vds.filestor.allthreads.movedbuckets.failed | request | Number of failed requests. | -| vds.filestor.allthreads.movedbuckets.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.operations | operation | Number of operations processed. | -| vds.filestor.allthreads.readbucketinfo.count | request | Number of requests processed. | -| vds.filestor.allthreads.readbucketinfo.failed | request | Number of failed requests. | -| vds.filestor.allthreads.readbucketinfo.latency | request | Latency of successful requests. | -| vds.filestor.allthreads.readbucketlist.count | request | Number of requests processed. | -| vds.filestor.allthreads.readbucketlist.failed | request | Number of failed requests. | -| vds.filestor.allthreads.readbucketlist.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.recheckbucketinfo.count | request | Number of requests processed. | -| vds.filestor.allthreads.recheckbucketinfo.failed | request | Number of failed requests. | -| vds.filestor.allthreads.recheckbucketinfo.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.revert.count | request | Number of requests processed. | -| vds.filestor.allthreads.revert.failed | request | Number of failed requests. | -| vds.filestor.allthreads.revert.latency | millisecond | Latency of successful requests. | -| vds.filestor.allthreads.revert.not\_found | request | Number of requests that could not be completed due to source document not found. | -| vds.filestor.allthreads.stat\_bucket.count | request | Number of requests processed. | -| vds.filestor.allthreads.stat\_bucket.failed | request | Number of failed requests. | -| vds.filestor.allthreads.stat\_bucket.latency | request | Latency of successful requests. | -| vds.filestor.bucket\_db\_init\_latency | millisecond | Time taken (in ms) to initialize bucket databases with information from the persistence provider | -| vds.filestor.directoryevents | operation | Number of directory events received. | -| vds.filestor.diskevents | operation | Number of disk events received. | -| vds.filestor.partitionevents | operation | Number of partition events received. | -| vds.filestor.pendingmerge | bucket | Number of buckets currently being merged. | -| vds.filestor.waitingforlockrate | operation | Amount of times a filestor thread has needed to wait for lock to take next message in queue. | -| vds.mergethrottler.mergechains.failures.aborted | operation | The number of merges that failed because the storage node was (most likely) shutting down | -| vds.mergethrottler.mergechains.failures.bucketnotfound | operation | The number of operations that failed because the bucket did not exist | -| vds.server.memoryusage | byte | Amount of memory used by the storage subsystem | -| vds.server.memoryusage\_visiting | byte | Message use from visiting | -| vds.server.message\_memory\_use.highpri | byte | Message use from high priority storage messages | -| vds.server.message\_memory\_use.lowpri | byte | Message use from low priority storage messages | -| vds.server.message\_memory\_use.normalpri | byte | Message use from normal priority storage messages | -| vds.server.message\_memory\_use.total | byte | Message use from storage messages | -| vds.server.message\_memory\_use.veryhighpri | byte | Message use from very high priority storage messages | -| vds.state\_manager.invoke\_state\_listeners\_latency | millisecond | Time spent (in ms) propagating state changes to internal state listeners | -| vds.visitor.cv\_queueevictedwaittime | millisecond | Milliseconds waiting in create visitor queue, for visitors that was evicted from queue due to higher priority visitors coming | -| vds.visitor.cv\_queuefull | operation | Number of create visitor messages failed as queue is full | -| vds.visitor.cv\_queuesize | item | Size of create visitor queue | -| vds.visitor.cv\_queuetimeoutwaittime | millisecond | Milliseconds waiting in create visitor queue, for visitors that timed out while in the visitor queue | -| vds.visitor.cv\_queuewaittime | millisecond | Milliseconds waiting in create visitor queue, for visitors that was added to visitor queue but scheduled later | -| vds.visitor.cv\_skipqueue | operation | Number of times we could skip queue as we had free visitor spots | -| vds.server.network.rpc-capability-checks-failed | failure | Number of RPC operations that failed due to one or more missing capabilities | -| vds.server.network.status-capability-checks-failed | failure | Number of status page operations that failed due to one or more missing capabilities | -| vds.server.fnet.num-connections | connection | Total number of connection objects | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitDescription
vds.datastored.alldisks.bucketsbucketNumber of buckets managed
vds.datastored.alldisks.docsdocumentNumber of documents stored
vds.datastored.alldisks.bytesbyteNumber of bytes stored
vds.datastored.alldisks.activebucketsbucketNumber of active buckets on the node
vds.datastored.alldisks.readybucketsbucketNumber of ready buckets on the node
vds.visitor.allthreads.averagevisitorlifetimemillisecondAverage lifetime of a visitor
vds.visitor.allthreads.averagequeuewaitmillisecondAverage time an operation spends in input queue.
vds.visitor.allthreads.queuesizeoperationSize of input message queue.
vds.visitor.allthreads.completedoperationNumber of visitors completed
vds.visitor.allthreads.createdoperationNumber of visitors created.
vds.visitor.allthreads.failedoperationNumber of visitors failed
vds.visitor.allthreads.averagemessagesendtimemillisecondAverage time it takes for messages to be sent to their target (and be replied to)
vds.visitor.allthreads.averageprocessingtimemillisecondAverage time used to process visitor requests
vds.visitor.allthreads.abortedinstanceNumber of visitors aborted.
vds.visitor.allthreads.averagevisitorcreationtimemillisecondAverage time spent creating a visitor instance
vds.visitor.allthreads.destination_failure_repliesinstanceNumber of failure replies received from the visitor destination
vds.filestor.queuesizeoperationSize of input message queue.
vds.filestor.averagequeuewaitmillisecondAverage time an operation spends in input queue.
vds.filestor.active_operations.sizeoperationNumber of concurrent active operations
vds.filestor.active_operations.latencymillisecondLatency (in ms) for completed operations
vds.filestor.throttle_window_sizeoperationCurrent size of async operation throttler window size
vds.filestor.throttle_waiting_threadsthreadNumber of threads waiting to acquire a throttle token
vds.filestor.throttle_active_tokensinstanceCurrent number of active throttle tokens
vds.filestor.allthreads.mergemetadatareadlatencymillisecondTime spent in a merge step to check metadata of current node to see what data it has.
vds.filestor.allthreads.mergedatareadlatencymillisecondTime spent in a merge step to read data other nodes need.
vds.filestor.allthreads.mergedatawritelatencymillisecondTime spent in a merge step to write data needed to current node.
vds.filestor.allthreads.mergeavgdatareceivedneededbyteAmount of data transferred from previous node in chain that we needed to apply locally.
vds.filestor.allthreads.mergebuckets.countrequestNumber of requests processed.
vds.filestor.allthreads.mergebuckets.failedrequestNumber of failed requests.
vds.filestor.allthreads.mergebuckets.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.mergelatencytotalmillisecondLatency of total merge operation, from master node receives it, until merge is complete and master node replies.
vds.filestor.allthreads.merge_put_latencymillisecondLatency of individual puts that are part of merge operations
vds.filestor.allthreads.merge_remove_latencymillisecondLatency of individual removes that are part of merge operations
vds.filestor.allstripes.throttled_rpc_direct_dispatchesinstanceNumber of times an RPC thread could not directly dispatch an async operation directly to Proton because it was disallowed by the throttle policy
vds.filestor.allstripes.throttled_persistence_thread_pollsinstanceNumber of times a persistence thread could not immediately dispatch a queued async operation because it was disallowed by the throttle policy
vds.filestor.allstripes.timeouts_waiting_for_throttle_tokeninstanceNumber of times a persistence thread timed out waiting for an available throttle policy token
vds.filestor.allstripes.averagequeuewaitmillisecondAverage time an operation spends in input queue.
vds.filestor.allthreads.put.countoperationNumber of requests processed.
vds.filestor.allthreads.put.failedoperationNumber of failed requests.
vds.filestor.allthreads.put.test_and_set_failedoperationNumber of operations that were skipped due to a test-and-set condition not met
vds.filestor.allthreads.put.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.put.request_sizebyteSize of requests, in bytes
vds.filestor.allthreads.remove.countoperationNumber of requests processed.
vds.filestor.allthreads.remove.failedoperationNumber of failed requests.
vds.filestor.allthreads.remove.test_and_set_failedoperationNumber of operations that were skipped due to a test-and-set condition not met
vds.filestor.allthreads.remove.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.remove.request_sizebyteSize of requests, in bytes
vds.filestor.allthreads.remove.not_foundrequestNumber of requests that could not be completed due to source document not found.
vds.filestor.allthreads.get.countoperationNumber of requests processed.
vds.filestor.allthreads.get.failedoperationNumber of failed requests.
vds.filestor.allthreads.get.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.get.request_sizebyteSize of requests, in bytes
vds.filestor.allthreads.get.not_foundrequestNumber of requests that could not be completed due to source document not found.
vds.filestor.allthreads.update.countrequestNumber of requests processed.
vds.filestor.allthreads.update.failedrequestNumber of failed requests.
vds.filestor.allthreads.update.test_and_set_failedrequestNumber of requests that were skipped due to a test-and-set condition not met
vds.filestor.allthreads.update.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.update.request_sizebyteSize of requests, in bytes
vds.filestor.allthreads.update.latency_readmillisecondLatency of the source read in the request.
vds.filestor.allthreads.update.not_foundrequestNumber of requests that could not be completed due to source document not found.
vds.filestor.allthreads.createiterator.countrequestNumber of requests processed.
vds.filestor.allthreads.createiterator.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.createiterator.failedrequestNumber of failed requests.
vds.filestor.allthreads.visit.countrequestNumber of requests processed.
vds.filestor.allthreads.visit.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.visit.docsdocumentNumber of entries read per iterate call
vds.filestor.allthreads.visit.failedrequestNumber of failed requests.
vds.filestor.allthreads.remove_location.countrequestNumber of requests processed.
vds.filestor.allthreads.remove_location.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.remove_location.failedrequestNumber of failed requests.
vds.filestor.allthreads.splitbuckets.countrequestNumber of requests processed.
vds.filestor.allthreads.splitbuckets.failedrequestNumber of failed requests.
vds.filestor.allthreads.splitbuckets.latencyrequestLatency of successful requests.
vds.filestor.allthreads.joinbuckets.countrequestNumber of requests processed.
vds.filestor.allthreads.joinbuckets.failedrequestNumber of failed requests.
vds.filestor.allthreads.joinbuckets.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.deletebuckets.countrequestNumber of requests processed.
vds.filestor.allthreads.deletebuckets.failedrequestNumber of failed requests.
vds.filestor.allthreads.deletebuckets.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.remove_by_gid.countrequestNumber of requests processed.
vds.filestor.allthreads.remove_by_gid.failedrequestNumber of failed requests.
vds.filestor.allthreads.remove_by_gid.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.setbucketstates.countrequestNumber of requests processed.
vds.filestor.allthreads.setbucketstates.failedrequestNumber of failed requests.
vds.filestor.allthreads.setbucketstates.latencymillisecondLatency of successful requests.
vds.mergethrottler.averagequeuewaitingtimemillisecondTime merges spent in the throttler queue
vds.mergethrottler.queuesizeinstanceLength of merge queue
vds.mergethrottler.active_window_sizeinstanceNumber of merges active within the pending window size
vds.mergethrottler.estimated_merge_memory_usagebyteAn estimated upper bound of the memory usage (in bytes) of the merges currently in the active window
vds.mergethrottler.bounced_due_to_back_pressureinstanceNumber of merges bounced due to resource exhaustion back-pressure
vds.mergethrottler.locallyexecutedmerges.okinstanceThe number of successful merges for 'locallyexecutedmerges'
vds.mergethrottler.locallyexecutedmerges.failures.abortedoperationThe number of merges that failed because the storage node was (most likely) shutting down
vds.mergethrottler.locallyexecutedmerges.failures.bucketnotfoundoperationThe number of operations that failed because the bucket did not exist
vds.mergethrottler.locallyexecutedmerges.failures.busyoperationThe number of merges that failed because the storage node was busy
vds.mergethrottler.locallyexecutedmerges.failures.existsoperationThe number of merges that were rejected due to a merge operation for their bucket already being processed
vds.mergethrottler.locallyexecutedmerges.failures.notreadyoperationThe number of merges discarded because distributor was not ready
vds.mergethrottler.locallyexecutedmerges.failures.otheroperationThe number of other failures
vds.mergethrottler.locallyexecutedmerges.failures.rejectedoperationThe number of merges that were rejected
vds.mergethrottler.locallyexecutedmerges.failures.timeoutoperationThe number of merges that failed because they timed out towards storage
vds.mergethrottler.locallyexecutedmerges.failures.totaloperationSum of all failures
vds.mergethrottler.locallyexecutedmerges.failures.wrongdistributionoperationThe number of merges that were discarded (flushed) because they were initiated at an older cluster state than the current
vds.mergethrottler.mergechains.okoperationThe number of successful merges for 'mergechains'
vds.mergethrottler.mergechains.failures.busyoperationThe number of merges that failed because the storage node was busy
vds.mergethrottler.mergechains.failures.totaloperationSum of all failures
vds.mergethrottler.mergechains.failures.existsoperationThe number of merges that were rejected due to a merge operation for their bucket already being processed
vds.mergethrottler.mergechains.failures.notreadyoperationThe number of merges discarded because distributor was not ready
vds.mergethrottler.mergechains.failures.otheroperationThe number of other failures
vds.mergethrottler.mergechains.failures.rejectedoperationThe number of merges that were rejected
vds.mergethrottler.mergechains.failures.timeoutoperationThe number of merges that failed because they timed out towards storage
vds.mergethrottler.mergechains.failures.wrongdistributionoperationThe number of merges that were discarded (flushed) because they were initiated at an older cluster state than the current
vds.server.network.tls-handshakes-failedoperationNumber of client or server connection attempts that failed during TLS handshaking
vds.server.network.peer-authorization-failuresfailureNumber of TLS connection attempts failed due to bad or missing peer certificate credentials
vds.server.network.client.tls-connections-establishedconnectionNumber of secure mTLS connections established
vds.server.network.server.tls-connections-establishedconnectionNumber of secure mTLS connections established
vds.server.network.client.insecure-connections-establishedconnectionNumber of insecure (plaintext) connections established
vds.server.network.server.insecure-connections-establishedconnectionNumber of insecure (plaintext) connections established
vds.server.network.tls-connections-brokenconnectionNumber of TLS connections broken due to failures during frame encoding or decoding
vds.server.network.failed-tls-config-reloadsfailureNumber of times background reloading of TLS config has failed
vds.bouncer.unavailable_node_abortsoperationNumber of operations that were aborted due to the node (or target bucket space) being unavailable
vds.changedbucketownershiphandler.avg_abort_processing_timemillisecondAverage time spent aborting operations for changed buckets
vds.changedbucketownershiphandler.external_load_ops_abortedoperationNumber of outdated external load operations aborted
vds.changedbucketownershiphandler.ideal_state_ops_abortedoperationNumber of outdated ideal state operations aborted
vds.communication.bucket_space_mapping_failuresoperationNumber of messages that could not be resolved to a known bucket space
vds.communication.convertfailuresoperationNumber of messages that failed to get converted to storage API messages
vds.communication.exceptionmessageprocesstimemillisecondTime transport thread uses to process a single message that fails with an exception thrown into communication manager
vds.communication.messageprocesstimemillisecondTime transport thread uses to process a single message
vds.communication.messagequeueitemSize of input message queue.
vds.communication.sendcommandlatencymillisecondAverage ms used to send commands to MBUS
vds.communication.sendreplylatencymillisecondAverage ms used to send replies to MBUS
vds.communication.toolittlememoryoperationNumber of messages failed due to too little memory available
vds.datastored.bucket_space.active_bucketsbucketNumber of active buckets in the bucket space
vds.datastored.bucket_space.bucket_db.memory_usage.allocated_bytesbyteThe number of allocated bytes
vds.datastored.bucket_space.bucket_db.memory_usage.dead_bytesbyteThe number of dead bytes ({`<=`} used_bytes)
vds.datastored.bucket_space.bucket_db.memory_usage.onhold_bytesbyteThe number of bytes on hold
vds.datastored.bucket_space.bucket_db.memory_usage.used_bytesbyteThe number of used bytes ({`<=`} allocated_bytes)
vds.datastored.bucket_space.buckets_totalbucketTotal number buckets present in the bucket space (ready + not ready)
vds.datastored.bucket_space.entriesdocumentNumber of entries (documents + tombstones) stored in the bucket space
vds.datastored.bucket_space.bytesbyteBytes stored across all documents in the bucket space
vds.datastored.bucket_space.docsdocumentDocuments stored in the bucket space
vds.datastored.bucket_space.ready_bucketsbucketNumber of ready buckets in the bucket space
vds.datastored.fullbucketinfolatencymillisecondAmount of time spent to process a full bucket info request
vds.datastored.fullbucketinforeqsizenodeAmount of distributors answered at once in full bucket info requests.
vds.datastored.simplebucketinforeqsizebucketAmount of buckets returned in simple bucket info requests
vds.filestor.allthreads.applybucketdiff.countrequestNumber of requests processed.
vds.filestor.allthreads.applybucketdiff.failedrequestNumber of failed requests.
vds.filestor.allthreads.applybucketdiff.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.applybucketdiffreplyrequestNumber of applybucketdiff replies that have been processed.
vds.filestor.allthreads.bucketfixedbucketNumber of times bucket has been fixed because of corruption
vds.filestor.allthreads.bucketverified.countrequestNumber of requests processed.
vds.filestor.allthreads.bucketverified.failedrequestNumber of failed requests.
vds.filestor.allthreads.bucketverified.latencyrequestLatency of successful requests.
vds.filestor.allthreads.bytesmergedbyteTotal number of bytes merged into this node.
vds.filestor.allthreads.createbuckets.countrequestNumber of requests processed.
vds.filestor.allthreads.createbuckets.failedrequestNumber of failed requests.
vds.filestor.allthreads.createbuckets.latencyrequestLatency of successful requests.
vds.filestor.allthreads.failedoperationsoperationNumber of operations throwing exceptions.
vds.filestor.allthreads.getbucketdiff.countrequestNumber of requests processed.
vds.filestor.allthreads.getbucketdiff.failedrequestNumber of failed requests.
vds.filestor.allthreads.getbucketdiff.latencyrequestLatency of successful requests.
vds.filestor.allthreads.getbucketdiffreplyrequestNumber of getbucketdiff replies that have been processed.
vds.filestor.allthreads.internaljoin.countrequestNumber of requests processed.
vds.filestor.allthreads.internaljoin.failedrequestNumber of failed requests.
vds.filestor.allthreads.internaljoin.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.movedbuckets.countrequestNumber of requests processed.
vds.filestor.allthreads.movedbuckets.failedrequestNumber of failed requests.
vds.filestor.allthreads.movedbuckets.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.operationsoperationNumber of operations processed.
vds.filestor.allthreads.readbucketinfo.countrequestNumber of requests processed.
vds.filestor.allthreads.readbucketinfo.failedrequestNumber of failed requests.
vds.filestor.allthreads.readbucketinfo.latencyrequestLatency of successful requests.
vds.filestor.allthreads.readbucketlist.countrequestNumber of requests processed.
vds.filestor.allthreads.readbucketlist.failedrequestNumber of failed requests.
vds.filestor.allthreads.readbucketlist.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.recheckbucketinfo.countrequestNumber of requests processed.
vds.filestor.allthreads.recheckbucketinfo.failedrequestNumber of failed requests.
vds.filestor.allthreads.recheckbucketinfo.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.revert.countrequestNumber of requests processed.
vds.filestor.allthreads.revert.failedrequestNumber of failed requests.
vds.filestor.allthreads.revert.latencymillisecondLatency of successful requests.
vds.filestor.allthreads.revert.not_foundrequestNumber of requests that could not be completed due to source document not found.
vds.filestor.allthreads.stat_bucket.countrequestNumber of requests processed.
vds.filestor.allthreads.stat_bucket.failedrequestNumber of failed requests.
vds.filestor.allthreads.stat_bucket.latencyrequestLatency of successful requests.
vds.filestor.bucket_db_init_latencymillisecondTime taken (in ms) to initialize bucket databases with information from the persistence provider
vds.filestor.directoryeventsoperationNumber of directory events received.
vds.filestor.diskeventsoperationNumber of disk events received.
vds.filestor.partitioneventsoperationNumber of partition events received.
vds.filestor.pendingmergebucketNumber of buckets currently being merged.
vds.filestor.waitingforlockrateoperationAmount of times a filestor thread has needed to wait for lock to take next message in queue.
vds.mergethrottler.mergechains.failures.abortedoperationThe number of merges that failed because the storage node was (most likely) shutting down
vds.mergethrottler.mergechains.failures.bucketnotfoundoperationThe number of operations that failed because the bucket did not exist
vds.server.memoryusagebyteAmount of memory used by the storage subsystem
vds.server.memoryusage_visitingbyteMessage use from visiting
vds.server.message_memory_use.highpribyteMessage use from high priority storage messages
vds.server.message_memory_use.lowpribyteMessage use from low priority storage messages
vds.server.message_memory_use.normalpribyteMessage use from normal priority storage messages
vds.server.message_memory_use.totalbyteMessage use from storage messages
vds.server.message_memory_use.veryhighpribyteMessage use from very high priority storage messages
vds.state_manager.invoke_state_listeners_latencymillisecondTime spent (in ms) propagating state changes to internal state listeners
vds.visitor.cv_queueevictedwaittimemillisecondMilliseconds waiting in create visitor queue, for visitors that was evicted from queue due to higher priority visitors coming
vds.visitor.cv_queuefulloperationNumber of create visitor messages failed as queue is full
vds.visitor.cv_queuesizeitemSize of create visitor queue
vds.visitor.cv_queuetimeoutwaittimemillisecondMilliseconds waiting in create visitor queue, for visitors that timed out while in the visitor queue
vds.visitor.cv_queuewaittimemillisecondMilliseconds waiting in create visitor queue, for visitors that was added to visitor queue but scheduled later
vds.visitor.cv_skipqueueoperationNumber of times we could skip queue as we had free visitor spots
vds.server.network.rpc-capability-checks-failedfailureNumber of RPC operations that failed due to one or more missing capabilities
vds.server.network.status-capability-checks-failedfailureNumber of status page operations that failed due to one or more missing capabilities
vds.server.fnet.num-connectionsconnectionTotal number of connection objects
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/metrics/vespa-metric-set.mdx b/mintlify-docs/en/reference/operations/metrics/vespa-metric-set.mdx index 9fe82d7e4e..34577141a5 100644 --- a/mintlify-docs/en/reference/operations/metrics/vespa-metric-set.mdx +++ b/mintlify-docs/en/reference/operations/metrics/vespa-metric-set.mdx @@ -6,565 +6,3255 @@ This document provides reference documentation for the Vespa metric set, includi ## ClusterController Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| cluster-controller.down.count | node | last, max | Number of content nodes down | -| cluster-controller.initializing.count | node | last, max | Number of content nodes initializing | -| cluster-controller.maintenance.count | node | last, max | Number of content nodes in maintenance | -| cluster-controller.retired.count | node | last, max | Number of content nodes that are retired | -| cluster-controller.stopping.count | node | last | Number of content nodes currently stopping | -| cluster-controller.up.count | node | last, max | Number of content nodes up | -| cluster-controller.nodes-not-converged | node | max | Number of nodes not converging to the latest cluster state version | -| cluster-controller.stored-document-count | document | max | Total number of unique documents stored in the cluster | -| cluster-controller.stored-document-bytes | byte | max | Combined byte size of all unique documents stored in the cluster (not including replication) | -| cluster-controller.cluster-buckets-out-of-sync-ratio | fraction | max | Ratio of buckets in the cluster currently in need of syncing | -| cluster-controller.busy-tick-time-ms | millisecond | count, last, max, sum | Time busy | -| cluster-controller.idle-tick-time-ms | millisecond | count, last, max, sum | Time idle | -| cluster-controller.work-ms | millisecond | count, last, sum | Time used for actual work | -| cluster-controller.is-master | binary | last, max | 1 if this cluster controller is currently the master, or 0 if not | -| cluster-controller.remote-task-queue.size | operation | last | Number of remote tasks queued | -| cluster-controller.resource\_usage.nodes\_above\_limit | node | last, max | The number of content nodes above resource limit, blocking feed | -| cluster-controller.resource\_usage.max\_memory\_utilization | fraction | last, max | Current memory utilisation, for content node with the highest value | -| cluster-controller.resource\_usage.max\_disk\_utilization | fraction | last, max | Current disk space utilisation, for content node with the highest value | -| cluster-controller.resource\_usage.memory\_limit | fraction | last, max | Memory space limit as a fraction of available memory | -| cluster-controller.resource\_usage.disk\_limit | fraction | last, max | Disk space limit as a fraction of available disk space | -| reindexing.progress | fraction | last, max | Re-indexing progress | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
cluster-controller.down.countnodelast, maxNumber of content nodes down
cluster-controller.initializing.countnodelast, maxNumber of content nodes initializing
cluster-controller.maintenance.countnodelast, maxNumber of content nodes in maintenance
cluster-controller.retired.countnodelast, maxNumber of content nodes that are retired
cluster-controller.stopping.countnodelastNumber of content nodes currently stopping
cluster-controller.up.countnodelast, maxNumber of content nodes up
cluster-controller.nodes-not-convergednodemaxNumber of nodes not converging to the latest cluster state version
cluster-controller.stored-document-countdocumentmaxTotal number of unique documents stored in the cluster
cluster-controller.stored-document-bytesbytemaxCombined byte size of all unique documents stored in the cluster (not including replication)
cluster-controller.cluster-buckets-out-of-sync-ratiofractionmaxRatio of buckets in the cluster currently in need of syncing
cluster-controller.busy-tick-time-msmillisecondcount, last, max, sumTime busy
cluster-controller.idle-tick-time-msmillisecondcount, last, max, sumTime idle
cluster-controller.work-msmillisecondcount, last, sumTime used for actual work
cluster-controller.is-masterbinarylast, max1 if this cluster controller is currently the master, or 0 if not
cluster-controller.remote-task-queue.sizeoperationlastNumber of remote tasks queued
cluster-controller.resource_usage.nodes_above_limitnodelast, maxThe number of content nodes above resource limit, blocking feed
cluster-controller.resource_usage.max_memory_utilizationfractionlast, maxCurrent memory utilisation, for content node with the highest value
cluster-controller.resource_usage.max_disk_utilizationfractionlast, maxCurrent disk space utilisation, for content node with the highest value
cluster-controller.resource_usage.memory_limitfractionlast, maxMemory space limit as a fraction of available memory
cluster-controller.resource_usage.disk_limitfractionlast, maxDisk space limit as a fraction of available disk space
reindexing.progressfractionlast, maxRe-indexing progress
## Container Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| http.status.1xx | response | rate | Number of responses with a 1xx status | -| http.status.2xx | response | rate | Number of responses with a 2xx status | -| http.status.3xx | response | rate | Number of responses with a 3xx status | -| http.status.4xx | response | rate | Number of responses with a 4xx status | -| http.status.5xx | response | rate | Number of responses with a 5xx status | -| application\_generation | version | N/A | The currently live application config generation (aka session id) | -| jdisc.gc.count | operation | average, last, max | Number of JVM garbage collections done | -| jdisc.gc.ms | millisecond | average, last, max | Time spent in JVM garbage collection | -| jdisc.jvm | version | last | JVM runtime version | -| jdisc.memory\_mappings | operation | max | JDISC Memory mappings | -| jdisc.open\_file\_descriptors | item | max | JDISC Open file descriptors | -| jdisc.thread\_pool.unhandled\_exceptions | thread | count, last, max, min, sum | Number of exceptions thrown by tasks | -| jdisc.thread\_pool.work\_queue.capacity | thread | count, last, max, min, sum | Capacity of the task queue | -| jdisc.thread\_pool.work\_queue.size | thread | count, last, max, min, sum | Size of the task queue | -| jdisc.thread\_pool.rejected\_tasks | thread | count, last, max, min, sum | Number of tasks rejected by the thread pool | -| jdisc.thread\_pool.size | thread | count, last, max, min, sum | Size of the thread pool | -| jdisc.thread\_pool.max\_allowed\_size | thread | count, last, max, min, sum | The maximum allowed number of threads in the pool | -| jdisc.thread\_pool.active\_threads | thread | count, last, max, min, sum | Number of threads that are active | -| jdisc.deactivated\_containers.total | item | last, sum | JDISC Deactivated container instances | -| jdisc.deactivated\_containers.with\_retained\_refs.last | item | last | JDISC Deactivated container nodes with retained refs | -| jdisc.application.failed\_component\_graphs | item | rate | JDISC Application failed component graphs | -| jdisc.application.component\_graph.creation\_time\_millis | millisecond | last | JDISC Application component graph creation time | -| jdisc.application.component\_graph.reconfigurations | item | rate | JDISC Application component graph reconfigurations | -| jdisc.singleton.is\_active | item | last, max, min | JDISC Singleton is active | -| jdisc.singleton.activation.count | operation | last | JDISC Singleton activations | -| jdisc.singleton.activation.failure.count | operation | last | JDISC Singleton activation failures | -| jdisc.singleton.activation.millis | millisecond | last | JDISC Singleton activation time | -| jdisc.singleton.deactivation.count | operation | last | JDISC Singleton deactivations | -| jdisc.singleton.deactivation.failure.count | operation | last | JDISC Singleton deactivation failures | -| jdisc.singleton.deactivation.millis | millisecond | last | JDISC Singleton deactivation time | -| jdisc.http.ssl.handshake.failure.missing\_client\_cert | operation | rate | JDISC HTTP SSL Handshake failures due to missing client certificate | -| jdisc.http.ssl.handshake.failure.expired\_client\_cert | operation | rate | JDISC HTTP SSL Handshake failures due to expired client certificate | -| jdisc.http.ssl.handshake.failure.invalid\_client\_cert | operation | rate | JDISC HTTP SSL Handshake failures due to invalid client certificate | -| jdisc.http.ssl.handshake.failure.incompatible\_protocols | operation | rate | JDISC HTTP SSL Handshake failures due to incompatible protocols | -| jdisc.http.ssl.handshake.failure.incompatible\_chifers | operation | rate | JDISC HTTP SSL Handshake failures due to incompatible chifers | -| jdisc.http.ssl.handshake.failure.connection\_closed | operation | rate | JDISC HTTP SSL Handshake failures due to connection closed | -| jdisc.http.ssl.handshake.failure.unknown | operation | rate | JDISC HTTP SSL Handshake failures for unknown reason | -| jdisc.http.latency | millisecond | count, max, sum | Request latency including the HTTP layer | -| jdisc.http.request.prematurely\_closed | request | rate | HTTP requests prematurely closed | -| jdisc.http.request.requests\_per\_connection | request | average, count, max, min, sum | HTTP requests per connection | -| jdisc.http.request.uri\_length | byte | count, max, sum | HTTP URI length | -| jdisc.http.request.content\_size | byte | count, max, sum | HTTP request content size | -| jdisc.http.requests | request | count, rate | HTTP requests | -| jdisc.http.filter.rule.blocked\_requests | request | rate | Number of requests blocked by filter | -| jdisc.http.filter.rule.allowed\_requests | request | rate | Number of requests allowed by filter | -| jdisc.http.filtering.request.handled | request | rate | Number of filtering requests handled | -| jdisc.http.filtering.request.unhandled | request | rate | Number of filtering requests unhandled | -| jdisc.http.filtering.response.handled | request | rate | Number of filtering responses handled | -| jdisc.http.filtering.response.unhandled | request | rate | Number of filtering responses unhandled | -| jdisc.http.handler.unhandled\_exceptions | request | rate | Number of unhandled exceptions in handler | -| jdisc.tls.capability\_checks.succeeded | operation | rate | Number of TLS capability checks succeeded | -| jdisc.tls.capability\_checks.failed | operation | rate | Number of TLS capability checks failed | -| jdisc.http.jetty.threadpool.thread.max | thread | count, last, max, min, sum | Configured maximum number of threads | -| jdisc.http.jetty.threadpool.thread.min | thread | count, last, max, min, sum | Configured minimum number of threads | -| jdisc.http.jetty.threadpool.thread.reserved | thread | count, last, max, min, sum | Configured number of reserved threads or -1 for heuristic | -| jdisc.http.jetty.threadpool.thread.busy | thread | count, last, max, min, sum | Number of threads executing internal and transient jobs | -| jdisc.http.jetty.threadpool.thread.total | thread | count, last, max, min, sum | Current number of threads | -| jdisc.http.jetty.threadpool.queue.size | thread | count, last, max, min, sum | Current size of the job queue | -| jdisc.http.jetty.http\_compliance.violation | failure | rate | Number of HTTP compliance violations | -| serverNumOpenConnections | connection | average, last, max | The number of currently open connections | -| serverNumConnections | connection | average, last, max | The total number of connections opened | -| serverBytesReceived | byte | count, sum | The number of bytes received by the server | -| serverBytesSent | byte | count, sum | The number of bytes sent from the server | -| handled.requests | operation | count | The number of requests handled per metrics snapshot | -| handled.latency | millisecond | count, max, sum | The time used for handling requests, excluding HTTP layer and rendering | -| httpapi\_latency | millisecond | count, max, sum | Duration for requests to the HTTP document APIs | -| httpapi\_pending | operation | count, max, sum | Document operations pending execution | -| httpapi\_num\_operations | operation | rate | Total number of document operations performed | -| httpapi\_num\_updates | operation | rate | Document update operations performed | -| httpapi\_num\_removes | operation | rate | Document remove operations performed | -| httpapi\_num\_puts | operation | rate | Document put operations performed | -| httpapi\_succeeded | operation | rate | Document operations that succeeded | -| httpapi\_failed | operation | rate | Document operations that failed | -| httpapi\_parse\_error | operation | rate | Document operations that failed due to document parse errors | -| httpapi\_condition\_not\_met | operation | rate | Document operations not applied due to condition not met | -| httpapi\_not\_found | operation | rate | Document operations not applied due to document not found | -| httpapi\_failed\_unknown | operation | rate | Document operations failed by unknown cause | -| httpapi\_failed\_timeout | operation | rate | Document operations failed by timeout | -| httpapi\_failed\_insufficient\_storage | operation | rate | Document operations failed by insufficient storage | -| httpapi\_queued\_operations | operation | last | Document operations queued for execution in /document/v1 API handler | -| httpapi\_queued\_bytes | byte | last | Total operation bytes queued for execution in /document/v1 API handler | -| httpapi\_queued\_age | second | last | Age in seconds of the oldest operation in the queue for /document/v1 API handler | -| httpapi\_mbus\_window\_size | operation | last | The window size of Messagebus's dynamic throttle policy for /document/v1 API handler | -| mem.heap.total | byte | average | Total available heap memory | -| mem.heap.free | byte | average | Free heap memory | -| mem.heap.used | byte | average, max | Currently used heap memory | -| mem.direct.total | byte | average | Total available direct memory | -| mem.direct.free | byte | average | Currently free direct memory | -| mem.direct.used | byte | average, max | Direct memory currently used | -| mem.direct.count | byte | max | Number of direct memory allocations | -| mem.native.total | byte | average | Total available native memory | -| mem.native.free | byte | average | Currently free native memory | -| mem.native.used | byte | average | Native memory currently used | -| athenz-tenant-cert.expiry.seconds | second | last, max, min | Time remaining until Athenz tenant certificate expires | -| container-iam-role.expiry.seconds | second | N/A | Time remaining until IAM role expires | -| peak\_qps | query\_per\_second | max | The highest number of qps for a second for this metrics snapshot | -| search\_connections | connection | count, max, sum | Number of search connections | -| feed.operations | operation | rate | Number of document feed operations | -| feed.latency | millisecond | count, max, sum | Feed latency | -| feed.http-requests | operation | count, rate | Feed HTTP requests | -| queries | operation | rate | Query volume | -| query\_container\_latency | millisecond | count, max, sum | The query execution time consumed in the container | -| query\_latency | millisecond | count, max, sum | The overall query latency as observed by the container cluster, excluding HTTP layer and rendering | -| query\_timeout | millisecond | count, max, min, sum | The amount of time allowed for query execution, from the client | -| failed\_queries | operation | rate | The number of failed queries | -| degraded\_queries | operation | rate | The number of degraded queries, e.g. due to some content nodes not responding in time | -| hits\_per\_query | hit\_per\_query | count, max, sum | The number of hits returned | -| query\_hit\_offset | hit | count, max, sum | The offset for hits returned | -| documents\_covered | document | count | The combined number of documents considered during query evaluation | -| documents\_total | document | count | The number of documents to be evaluated if all requests had been fully executed | -| documents\_target\_total | document | count | The target number of total documents to be evaluated when all data is in sync | -| jdisc.render.latency | nanosecond | average, count, last, max, min, sum | The time used by the container to render responses | -| query\_item\_count | item | count, max, sum | The number of query items (terms, phrases, etc.) | -| docproc.proctime | millisecond | count, max, sum | Time spent processing document | -| docproc.documents | document | count, max, min, sum | Number of processed documents | -| totalhits\_per\_query | hit\_per\_query | count, max, sum | The total number of documents found to match queries | -| empty\_results | operation | rate | Number of queries matching no documents | -| requestsOverQuota | operation | count, rate | The number of requests rejected due to exceeding quota | -| relevance.at\_1 | score | count, sum | The relevance of hit number 1 | -| relevance.at\_3 | score | count, sum | The relevance of hit number 3 | -| relevance.at\_10 | score | count, sum | The relevance of hit number 10 | -| error.timeout | operation | rate | Requests that timed out | -| error.backends\_oos | operation | rate | Requests that failed due to no available backends nodes | -| error.plugin\_failure | operation | rate | Requests that failed due to plugin failure | -| error.backend\_communication\_error | operation | rate | Requests that failed due to backend communication error | -| error.empty\_document\_summaries | operation | rate | Requests that failed due to missing document summaries | -| error.invalid\_query\_parameter | operation | rate | Requests that failed due to invalid query parameters | -| error.internal\_server\_error | operation | rate | Requests that failed due to internal server error | -| error.misconfigured\_server | operation | rate | Requests that failed due to misconfigured server | -| error.invalid\_query\_transformation | operation | rate | Requests that failed due to invalid query transformation | -| error.results\_with\_errors | operation | rate | The number of queries with error payload | -| error.unspecified | operation | rate | Requests that failed for an unspecified reason | -| error.unhandled\_exception | operation | rate | Requests that failed due to an unhandled exception | -| serverRejectedRequests | operation | count, rate | Deprecated. Use jdisc.thread\_pool.rejected\_tasks instead. | -| serverThreadPoolSize | thread | last, max | Deprecated. Use jdisc.thread\_pool.size instead. | -| serverActiveThreads | thread | count, last, max, min, sum | Deprecated. Use jdisc.thread\_pool.active\_threads instead. | -| jrt.transport.tls-certificate-verification-failures | failure | N/A | TLS certificate verification failures | -| jrt.transport.peer-authorization-failures | failure | N/A | TLS peer authorization failures | -| jrt.transport.server.tls-connections-established | connection | N/A | TLS server connections established | -| jrt.transport.client.tls-connections-established | connection | N/A | TLS client connections established | -| jrt.transport.server.unencrypted-connections-established | connection | N/A | Unencrypted server connections established | -| jrt.transport.client.unencrypted-connections-established | connection | N/A | Unencrypted client connections established | -| embedder.latency | millisecond | count, max, sum | Time spent creating an embedding | -| embedder.sequence\_length | item | count, max, sum | Number of tokens in the input sequence | -| embedder.request.count | request | count | Number of embedder API requests | -| embedder.request.failure.count | request | count | Number of failed embedder API requests | -| embedder.batch.size | item | count, max, sum | Number of items in each dispatched batch | -| embedder.batch.queue\_time | millisecond | count, max, sum | Time spent waiting in queue before batch dispatch | -| embedder.batch.count | operation | count | Number of batch dispatches | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
http.status.1xxresponserateNumber of responses with a 1xx status
http.status.2xxresponserateNumber of responses with a 2xx status
http.status.3xxresponserateNumber of responses with a 3xx status
http.status.4xxresponserateNumber of responses with a 4xx status
http.status.5xxresponserateNumber of responses with a 5xx status
application_generationversionN/AThe currently live application config generation (aka session id)
jdisc.gc.countoperationaverage, last, maxNumber of JVM garbage collections done
jdisc.gc.msmillisecondaverage, last, maxTime spent in JVM garbage collection
jdisc.jvmversionlastJVM runtime version
jdisc.memory_mappingsoperationmaxJDISC Memory mappings
jdisc.open_file_descriptorsitemmaxJDISC Open file descriptors
jdisc.thread_pool.unhandled_exceptionsthreadcount, last, max, min, sumNumber of exceptions thrown by tasks
jdisc.thread_pool.work_queue.capacitythreadcount, last, max, min, sumCapacity of the task queue
jdisc.thread_pool.work_queue.sizethreadcount, last, max, min, sumSize of the task queue
jdisc.thread_pool.rejected_tasksthreadcount, last, max, min, sumNumber of tasks rejected by the thread pool
jdisc.thread_pool.sizethreadcount, last, max, min, sumSize of the thread pool
jdisc.thread_pool.max_allowed_sizethreadcount, last, max, min, sumThe maximum allowed number of threads in the pool
jdisc.thread_pool.active_threadsthreadcount, last, max, min, sumNumber of threads that are active
jdisc.deactivated_containers.totalitemlast, sumJDISC Deactivated container instances
jdisc.deactivated_containers.with_retained_refs.lastitemlastJDISC Deactivated container nodes with retained refs
jdisc.application.failed_component_graphsitemrateJDISC Application failed component graphs
jdisc.application.component_graph.creation_time_millismillisecondlastJDISC Application component graph creation time
jdisc.application.component_graph.reconfigurationsitemrateJDISC Application component graph reconfigurations
jdisc.singleton.is_activeitemlast, max, minJDISC Singleton is active
jdisc.singleton.activation.countoperationlastJDISC Singleton activations
jdisc.singleton.activation.failure.countoperationlastJDISC Singleton activation failures
jdisc.singleton.activation.millismillisecondlastJDISC Singleton activation time
jdisc.singleton.deactivation.countoperationlastJDISC Singleton deactivations
jdisc.singleton.deactivation.failure.countoperationlastJDISC Singleton deactivation failures
jdisc.singleton.deactivation.millismillisecondlastJDISC Singleton deactivation time
jdisc.http.ssl.handshake.failure.missing_client_certoperationrateJDISC HTTP SSL Handshake failures due to missing client certificate
jdisc.http.ssl.handshake.failure.expired_client_certoperationrateJDISC HTTP SSL Handshake failures due to expired client certificate
jdisc.http.ssl.handshake.failure.invalid_client_certoperationrateJDISC HTTP SSL Handshake failures due to invalid client certificate
jdisc.http.ssl.handshake.failure.incompatible_protocolsoperationrateJDISC HTTP SSL Handshake failures due to incompatible protocols
jdisc.http.ssl.handshake.failure.incompatible_chifersoperationrateJDISC HTTP SSL Handshake failures due to incompatible chifers
jdisc.http.ssl.handshake.failure.connection_closedoperationrateJDISC HTTP SSL Handshake failures due to connection closed
jdisc.http.ssl.handshake.failure.unknownoperationrateJDISC HTTP SSL Handshake failures for unknown reason
jdisc.http.latencymillisecondcount, max, sumRequest latency including the HTTP layer
jdisc.http.request.prematurely_closedrequestrateHTTP requests prematurely closed
jdisc.http.request.requests_per_connectionrequestaverage, count, max, min, sumHTTP requests per connection
jdisc.http.request.uri_lengthbytecount, max, sumHTTP URI length
jdisc.http.request.content_sizebytecount, max, sumHTTP request content size
jdisc.http.requestsrequestcount, rateHTTP requests
jdisc.http.filter.rule.blocked_requestsrequestrateNumber of requests blocked by filter
jdisc.http.filter.rule.allowed_requestsrequestrateNumber of requests allowed by filter
jdisc.http.filtering.request.handledrequestrateNumber of filtering requests handled
jdisc.http.filtering.request.unhandledrequestrateNumber of filtering requests unhandled
jdisc.http.filtering.response.handledrequestrateNumber of filtering responses handled
jdisc.http.filtering.response.unhandledrequestrateNumber of filtering responses unhandled
jdisc.http.handler.unhandled_exceptionsrequestrateNumber of unhandled exceptions in handler
jdisc.tls.capability_checks.succeededoperationrateNumber of TLS capability checks succeeded
jdisc.tls.capability_checks.failedoperationrateNumber of TLS capability checks failed
jdisc.http.jetty.threadpool.thread.maxthreadcount, last, max, min, sumConfigured maximum number of threads
jdisc.http.jetty.threadpool.thread.minthreadcount, last, max, min, sumConfigured minimum number of threads
jdisc.http.jetty.threadpool.thread.reservedthreadcount, last, max, min, sumConfigured number of reserved threads or -1 for heuristic
jdisc.http.jetty.threadpool.thread.busythreadcount, last, max, min, sumNumber of threads executing internal and transient jobs
jdisc.http.jetty.threadpool.thread.totalthreadcount, last, max, min, sumCurrent number of threads
jdisc.http.jetty.threadpool.queue.sizethreadcount, last, max, min, sumCurrent size of the job queue
jdisc.http.jetty.http_compliance.violationfailurerateNumber of HTTP compliance violations
serverNumOpenConnectionsconnectionaverage, last, maxThe number of currently open connections
serverNumConnectionsconnectionaverage, last, maxThe total number of connections opened
serverBytesReceivedbytecount, sumThe number of bytes received by the server
serverBytesSentbytecount, sumThe number of bytes sent from the server
handled.requestsoperationcountThe number of requests handled per metrics snapshot
handled.latencymillisecondcount, max, sumThe time used for handling requests, excluding HTTP layer and rendering
httpapi_latencymillisecondcount, max, sumDuration for requests to the HTTP document APIs
httpapi_pendingoperationcount, max, sumDocument operations pending execution
httpapi_num_operationsoperationrateTotal number of document operations performed
httpapi_num_updatesoperationrateDocument update operations performed
httpapi_num_removesoperationrateDocument remove operations performed
httpapi_num_putsoperationrateDocument put operations performed
httpapi_succeededoperationrateDocument operations that succeeded
httpapi_failedoperationrateDocument operations that failed
httpapi_parse_erroroperationrateDocument operations that failed due to document parse errors
httpapi_condition_not_metoperationrateDocument operations not applied due to condition not met
httpapi_not_foundoperationrateDocument operations not applied due to document not found
httpapi_failed_unknownoperationrateDocument operations failed by unknown cause
httpapi_failed_timeoutoperationrateDocument operations failed by timeout
httpapi_failed_insufficient_storageoperationrateDocument operations failed by insufficient storage
httpapi_queued_operationsoperationlastDocument operations queued for execution in /document/v1 API handler
httpapi_queued_bytesbytelastTotal operation bytes queued for execution in /document/v1 API handler
httpapi_queued_agesecondlastAge in seconds of the oldest operation in the queue for /document/v1 API handler
httpapi_mbus_window_sizeoperationlastThe window size of Messagebus's dynamic throttle policy for /document/v1 API handler
mem.heap.totalbyteaverageTotal available heap memory
mem.heap.freebyteaverageFree heap memory
mem.heap.usedbyteaverage, maxCurrently used heap memory
mem.direct.totalbyteaverageTotal available direct memory
mem.direct.freebyteaverageCurrently free direct memory
mem.direct.usedbyteaverage, maxDirect memory currently used
mem.direct.countbytemaxNumber of direct memory allocations
mem.native.totalbyteaverageTotal available native memory
mem.native.freebyteaverageCurrently free native memory
mem.native.usedbyteaverageNative memory currently used
athenz-tenant-cert.expiry.secondssecondlast, max, minTime remaining until Athenz tenant certificate expires
container-iam-role.expiry.secondssecondN/ATime remaining until IAM role expires
peak_qpsquery_per_secondmaxThe highest number of qps for a second for this metrics snapshot
search_connectionsconnectioncount, max, sumNumber of search connections
feed.operationsoperationrateNumber of document feed operations
feed.latencymillisecondcount, max, sumFeed latency
feed.http-requestsoperationcount, rateFeed HTTP requests
queriesoperationrateQuery volume
query_container_latencymillisecondcount, max, sumThe query execution time consumed in the container
query_latencymillisecondcount, max, sumThe overall query latency as observed by the container cluster, excluding HTTP layer and rendering
query_timeoutmillisecondcount, max, min, sumThe amount of time allowed for query execution, from the client
failed_queriesoperationrateThe number of failed queries
degraded_queriesoperationrateThe number of degraded queries, e.g. due to some content nodes not responding in time
hits_per_queryhit_per_querycount, max, sumThe number of hits returned
query_hit_offsethitcount, max, sumThe offset for hits returned
documents_covereddocumentcountThe combined number of documents considered during query evaluation
documents_totaldocumentcountThe number of documents to be evaluated if all requests had been fully executed
documents_target_totaldocumentcountThe target number of total documents to be evaluated when all data is in sync
jdisc.render.latencynanosecondaverage, count, last, max, min, sumThe time used by the container to render responses
query_item_countitemcount, max, sumThe number of query items (terms, phrases, etc.)
docproc.proctimemillisecondcount, max, sumTime spent processing document
docproc.documentsdocumentcount, max, min, sumNumber of processed documents
totalhits_per_queryhit_per_querycount, max, sumThe total number of documents found to match queries
empty_resultsoperationrateNumber of queries matching no documents
requestsOverQuotaoperationcount, rateThe number of requests rejected due to exceeding quota
relevance.at_1scorecount, sumThe relevance of hit number 1
relevance.at_3scorecount, sumThe relevance of hit number 3
relevance.at_10scorecount, sumThe relevance of hit number 10
error.timeoutoperationrateRequests that timed out
error.backends_oosoperationrateRequests that failed due to no available backends nodes
error.plugin_failureoperationrateRequests that failed due to plugin failure
error.backend_communication_erroroperationrateRequests that failed due to backend communication error
error.empty_document_summariesoperationrateRequests that failed due to missing document summaries
error.invalid_query_parameteroperationrateRequests that failed due to invalid query parameters
error.internal_server_erroroperationrateRequests that failed due to internal server error
error.misconfigured_serveroperationrateRequests that failed due to misconfigured server
error.invalid_query_transformationoperationrateRequests that failed due to invalid query transformation
error.results_with_errorsoperationrateThe number of queries with error payload
error.unspecifiedoperationrateRequests that failed for an unspecified reason
error.unhandled_exceptionoperationrateRequests that failed due to an unhandled exception
serverRejectedRequestsoperationcount, rateDeprecated. Use jdisc.thread_pool.rejected_tasks instead.
serverThreadPoolSizethreadlast, maxDeprecated. Use jdisc.thread_pool.size instead.
serverActiveThreadsthreadcount, last, max, min, sumDeprecated. Use jdisc.thread_pool.active_threads instead.
jrt.transport.tls-certificate-verification-failuresfailureN/ATLS certificate verification failures
jrt.transport.peer-authorization-failuresfailureN/ATLS peer authorization failures
jrt.transport.server.tls-connections-establishedconnectionN/ATLS server connections established
jrt.transport.client.tls-connections-establishedconnectionN/ATLS client connections established
jrt.transport.server.unencrypted-connections-establishedconnectionN/AUnencrypted server connections established
jrt.transport.client.unencrypted-connections-establishedconnectionN/AUnencrypted client connections established
embedder.latencymillisecondcount, max, sumTime spent creating an embedding
embedder.sequence_lengthitemcount, max, sumNumber of tokens in the input sequence
embedder.request.countrequestcountNumber of embedder API requests
embedder.request.failure.countrequestcountNumber of failed embedder API requests
embedder.batch.sizeitemcount, max, sumNumber of items in each dispatched batch
embedder.batch.queue_timemillisecondcount, max, sumTime spent waiting in queue before batch dispatch
embedder.batch.countoperationcountNumber of batch dispatches
## Distributor Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| vds.idealstate.buckets\_rechecking | bucket | average | The number of buckets that we are rechecking for ideal state operations | -| vds.idealstate.idealstate\_diff | bucket | average | A number representing the current difference from the ideal state. This is a number that decreases steadily as the system is getting closer to the ideal state | -| vds.idealstate.buckets\_toofewcopies | bucket | average | The number of buckets the distributor controls that have less than the desired redundancy | -| vds.idealstate.buckets\_toomanycopies | bucket | average | The number of buckets the distributor controls that have more than the desired redundancy | -| vds.idealstate.buckets | bucket | average | The number of buckets the distributor controls | -| vds.idealstate.buckets\_notrusted | bucket | average | The number of buckets that have no trusted copies. | -| vds.idealstate.bucket\_replicas\_moving\_out | bucket | average | Bucket replicas that should be moved out, e.g. retirement case or node added to cluster that has higher ideal state priority. | -| vds.idealstate.bucket\_replicas\_copying\_out | bucket | average | Bucket replicas that should be copied out, e.g. node is in ideal state but might have to provide data other nodes in a merge | -| vds.idealstate.bucket\_replicas\_copying\_in | bucket | average | Bucket replicas that should be copied in, e.g. node does not have a replica for a bucket that it is in ideal state for | -| vds.idealstate.bucket\_replicas\_syncing | bucket | average | Bucket replicas that need syncing due to mismatching metadata | -| vds.idealstate.max\_observed\_time\_since\_last\_gc\_sec | second | average | Maximum time (in seconds) since GC was last successfully run for a bucket. Aggregated max value across all buckets on the distributor. | -| vds.idealstate.delete\_bucket.done\_ok | operation | rate | The number of operations successfully performed | -| vds.idealstate.delete\_bucket.done\_failed | operation | rate | The number of operations that failed | -| vds.idealstate.delete\_bucket.pending | operation | average | The number of operations pending | -| vds.idealstate.merge\_bucket.done\_ok | operation | rate | The number of operations successfully performed | -| vds.idealstate.merge\_bucket.done\_failed | operation | rate | The number of operations that failed | -| vds.idealstate.merge\_bucket.pending | operation | average | The number of operations pending | -| vds.idealstate.merge\_bucket.blocked | operation | rate | The number of operations blocked by blocking operation starter | -| vds.idealstate.merge\_bucket.throttled | operation | rate | The number of operations throttled by throttling operation starter | -| vds.idealstate.merge\_bucket.source\_only\_copy\_changed | operation | rate | The number of merge operations where source-only copy changed | -| vds.idealstate.merge\_bucket.source\_only\_copy\_delete\_blocked | operation | rate | The number of merge operations where delete of unchanged source-only copies was blocked | -| vds.idealstate.merge\_bucket.source\_only\_copy\_delete\_failed | operation | rate | The number of merge operations where delete of unchanged source-only copies failed | -| vds.idealstate.split\_bucket.done\_ok | operation | rate | The number of operations successfully performed | -| vds.idealstate.split\_bucket.done\_failed | operation | rate | The number of operations that failed | -| vds.idealstate.split\_bucket.pending | operation | average | The number of operations pending | -| vds.idealstate.join\_bucket.done\_ok | operation | rate | The number of operations successfully performed | -| vds.idealstate.join\_bucket.done\_failed | operation | rate | The number of operations that failed | -| vds.idealstate.join\_bucket.pending | operation | average | The number of operations pending | -| vds.idealstate.garbage\_collection.done\_ok | operation | rate | The number of operations successfully performed | -| vds.idealstate.garbage\_collection.done\_failed | operation | rate | The number of operations that failed | -| vds.idealstate.garbage\_collection.pending | operation | average | The number of operations pending | -| vds.idealstate.garbage\_collection.documents\_removed | document | count, rate | Number of documents removed by GC operations | -| vds.distributor.puts.latency | millisecond | count, max, sum | The latency of put operations | -| vds.distributor.puts.ok | operation | rate | The number of successful put operations performed | -| vds.distributor.puts.failures.total | operation | rate | Sum of all failures | -| vds.distributor.puts.failures.notfound | operation | rate | The number of operations that failed because the document did not exist | -| vds.distributor.puts.failures.test\_and\_set\_failed | operation | rate | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.puts.failures.concurrent\_mutations | operation | rate | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.puts.failures.notconnected | operation | rate | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.puts.failures.notready | operation | rate | The number of operations discarded because distributor was not ready | -| vds.distributor.puts.failures.wrongdistributor | operation | rate | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.puts.failures.safe\_time\_not\_reached | operation | rate | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.puts.failures.storagefailure | operation | rate | The number of operations that failed in storage | -| vds.distributor.puts.failures.timeout | operation | rate | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.puts.failures.busy | operation | rate | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.puts.failures.inconsistent\_bucket | operation | rate | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.removes.latency | millisecond | count, max, sum | The latency of remove operations | -| vds.distributor.removes.ok | operation | rate | The number of successful removes operations performed | -| vds.distributor.removes.failures.total | operation | rate | Sum of all failures | -| vds.distributor.removes.failures.notfound | operation | rate | The number of operations that failed because the document did not exist | -| vds.distributor.removes.failures.test\_and\_set\_failed | operation | rate | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.removes.failures.concurrent\_mutations | operation | rate | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.updates.latency | millisecond | count, max, sum | The latency of update operations | -| vds.distributor.updates.ok | operation | rate | The number of successful updates operations performed | -| vds.distributor.updates.failures.total | operation | rate | Sum of all failures | -| vds.distributor.updates.failures.notfound | operation | rate | The number of operations that failed because the document did not exist | -| vds.distributor.updates.failures.test\_and\_set\_failed | operation | rate | The number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document | -| vds.distributor.updates.failures.concurrent\_mutations | operation | rate | The number of operations that were transiently failed due to a mutating operation already being in progress for its document ID | -| vds.distributor.updates.diverging\_timestamp\_updates | operation | rate | Number of updates that report they were performed against divergent version timestamps on different replicas | -| vds.distributor.removelocations.ok | operation | rate | The number of successful removelocations operations performed | -| vds.distributor.removelocations.failures.total | operation | rate | Sum of all failures | -| vds.distributor.gets.latency | millisecond | count, max, sum | The average latency of gets operations | -| vds.distributor.gets.ok | operation | rate | The number of successful gets operations performed | -| vds.distributor.gets.failures.total | operation | rate | Sum of all failures | -| vds.distributor.gets.failures.notfound | operation | rate | The number of operations that failed because the document did not exist | -| vds.distributor.visitor.latency | millisecond | count, max, sum | The average latency of visitor operations | -| vds.distributor.visitor.ok | operation | rate | The number of successful visitor operations performed | -| vds.distributor.visitor.failures.total | operation | rate | Sum of all failures | -| vds.distributor.visitor.failures.notready | operation | rate | The number of operations discarded because distributor was not ready | -| vds.distributor.visitor.failures.notconnected | operation | rate | The number of operations discarded because there were no available storage nodes to send to | -| vds.distributor.visitor.failures.wrongdistributor | operation | rate | The number of operations discarded because they were sent to the wrong distributor | -| vds.distributor.visitor.failures.safe\_time\_not\_reached | operation | rate | The number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed | -| vds.distributor.visitor.failures.storagefailure | operation | rate | The number of operations that failed in storage | -| vds.distributor.visitor.failures.timeout | operation | rate | The number of operations that failed because the operation timed out towards storage | -| vds.distributor.visitor.failures.busy | operation | rate | The number of messages from storage that failed because the storage node was busy | -| vds.distributor.visitor.failures.inconsistent\_bucket | operation | rate | The number of operations failed due to buckets being in an inconsistent state or not found | -| vds.distributor.visitor.failures.notfound | operation | rate | The number of operations that failed because the document did not exist | -| vds.distributor.docsstored | document | average | Number of documents stored in all buckets controlled by this distributor | -| vds.distributor.bytesstored | byte | average | Number of bytes stored in all buckets controlled by this distributor | -| vds.distributor.mutating\_op\_memory\_usage | byte | max | Estimated amount of memory used by active mutating operations across all distributor stripes, in bytes | -| vds.bouncer.clock\_skew\_aborts | operation | count | Number of client operations that were aborted due to clock skew between sender and receiver exceeding acceptable range | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
vds.idealstate.buckets_recheckingbucketaverageThe number of buckets that we are rechecking for ideal state operations
vds.idealstate.idealstate_diffbucketaverageA number representing the current difference from the ideal state. This is a number that decreases steadily as the system is getting closer to the ideal state
vds.idealstate.buckets_toofewcopiesbucketaverageThe number of buckets the distributor controls that have less than the desired redundancy
vds.idealstate.buckets_toomanycopiesbucketaverageThe number of buckets the distributor controls that have more than the desired redundancy
vds.idealstate.bucketsbucketaverageThe number of buckets the distributor controls
vds.idealstate.buckets_notrustedbucketaverageThe number of buckets that have no trusted copies.
vds.idealstate.bucket_replicas_moving_outbucketaverageBucket replicas that should be moved out, e.g. retirement case or node added to cluster that has higher ideal state priority.
vds.idealstate.bucket_replicas_copying_outbucketaverageBucket replicas that should be copied out, e.g. node is in ideal state but might have to provide data other nodes in a merge
vds.idealstate.bucket_replicas_copying_inbucketaverageBucket replicas that should be copied in, e.g. node does not have a replica for a bucket that it is in ideal state for
vds.idealstate.bucket_replicas_syncingbucketaverageBucket replicas that need syncing due to mismatching metadata
vds.idealstate.max_observed_time_since_last_gc_secsecondaverageMaximum time (in seconds) since GC was last successfully run for a bucket. Aggregated max value across all buckets on the distributor.
vds.idealstate.delete_bucket.done_okoperationrateThe number of operations successfully performed
vds.idealstate.delete_bucket.done_failedoperationrateThe number of operations that failed
vds.idealstate.delete_bucket.pendingoperationaverageThe number of operations pending
vds.idealstate.merge_bucket.done_okoperationrateThe number of operations successfully performed
vds.idealstate.merge_bucket.done_failedoperationrateThe number of operations that failed
vds.idealstate.merge_bucket.pendingoperationaverageThe number of operations pending
vds.idealstate.merge_bucket.blockedoperationrateThe number of operations blocked by blocking operation starter
vds.idealstate.merge_bucket.throttledoperationrateThe number of operations throttled by throttling operation starter
vds.idealstate.merge_bucket.source_only_copy_changedoperationrateThe number of merge operations where source-only copy changed
vds.idealstate.merge_bucket.source_only_copy_delete_blockedoperationrateThe number of merge operations where delete of unchanged source-only copies was blocked
vds.idealstate.merge_bucket.source_only_copy_delete_failedoperationrateThe number of merge operations where delete of unchanged source-only copies failed
vds.idealstate.split_bucket.done_okoperationrateThe number of operations successfully performed
vds.idealstate.split_bucket.done_failedoperationrateThe number of operations that failed
vds.idealstate.split_bucket.pendingoperationaverageThe number of operations pending
vds.idealstate.join_bucket.done_okoperationrateThe number of operations successfully performed
vds.idealstate.join_bucket.done_failedoperationrateThe number of operations that failed
vds.idealstate.join_bucket.pendingoperationaverageThe number of operations pending
vds.idealstate.garbage_collection.done_okoperationrateThe number of operations successfully performed
vds.idealstate.garbage_collection.done_failedoperationrateThe number of operations that failed
vds.idealstate.garbage_collection.pendingoperationaverageThe number of operations pending
vds.idealstate.garbage_collection.documents_removeddocumentcount, rateNumber of documents removed by GC operations
vds.distributor.puts.latencymillisecondcount, max, sumThe latency of put operations
vds.distributor.puts.okoperationrateThe number of successful put operations performed
vds.distributor.puts.failures.totaloperationrateSum of all failures
vds.distributor.puts.failures.notfoundoperationrateThe number of operations that failed because the document did not exist
vds.distributor.puts.failures.test_and_set_failedoperationrateThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.puts.failures.concurrent_mutationsoperationrateThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.puts.failures.notconnectedoperationrateThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.puts.failures.notreadyoperationrateThe number of operations discarded because distributor was not ready
vds.distributor.puts.failures.wrongdistributoroperationrateThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.puts.failures.safe_time_not_reachedoperationrateThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.puts.failures.storagefailureoperationrateThe number of operations that failed in storage
vds.distributor.puts.failures.timeoutoperationrateThe number of operations that failed because the operation timed out towards storage
vds.distributor.puts.failures.busyoperationrateThe number of messages from storage that failed because the storage node was busy
vds.distributor.puts.failures.inconsistent_bucketoperationrateThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.removes.latencymillisecondcount, max, sumThe latency of remove operations
vds.distributor.removes.okoperationrateThe number of successful removes operations performed
vds.distributor.removes.failures.totaloperationrateSum of all failures
vds.distributor.removes.failures.notfoundoperationrateThe number of operations that failed because the document did not exist
vds.distributor.removes.failures.test_and_set_failedoperationrateThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.removes.failures.concurrent_mutationsoperationrateThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.updates.latencymillisecondcount, max, sumThe latency of update operations
vds.distributor.updates.okoperationrateThe number of successful updates operations performed
vds.distributor.updates.failures.totaloperationrateSum of all failures
vds.distributor.updates.failures.notfoundoperationrateThe number of operations that failed because the document did not exist
vds.distributor.updates.failures.test_and_set_failedoperationrateThe number of mutating operations that failed because they specified a test-and-set condition that did not match the existing document
vds.distributor.updates.failures.concurrent_mutationsoperationrateThe number of operations that were transiently failed due to a mutating operation already being in progress for its document ID
vds.distributor.updates.diverging_timestamp_updatesoperationrateNumber of updates that report they were performed against divergent version timestamps on different replicas
vds.distributor.removelocations.okoperationrateThe number of successful removelocations operations performed
vds.distributor.removelocations.failures.totaloperationrateSum of all failures
vds.distributor.gets.latencymillisecondcount, max, sumThe average latency of gets operations
vds.distributor.gets.okoperationrateThe number of successful gets operations performed
vds.distributor.gets.failures.totaloperationrateSum of all failures
vds.distributor.gets.failures.notfoundoperationrateThe number of operations that failed because the document did not exist
vds.distributor.visitor.latencymillisecondcount, max, sumThe average latency of visitor operations
vds.distributor.visitor.okoperationrateThe number of successful visitor operations performed
vds.distributor.visitor.failures.totaloperationrateSum of all failures
vds.distributor.visitor.failures.notreadyoperationrateThe number of operations discarded because distributor was not ready
vds.distributor.visitor.failures.notconnectedoperationrateThe number of operations discarded because there were no available storage nodes to send to
vds.distributor.visitor.failures.wrongdistributoroperationrateThe number of operations discarded because they were sent to the wrong distributor
vds.distributor.visitor.failures.safe_time_not_reachedoperationrateThe number of operations that were transiently failed due to them arriving before the safe time point for bucket ownership handovers has passed
vds.distributor.visitor.failures.storagefailureoperationrateThe number of operations that failed in storage
vds.distributor.visitor.failures.timeoutoperationrateThe number of operations that failed because the operation timed out towards storage
vds.distributor.visitor.failures.busyoperationrateThe number of messages from storage that failed because the storage node was busy
vds.distributor.visitor.failures.inconsistent_bucketoperationrateThe number of operations failed due to buckets being in an inconsistent state or not found
vds.distributor.visitor.failures.notfoundoperationrateThe number of operations that failed because the document did not exist
vds.distributor.docsstoreddocumentaverageNumber of documents stored in all buckets controlled by this distributor
vds.distributor.bytesstoredbyteaverageNumber of bytes stored in all buckets controlled by this distributor
vds.distributor.mutating_op_memory_usagebytemaxEstimated amount of memory used by active mutating operations across all distributor stripes, in bytes
vds.bouncer.clock_skew_abortsoperationcountNumber of client operations that were aborted due to clock skew between sender and receiver exceeding acceptable range
## Logd Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| logd.processed.lines | item | count | Number of log lines processed | + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
logd.processed.linesitemcountNumber of log lines processed
## NodeAdmin Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| endpoint.certificate.expiry.seconds | second | N/A | Time until node endpoint certificate expires | -| node-certificate.expiry.seconds | second | N/A | Time until node certificate expires | + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
endpoint.certificate.expiry.secondssecondN/ATime until node endpoint certificate expires
node-certificate.expiry.secondssecondN/ATime until node certificate expires
## SearchNode Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| content.proton.config.generation | version | last | The oldest config generation used by this search node | -| content.proton.documentdb.documents.total | document | last, max | The total number of documents in this documents db (ready + not-ready) | -| content.proton.documentdb.documents.ready | document | last, max | The number of ready documents in this document db | -| content.proton.documentdb.documents.active | document | last, max | The number of active / searchable documents in this document db | -| content.proton.documentdb.documents.removed | document | last, max | The number of removed documents in this document db | -| content.proton.documentdb.index.docs\_in\_memory | document | last, max | Number of documents in memory index | -| content.proton.documentdb.disk\_usage | byte | last | The total disk usage (in bytes) for this document db | -| content.proton.documentdb.memory\_usage.allocated\_bytes | byte | max | The number of allocated bytes | -| content.proton.documentdb.heart\_beat\_age | second | last, min | How long ago (in seconds) heart beat maintenance job was run | -| content.proton.docsum.docs | document | rate | Total docsums returned | -| content.proton.docsum.latency | millisecond | count, max, sum | Docsum request latency | -| content.proton.search\_protocol.query.latency | second | count, max, sum | Query request latency (seconds) | -| content.proton.search\_protocol.query.request\_size | byte | count, max, sum | Query request size (network bytes) | -| content.proton.search\_protocol.query.reply\_size | byte | count, max, sum | Query reply size (network bytes) | -| content.proton.search\_protocol.docsum.latency | second | average, count, max, sum | Docsum request latency (seconds) | -| content.proton.search\_protocol.docsum.request\_size | byte | count, max, sum | Docsum request size (network bytes) | -| content.proton.search\_protocol.docsum.reply\_size | byte | count, max, sum | Docsum reply size (network bytes) | -| content.proton.search\_protocol.docsum.requested\_documents | document | count, max, sum | Total requested document summaries | -| content.proton.executor.proton.queuesize | task | count, max, sum | Size of executor proton task queue | -| content.proton.executor.proton.accepted | task | rate | Number of executor proton accepted tasks | -| content.proton.executor.proton.wakeups | wakeup | rate | Number of times an executor proton worker thread has been woken up | -| content.proton.executor.proton.utilization | fraction | count, max, sum | Ratio of time the executor proton worker threads has been active | -| content.proton.executor.flush.queuesize | task | count, max, sum | Size of executor flush task queue | -| content.proton.executor.flush.accepted | task | rate | Number of accepted executor flush tasks | -| content.proton.executor.flush.wakeups | wakeup | rate | Number of times an executor flush worker thread has been woken up | -| content.proton.executor.flush.utilization | fraction | count, max, sum | Ratio of time the executor flush worker threads has been active | -| content.proton.executor.match.queuesize | task | count, max, sum | Size of executor match task queue | -| content.proton.executor.match.accepted | task | rate | Number of accepted executor match tasks | -| content.proton.executor.match.wakeups | wakeup | rate | Number of times an executor match worker thread has been woken up | -| content.proton.executor.match.utilization | fraction | count, max, sum | Ratio of time the executor match worker threads has been active | -| content.proton.executor.docsum.queuesize | task | count, max, sum | Size of executor docsum task queue | -| content.proton.executor.docsum.accepted | task | rate | Number of executor accepted docsum tasks | -| content.proton.executor.docsum.wakeups | wakeup | rate | Number of times an executor docsum worker thread has been woken up | -| content.proton.executor.docsum.utilization | fraction | count, max, sum | Ratio of time the executor docsum worker threads has been active | -| content.proton.executor.shared.queuesize | task | count, max, sum | Size of executor shared task queue | -| content.proton.executor.shared.accepted | task | rate | Number of executor shared accepted tasks | -| content.proton.executor.shared.wakeups | wakeup | rate | Number of times an executor shared worker thread has been woken up | -| content.proton.executor.shared.utilization | fraction | count, max, sum | Ratio of time the executor shared worker threads has been active | -| content.proton.executor.warmup.queuesize | task | count, max, sum | Size of executor warmup task queue | -| content.proton.executor.warmup.accepted | task | rate | Number of accepted executor warmup tasks | -| content.proton.executor.warmup.wakeups | wakeup | rate | Number of times a warmup executor worker thread has been woken up | -| content.proton.executor.warmup.utilization | fraction | count, max, sum | Ratio of time the executor warmup worker threads has been active | -| content.proton.executor.field\_writer.queuesize | task | count, max, sum | Size of executor field writer task queue | -| content.proton.executor.field\_writer.accepted | task | rate | Number of accepted executor field writer tasks | -| content.proton.executor.field\_writer.wakeups | wakeup | rate | Number of times an executor field writer worker thread has been woken up | -| content.proton.executor.field\_writer.utilization | fraction | count, max, sum | Ratio of time the executor fieldwriter worker threads has been active | -| content.proton.executor.field\_writer.saturation | fraction | count, max, sum | Ratio indicating the max saturation of underlying worker threads. A higher saturation than utilization indicates a bottleneck in one of the worker threads. | -| content.proton.documentdb.job.total | fraction | average | The job load average total of all job metrics | -| content.proton.documentdb.job.attribute\_flush | fraction | average | Flushing of attribute vector(s) to disk | -| content.proton.documentdb.job.memory\_index\_flush | fraction | average | Flushing of memory index to disk | -| content.proton.documentdb.job.disk\_index\_fusion | fraction | average | Fusion of disk indexes | -| content.proton.documentdb.job.document\_store\_flush | fraction | average | Flushing of document store to disk | -| content.proton.documentdb.job.document\_store\_compact | fraction | average | Compaction of document store on disk | -| content.proton.documentdb.job.bucket\_move | fraction | average | Moving of buckets between 'ready' and 'notready' sub databases | -| content.proton.documentdb.job.lid\_space\_compact | fraction | average | Compaction of lid space in document meta store and attribute vectors | -| content.proton.documentdb.job.removed\_documents\_prune | fraction | average | Pruning of removed documents in 'removed' sub database | -| content.proton.documentdb.threading\_service.master.queuesize | task | count, max, sum | Size of threading service master task queue | -| content.proton.documentdb.threading\_service.master.accepted | task | rate | Number of accepted threading service master tasks | -| content.proton.documentdb.threading\_service.master.wakeups | wakeup | rate | Number of times a threading service master worker thread has been woken up | -| content.proton.documentdb.threading\_service.master.utilization | fraction | count, max, sum | Ratio of time the threading service master worker threads has been active | -| content.proton.documentdb.threading\_service.index.queuesize | task | count, max, sum | Size of threading service index task queue | -| content.proton.documentdb.threading\_service.index.accepted | task | rate | Number of accepted threading service index tasks | -| content.proton.documentdb.threading\_service.index.wakeups | wakeup | rate | Number of times a threading service index worker thread has been woken up | -| content.proton.documentdb.threading\_service.index.utilization | fraction | count, max, sum | Ratio of time the threading service index worker threads has been active | -| content.proton.documentdb.threading\_service.summary.queuesize | task | count, max, sum | Size of threading service summary task queue | -| content.proton.documentdb.threading\_service.summary.accepted | task | rate | Number of accepted threading service summary tasks | -| content.proton.documentdb.threading\_service.summary.wakeups | wakeup | rate | Number of times a threading service summary worker thread has been woken up | -| content.proton.documentdb.threading\_service.summary.utilization | fraction | count, max, sum | Ratio of time the threading service summary worker threads has been active | -| content.proton.documentdb.ready.lid\_space.lid\_bloat\_factor | fraction | average | The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid\_limit - used\_lids) / lid\_limit) | -| content.proton.documentdb.ready.lid\_space.lid\_fragmentation\_factor | fraction | average | The fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest\_used\_lid - used\_lids) / highest\_used\_lid) | -| content.proton.documentdb.ready.lid\_space.lid\_limit | documentid | last, max | The size of the allocated lid space | -| content.proton.documentdb.ready.lid\_space.highest\_used\_lid | documentid | last, max | The highest used lid | -| content.proton.documentdb.ready.lid\_space.used\_lids | documentid | last, max | The number of lids used | -| content.proton.documentdb.notready.lid\_space.lid\_bloat\_factor | fraction | average | The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid\_limit - used\_lids) / lid\_limit) | -| content.proton.documentdb.notready.lid\_space.lid\_fragmentation\_factor | fraction | average | The fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest\_used\_lid - used\_lids) / highest\_used\_lid) | -| content.proton.documentdb.notready.lid\_space.lid\_limit | documentid | last, max | The size of the allocated lid space | -| content.proton.documentdb.notready.lid\_space.highest\_used\_lid | documentid | last, max | The highest used lid | -| content.proton.documentdb.notready.lid\_space.used\_lids | documentid | last, max | The number of lids used | -| content.proton.documentdb.removed.lid\_space.lid\_bloat\_factor | fraction | average | The bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid\_limit - used\_lids) / lid\_limit) | -| content.proton.documentdb.removed.lid\_space.lid\_fragmentation\_factor | fraction | average | The fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest\_used\_lid - used\_lids) / highest\_used\_lid) | -| content.proton.documentdb.removed.lid\_space.lid\_limit | documentid | last, max | The size of the allocated lid space | -| content.proton.documentdb.removed.lid\_space.highest\_used\_lid | documentid | last, max | The highest used lid | -| content.proton.documentdb.removed.lid\_space.used\_lids | documentid | last, max | The number of lids used | -| content.proton.documentdb.bucket\_move.buckets\_pending | bucket | last, max, sum | The number of buckets left to move | -| content.proton.resource\_usage.disk | fraction | average | The relative amount of disk used by this content node (transient usage not included, value in the range \[0, 1\]). Same value as reported to the cluster controller | -| content.proton.resource\_usage.disk\_usage.total | fraction | max | The total relative amount of disk used by this content node (value in the range \[0, 1\]) | -| content.proton.resource\_usage.disk\_usage.total\_utilization | fraction | max | The relative amount of disk used compared to the content node disk resource limit | -| content.proton.resource\_usage.disk\_usage.transient | fraction | max | The relative amount of transient disk used by this content node (value in the range \[0, 1\]) | -| content.proton.resource\_usage.memory | fraction | average | The relative amount of memory used by this content node (transient usage not included, value in the range \[0, 1\]). Same value as reported to the cluster controller | -| content.proton.resource\_usage.memory\_usage.total | fraction | max | The total relative amount of memory used by this content node (value in the range \[0, 1\]) | -| content.proton.resource\_usage.memory\_usage.total\_utilization | fraction | max | The relative amount of memory used compared to the content node memory resource limit | -| content.proton.resource\_usage.memory\_usage.transient | fraction | max | The relative amount of transient memory used by this content node (value in the range \[0, 1\]) | -| content.proton.resource\_usage.memory\_mappings | file | max | The number of memory mapped files | -| content.proton.resource\_usage.open\_file\_descriptors | file | max | The number of open files | -| content.proton.resource\_usage.feeding\_blocked | binary | last, max | Whether feeding is blocked due to resource limits being reached (value is either 0 or 1) | -| content.proton.resource\_usage.malloc\_arena | byte | max | Size of malloc arena | -| content.proton.documentdb.attribute.resource\_usage.address\_space | fraction | max | The max relative address space used among components in all attribute vectors in this document db (value in the range \[0, 1\]) | -| content.proton.documentdb.attribute.resource\_usage.feeding\_blocked | binary | max | Whether feeding is blocked due to attribute resource limits being reached (value is either 0 or 1) | -| content.proton.resource\_usage.cpu\_util.setup | fraction | count, max, sum | cpu used by system init and (re-)configuration | -| content.proton.resource\_usage.cpu\_util.read | fraction | count, max, sum | cpu used by reading data from the system | -| content.proton.resource\_usage.cpu\_util.write | fraction | count, max, sum | cpu used by writing data to the system | -| content.proton.resource\_usage.cpu\_util.compact | fraction | count, max, sum | cpu used by internal data re-structuring | -| content.proton.resource\_usage.cpu\_util.other | fraction | count, max, sum | cpu used by work not classified as a specific category | -| content.proton.transactionlog.entries | record | average | The current number of entries in the transaction log | -| content.proton.transactionlog.disk\_usage | byte | average | The disk usage (in bytes) of the transaction log | -| content.proton.transactionlog.replay\_time | second | last, max | The replay time (in seconds) of the transaction log during start-up | -| content.proton.documentdb.ready.document\_store.disk\_usage | byte | average | Disk space usage in bytes | -| content.proton.documentdb.ready.document\_store.disk\_bloat | byte | average | Disk space bloat in bytes | -| content.proton.documentdb.ready.document\_store.max\_bucket\_spread | fraction | average | Max bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file) | -| content.proton.documentdb.ready.document\_store.memory\_usage.allocated\_bytes | byte | average | The number of allocated bytes | -| content.proton.documentdb.ready.document\_store.memory\_usage.used\_bytes | byte | average | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.ready.document\_store.memory\_usage.onhold\_bytes | byte | average | The number of bytes on hold | -| content.proton.documentdb.notready.document\_store.disk\_usage | byte | average | Disk space usage in bytes | -| content.proton.documentdb.notready.document\_store.disk\_bloat | byte | average | Disk space bloat in bytes | -| content.proton.documentdb.notready.document\_store.max\_bucket\_spread | fraction | average | Max bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file) | -| content.proton.documentdb.notready.document\_store.memory\_usage.allocated\_bytes | byte | average | The number of allocated bytes | -| content.proton.documentdb.notready.document\_store.memory\_usage.used\_bytes | byte | average | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.notready.document\_store.memory\_usage.dead\_bytes | byte | average | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.notready.document\_store.memory\_usage.onhold\_bytes | byte | average | The number of bytes on hold | -| content.proton.documentdb.removed.document\_store.disk\_usage | byte | average | Disk space usage in bytes | -| content.proton.documentdb.removed.document\_store.disk\_bloat | byte | average | Disk space bloat in bytes | -| content.proton.documentdb.removed.document\_store.max\_bucket\_spread | fraction | average | Max bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file) | -| content.proton.documentdb.removed.document\_store.memory\_usage.allocated\_bytes | byte | average | The number of allocated bytes | -| content.proton.documentdb.removed.document\_store.memory\_usage.used\_bytes | byte | average | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.removed.document\_store.memory\_usage.dead\_bytes | byte | average | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.removed.document\_store.memory\_usage.onhold\_bytes | byte | average | The number of bytes on hold | -| content.proton.documentdb.ready.document\_store.cache.memory\_usage | byte | average | Memory usage of the cache (in bytes) | -| content.proton.documentdb.ready.document\_store.cache.hit\_rate | fraction | average | Rate of hits in the cache compared to number of lookups | -| content.proton.documentdb.ready.document\_store.cache.lookups | operation | rate | Number of lookups in the cache (hits + misses) | -| content.proton.documentdb.ready.document\_store.cache.invalidations | operation | rate | Number of invalidations (erased elements) in the cache. | -| content.proton.documentdb.notready.document\_store.cache.memory\_usage | byte | average | Memory usage of the cache (in bytes) | -| content.proton.documentdb.notready.document\_store.cache.hit\_rate | fraction | average | Rate of hits in the cache compared to number of lookups | -| content.proton.documentdb.notready.document\_store.cache.lookups | operation | rate | Number of lookups in the cache (hits + misses) | -| content.proton.documentdb.notready.document\_store.cache.invalidations | operation | rate | Number of invalidations (erased elements) in the cache. | -| content.proton.documentdb.ready.attribute.memory\_usage.allocated\_bytes | byte | average | The number of allocated bytes | -| content.proton.documentdb.ready.attribute.memory\_usage.used\_bytes | byte | average | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.ready.attribute.memory\_usage.dead\_bytes | byte | average | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.ready.attribute.memory\_usage.onhold\_bytes | byte | average | The number of bytes on hold | -| content.proton.documentdb.ready.attribute.disk\_usage | byte | average | Disk space usage (in bytes) of the flushed snapshot of this attribute for this document type | -| content.proton.documentdb.notready.attribute.memory\_usage.allocated\_bytes | byte | average | The number of allocated bytes | -| content.proton.documentdb.notready.attribute.memory\_usage.used\_bytes | byte | average | The number of used bytes (`<=` allocated\_bytes) | -| content.proton.documentdb.notready.attribute.memory\_usage.dead\_bytes | byte | average | The number of dead bytes (`<=` used\_bytes) | -| content.proton.documentdb.notready.attribute.memory\_usage.onhold\_bytes | byte | average | The number of bytes on hold | -| content.proton.index.cache.postinglist.memory\_usage | byte | average | Memory usage of the cache (in bytes). Contains disk index posting list files across all document types | -| content.proton.index.cache.postinglist.hit\_rate | fraction | average | Rate of hits in the cache compared to number of lookups. Contains disk index posting list files across all document types | -| content.proton.index.cache.postinglist.lookups | operation | rate | Number of lookups in the cache (hits + misses). Contains disk index posting list files across all document types | -| content.proton.index.cache.postinglist.invalidations | operation | rate | Number of invalidations (erased elements) in the cache. Contains disk index posting list files across all document types | -| content.proton.index.cache.bitvector.memory\_usage | byte | average | Memory usage of the cache (in bytes). Contains disk index bitvector files across all document types | -| content.proton.index.cache.bitvector.hit\_rate | fraction | average | Rate of hits in the cache compared to number of lookups. Contains disk index bitvector files across all document types | -| content.proton.index.cache.bitvector.lookups | operation | rate | Number of lookups in the cache (hits + misses). Contains disk index bitvector files across all document types | -| content.proton.index.cache.bitvector.invalidations | operation | rate | Number of invalidations (erased elements) in the cache. Contains disk index bitvector files across all document types | -| content.proton.documentdb.index.memory\_usage.allocated\_bytes | byte | average | The number of allocated bytes for the memory index for this document type | -| content.proton.documentdb.index.memory\_usage.used\_bytes | byte | average | The number of used bytes (`<=` allocated\_bytes) for the memory index for this document type | -| content.proton.documentdb.index.memory\_usage.dead\_bytes | byte | average | The number of dead bytes (`<=` used\_bytes) for the memory index for this document type | -| content.proton.documentdb.index.memory\_usage.onhold\_bytes | byte | average | The number of bytes on hold for the memory index for this document type | -| content.proton.documentdb.index.io.search.read\_bytes | byte | count, sum | Bytes read from disk index posting list and bitvector files as part of search for this document type | -| content.proton.documentdb.index.io.search.cached\_read\_bytes | byte | count, sum | Bytes read from cached disk index posting list and bitvector files as part of search for this document type | -| content.proton.documentdb.ready.index.disk\_usage | byte | average | Disk space usage (in bytes) of this index field in all disk indexes for this document type | -| content.proton.documentdb.matching.queries | query | rate | Number of queries executed | -| content.proton.documentdb.matching.soft\_doomed\_queries | query | rate | Number of queries hitting the soft timeout | -| content.proton.documentdb.matching.query\_latency | second | count, max, sum | Total average latency (sec) when matching and ranking a query | -| content.proton.documentdb.matching.query\_setup\_time | second | count, max, sum | Average time (sec) spent setting up and tearing down queries | -| content.proton.documentdb.matching.docs\_matched | document | count, rate | Number of documents matched | -| content.proton.documentdb.matching.exact\_nns\_distances\_computed | distance | rate | Number of distances computed in exact nearest-neighbor search | -| content.proton.documentdb.matching.approximate\_nns\_distances\_computed | distance | rate | Number of distances computed in approximate nearest-neighbor search | -| content.proton.documentdb.matching.approximate\_nns\_nodes\_visited | graph\_node | rate | Number of nodes visited in approximate nearest-neighbor search | -| content.proton.documentdb.matching.rank\_profile.queries | query | rate | Number of queries executed | -| content.proton.documentdb.matching.rank\_profile.soft\_doomed\_queries | query | rate | Number of queries hitting the soft timeout | -| content.proton.documentdb.matching.rank\_profile.soft\_doom\_factor | fraction | count, max, min, sum | Factor used to compute soft-timeout | -| content.proton.documentdb.matching.rank\_profile.query\_latency | second | count, max, sum | Total average latency (sec) when matching and ranking a query | -| content.proton.documentdb.matching.rank\_profile.query\_setup\_time | second | count, max, sum | Average time (sec) spent setting up and tearing down queries | -| content.proton.documentdb.matching.rank\_profile.grouping\_time | second | count, max, sum | Average time (sec) spent on grouping | -| content.proton.documentdb.matching.rank\_profile.rerank\_time | second | count, max, sum | Average time (sec) spent on 2nd phase ranking | -| content.proton.documentdb.matching.rank\_profile.docs\_matched | document | count, rate | Number of documents matched | -| content.proton.documentdb.matching.rank\_profile.exact\_nns\_distances\_computed | distance | rate | Number of distances computed in exact nearest-neighbor search | -| content.proton.documentdb.matching.rank\_profile.approximate\_nns\_distances\_computed | distance | rate | Number of distances computed in approximate nearest-neighbor search | -| content.proton.documentdb.matching.rank\_profile.approximate\_nns\_nodes\_visited | graph\_node | rate | Number of nodes visited in approximate nearest-neighbor search | -| content.proton.documentdb.matching.rank\_profile.limited\_queries | query | rate | Number of queries limited in match phase | -| content.proton.documentdb.feeding.commit.operations | operation | count, max, rate, sum | Number of operations included in a commit | -| content.proton.documentdb.feeding.commit.latency | second | count, max, sum | Latency for commit in seconds | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
content.proton.config.generationversionlastThe oldest config generation used by this search node
content.proton.documentdb.documents.totaldocumentlast, maxThe total number of documents in this documents db (ready + not-ready)
content.proton.documentdb.documents.readydocumentlast, maxThe number of ready documents in this document db
content.proton.documentdb.documents.activedocumentlast, maxThe number of active / searchable documents in this document db
content.proton.documentdb.documents.removeddocumentlast, maxThe number of removed documents in this document db
content.proton.documentdb.index.docs_in_memorydocumentlast, maxNumber of documents in memory index
content.proton.documentdb.disk_usagebytelastThe total disk usage (in bytes) for this document db
content.proton.documentdb.memory_usage.allocated_bytesbytemaxThe number of allocated bytes
content.proton.documentdb.heart_beat_agesecondlast, minHow long ago (in seconds) heart beat maintenance job was run
content.proton.docsum.docsdocumentrateTotal docsums returned
content.proton.docsum.latencymillisecondcount, max, sumDocsum request latency
content.proton.search_protocol.query.latencysecondcount, max, sumQuery request latency (seconds)
content.proton.search_protocol.query.request_sizebytecount, max, sumQuery request size (network bytes)
content.proton.search_protocol.query.reply_sizebytecount, max, sumQuery reply size (network bytes)
content.proton.search_protocol.docsum.latencysecondaverage, count, max, sumDocsum request latency (seconds)
content.proton.search_protocol.docsum.request_sizebytecount, max, sumDocsum request size (network bytes)
content.proton.search_protocol.docsum.reply_sizebytecount, max, sumDocsum reply size (network bytes)
content.proton.search_protocol.docsum.requested_documentsdocumentcount, max, sumTotal requested document summaries
content.proton.executor.proton.queuesizetaskcount, max, sumSize of executor proton task queue
content.proton.executor.proton.acceptedtaskrateNumber of executor proton accepted tasks
content.proton.executor.proton.wakeupswakeuprateNumber of times an executor proton worker thread has been woken up
content.proton.executor.proton.utilizationfractioncount, max, sumRatio of time the executor proton worker threads has been active
content.proton.executor.flush.queuesizetaskcount, max, sumSize of executor flush task queue
content.proton.executor.flush.acceptedtaskrateNumber of accepted executor flush tasks
content.proton.executor.flush.wakeupswakeuprateNumber of times an executor flush worker thread has been woken up
content.proton.executor.flush.utilizationfractioncount, max, sumRatio of time the executor flush worker threads has been active
content.proton.executor.match.queuesizetaskcount, max, sumSize of executor match task queue
content.proton.executor.match.acceptedtaskrateNumber of accepted executor match tasks
content.proton.executor.match.wakeupswakeuprateNumber of times an executor match worker thread has been woken up
content.proton.executor.match.utilizationfractioncount, max, sumRatio of time the executor match worker threads has been active
content.proton.executor.docsum.queuesizetaskcount, max, sumSize of executor docsum task queue
content.proton.executor.docsum.acceptedtaskrateNumber of executor accepted docsum tasks
content.proton.executor.docsum.wakeupswakeuprateNumber of times an executor docsum worker thread has been woken up
content.proton.executor.docsum.utilizationfractioncount, max, sumRatio of time the executor docsum worker threads has been active
content.proton.executor.shared.queuesizetaskcount, max, sumSize of executor shared task queue
content.proton.executor.shared.acceptedtaskrateNumber of executor shared accepted tasks
content.proton.executor.shared.wakeupswakeuprateNumber of times an executor shared worker thread has been woken up
content.proton.executor.shared.utilizationfractioncount, max, sumRatio of time the executor shared worker threads has been active
content.proton.executor.warmup.queuesizetaskcount, max, sumSize of executor warmup task queue
content.proton.executor.warmup.acceptedtaskrateNumber of accepted executor warmup tasks
content.proton.executor.warmup.wakeupswakeuprateNumber of times a warmup executor worker thread has been woken up
content.proton.executor.warmup.utilizationfractioncount, max, sumRatio of time the executor warmup worker threads has been active
content.proton.executor.field_writer.queuesizetaskcount, max, sumSize of executor field writer task queue
content.proton.executor.field_writer.acceptedtaskrateNumber of accepted executor field writer tasks
content.proton.executor.field_writer.wakeupswakeuprateNumber of times an executor field writer worker thread has been woken up
content.proton.executor.field_writer.utilizationfractioncount, max, sumRatio of time the executor fieldwriter worker threads has been active
content.proton.executor.field_writer.saturationfractioncount, max, sumRatio indicating the max saturation of underlying worker threads. A higher saturation than utilization indicates a bottleneck in one of the worker threads.
content.proton.documentdb.job.totalfractionaverageThe job load average total of all job metrics
content.proton.documentdb.job.attribute_flushfractionaverageFlushing of attribute vector(s) to disk
content.proton.documentdb.job.memory_index_flushfractionaverageFlushing of memory index to disk
content.proton.documentdb.job.disk_index_fusionfractionaverageFusion of disk indexes
content.proton.documentdb.job.document_store_flushfractionaverageFlushing of document store to disk
content.proton.documentdb.job.document_store_compactfractionaverageCompaction of document store on disk
content.proton.documentdb.job.bucket_movefractionaverageMoving of buckets between 'ready' and 'notready' sub databases
content.proton.documentdb.job.lid_space_compactfractionaverageCompaction of lid space in document meta store and attribute vectors
content.proton.documentdb.job.removed_documents_prunefractionaveragePruning of removed documents in 'removed' sub database
content.proton.documentdb.threading_service.master.queuesizetaskcount, max, sumSize of threading service master task queue
content.proton.documentdb.threading_service.master.acceptedtaskrateNumber of accepted threading service master tasks
content.proton.documentdb.threading_service.master.wakeupswakeuprateNumber of times a threading service master worker thread has been woken up
content.proton.documentdb.threading_service.master.utilizationfractioncount, max, sumRatio of time the threading service master worker threads has been active
content.proton.documentdb.threading_service.index.queuesizetaskcount, max, sumSize of threading service index task queue
content.proton.documentdb.threading_service.index.acceptedtaskrateNumber of accepted threading service index tasks
content.proton.documentdb.threading_service.index.wakeupswakeuprateNumber of times a threading service index worker thread has been woken up
content.proton.documentdb.threading_service.index.utilizationfractioncount, max, sumRatio of time the threading service index worker threads has been active
content.proton.documentdb.threading_service.summary.queuesizetaskcount, max, sumSize of threading service summary task queue
content.proton.documentdb.threading_service.summary.acceptedtaskrateNumber of accepted threading service summary tasks
content.proton.documentdb.threading_service.summary.wakeupswakeuprateNumber of times a threading service summary worker thread has been woken up
content.proton.documentdb.threading_service.summary.utilizationfractioncount, max, sumRatio of time the threading service summary worker threads has been active
content.proton.documentdb.ready.lid_space.lid_bloat_factorfractionaverageThe bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid_limit - used_lids) / lid_limit)
content.proton.documentdb.ready.lid_space.lid_fragmentation_factorfractionaverageThe fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest_used_lid - used_lids) / highest_used_lid)
content.proton.documentdb.ready.lid_space.lid_limitdocumentidlast, maxThe size of the allocated lid space
content.proton.documentdb.ready.lid_space.highest_used_liddocumentidlast, maxThe highest used lid
content.proton.documentdb.ready.lid_space.used_lidsdocumentidlast, maxThe number of lids used
content.proton.documentdb.notready.lid_space.lid_bloat_factorfractionaverageThe bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid_limit - used_lids) / lid_limit)
content.proton.documentdb.notready.lid_space.lid_fragmentation_factorfractionaverageThe fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest_used_lid - used_lids) / highest_used_lid)
content.proton.documentdb.notready.lid_space.lid_limitdocumentidlast, maxThe size of the allocated lid space
content.proton.documentdb.notready.lid_space.highest_used_liddocumentidlast, maxThe highest used lid
content.proton.documentdb.notready.lid_space.used_lidsdocumentidlast, maxThe number of lids used
content.proton.documentdb.removed.lid_space.lid_bloat_factorfractionaverageThe bloat factor of this lid space, indicating the total amount of holes in the allocated lid space ((lid_limit - used_lids) / lid_limit)
content.proton.documentdb.removed.lid_space.lid_fragmentation_factorfractionaverageThe fragmentation factor of this lid space, indicating the amount of holes in the currently used part of the lid space ((highest_used_lid - used_lids) / highest_used_lid)
content.proton.documentdb.removed.lid_space.lid_limitdocumentidlast, maxThe size of the allocated lid space
content.proton.documentdb.removed.lid_space.highest_used_liddocumentidlast, maxThe highest used lid
content.proton.documentdb.removed.lid_space.used_lidsdocumentidlast, maxThe number of lids used
content.proton.documentdb.bucket_move.buckets_pendingbucketlast, max, sumThe number of buckets left to move
content.proton.resource_usage.diskfractionaverageThe relative amount of disk used by this content node (transient usage not included, value in the range [0, 1]). Same value as reported to the cluster controller
content.proton.resource_usage.disk_usage.totalfractionmaxThe total relative amount of disk used by this content node (value in the range [0, 1])
content.proton.resource_usage.disk_usage.total_utilizationfractionmaxThe relative amount of disk used compared to the content node disk resource limit
content.proton.resource_usage.disk_usage.transientfractionmaxThe relative amount of transient disk used by this content node (value in the range [0, 1])
content.proton.resource_usage.memoryfractionaverageThe relative amount of memory used by this content node (transient usage not included, value in the range [0, 1]). Same value as reported to the cluster controller
content.proton.resource_usage.memory_usage.totalfractionmaxThe total relative amount of memory used by this content node (value in the range [0, 1])
content.proton.resource_usage.memory_usage.total_utilizationfractionmaxThe relative amount of memory used compared to the content node memory resource limit
content.proton.resource_usage.memory_usage.transientfractionmaxThe relative amount of transient memory used by this content node (value in the range [0, 1])
content.proton.resource_usage.memory_mappingsfilemaxThe number of memory mapped files
content.proton.resource_usage.open_file_descriptorsfilemaxThe number of open files
content.proton.resource_usage.feeding_blockedbinarylast, maxWhether feeding is blocked due to resource limits being reached (value is either 0 or 1)
content.proton.resource_usage.malloc_arenabytemaxSize of malloc arena
content.proton.documentdb.attribute.resource_usage.address_spacefractionmaxThe max relative address space used among components in all attribute vectors in this document db (value in the range [0, 1])
content.proton.documentdb.attribute.resource_usage.feeding_blockedbinarymaxWhether feeding is blocked due to attribute resource limits being reached (value is either 0 or 1)
content.proton.resource_usage.cpu_util.setupfractioncount, max, sumcpu used by system init and (re-)configuration
content.proton.resource_usage.cpu_util.readfractioncount, max, sumcpu used by reading data from the system
content.proton.resource_usage.cpu_util.writefractioncount, max, sumcpu used by writing data to the system
content.proton.resource_usage.cpu_util.compactfractioncount, max, sumcpu used by internal data re-structuring
content.proton.resource_usage.cpu_util.otherfractioncount, max, sumcpu used by work not classified as a specific category
content.proton.transactionlog.entriesrecordaverageThe current number of entries in the transaction log
content.proton.transactionlog.disk_usagebyteaverageThe disk usage (in bytes) of the transaction log
content.proton.transactionlog.replay_timesecondlast, maxThe replay time (in seconds) of the transaction log during start-up
content.proton.documentdb.ready.document_store.disk_usagebyteaverageDisk space usage in bytes
content.proton.documentdb.ready.document_store.disk_bloatbyteaverageDisk space bloat in bytes
content.proton.documentdb.ready.document_store.max_bucket_spreadfractionaverageMax bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file)
content.proton.documentdb.ready.document_store.memory_usage.allocated_bytesbyteaverageThe number of allocated bytes
content.proton.documentdb.ready.document_store.memory_usage.used_bytesbyteaverageThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.ready.document_store.memory_usage.onhold_bytesbyteaverageThe number of bytes on hold
content.proton.documentdb.notready.document_store.disk_usagebyteaverageDisk space usage in bytes
content.proton.documentdb.notready.document_store.disk_bloatbyteaverageDisk space bloat in bytes
content.proton.documentdb.notready.document_store.max_bucket_spreadfractionaverageMax bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file)
content.proton.documentdb.notready.document_store.memory_usage.allocated_bytesbyteaverageThe number of allocated bytes
content.proton.documentdb.notready.document_store.memory_usage.used_bytesbyteaverageThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.notready.document_store.memory_usage.dead_bytesbyteaverageThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.notready.document_store.memory_usage.onhold_bytesbyteaverageThe number of bytes on hold
content.proton.documentdb.removed.document_store.disk_usagebyteaverageDisk space usage in bytes
content.proton.documentdb.removed.document_store.disk_bloatbyteaverageDisk space bloat in bytes
content.proton.documentdb.removed.document_store.max_bucket_spreadfractionaverageMax bucket spread in underlying files (sum(unique buckets in each chunk)/unique buckets in file)
content.proton.documentdb.removed.document_store.memory_usage.allocated_bytesbyteaverageThe number of allocated bytes
content.proton.documentdb.removed.document_store.memory_usage.used_bytesbyteaverageThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.removed.document_store.memory_usage.dead_bytesbyteaverageThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.removed.document_store.memory_usage.onhold_bytesbyteaverageThe number of bytes on hold
content.proton.documentdb.ready.document_store.cache.memory_usagebyteaverageMemory usage of the cache (in bytes)
content.proton.documentdb.ready.document_store.cache.hit_ratefractionaverageRate of hits in the cache compared to number of lookups
content.proton.documentdb.ready.document_store.cache.lookupsoperationrateNumber of lookups in the cache (hits + misses)
content.proton.documentdb.ready.document_store.cache.invalidationsoperationrateNumber of invalidations (erased elements) in the cache.
content.proton.documentdb.notready.document_store.cache.memory_usagebyteaverageMemory usage of the cache (in bytes)
content.proton.documentdb.notready.document_store.cache.hit_ratefractionaverageRate of hits in the cache compared to number of lookups
content.proton.documentdb.notready.document_store.cache.lookupsoperationrateNumber of lookups in the cache (hits + misses)
content.proton.documentdb.notready.document_store.cache.invalidationsoperationrateNumber of invalidations (erased elements) in the cache.
content.proton.documentdb.ready.attribute.memory_usage.allocated_bytesbyteaverageThe number of allocated bytes
content.proton.documentdb.ready.attribute.memory_usage.used_bytesbyteaverageThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.ready.attribute.memory_usage.dead_bytesbyteaverageThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.ready.attribute.memory_usage.onhold_bytesbyteaverageThe number of bytes on hold
content.proton.documentdb.ready.attribute.disk_usagebyteaverageDisk space usage (in bytes) of the flushed snapshot of this attribute for this document type
content.proton.documentdb.notready.attribute.memory_usage.allocated_bytesbyteaverageThe number of allocated bytes
content.proton.documentdb.notready.attribute.memory_usage.used_bytesbyteaverageThe number of used bytes ({`<=`} allocated_bytes)
content.proton.documentdb.notready.attribute.memory_usage.dead_bytesbyteaverageThe number of dead bytes ({`<=`} used_bytes)
content.proton.documentdb.notready.attribute.memory_usage.onhold_bytesbyteaverageThe number of bytes on hold
content.proton.index.cache.postinglist.memory_usagebyteaverageMemory usage of the cache (in bytes). Contains disk index posting list files across all document types
content.proton.index.cache.postinglist.hit_ratefractionaverageRate of hits in the cache compared to number of lookups. Contains disk index posting list files across all document types
content.proton.index.cache.postinglist.lookupsoperationrateNumber of lookups in the cache (hits + misses). Contains disk index posting list files across all document types
content.proton.index.cache.postinglist.invalidationsoperationrateNumber of invalidations (erased elements) in the cache. Contains disk index posting list files across all document types
content.proton.index.cache.bitvector.memory_usagebyteaverageMemory usage of the cache (in bytes). Contains disk index bitvector files across all document types
content.proton.index.cache.bitvector.hit_ratefractionaverageRate of hits in the cache compared to number of lookups. Contains disk index bitvector files across all document types
content.proton.index.cache.bitvector.lookupsoperationrateNumber of lookups in the cache (hits + misses). Contains disk index bitvector files across all document types
content.proton.index.cache.bitvector.invalidationsoperationrateNumber of invalidations (erased elements) in the cache. Contains disk index bitvector files across all document types
content.proton.documentdb.index.memory_usage.allocated_bytesbyteaverageThe number of allocated bytes for the memory index for this document type
content.proton.documentdb.index.memory_usage.used_bytesbyteaverageThe number of used bytes ({`<=`} allocated_bytes) for the memory index for this document type
content.proton.documentdb.index.memory_usage.dead_bytesbyteaverageThe number of dead bytes ({`<=`} used_bytes) for the memory index for this document type
content.proton.documentdb.index.memory_usage.onhold_bytesbyteaverageThe number of bytes on hold for the memory index for this document type
content.proton.documentdb.index.io.search.read_bytesbytecount, sumBytes read from disk index posting list and bitvector files as part of search for this document type
content.proton.documentdb.index.io.search.cached_read_bytesbytecount, sumBytes read from cached disk index posting list and bitvector files as part of search for this document type
content.proton.documentdb.ready.index.disk_usagebyteaverageDisk space usage (in bytes) of this index field in all disk indexes for this document type
content.proton.documentdb.matching.queriesqueryrateNumber of queries executed
content.proton.documentdb.matching.soft_doomed_queriesqueryrateNumber of queries hitting the soft timeout
content.proton.documentdb.matching.query_latencysecondcount, max, sumTotal average latency (sec) when matching and ranking a query
content.proton.documentdb.matching.query_setup_timesecondcount, max, sumAverage time (sec) spent setting up and tearing down queries
content.proton.documentdb.matching.docs_matcheddocumentcount, rateNumber of documents matched
content.proton.documentdb.matching.exact_nns_distances_computeddistancerateNumber of distances computed in exact nearest-neighbor search
content.proton.documentdb.matching.approximate_nns_distances_computeddistancerateNumber of distances computed in approximate nearest-neighbor search
content.proton.documentdb.matching.approximate_nns_nodes_visitedgraph_noderateNumber of nodes visited in approximate nearest-neighbor search
content.proton.documentdb.matching.rank_profile.queriesqueryrateNumber of queries executed
content.proton.documentdb.matching.rank_profile.soft_doomed_queriesqueryrateNumber of queries hitting the soft timeout
content.proton.documentdb.matching.rank_profile.soft_doom_factorfractioncount, max, min, sumFactor used to compute soft-timeout
content.proton.documentdb.matching.rank_profile.query_latencysecondcount, max, sumTotal average latency (sec) when matching and ranking a query
content.proton.documentdb.matching.rank_profile.query_setup_timesecondcount, max, sumAverage time (sec) spent setting up and tearing down queries
content.proton.documentdb.matching.rank_profile.grouping_timesecondcount, max, sumAverage time (sec) spent on grouping
content.proton.documentdb.matching.rank_profile.rerank_timesecondcount, max, sumAverage time (sec) spent on 2nd phase ranking
content.proton.documentdb.matching.rank_profile.docs_matcheddocumentcount, rateNumber of documents matched
content.proton.documentdb.matching.rank_profile.exact_nns_distances_computeddistancerateNumber of distances computed in exact nearest-neighbor search
content.proton.documentdb.matching.rank_profile.approximate_nns_distances_computeddistancerateNumber of distances computed in approximate nearest-neighbor search
content.proton.documentdb.matching.rank_profile.approximate_nns_nodes_visitedgraph_noderateNumber of nodes visited in approximate nearest-neighbor search
content.proton.documentdb.matching.rank_profile.limited_queriesqueryrateNumber of queries limited in match phase
content.proton.documentdb.feeding.commit.operationsoperationcount, max, rate, sumNumber of operations included in a commit
content.proton.documentdb.feeding.commit.latencysecondcount, max, sumLatency for commit in seconds
## Sentinel Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| sentinel.restarts | restart | count | Number of service restarts done by the sentinel | -| sentinel.totalRestarts | restart | last, max, sum | Total number of service restarts done by the sentinel since the sentinel was started | -| sentinel.uptime | second | last | Time the sentinel has been running | -| sentinel.running | instance | count, last | Number of services the sentinel has running currently | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
sentinel.restartsrestartcountNumber of service restarts done by the sentinel
sentinel.totalRestartsrestartlast, max, sumTotal number of service restarts done by the sentinel since the sentinel was started
sentinel.uptimesecondlastTime the sentinel has been running
sentinel.runninginstancecount, lastNumber of services the sentinel has running currently
## Slobrok Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| slobrok.heartbeats.failed | request | count | Number of heartbeat requests failed | -| slobrok.missing.consensus | second | count | Number of seconds without full consensus with all other brokers | + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
slobrok.heartbeats.failedrequestcountNumber of heartbeat requests failed
slobrok.missing.consensussecondcountNumber of seconds without full consensus with all other brokers
## Storage Metrics -| Name | Unit | Suffixes | Description | -| --- | --- | --- | --- | -| vds.datastored.alldisks.buckets | bucket | average | Number of buckets managed | -| vds.datastored.alldisks.docs | document | average | Number of documents stored | -| vds.datastored.alldisks.bytes | byte | average | Number of bytes stored | -| vds.visitor.allthreads.averagevisitorlifetime | millisecond | count, max, sum | Average lifetime of a visitor | -| vds.visitor.allthreads.averagequeuewait | millisecond | count, max, sum | Average time an operation spends in input queue. | -| vds.visitor.allthreads.queuesize | operation | count, max, sum | Size of input message queue. | -| vds.visitor.allthreads.completed | operation | rate | Number of visitors completed | -| vds.visitor.allthreads.created | operation | rate | Number of visitors created. | -| vds.visitor.allthreads.failed | operation | rate | Number of visitors failed | -| vds.visitor.allthreads.averagemessagesendtime | millisecond | count, max, sum | Average time it takes for messages to be sent to their target (and be replied to) | -| vds.visitor.allthreads.averageprocessingtime | millisecond | count, max, sum | Average time used to process visitor requests | -| vds.filestor.queuesize | operation | count, max, sum | Size of input message queue. | -| vds.filestor.averagequeuewait | millisecond | count, max, sum | Average time an operation spends in input queue. | -| vds.filestor.active\_operations.size | operation | count, max, sum | Number of concurrent active operations | -| vds.filestor.active\_operations.latency | millisecond | count, max, sum | Latency (in ms) for completed operations | -| vds.filestor.throttle\_window\_size | operation | count, max, sum | Current size of async operation throttler window size | -| vds.filestor.throttle\_waiting\_threads | thread | count, max, sum | Number of threads waiting to acquire a throttle token | -| vds.filestor.throttle\_active\_tokens | instance | count, max, sum | Current number of active throttle tokens | -| vds.filestor.allthreads.mergemetadatareadlatency | millisecond | count, max, sum | Time spent in a merge step to check metadata of current node to see what data it has. | -| vds.filestor.allthreads.mergedatareadlatency | millisecond | count, max, sum | Time spent in a merge step to read data other nodes need. | -| vds.filestor.allthreads.mergedatawritelatency | millisecond | count, max, sum | Time spent in a merge step to write data needed to current node. | -| vds.filestor.allthreads.merge\_put\_latency | millisecond | count, max, sum | Latency of individual puts that are part of merge operations | -| vds.filestor.allthreads.merge\_remove\_latency | millisecond | count, max, sum | Latency of individual removes that are part of merge operations | -| vds.filestor.allstripes.throttled\_rpc\_direct\_dispatches | instance | rate | Number of times an RPC thread could not directly dispatch an async operation directly to Proton because it was disallowed by the throttle policy | -| vds.filestor.allstripes.throttled\_persistence\_thread\_polls | instance | rate | Number of times a persistence thread could not immediately dispatch a queued async operation because it was disallowed by the throttle policy | -| vds.filestor.allstripes.timeouts\_waiting\_for\_throttle\_token | instance | rate | Number of times a persistence thread timed out waiting for an available throttle policy token | -| vds.filestor.allthreads.put.count | operation | rate | Number of requests processed. | -| vds.filestor.allthreads.put.failed | operation | rate | Number of failed requests. | -| vds.filestor.allthreads.put.test\_and\_set\_failed | operation | rate | Number of operations that were skipped due to a test-and-set condition not met | -| vds.filestor.allthreads.put.latency | millisecond | count, max, sum | Latency of successful requests. | -| vds.filestor.allthreads.put.request\_size | byte | count, max, sum | Size of requests, in bytes | -| vds.filestor.allthreads.remove.count | operation | rate | Number of requests processed. | -| vds.filestor.allthreads.remove.failed | operation | rate | Number of failed requests. | -| vds.filestor.allthreads.remove.test\_and\_set\_failed | operation | rate | Number of operations that were skipped due to a test-and-set condition not met | -| vds.filestor.allthreads.remove.latency | millisecond | count, max, sum | Latency of successful requests. | -| vds.filestor.allthreads.remove.request\_size | byte | count, max, sum | Size of requests, in bytes | -| vds.filestor.allthreads.get.count | operation | rate | Number of requests processed. | -| vds.filestor.allthreads.get.failed | operation | rate | Number of failed requests. | -| vds.filestor.allthreads.get.latency | millisecond | count, max, sum | Latency of successful requests. | -| vds.filestor.allthreads.get.request\_size | byte | count, max, sum | Size of requests, in bytes | -| vds.filestor.allthreads.update.count | request | rate | Number of requests processed. | -| vds.filestor.allthreads.update.failed | request | rate | Number of failed requests. | -| vds.filestor.allthreads.update.test\_and\_set\_failed | request | rate | Number of requests that were skipped due to a test-and-set condition not met | -| vds.filestor.allthreads.update.latency | millisecond | count, max, sum | Latency of successful requests. | -| vds.filestor.allthreads.update.request\_size | byte | count, max, sum | Size of requests, in bytes | -| vds.filestor.allthreads.createiterator.count | request | rate | Number of requests processed. | -| vds.filestor.allthreads.createiterator.latency | millisecond | count, max, sum | Latency of successful requests. | -| vds.filestor.allthreads.visit.count | request | rate | Number of requests processed. | -| vds.filestor.allthreads.visit.latency | millisecond | count, max, sum | Latency of successful requests. | -| vds.filestor.allthreads.remove\_location.count | request | rate | Number of requests processed. | -| vds.filestor.allthreads.remove\_location.latency | millisecond | count, max, sum | Latency of successful requests. | -| vds.filestor.allthreads.splitbuckets.count | request | rate | Number of requests processed. | -| vds.filestor.allthreads.joinbuckets.count | request | rate | Number of requests processed. | -| vds.filestor.allthreads.deletebuckets.count | request | rate | Number of requests processed. | -| vds.filestor.allthreads.deletebuckets.failed | request | rate | Number of failed requests. | -| vds.filestor.allthreads.deletebuckets.latency | millisecond | count, max, sum | Latency of successful requests. | -| vds.filestor.allthreads.remove\_by\_gid.count | request | rate | Number of requests processed. | -| vds.filestor.allthreads.remove\_by\_gid.failed | request | rate | Number of failed requests. | -| vds.filestor.allthreads.remove\_by\_gid.latency | millisecond | count, max, sum | Latency of successful requests. | -| vds.filestor.allthreads.setbucketstates.count | request | rate | Number of requests processed. | -| vds.mergethrottler.averagequeuewaitingtime | millisecond | count, max, sum | Time merges spent in the throttler queue | -| vds.mergethrottler.queuesize | instance | count, max, sum | Length of merge queue | -| vds.mergethrottler.active\_window\_size | instance | count, max, sum | Number of merges active within the pending window size | -| vds.mergethrottler.estimated\_merge\_memory\_usage | byte | count, max, sum | An estimated upper bound of the memory usage (in bytes) of the merges currently in the active window | -| vds.mergethrottler.bounced\_due\_to\_back\_pressure | instance | rate | Number of merges bounced due to resource exhaustion back-pressure | -| vds.mergethrottler.locallyexecutedmerges.ok | instance | rate | The number of successful merges for 'locallyexecutedmerges' | -| vds.mergethrottler.mergechains.ok | operation | rate | The number of successful merges for 'mergechains' | -| vds.mergethrottler.mergechains.failures.busy | operation | rate | The number of merges that failed because the storage node was busy | -| vds.mergethrottler.mergechains.failures.total | operation | rate | Sum of all failures | -| vds.server.network.tls-handshakes-failed | operation | count | Number of client or server connection attempts that failed during TLS handshaking | -| vds.server.network.peer-authorization-failures | failure | count | Number of TLS connection attempts failed due to bad or missing peer certificate credentials | -| vds.server.network.client.tls-connections-established | connection | count | Number of secure mTLS connections established | -| vds.server.network.server.tls-connections-established | connection | count | Number of secure mTLS connections established | -| vds.server.network.client.insecure-connections-established | connection | count | Number of insecure (plaintext) connections established | -| vds.server.network.server.insecure-connections-established | connection | count | Number of insecure (plaintext) connections established | -| vds.server.network.tls-connections-broken | connection | count | Number of TLS connections broken due to failures during frame encoding or decoding | -| vds.server.network.failed-tls-config-reloads | failure | count | Number of times background reloading of TLS config has failed | -| vds.server.network.rpc-capability-checks-failed | failure | count | Number of RPC operations that failed due to one or more missing capabilities | -| vds.server.network.status-capability-checks-failed | failure | count | Number of status page operations that failed due to one or more missing capabilities | -| vds.server.fnet.num-connections | connection | count | Total number of connection objects | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameUnitSuffixesDescription
vds.datastored.alldisks.bucketsbucketaverageNumber of buckets managed
vds.datastored.alldisks.docsdocumentaverageNumber of documents stored
vds.datastored.alldisks.bytesbyteaverageNumber of bytes stored
vds.visitor.allthreads.averagevisitorlifetimemillisecondcount, max, sumAverage lifetime of a visitor
vds.visitor.allthreads.averagequeuewaitmillisecondcount, max, sumAverage time an operation spends in input queue.
vds.visitor.allthreads.queuesizeoperationcount, max, sumSize of input message queue.
vds.visitor.allthreads.completedoperationrateNumber of visitors completed
vds.visitor.allthreads.createdoperationrateNumber of visitors created.
vds.visitor.allthreads.failedoperationrateNumber of visitors failed
vds.visitor.allthreads.averagemessagesendtimemillisecondcount, max, sumAverage time it takes for messages to be sent to their target (and be replied to)
vds.visitor.allthreads.averageprocessingtimemillisecondcount, max, sumAverage time used to process visitor requests
vds.filestor.queuesizeoperationcount, max, sumSize of input message queue.
vds.filestor.averagequeuewaitmillisecondcount, max, sumAverage time an operation spends in input queue.
vds.filestor.active_operations.sizeoperationcount, max, sumNumber of concurrent active operations
vds.filestor.active_operations.latencymillisecondcount, max, sumLatency (in ms) for completed operations
vds.filestor.throttle_window_sizeoperationcount, max, sumCurrent size of async operation throttler window size
vds.filestor.throttle_waiting_threadsthreadcount, max, sumNumber of threads waiting to acquire a throttle token
vds.filestor.throttle_active_tokensinstancecount, max, sumCurrent number of active throttle tokens
vds.filestor.allthreads.mergemetadatareadlatencymillisecondcount, max, sumTime spent in a merge step to check metadata of current node to see what data it has.
vds.filestor.allthreads.mergedatareadlatencymillisecondcount, max, sumTime spent in a merge step to read data other nodes need.
vds.filestor.allthreads.mergedatawritelatencymillisecondcount, max, sumTime spent in a merge step to write data needed to current node.
vds.filestor.allthreads.merge_put_latencymillisecondcount, max, sumLatency of individual puts that are part of merge operations
vds.filestor.allthreads.merge_remove_latencymillisecondcount, max, sumLatency of individual removes that are part of merge operations
vds.filestor.allstripes.throttled_rpc_direct_dispatchesinstancerateNumber of times an RPC thread could not directly dispatch an async operation directly to Proton because it was disallowed by the throttle policy
vds.filestor.allstripes.throttled_persistence_thread_pollsinstancerateNumber of times a persistence thread could not immediately dispatch a queued async operation because it was disallowed by the throttle policy
vds.filestor.allstripes.timeouts_waiting_for_throttle_tokeninstancerateNumber of times a persistence thread timed out waiting for an available throttle policy token
vds.filestor.allthreads.put.countoperationrateNumber of requests processed.
vds.filestor.allthreads.put.failedoperationrateNumber of failed requests.
vds.filestor.allthreads.put.test_and_set_failedoperationrateNumber of operations that were skipped due to a test-and-set condition not met
vds.filestor.allthreads.put.latencymillisecondcount, max, sumLatency of successful requests.
vds.filestor.allthreads.put.request_sizebytecount, max, sumSize of requests, in bytes
vds.filestor.allthreads.remove.countoperationrateNumber of requests processed.
vds.filestor.allthreads.remove.failedoperationrateNumber of failed requests.
vds.filestor.allthreads.remove.test_and_set_failedoperationrateNumber of operations that were skipped due to a test-and-set condition not met
vds.filestor.allthreads.remove.latencymillisecondcount, max, sumLatency of successful requests.
vds.filestor.allthreads.remove.request_sizebytecount, max, sumSize of requests, in bytes
vds.filestor.allthreads.get.countoperationrateNumber of requests processed.
vds.filestor.allthreads.get.failedoperationrateNumber of failed requests.
vds.filestor.allthreads.get.latencymillisecondcount, max, sumLatency of successful requests.
vds.filestor.allthreads.get.request_sizebytecount, max, sumSize of requests, in bytes
vds.filestor.allthreads.update.countrequestrateNumber of requests processed.
vds.filestor.allthreads.update.failedrequestrateNumber of failed requests.
vds.filestor.allthreads.update.test_and_set_failedrequestrateNumber of requests that were skipped due to a test-and-set condition not met
vds.filestor.allthreads.update.latencymillisecondcount, max, sumLatency of successful requests.
vds.filestor.allthreads.update.request_sizebytecount, max, sumSize of requests, in bytes
vds.filestor.allthreads.createiterator.countrequestrateNumber of requests processed.
vds.filestor.allthreads.createiterator.latencymillisecondcount, max, sumLatency of successful requests.
vds.filestor.allthreads.visit.countrequestrateNumber of requests processed.
vds.filestor.allthreads.visit.latencymillisecondcount, max, sumLatency of successful requests.
vds.filestor.allthreads.remove_location.countrequestrateNumber of requests processed.
vds.filestor.allthreads.remove_location.latencymillisecondcount, max, sumLatency of successful requests.
vds.filestor.allthreads.splitbuckets.countrequestrateNumber of requests processed.
vds.filestor.allthreads.joinbuckets.countrequestrateNumber of requests processed.
vds.filestor.allthreads.deletebuckets.countrequestrateNumber of requests processed.
vds.filestor.allthreads.deletebuckets.failedrequestrateNumber of failed requests.
vds.filestor.allthreads.deletebuckets.latencymillisecondcount, max, sumLatency of successful requests.
vds.filestor.allthreads.remove_by_gid.countrequestrateNumber of requests processed.
vds.filestor.allthreads.remove_by_gid.failedrequestrateNumber of failed requests.
vds.filestor.allthreads.remove_by_gid.latencymillisecondcount, max, sumLatency of successful requests.
vds.filestor.allthreads.setbucketstates.countrequestrateNumber of requests processed.
vds.mergethrottler.averagequeuewaitingtimemillisecondcount, max, sumTime merges spent in the throttler queue
vds.mergethrottler.queuesizeinstancecount, max, sumLength of merge queue
vds.mergethrottler.active_window_sizeinstancecount, max, sumNumber of merges active within the pending window size
vds.mergethrottler.estimated_merge_memory_usagebytecount, max, sumAn estimated upper bound of the memory usage (in bytes) of the merges currently in the active window
vds.mergethrottler.bounced_due_to_back_pressureinstancerateNumber of merges bounced due to resource exhaustion back-pressure
vds.mergethrottler.locallyexecutedmerges.okinstancerateThe number of successful merges for 'locallyexecutedmerges'
vds.mergethrottler.mergechains.okoperationrateThe number of successful merges for 'mergechains'
vds.mergethrottler.mergechains.failures.busyoperationrateThe number of merges that failed because the storage node was busy
vds.mergethrottler.mergechains.failures.totaloperationrateSum of all failures
vds.server.network.tls-handshakes-failedoperationcountNumber of client or server connection attempts that failed during TLS handshaking
vds.server.network.peer-authorization-failuresfailurecountNumber of TLS connection attempts failed due to bad or missing peer certificate credentials
vds.server.network.client.tls-connections-establishedconnectioncountNumber of secure mTLS connections established
vds.server.network.server.tls-connections-establishedconnectioncountNumber of secure mTLS connections established
vds.server.network.client.insecure-connections-establishedconnectioncountNumber of insecure (plaintext) connections established
vds.server.network.server.insecure-connections-establishedconnectioncountNumber of insecure (plaintext) connections established
vds.server.network.tls-connections-brokenconnectioncountNumber of TLS connections broken due to failures during frame encoding or decoding
vds.server.network.failed-tls-config-reloadsfailurecountNumber of times background reloading of TLS config has failed
vds.server.network.rpc-capability-checks-failedfailurecountNumber of RPC operations that failed due to one or more missing capabilities
vds.server.network.status-capability-checks-failedfailurecountNumber of status page operations that failed due to one or more missing capabilities
vds.server.fnet.num-connectionsconnectioncountTotal number of connection objects
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/self-managed/tools.mdx b/mintlify-docs/en/reference/operations/self-managed/tools.mdx index 7f375bc42c..8dd73caf29 100644 --- a/mintlify-docs/en/reference/operations/self-managed/tools.mdx +++ b/mintlify-docs/en/reference/operations/self-managed/tools.mdx @@ -34,12 +34,32 @@ $ vespa-configproxy-cmd -m sources Find a more comprehensive example in [inspecting config](/en/operations/self-managed/config-proxy#inspecting-config). -| Option | Description | -| --- | --- | -| **\-m** | method, available methods are:

**cache**
Output the config proxy cache content (overview)

**dumpcache**

**statistics**

**heap**

**getConfig**
Get config (see [vespa-get-config](#vespa-get-config))

**getmode**
Outputs the current mode of the config proxy

**setmode**
Use *default* or *memorycache* - [example](/en/operations/self-managed/config-proxy)

**invalidatecache**
Clears the current cache in the config proxy

**cachefull**
Output the config proxy cache content (including config payload)

**sources**
Output the config proxy's upstream config sources

**updatesources**
Updates the config proxy's upstream config sources to the supplied ones | -| **\-p** | port number, optional | -| **\-s** | hostname, optional | -| **\-h** | help text and usage | + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-m**method, available methods are:

**cache**
Output the config proxy cache content (overview)

**dumpcache**

**statistics**

**heap**

**getConfig**
Get config (see vespa-get-config)

**getmode**
Outputs the current mode of the config proxy

**setmode**
Use *default* or *memorycache* - example

**invalidatecache**
Clears the current cache in the config proxy

**cachefull**
Output the config proxy cache content (including config payload)

**sources**
Output the config proxy's upstream config sources

**updatesources**
Updates the config proxy's upstream config sources to the supplied ones
**-p**port number, optional
**-s**hostname, optional
**-h**help text and usage
## vespa-configserver-remove-state @@ -47,9 +67,20 @@ Find a more comprehensive example in [inspecting config](/en/operations/self-man Synopsis: `vespa-configserver-remove-state [-force]` -| Option | Description | -| --- | --- | -| **\-force** | Do not ask for confirmation before removal | + + + + + + + + + + + + + +
OptionDescription
**-force**Do not ask for confirmation before removal
## vespa-config-status @@ -63,11 +94,28 @@ Example: $ vespa-config-status ``` -| Option | Description | -| --- | --- | -| **\-v** | Verbose - show all services, even if they are up-to-date | -| **\-c arg** | Get the Vespa cluster configuration from the config server specified by host and port. Use *host* or *host:port* for config server | -| **\-f** | Filter to only query config status for the given comma-separated set of hosts | + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-v**Verbose - show all services, even if they are up-to-date
**-c arg**Get the Vespa cluster configuration from the config server specified by host and port. Use *host* or *host:port* for config server
**-f**Filter to only query config status for the given comma-separated set of hosts
## vespa-deploy @@ -85,23 +133,75 @@ $ vespa-deploy prepare [application-path|zip-file] && vespa-deploy activate $ vespa-deploy prepare app.zip && vespa-deploy activate ``` -| Command | Description | -| --- | --- | -| **prepare** | *vespa-deploy prepare* combines the [upload](/en/reference/api/deploy-v2#create-session) and [prepare](/en/reference/api/deploy-v2#prepare-session) steps. | -| **activate** | *vespa-deploy activate* invokes the [activate](/en/reference/api/deploy-v2#activate-session) step. | -| **upload** | *vespa-deploy upload* uploads an application package | -| **fetch** | *vespa-deploy fetch* fetches an application package. Useful to get the active configuration for an instance. | -| **help** | Same as **\-h** | - -| Option | Description | -| --- | --- | -| **\-h** | Show help text | -| **\-v** | Verbose | -| **\-n** | Dry-run deployment | -| **\-f** | Force - ignore validation errors | -| **\-t** | Timeout | -| **\-c** | Config server hostname | -| **\-p** | Config server port | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandDescription
**prepare***vespa-deploy prepare* combines the upload and prepare steps.
**activate***vespa-deploy activate* invokes the activate step.
**upload***vespa-deploy upload* uploads an application package
**fetch***vespa-deploy fetch* fetches an application package. Useful to get the active configuration for an instance.
**help**Same as **-h**
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-h**Show help text
**-v**Verbose
**-n**Dry-run deployment
**-f**Force - ignore validation errors
**-t**Timeout
**-c**Config server hostname
**-p**Config server port
## vespa-destination @@ -115,15 +215,44 @@ Example: $ vespa-destination --name msg_sink ``` -| Option | Description | -| --- | --- | -| **\--instant** | Reply in message thread | -| **\--name arg** | Slobrok name to register | -| **\--maxqueuetime arg** | Adjust the in-queue size to have a maximum queue wait period of this many ms (default -1 = unlimited) | -| **\--silent #nummsg** | Do not dump anything, but progress every #nummsg | -| **\--sleeptime arg** | The number of milliseconds to sleep per message, to simulate processing time | -| **\--threads arg** | The number of threads to process the incoming data | -| **\--verbose** | Dump the contents of certain messages to stdout | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**--instant**Reply in message thread
**--name arg**Slobrok name to register
**--maxqueuetime arg**Adjust the in-queue size to have a maximum queue wait period of this many ms (default -1 = unlimited)
**--silent #nummsg**Do not dump anything, but progress every #nummsg
**--sleeptime arg**The number of milliseconds to sleep per message, to simulate processing time
**--threads arg**The number of threads to process the incoming data
**--verbose**Dump the contents of certain messages to stdout
## vespa-fbench-filter-file @@ -189,25 +318,84 @@ Example: $ vespa-feeder file.json ``` -| Option | Description | -| --- | --- | -| **\--abortondataerror arg** | Abort if the input has errors (true\|false) - default true. Set to *false* in case the input has errors (e.g., invalid characters). *vespa-feeder* notifies on parsing errors at the end of the feed, but it will not abort | -| **\--abortonsenderror arg** | Abort if an error occurred while sending operations to Vespa (true\|false) - default true | -| **\--file arg** | Input files to read. These can also be passed as arguments without the option prefix. If none is given, this tool parses identifiers from stdin | -| **\--maxpending arg** | Maximum number of pending operations. This disables dynamic throttling, use with care | -| **\--maxpendingsize arg** | Maximum size (in bytes) of pending operations | -| **\--maxfeedrate arg** | Limits the feed rate to the given number (operations/second) | -| **\--mode** | The mode to run vespa-feeder in (standard\|benchmark) - default standard | -| **\--noretry** | Disables retries of recoverable failures | -| **\--retrydelay arg** | The time (in seconds) to wait between retries of a failed operation. Default 1 | -| **\--route arg** | The [route](/en/writing/document-routing) to send the data to. Default the *default* route | -| **\--timeout arg** | Time (in seconds) allowed for sending operations. Default 180 | -| **\--trace arg** | Trace level of network traffic. Default 0 | -| **\--validate** | Run validation tool on input files - do not feed | -| **\--dumpDocuments ``** | File where documents in the put are serialized | -| **\--numthreads arg** | How many threads to use for sending. Default 1 | -| **\--create-if-non-existent** | Enable setting of create-if-non-existent to true on all document updates in the given feed | -| **\-v, --verbose** | Enable verbose output of progress | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**--abortondataerror arg**Abort if the input has errors (true|false) - default true. Set to *false* in case the input has errors (e.g., invalid characters). *vespa-feeder* notifies on parsing errors at the end of the feed, but it will not abort
**--abortonsenderror arg**Abort if an error occurred while sending operations to Vespa (true|false) - default true
**--file arg**Input files to read. These can also be passed as arguments without the option prefix. If none is given, this tool parses identifiers from stdin
**--maxpending arg**Maximum number of pending operations. This disables dynamic throttling, use with care
**--maxpendingsize arg**Maximum size (in bytes) of pending operations
**--maxfeedrate arg**Limits the feed rate to the given number (operations/second)
**--mode**The mode to run vespa-feeder in (standard|benchmark) - default standard
**--noretry**Disables retries of recoverable failures
**--retrydelay arg**The time (in seconds) to wait between retries of a failed operation. Default 1
**--route arg**The route to send the data to. Default the *default* route
**--timeout arg**Time (in seconds) allowed for sending operations. Default 180
**--trace arg**Trace level of network traffic. Default 0
**--validate**Run validation tool on input files - do not feed
**--dumpDocuments {``}**File where documents in the put are serialized
**--numthreads arg**How many threads to use for sending. Default 1
**--create-if-non-existent**Enable setting of create-if-non-existent to true on all document updates in the given feed
**-v, --verbose**Enable verbose output of progress
## vespa-get @@ -215,21 +403,68 @@ $ vespa-feeder file.json Synopsis: `vespa-get [documentid...]` -| Option | Description | -| --- | --- | -| **\-a,--trace *tracelevel*** | Trace level to use (default 0) | -| **\-c,--configid *configid*** | Use the specified config id for messagebus configuration | -| **\-f,--fieldset *fieldset*** | Retrieve the specified fields only (see [Document field sets](/en/schemas/documents#fieldsets)). Default: `[document]` | -| **\-h,--help** | Show this syntax page | -| **\-i,--printids** | Show only identifiers of retrieved documents | -| **\-j,--jsonoutput** | JSON output (default) | -| **\-l,--loadtype *loadtype*** | Load type (default "") | -| **\-n,--noretry** | Do not retry operation on transient errors, as is default | -| **\-r,--route *route*** | Send request to the given messagebus route | -| **\-s,--showdocsize** | Show binary size of document | -| **\--shorttensor**s | Output using [tensor short form](/en/reference/schemas/document-json-format#tensor) | -| **\-t,--timeout *timeout*** | Set timeout for the request in seconds (default 0) | -| **\-u,--cluster *cluster*** | Send request to the given content cluster | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-a,--trace *tracelevel***Trace level to use (default 0)
**-c,--configid *configid***Use the specified config id for messagebus configuration
**-f,--fieldset *fieldset***Retrieve the specified fields only (see Document field sets). Default: {`[document]`}
**-h,--help**Show this syntax page
**-i,--printids**Show only identifiers of retrieved documents
**-j,--jsonoutput**JSON output (default)
**-l,--loadtype *loadtype***Load type (default "")
**-n,--noretry**Do not retry operation on transient errors, as is default
**-r,--route *route***Send request to the given messagebus route
**-s,--showdocsize**Show binary size of document
**--shorttensor**sOutput using tensor short form
**-t,--timeout *timeout***Set timeout for the request in seconds (default 0)
**-u,--cluster *cluster***Send request to the given content cluster
## vespa-get-cluster-state @@ -237,17 +472,52 @@ Get cluster state - refer to [content nodes](/en/content/content-nodes). Synopsis: `vespa-get-cluster-state [options]` -| Option | Description | -| --- | --- | -| **\-h, --help** | Show help | -| **\-v** | More verbose output | -| **\-s** | Less verbose output | -| **\--show-hidden** | Also show hidden undocumented debug options | -| **\-c, --cluster** | The cluster name of the cluster to query. If unspecified, and vespa is installed on the current node, information will be attempted auto-extracted | -| **\-f, --force** | Force execution | -| **\--config-server** | Host name of the config server to query | -| **\--config-server-port** | Port to connect to the config server on | -| **\--config-request-timeout** | Timeout of config request | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-h, --help**Show help
**-v**More verbose output
**-s**Less verbose output
**--show-hidden**Also show hidden undocumented debug options
**-c, --cluster**The cluster name of the cluster to query. If unspecified, and vespa is installed on the current node, information will be attempted auto-extracted
**-f, --force**Force execution
**--config-server**Host name of the config server to query
**--config-server-port**Port to connect to the config server on
**--config-request-timeout**Timeout of config request
## vespa-get-config @@ -263,45 +533,144 @@ $ vespa-get-config -n container.statistics -i search/cluster.search Find a more comprehensive example in [inspecting config](/en/operations/self-managed/config-proxy#inspecting-config). -| Option | Description | -| --- | --- | -| **\-n** | config definition name, including namespace (on the form `.`) | -| **\-i** | config id, optional | -| **\-a** | config def schema file, optional (if you want to use another schema than the one known for the config server) | -| **\-m** | defMd5, optional | -| **\-c** | configMd5, optional | -| **\-t** | server timeout, in seconds, default value 3, optional | -| **\-w** | timeout, default value 10, optional | -| **\-s** | server hostname, default localhost, optional | -| **\-p** | port, default 19090, optional | -| **\-d** | debug mode, optional | -| **\-h** | help text and usage | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-n**config definition name, including namespace (on the form {`.`})
**-i**config id, optional
**-a**config def schema file, optional (if you want to use another schema than the one known for the config server)
**-m**defMd5, optional
**-c**configMd5, optional
**-t**server timeout, in seconds, default value 3, optional
**-w**timeout, default value 10, optional
**-s**server hostname, default localhost, optional
**-p**port, default 19090, optional
**-d**debug mode, optional
**-h**help text and usage
## vespa-get-node-state Get the state of one or more storage services from the fleet controller - refer to [content nodes](/en/content/content-nodes): -| State | Description | -| --- | --- | -| **Unit state** | The state of the node seen from the cluster controller. | -| **User state** | The state the administrator wants the node to be in, default "up". Can be set by using [vespa-set-node-state](#vespa-set-node-state) or by the cluster controller | -| **Generated state** | The state of a given node in the current cluster state. This is the state all the other nodes know about. This state is a product of the other two states and cluster controller logic to keep the cluster stable. | + + + + + + + + + + + + + + + + + + + + + +
StateDescription
**Unit state**The state of the node seen from the cluster controller.
**User state**The state the administrator wants the node to be in, default "up". Can be set by using vespa-set-node-state or by the cluster controller
**Generated state**The state of a given node in the current cluster state. This is the state all the other nodes know about. This state is a product of the other two states and cluster controller logic to keep the cluster stable.
Synopsis: `vespa-get-node-state [options]` -| Option | Description | -| --- | --- | -| **\-h, --help** | Show help | -| **\-v** | More verbose output | -| **\-s** | Less verbose output | -| **\--show-hidden** | Also show hidden undocumented debug options | -| **\-c, --cluster** | The cluster name of the cluster to query. If unspecified, and vespa is installed on the current node, information will be attempted auto-extracted | -| **\-f, --force** | Force execution | -| **\-t, --type** | Node type - can either be 'storage' or 'distributor'. If not specified, the operation will use state for both types | -| **\-i, --index** | Node index. If not specified, all nodes found running on this host will be used | -| **\--config-server** | Host name of the config server to query | -| **\--config-server-port** | Port to connect to the config server on | -| **\--config-request-timeout** | Timeout of config request | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-h, --help**Show help
**-v**More verbose output
**-s**Less verbose output
**--show-hidden**Also show hidden undocumented debug options
**-c, --cluster**The cluster name of the cluster to query. If unspecified, and vespa is installed on the current node, information will be attempted auto-extracted
**-f, --force**Force execution
**-t, --type**Node type - can either be 'storage' or 'distributor'. If not specified, the operation will use state for both types
**-i, --index**Node index. If not specified, all nodes found running on this host will be used
**--config-server**Host name of the config server to query
**--config-server-port**Port to connect to the config server on
**--config-request-timeout**Timeout of config request
## vespa-index-inspect @@ -326,16 +695,48 @@ Example (make sure to flush the index before using): `$` [`vespa-proton-cmd`](#vespa-proton-cmd) `--local triggerFlush && \ vespa-index-inspect dumpwords \ --indexdir /opt/vespa/var/db/vespa/search/cluster.music/n0/documents/music/0.ready/index/index.flush.1 \ --field artist bad 2 so 1` -| Option | Description | -| --- | --- | -| **\--indexdir *path*** | Index location | -| **\--field *fieldname*** | Field to analyze | -| **\--transpose** | Dump all tokens | -| **\--minnumdocs *count*** | Minimum number of documents to analyze | -| **\--docidlimit *docid*** | Dump up to this doc id | -| **\--mindocid *docid*** | Start from this docid | -| **\--wordnum** | Also dump token numbers | -| **\--verbose** | Verbose output | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**--indexdir *path***Index location
**--field *fieldname***Field to analyze
**--transpose**Dump all tokens
**--minnumdocs *count***Minimum number of documents to analyze
**--docidlimit *docid***Dump up to this doc id
**--mindocid *docid***Start from this docid
**--wordnum**Also dump token numbers
**--verbose**Verbose output
## vespa-attribute-inspect @@ -348,10 +749,24 @@ Example (make sure to flush the attribute before using): `$` [`vespa-proton-cmd`](#vespa-proton-cmd) `--local triggerFlush && \ vespa-attribute-inspect -p /opt/vespa/var/db/vespa/search/cluster.music/n0/documents/music/0.ready/attribute/year/snapshot-10/year && \ cat /opt/vespa/var/db/vespa/search/cluster.music/n0/documents/music/0.ready/attribute/year/snapshot-10/year.out` -| Option | Description | -| --- | --- | -| **\-p**| print content to `.out` | -| **\-s** | save attribute to `.save.dat` | + + + + + + + + + + + + + + + + + +
OptionDescription
**-p**print content to {`.out`}
**-s**save attribute to {`.save.dat`}
## vespa-jvm-dumper @@ -390,14 +805,40 @@ Example: For service `container`, set `com.yahoo.search.searchchain` and all sub $ vespa-logctl container:com.yahoo.search.searchchain all=on,spam=off,debug=off ``` -| Option | Description | -| --- | --- | -| **\-c** | Create the control file if it does not exist (implies -n) | -| **\-a** | Update all .logcontrol files | -| **\-r** | Reset to default levels | -| **\-n** | Create the component entry if it does not exist | -| **\-f *file*** | Use `` as the log control file | -| **\-d *dir*** | Look in `` for log control files | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-c**Create the control file if it does not exist (implies -n)
**-a**Update all .logcontrol files
**-r**Reset to default levels
**-n**Create the component entry if it does not exist
**-f *file***Use {``} as the log control file
**-d *dir***Look in {``} for log control files
## vespa-logfmt @@ -431,20 +872,64 @@ $ vespa-logfmt -l all-info,-debug -s level -s time,usecs,component,message -t -l 1504592307.949587 WARNING : config-sentinel FRT Connection tcp/localhost:19090 suspended until 2017-09-05 06:19:07 GMT ``` -| Option | Description | -| --- | --- | -| **\-l *levellist* (--level=*levellist*)** | Filter messages by log level. By default, only messages of level *fatal, error, warning*, and *info* will be included, while messages of level *config, event, debug*, and *spam* will be ignored. This option allows you to replace or modify the list of log levels to be included. *levellist* is a comma-separated list of level names.

• The name *all* may be used to add all known levels
• You may use + or - in front of terms to add or remove from the current (or default) list of levels instead of replacing it
• Adding term | -| **\-s *fieldlist*** | Select which fields of log messages to show. The output field order is fixed. When using this option, only the named fields will be printed. The default fields are as \[**\-s fmttime,msecs,level,service,component,message**\]. The fieldlist is a comma-separated list of field names. The name *all* may be used to add all possible fields. Prepending a minus sign will turn off the display of the named field. Starting the list with a plus sign will add and remove fields from the current (or default) list of fields instead of replacing it. Using this option several times works as if the given *fieldlist* arguments had been concatenated into one comma-separated list. Fields:

**time**
Print the time in seconds since the epoch. Ignored if *fmttime* is shown

**fmttime**
Print the time in human-readable \[YYYY-MM-DD HH:mm:ss\] format. Note that the time is printed in the local timezone. To get GMT output, use `env TZ=GMT vespa-logfmt`

**msecs**
Add milliseconds after the seconds in *time* and *fmttime* output. Ignored if *usecs* is in effect

**usecs**
Add microseconds after the seconds in *time* and *fmttime* output

**host**
Print the hostname field

**level**

Print the level field (upper-cased)

**pid**
Print the pid field

**service**
Print the service field

**component**
Print the component field

**message**
Print the message text field. You probably always want to add this | -| **\-p *pid*** | Select messages where the pid field matches the *pid* string | -| **\-S *service*** | Select messages where the service field matches the *service* string | -| **\-H *host*** | Select messages where the hostname field matches the *host* string | -| **\-c *regex*** | Select messages where the component field matches the *regex*, using *perlre* regular expression matching | -| **\-m *regex*** | Select messages where the message text field matches the *regex*, using *perlre* regular expression matching | -| **\-f** | Invoke tail -F to follow the input file | -| **\-N** | De-quote quoted newlines in the message text field to an actual newline plus tab | -| **\-t** | Format the component field (if shown) as a fixed-width string, truncating if necessary | -| **\-ts** | Format the service field (if shown) as a fixed-width string, truncating if necessary | -| **\-i, --internal** | Only include log entries emitted by the Vespa platform, i.e., exclude log entries from custom components | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-l *levellist* (--level=*levellist*)**Filter messages by log level. By default, only messages of level *fatal, error, warning*, and *info* will be included, while messages of level *config, event, debug*, and *spam* will be ignored. This option allows you to replace or modify the list of log levels to be included. *levellist* is a comma-separated list of level names.

• The name *all* may be used to add all known levels
• You may use + or - in front of terms to add or remove from the current (or default) list of levels instead of replacing it
• Adding term
**-s *fieldlist***Select which fields of log messages to show. The output field order is fixed. When using this option, only the named fields will be printed. The default fields are as [**-s fmttime,msecs,level,service,component,message**]. The fieldlist is a comma-separated list of field names. The name *all* may be used to add all possible fields. Prepending a minus sign will turn off the display of the named field. Starting the list with a plus sign will add and remove fields from the current (or default) list of fields instead of replacing it. Using this option several times works as if the given *fieldlist* arguments had been concatenated into one comma-separated list. Fields:

**time**
Print the time in seconds since the epoch. Ignored if *fmttime* is shown

**fmttime**
Print the time in human-readable [YYYY-MM-DD HH:mm:ss] format. Note that the time is printed in the local timezone. To get GMT output, use {`env TZ=GMT vespa-logfmt`}

**msecs**
Add milliseconds after the seconds in *time* and *fmttime* output. Ignored if *usecs* is in effect

**usecs**
Add microseconds after the seconds in *time* and *fmttime* output

**host**
Print the hostname field

**level**

Print the level field (upper-cased)

**pid**
Print the pid field

**service**
Print the service field

**component**
Print the component field

**message**
Print the message text field. You probably always want to add this
**-p *pid***Select messages where the pid field matches the *pid* string
**-S *service***Select messages where the service field matches the *service* string
**-H *host***Select messages where the hostname field matches the *host* string
**-c *regex***Select messages where the component field matches the *regex*, using *perlre* regular expression matching
**-m *regex***Select messages where the message text field matches the *regex*, using *perlre* regular expression matching
**-f**Invoke tail -F to follow the input file
**-N**De-quote quoted newlines in the message text field to an actual newline plus tab
**-t**Format the component field (if shown) as a fixed-width string, truncating if necessary
**-ts**Format the service field (if shown) as a fixed-width string, truncating if necessary
**-i, --internal**Only include log entries emitted by the Vespa platform, i.e., exclude log entries from custom components
## vespa-model-inspect @@ -452,26 +937,87 @@ $ vespa-logfmt -l all-info,-debug -s level -s time,usecs,component,message -t -l Synopsis: `vespa-model-inspect [-c host | host:port] [-t tag] [-h] [-u] [-v] command` -| Command | Description | -| --- | --- | -| **hosts** | Show hostnames of all hosts in the Vespa system | -| **services** | Show a list of all service types in the Vespa system | -| **clusters** | Show a list of all named clusters in the Vespa system | -| **configids** | Show a list of all config ids in the Vespa system | -| **filter:ports** | List ports matching filter options | -| **host *hostname*** | Show host details: What services are running, and what ports have they allocated | -| **service *servicetype*** | Show service details: What instances of the service are running, on what hosts, and what ports have they allocated | -| **cluster *clustername*** | Show all services in the cluster, with details on hostname and allocated ports | -| **configid *configid*** | Show all services using this configid | -| **get-index-of *servicetype* *host*** | Show all indexes for instances of the service type on the given host | - -| Option | Description | -| --- | --- | -| **\-c *host* \| *host:port*** | Specify host and port (or just host) to use for getting the config that this tool displays. Default is to use the configserver. You might want to use localhost:19090 if you are on a host with a running Vespa system without a config server | -| **\-h** | Show usage | -| **\-t *tag*** | to filter on a port tag | -| **\-u** | Show URLs for services | -| **\-v** | Verbose mode | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandDescription
**hosts**Show hostnames of all hosts in the Vespa system
**services**Show a list of all service types in the Vespa system
**clusters**Show a list of all named clusters in the Vespa system
**configids**Show a list of all config ids in the Vespa system
**filter:ports**List ports matching filter options
**host *hostname***Show host details: What services are running, and what ports have they allocated
**service *servicetype***Show service details: What instances of the service are running, on what hosts, and what ports have they allocated
**cluster *clustername***Show all services in the cluster, with details on hostname and allocated ports
**configid *configid***Show all services using this configid
**get-index-of *servicetype* *host***Show all indexes for instances of the service type on the given host
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-c *host* | *host:port***Specify host and port (or just host) to use for getting the config that this tool displays. Default is to use the configserver. You might want to use localhost:19090 if you are on a host with a running Vespa system without a config server
**-h**Show usage
**-t *tag***to filter on a port tag
**-u**Show URLs for services
**-v**Verbose mode
Examples: @@ -540,12 +1086,32 @@ $ vespa-proton-cmd 19108 triggerFlush Unless the **\-h** or **\--help** option is used, one of these commands must be present: -| Command | Description | -| --- | --- | -| **getProtonStatus** | Get the current proton state and its components. | -| **getState** | Get the current proton state. | -| **triggerFlush** | Trigger [flush](/en/content/proton#proton-maintenance-jobs) as soon as possible for all document types. | -| **prepareRestart** | Estimates the cost of [transaction log](/en/content/proton#transaction-log) replay, and flushes data structures if that will speed up a subsequent start. If this is not called before stopping proton, there is no estimation and no flush. | + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandDescription
**getProtonStatus**Get the current proton state and its components.
**getState**Get the current proton state.
**triggerFlush**Trigger flush as soon as possible for all document types.
**prepareRestart**Estimates the cost of transaction log replay, and flushes data structures if that will speed up a subsequent start. If this is not called before stopping proton, there is no estimation and no flush.
## vespa-remove-index @@ -570,10 +1136,24 @@ Really to remove this vespa index? Type "yes" if you are sure ==> yes [info] removed. ``` -| Option | Description | -| --- | --- | -| **\-force** | Do not require verification from the user before really removing index data | -| **\-cluster *name*** | Only remove data for the given cluster name | + + + + + + + + + + + + + + + + + +
OptionDescription
**-force**Do not require verification from the user before really removing index data
**-cluster *name***Only remove data for the given cluster name
## vespa-route @@ -597,24 +1177,80 @@ There are 2 hop(s): 2. indexing ``` -| Option | Description | -| --- | --- | -| **\--documentmanagerconfigid ``** | Sets the config id that supplies document configuration | -| **\--dump** | Prints the complete content of the routing table | -| **\--help** | Prints this help | -| **\--hop ``** | Prints detailed information about hop `` | -| **\--hops** | Prints a list of all available hops | -| **\--identity ``** | Sets the identity of message bus | -| **\--listenport ``** | Sets the port message bus will listen to | -| **\--oosserverpattern ``** | Sets the out-of-service server pattern for message bus | -| **\--protocol ``** | Sets the name of the protocol whose routing to inspect | -| **\--route ``** | Prints detailed information about route `` | -| **\--routes** | Prints a list of all available routes | -| **\--routingconfigid ``** | Sets the config id that supplies the routing tables | -| **\--services** | Prints a list of all available services | -| **\--slobrokconfigid ``** | Sets the config id that supplies the slobrok server list | -| **\--trace ``** | Sets the trace level to use when visualizing the route | -| **\--verify** | All hops and routes are verified when routing | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**--documentmanagerconfigid {``}**Sets the config id that supplies document configuration
**--dump**Prints the complete content of the routing table
**--help**Prints this help
**--hop {``}**Prints detailed information about hop {``}
**--hops**Prints a list of all available hops
**--identity {``}**Sets the identity of message bus
**--listenport {``}**Sets the port message bus will listen to
**--oosserverpattern {``}**Sets the out-of-service server pattern for message bus
**--protocol {``}**Sets the name of the protocol whose routing to inspect
**--route {``}**Prints detailed information about route {``}
**--routes**Prints a list of all available routes
**--routingconfigid {``}**Sets the config id that supplies the routing tables
**--services**Prints a list of all available services
**--slobrokconfigid {``}**Sets the config id that supplies the slobrok server list
**--trace {``}**Sets the trace level to use when visualizing the route
**--verify**All hops and routes are verified when routing
## vespa-sentinel-cmd @@ -628,17 +1264,51 @@ See [start / stop / restart](/en/operations/self-managed/admin-procedures#vespa- Synopsis: `vespa-sentinel-cmd [-h] list|start |restart |stop |connectivity` -| Option | Description | -| --- | --- | -| **\-h** | Help text | - -| Command | Description | -| --- | --- | -| **list** | Lists the services running on this node and their status:

**service name**

**state**
• RUNNING: Service is running
• FINISHED: Service has been stopped
• FAILED: Service has crashed and failed to restart
• TERMINATING: Service is stopping

**mode**
• MANUAL: Service has to be started and stopped manually
• AUTO: Service will restart automatically if it stops

**pid**
Pid of the process (main thread)

**exitstatus**
Exit code the last time the service stopped.

**id**
[Config ID](/en/applications/configapi-dev#config-id) of the service | -| **restart \[name\]** | Restarts the service with the given name. The name is the first string in the service list given by `list` | -| **stop \[name\]** | Stops the service with the given name | -| **start \[name\]** | Starts the service with the given name | -| **connectivity** | Use to troubleshoot startup issues/network configuration/ACLs/iptables:

`$ vespa-sentinel-cmd connectivity`
`vespa-sentinel-cmd 'connectivity' OK.`
`node0.vespanet -> ok`
`node1.vespanet -> ok`
`node2.vespanet -> ok` | + + + + + + + + + + + + + +
OptionDescription
**-h**Help text
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandDescription
**list**Lists the services running on this node and their status:

**service name**

**state**
• RUNNING: Service is running
• FINISHED: Service has been stopped
• FAILED: Service has crashed and failed to restart
• TERMINATING: Service is stopping

**mode**
• MANUAL: Service has to be started and stopped manually
• AUTO: Service will restart automatically if it stops

**pid**
Pid of the process (main thread)

**exitstatus**
Exit code the last time the service stopped.

**id**
Config ID of the service
**restart [name]**Restarts the service with the given name. The name is the first string in the service list given by {`list`}
**stop [name]**Stops the service with the given name
**start [name]**Starts the service with the given name
**connectivity**Use to troubleshoot startup issues/network configuration/ACLs/iptables:

{`$ vespa-sentinel-cmd connectivity`}
{`vespa-sentinel-cmd 'connectivity' OK.`}
{`node0.vespanet -> ok`}
{`node1.vespanet -> ok`}
{`node2.vespanet -> ok`}
## vespa-set-node-state @@ -652,20 +1322,64 @@ Example: $ vespa-set-node-state -i 0 maintenance "Set to maintenance for software upgrade" ``` -| Option | Description | -| --- | --- | -| **\-h, --help** | Show help | -| **\-v** | More verbose output | -| **\-s** | Less verbose output | -| **\--show-hidden** | Also show hidden undocumented debug options | -| **\-n, --no-wait** | Do not wait for node state changes to be visible in the cluster before returning | -| **\-c, --cluster** | The cluster name of the cluster to query. If unspecified, and vespa is installed on the current node, information will be attempted auto-extracted | -| **\-f, --force** | Force execution | -| **\-t, --type** | Node type - can either be 'storage' or 'distributor'. If not specified, the operation will use state for both types | -| **\-i, --index** | Node index. If not specified, all nodes found running on this host will be used | -| **\--config-server** | Host name of the config server to query | -| **\--config-server-port** | Port to connect to the config server on | -| **\--config-request-timeout** | Timeout of config request | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-h, --help**Show help
**-v**More verbose output
**-s**Less verbose output
**--show-hidden**Also show hidden undocumented debug options
**-n, --no-wait**Do not wait for node state changes to be visible in the cluster before returning
**-c, --cluster**The cluster name of the cluster to query. If unspecified, and vespa is installed on the current node, information will be attempted auto-extracted
**-f, --force**Force execution
**-t, --type**Node type - can either be 'storage' or 'distributor'. If not specified, the operation will use state for both types
**-i, --index**Node index. If not specified, all nodes found running on this host will be used
**--config-server**Host name of the config server to query
**--config-server-port**Port to connect to the config server on
**--config-request-timeout**Timeout of config request
## vespa-significance @@ -719,15 +1433,44 @@ $ vespa-significance generate --format vstsv --in dumped_term_df.vstsv --out un_ In this example the input is generated with `vespa-significance export`. This is available in Vespa as of version 8.597.8. When language is not specified, the default is set to unknown when using VSTSV format. -| Option | Description | -| --- | --- | -| **\-h, --help** | Show help for the subcommand. | -| **\-i, --in ``** | Input file. Default format is JSON Lines where each line is a [Vespa document in JSON](/en/reference/schemas/document-json-format). Use `--format vstsv` to read VSTSV files. | -| **\--format ``** | Input format. Format can be `jsonl` or `vstsv`. Defaults to `jsonl`. | -| **\-o, --out ``** | Output [significance model](/en/ranking/significance#significance-model-file). | -| **\-f, --field ``** | JSONL: the name of the text field to analyse. VSTSV: No effect. | -| **\-l, --language ``** | Comma-separated ISO language tags. The first tag controls tokenization; additional tags are stored in the model. Required for JSONL, optional for VSTSV (defaults to `un`). See supported tags in [linguistics in Vespa](/en/linguistics/linguistics-opennlp#default-languages). | -| **\-zst, --zst-compression ``** | Enable Zstandard compression of the output. Enabled can be `true` or `false`. Default `false`. When `true`, the output file must end with `.zst`. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-h, --help**Show help for the subcommand.
**-i, --in {``}**Input file. Default format is JSON Lines where each line is a Vespa document in JSON. Use {`--format vstsv`} to read VSTSV files.
**--format {``}**Input format. Format can be {`jsonl`} or {`vstsv`}. Defaults to {`jsonl`}.
**-o, --out {``}**Output significance model.
**-f, --field {``}**JSONL: the name of the text field to analyse. VSTSV: No effect.
**-l, --language {``}**Comma-separated ISO language tags. The first tag controls tokenization; additional tags are stored in the model. Required for JSONL, optional for VSTSV (defaults to {`un`}). See supported tags in linguistics in Vespa.
**-zst, --zst-compression {``}**Enable Zstandard compression of the output. Enabled can be {`true`} or {`false`}. Default {`false`}. When {`true`}, the output file must end with {`.zst`}.
### vespa-significance export @@ -743,16 +1486,48 @@ Locates an index on the content node and exports term document frequencies from This command must be executed on a content node. -| Option | Description | -| --- | --- | -| **\-h, --help** | Show help for the subcommand. | -| **\--index-dir ``** | Explicit path to the index directory. If omitted, the tool locates the directory using cluster, schema, and node information. | -| **\--out ``** | Output VSTSV file. Defaults to `export_*FIELD*.vstsv`. Compression adds `.zst` automatically. | -| **\--field ``** | Text field to export. Must correspond to a field directory within the selected index. This is the same as a field in the schema. | -| **\--cluster ``** | Specifies the content cluster name for locating the index directory. If multiple clusters exist per node, use --cluster to choose one. | -| **\--schema ``** | Specifies the schema (document type) name used when locating the index directory. | -| **\--node-index ``** | Specifies the content node index for locating the index directory. If there are multiple indexes on a node, use --node-index to choose one. | -| **\-zst, --zst-compression** | Write the VSTSV output compressed with Zstandard. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-h, --help**Show help for the subcommand.
**--index-dir {``}**Explicit path to the index directory. If omitted, the tool locates the directory using cluster, schema, and node information.
**--out {``}**Output VSTSV file. Defaults to {`export_*FIELD*.vstsv`}. Compression adds {`.zst`} automatically.
**--field {``}**Text field to export. Must correspond to a field directory within the selected index. This is the same as a field in the schema.
**--cluster {``}**Specifies the content cluster name for locating the index directory. If multiple clusters exist per node, use --cluster to choose one.
**--schema {``}**Specifies the schema (document type) name used when locating the index directory.
**--node-index {``}**Specifies the content node index for locating the index directory. If there are multiple indexes on a node, use --node-index to choose one.
**-zst, --zst-compression**Write the VSTSV output compressed with Zstandard.
### vespa-significance merge @@ -766,12 +1541,32 @@ $ vespa-significance merge --out merged_title.vstsv export_title_node1.vstsv exp Merges multiple VSTSV files and preserves the total document count in the header. Use this to combine exports before generating a model. This is available in Vespa as of version 8.597.8. -| Option | Description | -| --- | --- | -| **\-h, --help** | Show help for the subcommand. | -| **\--out ``** | Output VSTSV file. Defaults to `merged.vstsv`. Compression adds `.zst`. | -| **\--min-keep ``** | Filter out terms with document frequency strictly lower than `NUMBER`. | -| **\-zst, --zst-compression** | Write the merged VSTSV output compressed with Zstandard. | + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-h, --help**Show help for the subcommand.
**--out {``}**Output VSTSV file. Defaults to {`merged.vstsv`}. Compression adds {`.zst`}.
**--min-keep {``}**Filter out terms with document frequency strictly lower than {`NUMBER`}.
**-zst, --zst-compression**Write the merged VSTSV output compressed with Zstandard.
## vespa-start-configserver @@ -816,17 +1611,52 @@ Persistence bucket BucketId(0x4000000000004800), partition 0 Timestamp: 1452598747000000, Doc(id:my_namespace:my_search::12345678-4fb7-3797-ae9a-d4d7a4e6e085), gid(0x0048e840a48002b12abbb0a0), size: 101 ``` -| Option | Description | -| --- | --- | -| **\-b, --bucket ``** | Dump list of buckets that are contained in the given bucket, or that contain it | -| **\-d, --dump** | Dump list of documents for all buckets matching the selection command. | -| **\-g, --group ``** | Dump list of buckets that can contain the given group | -| **\-h, --help | Help text | -| **\-l, --gid ``** | Dump information about one specific document, as given by the GID (implies --dump) | -| **\-o, --document ``** | Dump information about one specific document (implies --dump) | -| **\-r, --route ``** | Route to send the messages to, usually the name of the storage cluster | -| **\-s, --bucketspace ``** | [Bucket space](/en/content/buckets#bucket-space) (*default* or *global*). If not specified, *default* is used | -| **\-u, --user ``** | Dump list of buckets that can contain the given user | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-b, --bucket {``}**Dump list of buckets that are contained in the given bucket, or that contain it
**-d, --dump**Dump list of documents for all buckets matching the selection command.
**-g, --group {``}**Dump list of buckets that can contain the given group
**-h, --helpHelp text
**-l, --gid {``}**Dump information about one specific document, as given by the GID (implies --dump)
**-o, --document {``}**Dump information about one specific document (implies --dump)
**-r, --route {``}**Route to send the messages to, usually the name of the storage cluster
**-s, --bucketspace {``}**Bucket space (*default* or *global*). If not specified, *default* is used
**-u, --user {``}**Dump list of buckets that can contain the given user
## vespa-status-filedistribution @@ -834,16 +1664,48 @@ Use *vespa-status-filedistribution* to get status from file distribution. Should Synopsis: `vespa-status-filedistribution [--application ] [--debug] [--environment ] [(-h | --help)] [--instance ] [--region ] [--tenant ] [--timeout ]` -| Option | Description | -| --- | --- | -| **\--application ``** | Application name | -| **\--debug** | Print debug log | -| **\--environment ``** | Environment name | -| **\-h, --help** | Display help information | -| **\--instance ``** | Instance name | -| **\--region ``** | Region name | -| **\--tenant ``** | Tenant name | -| **\--timeout ``** | timeout (in seconds) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**--application {``}**Application name
**--debug**Print debug log
**--environment {``}**Environment name
**-h, --help**Display help information
**--instance {``}**Instance name
**--region {``}**Region name
**--tenant {``}**Tenant name
**--timeout {``}**timeout (in seconds)
## vespa-stop-configserver @@ -908,55 +1770,184 @@ $ vespa-visit --datahandler '[Content:config=tcp/myconfigserver.mydomain.com:123 Visitor processor types: -| Processor Type | Description | -| --- | --- | -| **Dump visitor** | The most commonly used visitor processor type is the dump visitor. All it does is to send the read documents on to some external target specified by the visitor. Using the command line tool *vespa-visit*, the default is to just send the documents back to the client, and have them printed to stdout. The dump visitor is used to implement reprocessing. Typically, using a messagebus route, which will send the documents through the document processing cluster and then back to the content cluster. Migration of documents from one cluster to another is also implemented using a dump visitor. | -| **Streaming search visitor** | The [streaming search](/en/performance/streaming-search) visitor runs in the Vespa container, making it transparent whether search results were created from streaming or indexed search - see [indexing mode](/en/reference/applications/services/content#document). | + + + + + + + + + + + + + + + + + +
Processor TypeDescription
**Dump visitor**The most commonly used visitor processor type is the dump visitor. All it does is to send the read documents on to some external target specified by the visitor. Using the command line tool *vespa-visit*, the default is to just send the documents back to the client, and have them printed to stdout. The dump visitor is used to implement reprocessing. Typically, using a messagebus route, which will send the documents through the document processing cluster and then back to the content cluster. Migration of documents from one cluster to another is also implemented using a dump visitor.
**Streaming search visitor**The streaming search visitor runs in the Vespa container, making it transparent whether search results were created from streaming or indexed search - see indexing mode.
Requests sent from the visitor processor are sent to a visitor target - types: -| Target Type | Description | -| --- | --- | -| **Message bus routes** | You can specify a [message bus route](/en/writing/document-routing) name directly, and this route will be used to send the results. This is typically used when doing reprocessing or migration. Message bus routes are set up in the application package. In addition, some routes may have been auto-generated in simple setups, for instance, a route called *default* is generated if your setup is simple enough for the config model to likely guess where you want to send your data. | -| **Slobrok address** | You can also specify a slobrok address for data to be sent to. A slobrok address is a slash-separated path where you can use an asterisk to mean any element within this path. For instance, if you have a docproc cluster called *mydpcluster*, it will have registered its nodes with slobrok names like *docproc/cluster.mydpcluster/docproc/0/feed\_processor*, where the 0 here indicates the first node in the cluster. You can thus specify to send visit data to this docproc cluster by stating a slobrok address of *docproc/cluster.mydpcluster/docproc/\*/feed\_processor*. Note that this will not send all the data to one or all the nodes. The data sent from the visitor will be distributed among the matching nodes, but each message will just be sent to one node.

Slobrok names can be used when using [vespa-visit-target](#vespa-visit-target) to retrieve the data from some location. If you start vespa-visit-target on two nodes, listening to slobrok names *mynode/0/visit-destination* and *mynode/1/visit-destination*, you can send the results to these nodes by specifying *mynode/\*/visit-destination* as the data handler.

[vespa-destination](#vespa-destination) is similar to vespa-visit-target in that it can receive messages from messagebus and print the contents to stdout. It can be useful in situations where you want to debug a route or a docproc, by using the vespadestination as the endpoint of your route. | -| **TCP socket** | TCP sockets can also be specified directly. This requires that the endpoint speaks FNET RPC. This is typically done, either by using the *vespa-visit-target* tool, or by using a visitor destination programmatically by using a utility class in the document API. A socket address looks like the following: tcp/*hostname*:*port*/*servicename*. For instance, an address generated by *vespa-visit-target* might look like: *tcp/myhost.mydomain.com:12345/visit-destination* | + + + + + + + + + + + + + + + + + + + + + +
Target TypeDescription
**Message bus routes**You can specify a message bus route name directly, and this route will be used to send the results. This is typically used when doing reprocessing or migration. Message bus routes are set up in the application package. In addition, some routes may have been auto-generated in simple setups, for instance, a route called *default* is generated if your setup is simple enough for the config model to likely guess where you want to send your data.
**Slobrok address**You can also specify a slobrok address for data to be sent to. A slobrok address is a slash-separated path where you can use an asterisk to mean any element within this path. For instance, if you have a docproc cluster called *mydpcluster*, it will have registered its nodes with slobrok names like *docproc/cluster.mydpcluster/docproc/0/feed_processor*, where the 0 here indicates the first node in the cluster. You can thus specify to send visit data to this docproc cluster by stating a slobrok address of *docproc/cluster.mydpcluster/docproc/*/feed_processor*. Note that this will not send all the data to one or all the nodes. The data sent from the visitor will be distributed among the matching nodes, but each message will just be sent to one node.

Slobrok names can be used when using vespa-visit-target to retrieve the data from some location. If you start vespa-visit-target on two nodes, listening to slobrok names *mynode/0/visit-destination* and *mynode/1/visit-destination*, you can send the results to these nodes by specifying *mynode/*/visit-destination* as the data handler.

vespa-destination is similar to vespa-visit-target in that it can receive messages from messagebus and print the contents to stdout. It can be useful in situations where you want to debug a route or a docproc, by using the vespadestination as the endpoint of your route.
**TCP socket**TCP sockets can also be specified directly. This requires that the endpoint speaks FNET RPC. This is typically done, either by using the *vespa-visit-target* tool, or by using a visitor destination programmatically by using a utility class in the document API. A socket address looks like the following: tcp/*hostname*:*port*/*servicename*. For instance, an address generated by *vespa-visit-target* might look like: *tcp/myhost.mydomain.com:12345/visit-destination*
Also see [vespa-destination](#vespa-destination). Synopsis: `vespa-visit [options]` -| Option | Description | -| --- | --- | -| **\--abortonclusterdown** | Abort if cluster is down | -| **\-b, --maxbuckets ``** | Maximum buckets per visitor | -| **\--bucketspace ``** | [Bucket space](/en/content/buckets#bucket-space) to visit (*default* or *global*). If not specified, *default* is used | -| **\-c, --cluster ``** | Visit the given cluster | -| **\-d, --datahandler ``** | Send results to the given target - see [vespa-visit-target](#vespa-visit-target) | -| **\-f, --from ``** | Only visit from the given timestamp (microseconds) | -| **\-h, --help** | Show help text | -| **\-i, --printids** | Display only document identifiers | -| **\--jsonoutput** | Output a JSON array of document objects. This is the default output format. | -| **\--jsonl** | Output documents as JSONL (JSON Lines format). Each individual document is output as a single line, with a newline separating each document. Lines are not comma-separated, and there is no top-level array wrapping the document objects. | -| **\-l, --fieldset `
`** | Retrieve the specified fields only (see [Document field sets](/en/schemas/documents#fieldsets)). Default: `[document]` | -| **\--libraryparam `` ``** | Send parameter to the visitor library | -| **\-m, --maxpending ``** | Maximum pending messages to data handlers per storage visitor | -| **\--maxpendingsuperbuckets ``** | Maximum pending visitor messages from the vespa-visit client. If set, dynamic throttling of visitors is disabled | -| **\--maxtotalhits ``** | Abort visiting when received this many total documents. This is only an approximate number, all pending work will be completed, and those documents will also be returned | -| **\-o, --timeout ``** | Time out visitor after given time | -| **\-p, --progress ``** | Use the given file to track progress. `-p progress-file` saves progress, allowing the visitor to resume at next startup. Always remove the progress file to run the visiting operation from the start. | -| **\--processtime ``** | Sleep for this number of milliseconds before processing the message. (Debug option for pretending to be a slow client) | -| **\-r, --visitremoves** | Return tombstone entries of documents that have been removed. Tombstones will be output as `remove` objects, which only contain a document ID. When using `--visitremoves`, regular (non-tombstone) documents will also be returned. | -| **\-s, --selection ``** | [Selection](/en/reference/writing/document-selector-language) string for which documents to visit. E.g., `-s 'id.hash().abs() % 100 == 0'` dumps 1% of the corpus - see [selection](/en/clients/vespa-cli#selection). Note that this expression is evaluated for *every* document in the cluster, so running 100 visits comparing against all values in \[0, 99) end up reading all documents 100 times. Prefer using `--slices` and `--sliceid` instead if available. | -| **\--shorttensors** | Output using [tensor short form](/en/reference/schemas/document-json-format#tensor) | -| **\--skipbucketsonfatalerrors** | Skip visiting super buckets with fatal error codes | -| **\--sliceid ``** | The slice number of the visit represented by this visitor. This number must be non-negative and less than the number of slices specified for the visit. | -| **\--slices ``** | Split the document corpus into this number of independent slices. This lets multiple, concurrent series of visitors advance the same logical visit independently, by specifying a different `sliceid` for each.

E.g. `--slices 100 --sliceid 0` dumps 1% of the corpus by efficiently iterating over only 1/100th of the data space. For a given number of `--slices`, it's possible to visit the entire corpus (possibly in parallel) with non-overlapping output by visiting with all `--sliceid` values from (and including) 0 up to (and excluding) `--slices`. | -| **\-t, --to ``** | Only visit up to the given timestamp (microseconds) | -| **\--tracelevel ``** | Tracelevel (\[0-9\]), for debugging | -| **\-u, --buckettimeout ``** | Fail visitor if visiting a single bucket takes longer than this (default same as timeout) | -| **\-v, --verbose** | Show progress and info on STDERR | -| **\--visitinconsistentbuckets** | Don't wait for inconsistent buckets to become consistent. See [read-consistency](/en/content/consistency#read-consistency) for details. | -| **\--visitlibrary ``** | Use the given visitor library | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**--abortonclusterdown**Abort if cluster is down
**-b, --maxbuckets {``}**Maximum buckets per visitor
**--bucketspace {``}**Bucket space to visit (*default* or *global*). If not specified, *default* is used
**-c, --cluster {``}**Visit the given cluster
**-d, --datahandler {``}**Send results to the given target - see vespa-visit-target
**-f, --from {``}**Only visit from the given timestamp (microseconds)
**-h, --help**Show help text
**-i, --printids**Display only document identifiers
**--jsonoutput**Output a JSON array of document objects. This is the default output format.
**--jsonl**Output documents as JSONL (JSON Lines format). Each individual document is output as a single line, with a newline separating each document. Lines are not comma-separated, and there is no top-level array wrapping the document objects.
**-l, --fieldset {`
`}**
Retrieve the specified fields only (see Document field sets). Default: {`[document]`}
**--libraryparam {``} {``}**Send parameter to the visitor library
**-m, --maxpending {``}**Maximum pending messages to data handlers per storage visitor
**--maxpendingsuperbuckets {``}**Maximum pending visitor messages from the vespa-visit client. If set, dynamic throttling of visitors is disabled
**--maxtotalhits {``}**Abort visiting when received this many total documents. This is only an approximate number, all pending work will be completed, and those documents will also be returned
**-o, --timeout {``}**Time out visitor after given time
**-p, --progress {``}**Use the given file to track progress. {`-p progress-file`} saves progress, allowing the visitor to resume at next startup. Always remove the progress file to run the visiting operation from the start.
**--processtime {``}**Sleep for this number of milliseconds before processing the message. (Debug option for pretending to be a slow client)
**-r, --visitremoves**Return tombstone entries of documents that have been removed. Tombstones will be output as {`remove`} objects, which only contain a document ID. When using {`--visitremoves`}, regular (non-tombstone) documents will also be returned.
**-s, --selection {``}**Selection string for which documents to visit. E.g., {`-s 'id.hash().abs() % 100 == 0'`} dumps 1% of the corpus - see selection. Note that this expression is evaluated for *every* document in the cluster, so running 100 visits comparing against all values in [0, 99) end up reading all documents 100 times. Prefer using {`--slices`} and {`--sliceid`} instead if available.
**--shorttensors**Output using tensor short form
**--skipbucketsonfatalerrors**Skip visiting super buckets with fatal error codes
**--sliceid {``}**The slice number of the visit represented by this visitor. This number must be non-negative and less than the number of slices specified for the visit.
**--slices {``}**Split the document corpus into this number of independent slices. This lets multiple, concurrent series of visitors advance the same logical visit independently, by specifying a different {`sliceid`} for each.

E.g. {`--slices 100 --sliceid 0`} dumps 1% of the corpus by efficiently iterating over only 1/100th of the data space. For a given number of {`--slices`}, it's possible to visit the entire corpus (possibly in parallel) with non-overlapping output by visiting with all {`--sliceid`} values from (and including) 0 up to (and excluding) {`--slices`}.
**-t, --to {``}**Only visit up to the given timestamp (microseconds)
**--tracelevel {``}**Tracelevel ([0-9]), for debugging
**-u, --buckettimeout {``}**Fail visitor if visiting a single bucket takes longer than this (default same as timeout)
**-v, --verbose**Show progress and info on STDERR
**--visitinconsistentbuckets**Don't wait for inconsistent buckets to become consistent. See read-consistency for details.
**--visitlibrary {``}**Use the given visitor library
## vespa-visit-target @@ -964,13 +1955,45 @@ Synopsis: `vespa-visit [options]` Synopsis: `vespa-visit-target [options]` -| Option | Description | -| --- | --- | -| **\-c, --visithandler ``** | Use the given class as a visit handler (defaults to StdOutVisitorHandler) | -| **\-h, --help** | Show help page | -| **\-i, --printids** | Display document IDs only | -| **\-o, --visitoptions ``** | Option arguments to pass through to the visitor handler instance | -| **\-p, --processtime ``** | Sleep msecs milliseconds before processing the message. (Debug option for pretending to be a slow client) | -| **\-s, --bindtoslobrok `
`** | Bind to slobrok address. One, and only one, of the binding options must be set | -| **\-t, --bindtosocket ``** | Bind to TCP port. One, and only one, of the binding options must be set | -| **\-v, --verbose** | Indent output, show progress and info on STDERR | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-c, --visithandler {``}**Use the given class as a visit handler (defaults to StdOutVisitorHandler)
**-h, --help**Show help page
**-i, --printids**Display document IDs only
**-o, --visitoptions {``}**Option arguments to pass through to the visitor handler instance
**-p, --processtime {``}**Sleep msecs milliseconds before processing the message. (Debug option for pretending to be a slow client)
**-s, --bindtoslobrok {`
`}**
Bind to slobrok address. One, and only one, of the binding options must be set
**-t, --bindtosocket {``}**Bind to TCP port. One, and only one, of the binding options must be set
**-v, --verbose**Indent output, show progress and info on STDERR
\ No newline at end of file diff --git a/mintlify-docs/en/reference/operations/tools.mdx b/mintlify-docs/en/reference/operations/tools.mdx index 040b3e00b9..467dba33f0 100644 --- a/mintlify-docs/en/reference/operations/tools.mdx +++ b/mintlify-docs/en/reference/operations/tools.mdx @@ -15,9 +15,20 @@ Example (refer to [ONNX](/en/ranking/onnx) for more examples): $ vespa-analyze-onnx-model Network.onnx ``` -| Option | Description | -| --- | --- | -| **\--probe-types** | Use onnx model to infer/probe output types based on input types | + + + + + + + + + + + + + +
OptionDescription
**--probe-types**Use onnx model to infer/probe output types based on input types
## vespa-fbench @@ -33,50 +44,177 @@ Example: $ vespa-fbench -n 10 -q query%03d.txt -s 300 -c 0 -o output%03d.txt -xy test.domain.com 8080 ``` -| Option | Description | -| --- | --- | -| **\-H *header*** | append extra header to each get request. | -| **\-A *assign authority*** | hostname:port. Overrides Host: header sent. | -| **\-a *str*** | append string to each query | -| **\-n *numClients*** | Run vespa-fbench with *numClients* clients in parallel. If not specified, vespa-fbench will use a default value of *10* clients. | -| **\-c *cycleTime*** | each client will make a request each `` milliseconds \[1000\] ('-1' -> cycle time should be twice the response time) | -| **\-l *limit*** | minimum response size for successful requests \[0\] | -| **\-i *ignoreCount*** | do not log the `` first results. -1 means no logging \[0\] | -| **\-s *seconds*** | run the test for `` seconds. -1 means forever \[60\] | -| **\-q *queryFilePattern*** | pattern defining input query files, e.g. *query%03d.txt* (the pattern is used with sprintf to generate filenames). Unless using POST, a query file has one query per line, each line starting with `/search/`:

`/search/?yql=select%20%2A%20from%20sources%20%2A%20where%20true` | -| **\-P** | use POST for requests instead of GET. Two lines per query, format:

`/search/`
`{"yql" : "select * from sources * where true"}`

Any line starting with "/" will be taken as a URL path, with the following lines taken as the content (these lines can NOT start with "/"). The default content type is *"Content-Type: application/json"*; see *\-H*. | -| **\-o *outputFilePattern*** | save query results to output files with the given pattern (default is not saving.) | -| **\-r *restartLimit*** | number of times to re-use each query file. -1 means no limit \[-1\] | -| **\-m *maxLineSize*** | max line size in input query files \[8192\]. Can not be less than the minimum \[1024\]. | -| **\-p *seconds*** | Print summary every `` seconds. Only available when installing vespa-fbench from test branch, | -| **\-k** | Enable HTTP keep-alive. | -| **\-d** | Base64 decode POST request content | -| **\-x** | write benchmark data reporting to output file:

**NumHits**
Number of hits returned

**NumFastHits**
Number of actual document hits returned

**TotalHitCount**
Total number of hits for query

**QueryHits**
Hits as specified in query

**QueryOffset**
Offset as specified in query

**NumErrors**
Number of error hits returned

**NumGroupHits**
Number of grouping hits returned

**SearchTime**
Time used for searching. Entire query time for one phase search, first phase for two-phase search

**AttributeFetchTime**
Time used for attribute fetching, or 0 for one phase search

**FillTime**
Time used for summary fetching, or 0 for one phase search | -| **\-y** | write data on coverage to output file (must be used with -x).

**DocsSearched**
Total number of documents in nodes searched

**NodesSearched**
Total number of search nodes which were used

**FullCoverage**
1 if true, 0 if false | -| **\-z** | Use single query file to be distributed between clients. | -| **\-C *file*** | Client certificate file name | -| **\-K *file*** | Client private key file name | -| **\-D** | Use TLS configuration from environment if T/C/K is not used | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-H *header***append extra header to each get request.
**-A *assign authority***hostname:port. Overrides Host: header sent.
**-a *str***append string to each query
**-n *numClients***Run vespa-fbench with *numClients* clients in parallel. If not specified, vespa-fbench will use a default value of *10* clients.
**-c *cycleTime***each client will make a request each {``} milliseconds [1000] ('-1' -> cycle time should be twice the response time)
**-l *limit***minimum response size for successful requests [0]
**-i *ignoreCount***do not log the {``} first results. -1 means no logging [0]
**-s *seconds***run the test for {``} seconds. -1 means forever [60]
**-q *queryFilePattern***pattern defining input query files, e.g. *query%03d.txt* (the pattern is used with sprintf to generate filenames). Unless using POST, a query file has one query per line, each line starting with {`/search/`}:

{`/search/?yql=select%20%2A%20from%20sources%20%2A%20where%20true`}
**-P**use POST for requests instead of GET. Two lines per query, format:

{`/search/`}
{`{"yql" : "select * from sources * where true"}`}

Any line starting with "/" will be taken as a URL path, with the following lines taken as the content (these lines can NOT start with "/"). The default content type is *"Content-Type: application/json"*; see *-H*.
**-o *outputFilePattern***save query results to output files with the given pattern (default is not saving.)
**-r *restartLimit***number of times to re-use each query file. -1 means no limit [-1]
**-m *maxLineSize***max line size in input query files [8192]. Can not be less than the minimum [1024].
**-p *seconds***Print summary every {``} seconds. Only available when installing vespa-fbench from test branch,
**-k**Enable HTTP keep-alive.
**-d**Base64 decode POST request content
**-x**write benchmark data reporting to output file:

**NumHits**
Number of hits returned

**NumFastHits**
Number of actual document hits returned

**TotalHitCount**
Total number of hits for query

**QueryHits**
Hits as specified in query

**QueryOffset**
Offset as specified in query

**NumErrors**
Number of error hits returned

**NumGroupHits**
Number of grouping hits returned

**SearchTime**
Time used for searching. Entire query time for one phase search, first phase for two-phase search

**AttributeFetchTime**
Time used for attribute fetching, or 0 for one phase search

**FillTime**
Time used for summary fetching, or 0 for one phase search
**-y**write data on coverage to output file (must be used with -x).

**DocsSearched**
Total number of documents in nodes searched

**NodesSearched**
Total number of search nodes which were used

**FullCoverage**
1 if true, 0 if false
**-z**Use single query file to be distributed between clients.
**-C *file***Client certificate file name
**-K *file***Client private key file name
**-D**Use TLS configuration from environment if T/C/K is not used
Default output: -||| -| --- | --- | -| **connection reuse count** | Indicates how many times HTTP connections were reused to issue another request. Note that this number will only be displayed if the -k switch (enable HTTP keep-alive) is used. | -| **clients** | Echo of the -n parameter. | -| **cycle time** | Echo of the -c parameter. | -| **lower response limit** | Echo of the -l parameter. | -| **skipped requests** | Number of requests that was skipped by vespa-fbench. vespa-fbench will typically skip a request if the line containing the query url exceeds a pre-defined limit. Skipped requests will have minimal impact on the statistical results. | -| **failed requests** | The number of failed requests. A request will be marked as failed if en error occurred while reading the result or if the result contained fewer bytes than 'lower response limit'. | -| **successful requests** | Number of successful requests. Each performed request is counted as either successful or failed. Skipped requests (see above) are not performed and therefore not counted. | -| **cycles not held** | Number of cycles not held. The cycle time is specified with the -c parameter. It defines how often a client should perform a new request. However, a client may not perform another request before the result from the previous request has been obtained. Whenever a client is unable to initiate a new request 'on time' due to not being finished with the previous request, this value will be increased. | -| **minimum response time** | The minimum response time. The response time is measured as the time period from just before the request is sent to the server, till the result is obtained from the server. | -| **maximum response time** | The maximum response time. The response time is measured as the time period from just before the request is sent to the server, till the result is obtained from the server. | -| **average response time** | The average response time. The response time is measured as the time period from just before the request is sent to the server, till the result is obtained from the server. | -| **X percentile** | The X percentile of the response time samples; a value selected such that X percent of the response time samples are below this value. In order to calculate percentiles, a histogram of response times is maintained for each client at runtime and merged after the test run ends. If a percentile value exceeds the upper bound of this histogram, it will be approximated (and thus less accurate) and marked with '(approx)'. | -| **actual query rate** | The average number of queries per second; QPS. | -| **utilization** | The percentage of time used waiting for the server to complete (successful) requests. Note that if a request fails, the utilization will drop since the client has 'wasted' the time spent on the failed request. | -| **zero hit queries** | The number of queries that gave zero hits in Vespa | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**connection reuse count**Indicates how many times HTTP connections were reused to issue another request. Note that this number will only be displayed if the -k switch (enable HTTP keep-alive) is used.
**clients**Echo of the -n parameter.
**cycle time**Echo of the -c parameter.
**lower response limit**Echo of the -l parameter.
**skipped requests**Number of requests that was skipped by vespa-fbench. vespa-fbench will typically skip a request if the line containing the query url exceeds a pre-defined limit. Skipped requests will have minimal impact on the statistical results.
**failed requests**The number of failed requests. A request will be marked as failed if en error occurred while reading the result or if the result contained fewer bytes than 'lower response limit'.
**successful requests**Number of successful requests. Each performed request is counted as either successful or failed. Skipped requests (see above) are not performed and therefore not counted.
**cycles not held**Number of cycles not held. The cycle time is specified with the -c parameter. It defines how often a client should perform a new request. However, a client may not perform another request before the result from the previous request has been obtained. Whenever a client is unable to initiate a new request 'on time' due to not being finished with the previous request, this value will be increased.
**minimum response time**The minimum response time. The response time is measured as the time period from just before the request is sent to the server, till the result is obtained from the server.
**maximum response time**The maximum response time. The response time is measured as the time period from just before the request is sent to the server, till the result is obtained from the server.
**average response time**The average response time. The response time is measured as the time period from just before the request is sent to the server, till the result is obtained from the server.
**X percentile**The X percentile of the response time samples; a value selected such that X percent of the response time samples are below this value. In order to calculate percentiles, a histogram of response times is maintained for each client at runtime and merged after the test run ends. If a percentile value exceeds the upper bound of this histogram, it will be approximated (and thus less accurate) and marked with '(approx)'.
**actual query rate**The average number of queries per second; QPS.
**utilization**The percentage of time used waiting for the server to complete (successful) requests. Note that if a request fails, the utilization will drop since the client has 'wasted' the time spent on the failed request.
**zero hit queries**The number of queries that gave zero hits in Vespa
## vespa-makefsa @@ -86,20 +224,64 @@ If input file is not specified, standard input is used. Synopsis: `vespa-makefsa [-h] [-b] [-B] [-e] [-n] [-s bytes] [-z bytes] [-t] [-p] [-i] [-S serial] [-v] [-V] [input_file] output_file` -| Option | Description | -| --- | --- | -| **\-h** | Help text | -| **\-b** | Use binary input format with Base64 encoded info | -| **\-B** | Use binary input format with raw | -| **\-e** | Use text input format with no info (default) | -| **\-s bytes** | Data size for numerical info: 1,2 or 4(default) | -| **\-z bytes** | Data size for binary info (-B) (0 means NUL terminated) | -| **\-t** | Use text input format | -| **\-p** | Build automaton with perfect hash | -| **\-i** | Ignore info string, regardless of input format | -| **\-S serial** | Serial number | -| **\-v** | Verbose | -| **\-V** | Display version | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**-h**Help text
**-b**Use binary input format with Base64 encoded info
**-B**Use binary input format with raw
**-e**Use text input format with no info (default)
**-s bytes**Data size for numerical info: 1,2 or 4(default)
**-z bytes**Data size for binary info (-B) (0 means NUL terminated)
**-t**Use text input format
**-p**Build automaton with perfect hash
**-i**Ignore info string, regardless of input format
**-S serial**Serial number
**-v**Verbose
**-V**Display version
## vespa-query-profile-dump-tool @@ -119,8 +301,25 @@ dump default myapppackage # dumps the 'default' profile non-variant dump default dev/myprofiles x=x1&y=y1 # dumps the 'default' profile resolved with dimensions values x=x1 and y=y1 in dev/myprofiles ``` -| Option | Description | -| --- | --- | -| **query-profile** | Name of the query profile to dump the values of | -| **dir** | Path to an application package or query profile directory. Default: current dir | -| **parameters** | HTTP request encoded dimension keys used during resolving. Default: none | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
**query-profile**Name of the query profile to dump the values of
**dir**Path to an application package or query profile directory. Default: current dir
**parameters**HTTP request encoded dimension keys used during resolving. Default: none
\ No newline at end of file diff --git a/mintlify-docs/en/reference/querying/default-result-format.mdx b/mintlify-docs/en/reference/querying/default-result-format.mdx index c7c5f2b972..512cf42e9e 100644 --- a/mintlify-docs/en/reference/querying/default-result-format.mdx +++ b/mintlify-docs/en/reference/querying/default-result-format.mdx @@ -14,52 +14,302 @@ All object names are literal strings, the node `root` is the map key "root" in t ## root -| Element | Parent | Mandatory | Type | Description | -| :--- | :--- | :--- | :--- | :--- | -| **root** | | yes | Map of string to object | The root of the tree of returned data. | -| **children** | root | no | Array of objects | Array of JSON objects with the same structure as `root`. | -| **fields** | root | no | Map of string to object | | -| **totalCount** | fields | no | Integer | Number of documents matching the query. Not accurate when using *nearestNeighbor*, *wand* or *weakAnd* query operators. The value is the number of hits after [first-phase dropping](/en/reference/schemas/schemas#rank-score-drop-limit). | -| **searchGroup** | fields | no | Integer | The index of the group that produced this result, when informative and unique. Useful for [group pinning](/en/content/elasticity#pinning-groups). | -| **coverage** | root | no | Map of string to string/number | Map of metadata about how much of the total corpus has been searched to return the given documents. | -| **coverage** | coverage | yes | Integer | Percentage of total corpus searched (when lower than 100 this is an approximation and is a lower bound, as no info from nodes down is known) | -| **documents** | coverage | yes | Long | The number of active documents searched. | -| **full** | coverage | yes | Boolean | Whether the full corpus was searched. | -| **nodes** | coverage | yes | Integer | The number of search nodes returning results. | -| **results** | coverage | yes | Integer | The number of results merged creating the final rendered result. | -| **resultsFull** | coverage | yes | Integer | The number of full result sets merged, e.g. when there are several sources/clusters for the results. | -| **degraded** | coverage | no | Map of string to object | Map of match-phase degradation elements. | -| **match-phase** | degraded | no | Boolean | Indicator whether [match-phase degradation](/en/reference/schemas/schemas#match-phase) has occurred. | -| **timeout** | degraded | no | Boolean | Indicator whether the query [timed out](/en/reference/api/query#timeout) before completion. | -| **adaptive-timeout** | degraded | no | Boolean | Indicator whether the query timed out with [adaptive timeout](/en/reference/api/query#ranking.softtimeout.enable) before completion. | -| **non-ideal-state** | degraded | no | Boolean | Indicator whether the content cluster is in [ideal state](/en/content/idealstate). | -| **errors** | root | no | Array of objects | Array of error messages with the fields given below. [Example](/en/querying/query-api#error-result). | -| **code** | errors | yes | Integer | Numeric identifier used by the container application. See [error codes](https://github.com/vespa-engine/vespa/blob/master/container-disc/src/main/java/com/yahoo/container/protect/Error.java) and [ErrorMessage.java](https://github.com/vespa-engine/vespa/blob/master/container-search/src/main/java/com/yahoo/search/result/ErrorMessage.java) for a short description. | -| **message** | errors | no | String | Full error message. | -| **source** | errors | no | String | Which [data provider](/en/querying/federation) logged the error condition. | -| **stackTrace** | errors | no | String | Stack trace if an exception was involved. | -| **summary** | errors | yes | String | Short description of error. | -| **transient** | errors | no | Boolean | Whether the system is expected to recover from the faulty state on its own. If the flag is not present, this may or may not be the case, or the flag is not applicable. | -| **fields** | root | no | Map of string to object | The named document (schema) [fields](/en/reference/schemas/schemas#field). Fields without value are not rendered.

In addition to the fields defined in the schema, the following might be returned:

  • sddocname: Schema name. Returned in the [default document summary](/en/querying/document-summaries).
  • documentid: Document ID. Returned in the [default document summary](/en/querying/document-summaries).
  • summaryfeatures: Refer to [summary-features](/en/reference/schemas/schemas#summary-features) and [observing values used in ranking](/en/ranking/ranking-intro#observing-values-used-in-ranking).
  • matchfeatures: Refer to [match-features](/en/reference/schemas/schemas#match-features) and [example use](/en/querying/nearest-neighbor-search-guide#strict-filters-and-distant-neighbors).
| -| **id** | root | no | String | String identifying the hit, document or other data type. For document hits, this is the full string document ID if the hit is filled with a document summary that includes the `documentid` field. If it is not filled or only filled with a document summary without the `documentid` field, it is an internally generated unique id on the form `index:[source]/[node-index]/[hex-gid]`.

See [Document IDs in search results](/en//schemas/documents#docid-in-results) for how to ensure that the full string document ID (from memory) is returned.

For further information on the internally generated ids, see the [/document/v1/guide](/en/writing/document-v1-api-guide#troubleshooting) and also [receiving-responses-of-different-formats-for-the-same-query-in-vespa](https://stackoverflow.com/questions/74033383/receiving-responses-of-different-formats-for-the-same-query-in-vespa) (outdated regarding document IDs being stored on disk only). | -| **label** | root | no | String | The label of a grouping list. | -| **limits** | root | no | Object | Used in grouping, the limits of a bucket in histogram style data. | -| **from** | limits | no | String | Lower bound of a bucket group. | -| **to** | limits | no | String | Upper bound of a bucket group. | -| **relevance** | root | yes | Double | Double value representing the rank score. The rank score is returned from the [rank-profile](/en/ranking/ranking-intro). See the [FAQ](/en/learn/faq#what-could-cause-the-relevance-field-to-be--infinity) for how to handle "-Infinity" (represented as string) values. | -| **source** | root | no | String | Which data provider created this node. | -| **types** | root | no | Array of string | Metadata about what kind of document or other kind of node in the result set this object is. | -| **value** | root | no | String | Used in grouping for value groups, the argument for the grouping data which is in the fields. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementParentMandatoryTypeDescription
**root**yesMap of string to objectThe root of the tree of returned data.
**children**rootnoArray of objectsArray of JSON objects with the same structure as {`root`}.
**fields**rootnoMap of string to object
**totalCount**fieldsnoIntegerNumber of documents matching the query. Not accurate when using *nearestNeighbor*, *wand* or *weakAnd* query operators. The value is the number of hits after first-phase dropping.
**searchGroup**fieldsnoIntegerThe index of the group that produced this result, when informative and unique. Useful for group pinning.
**coverage**rootnoMap of string to string/numberMap of metadata about how much of the total corpus has been searched to return the given documents.
**coverage**coverageyesIntegerPercentage of total corpus searched (when lower than 100 this is an approximation and is a lower bound, as no info from nodes down is known)
**documents**coverageyesLongThe number of active documents searched.
**full**coverageyesBooleanWhether the full corpus was searched.
**nodes**coverageyesIntegerThe number of search nodes returning results.
**results**coverageyesIntegerThe number of results merged creating the final rendered result.
**resultsFull**coverageyesIntegerThe number of full result sets merged, e.g. when there are several sources/clusters for the results.
**degraded**coveragenoMap of string to objectMap of match-phase degradation elements.
**match-phase**degradednoBooleanIndicator whether match-phase degradation has occurred.
**timeout**degradednoBooleanIndicator whether the query timed out before completion.
**adaptive-timeout**degradednoBooleanIndicator whether the query timed out with adaptive timeout before completion.
**non-ideal-state**degradednoBooleanIndicator whether the content cluster is in ideal state.
**errors**rootnoArray of objectsArray of error messages with the fields given below. Example.
**code**errorsyesIntegerNumeric identifier used by the container application. See error codes and ErrorMessage.java for a short description.
**message**errorsnoStringFull error message.
**source**errorsnoStringWhich data provider logged the error condition.
**stackTrace**errorsnoStringStack trace if an exception was involved.
**summary**errorsyesStringShort description of error.
**transient**errorsnoBooleanWhether the system is expected to recover from the faulty state on its own. If the flag is not present, this may or may not be the case, or the flag is not applicable.
**fields**rootnoMap of string to objectThe named document (schema) fields. Fields without value are not rendered.

In addition to the fields defined in the schema, the following might be returned:

<ul><li><b>sddocname</b>: Schema name. Returned in the default document summary.</li><li><b>documentid</b>: Document ID. Returned in the default document summary.</li><li><b>summaryfeatures</b>: Refer to summary-features and observing values used in ranking.</li><li><b>matchfeatures</b>: Refer to match-features and example use.</li></ul>
**id**rootnoStringString identifying the hit, document or other data type. For document hits, this is the full string document ID if the hit is filled with a document summary that includes the {`documentid`} field. If it is not filled or only filled with a document summary without the {`documentid`} field, it is an internally generated unique id on the form {`index:[source]/[node-index]/[hex-gid]`}.

See Document IDs in search results for how to ensure that the full string document ID (from memory) is returned.

For further information on the internally generated ids, see the /document/v1/guide and also receiving-responses-of-different-formats-for-the-same-query-in-vespa (outdated regarding document IDs being stored on disk only).
**label**rootnoStringThe label of a grouping list.
**limits**rootnoObjectUsed in grouping, the limits of a bucket in histogram style data.
**from**limitsnoStringLower bound of a bucket group.
**to**limitsnoStringUpper bound of a bucket group.
**relevance**rootyesDoubleDouble value representing the rank score. The rank score is returned from the rank-profile. See the FAQ for how to handle <code>"-Infinity"</code> (represented as string) values.
**source**rootnoStringWhich data provider created this node.
**types**rootnoArray of stringMetadata about what kind of document or other kind of node in the result set this object is.
**value**rootnoStringUsed in grouping for value groups, the argument for the grouping data which is in the fields.
## timing -| Element | Parent | Mandatory | Type | Description | -| :--- | :--- | :--- | :--- | :--- | -| **timing** | | no | Map of string to object| Query timing information, enabled by [presentation.timing](/en/reference/api/query#presentation.timing). The [query performance guide](/en/performance/practical-search-performance-guide#basic-text-search-query-performance) is a useful resource to understand the values in its child elements. | -| **querytime** | timing | no | Double | Time to execute the first protocol phase/matching phase, in seconds. | -| **summaryfetchtime** | timing | no | Double | [Document summary](/en/querying/document-summaries) fetch time, in seconds. This is the time to execute the summary fill protocol phase for the globally ordered top-k hits. | -| **searchtime** | timing | no | Double | Approximately the sum of `querytime` and `summaryfetchtime` and is close to what a client will observe (except network latency). In seconds. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementParentMandatoryTypeDescription
**timing**noMap of string to objectQuery timing information, enabled by presentation.timing. The query performance guide is a useful resource to understand the values in its child elements.
**querytime**timingnoDoubleTime to execute the first protocol phase/matching phase, in seconds.
**summaryfetchtime**timingnoDoubleDocument summary fetch time, in seconds. This is the time to execute the summary fill protocol phase for the globally ordered top-k hits.
**searchtime**timingnoDoubleApproximately the sum of {`querytime`} and {`summaryfetchtime`} and is close to what a client will observe (except network latency). In seconds.
## trace @@ -67,21 +317,110 @@ All object names are literal strings, the node `root` is the map key "root" in t **Note:** The tracing elements below is a subset of all elements. Refer to the [search performance guide](/en/performance/practical-search-performance-guide#advanced-query-tracing) for examples. -| Element | Parent | Mandatory | Type | Description | -| :----------------- | :------------------ | :-------- | :-------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| **trace** | | no | Map of string to object | Metadata about query execution.

**Note:** The tracing elements below are a subset of all elements. Refer to the [search performance guide](/en/performance/practical-search-performance-guide#advanced-query-tracing) for examples. | -| **children** | trace | no | Array of object | Array of maps with exactly the same structure as `trace` itself. | -| **timestamp** | children | no | Long | Number of milliseconds since the start of query execution this node was added to the trace. | -| **message** | children | no | String | Descriptive trace text regarding this step of query execution. | -| **message** | children | no | Array of objects | Array of messages. | -| **start_time** | message | no | String | Timestamp, e.g. 2022-07-27 09:51:21.938 UTC | -| **traces** | message or threads | no | Array of traces or objects | | -| **distribution-key** | message | no | Integer | The [distribution key](/en/reference/applications/services/content#node) of the content node creating this span. | -| **duration_ms** | message | no | Float | Duration of span. | -| **timestamp_ms** | traces | no | Float | Time since start of parent, see `start_time`. | -| **event** | traces | no | String | Description of span. | -| **tag** | traces | no | String | Name of span. | -| **threads** | traces | no | Array of objects | Array of objects that again have `traces` elements. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ElementParentMandatoryTypeDescription
**trace**noMap of string to objectMetadata about query execution.

**Note:** The tracing elements below are a subset of all elements. Refer to the search performance guide for examples.
**children**tracenoArray of objectArray of maps with exactly the same structure as {`trace`} itself.
**timestamp**childrennoLongNumber of milliseconds since the start of query execution this node was added to the trace.
**message**childrennoStringDescriptive trace text regarding this step of query execution.
**message**childrennoArray of objectsArray of messages.
**start_time**messagenoStringTimestamp, e.g. 2022-07-27 09:51:21.938 UTC
**traces**message or threadsnoArray of traces or objects
**distribution-key**messagenoIntegerThe distribution key of the content node creating this span.
**duration_ms**messagenoFloatDuration of span.
**timestamp_ms**tracesnoFloatTime since start of parent, see {`start_time`}.
**event**tracesnoStringDescription of span.
**tag**tracesnoStringName of span.
**threads**tracesnoArray of objectsArray of objects that again have {`traces`} elements.
## JSON Schema diff --git a/mintlify-docs/en/reference/querying/grouping-language.mdx b/mintlify-docs/en/reference/querying/grouping-language.mdx index 2c2afdcaea..37a9ca41f0 100644 --- a/mintlify-docs/en/reference/querying/grouping-language.mdx +++ b/mintlify-docs/en/reference/querying/grouping-language.mdx @@ -180,6 +180,16 @@ Refer to the [grouping guide](/en/querying/grouping#pagination) for an example. Lists created using the `each` keyword can be assigned a label using the construct `each(...) as(mylabel)`. The outputs created by each clause will be identified by this label. +```bash +all(group(year) each(output(count())) as(by_year)) +``` + +Individual output aggregators can also be assigned a label by adding `as(mylabel)` to the aggregator inside `output(...)`. This labels the aggregation result, not the group list. + +```bash +all(group(author) output(count() as(authors_cardinality))) +``` + ## Aliases Grouping expressions can be tagged with an _alias_. An alias allows the expression to be reused without having to repeat the expression verbatim. @@ -267,187 +277,785 @@ Refer to the system test for [grouping on struct and map types](https://github.c ### Group list aggregators -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| count | Counts the number of unique groups (as produced by `group`). Note that `count` operates independently of `max` and that this count is an estimate using HyperLogLog++ which is an algorithm for the count-distinct problem | None | Long | + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
countCounts the number of unique groups (as produced by {`group`}). Note that {`count`} operates independently of {`max`} and that this count is an estimate using HyperLogLog++ which is an algorithm for the count-distinct problemNoneLong
| ### Group aggregators -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| count | Increments a long counter every time it is invoked | None | Long | -| sum | Sums the argument over all selected documents | Numeric | Numeric | -| avg | Computes the average over all selected documents | Numeric | Numeric | -| min | Keeps the minimum value of selected documents | Numeric | Numeric | -| max | Keeps the maximum value of selected documents | Numeric | Numeric | -| xor | XOR the values (their least significant 64 bits) of all selected documents | Any | Long | -| stddev | Computes the population standard deviation over all selected documents | Numeric | Double | -| quantiles | Computes one or multiple quantiles of the values of an expression. Quantiles must be a number between 0 and 1 inclusive. | [Numeric+], Expr | \[\{"quantile":Double,"value":Double}\+] | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
countIncrements a long counter every time it is invokedNoneLong
sumSums the argument over all selected documentsNumericNumeric
avgComputes the average over all selected documentsNumericNumeric
minKeeps the minimum value of selected documentsNumericNumeric
maxKeeps the maximum value of selected documentsNumericNumeric
xorXOR the values (their least significant 64 bits) of all selected documentsAnyLong
stddevComputes the population standard deviation over all selected documentsNumericDouble
quantilesComputes one or multiple quantiles of the values of an expression. Quantiles must be a number between 0 and 1 inclusive.[Numeric+], Expr[{"quantile":Double,"value":Double}+]
### Hit aggregators -| Name | Description | Arguments | Result | -| --- | --- | --- | --- | -|summary| Produces a summary of the requested [summary class](/en/reference/schemas/schemas#document-summary) | Name of summary class | Summary | + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
summaryProduces a summary of the requested summary className of summary classSummary
## Expressions ### Arithmetic expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| add | Add the arguments together | Numeric+ | Numeric | -| + | Add left and right argument | Numeric, Numeric | Numeric | -| mul | Multiply the arguments together | Numeric+ | Numeric | -| \* | Multiply left and right argument | Numeric, Numeric | Numeric | -| sub | Subtract second argument from first, third from result, etc | Numeric+ | Numeric | -| - | Subtract right argument from left | Numeric, Numeric | Numeric | -| div | Divide first argument by second, result by third, etc | Numeric+ | Numeric | -| / | Divide left argument by right | Numeric, Numeric | Numeric | -| mod | Modulo first argument by second, result by third, etc | Numeric+ | Numeric | -| % | Modulo left argument by right | Numeric, Numeric | Numeric | -| neg | Negate argument | Numeric | Numeric | -| - | Negate right argument | Numeric | Numeric | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
addAdd the arguments togetherNumeric+Numeric
+Add left and right argumentNumeric, NumericNumeric
mulMultiply the arguments togetherNumeric+Numeric
*Multiply left and right argumentNumeric, NumericNumeric
subSubtract second argument from first, third from result, etcNumeric+Numeric
-Subtract right argument from leftNumeric, NumericNumeric
divDivide first argument by second, result by third, etcNumeric+Numeric
/Divide left argument by rightNumeric, NumericNumeric
modModulo first argument by second, result by third, etcNumeric+Numeric
%Modulo left argument by rightNumeric, NumericNumeric
negNegate argumentNumericNumeric
-Negate right argumentNumericNumeric
### Bitwise expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| and | AND the arguments in order | Long+ | Long | -| or | OR the arguments in order | Long+ | Long | -| xor | XOR the arguments in order | Long+ | Long | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
andAND the arguments in orderLong+Long
orOR the arguments in orderLong+Long
xorXOR the arguments in orderLong+Long
### String expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| strlen | Count the number of bytes in argument | String | Long | -| strcat | Concatenate arguments in order | String+ | String | + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
strlenCount the number of bytes in argumentStringLong
strcatConcatenate arguments in orderString+String
### Type conversion expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| todouble | Convert argument to double | Any | Double | -| tolong | Convert argument to long | Any | Long | -| tostring | Convert argument to string | Any | String | -| toraw | Convert argument to raw | Any | Raw | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
todoubleConvert argument to doubleAnyDouble
tolongConvert argument to longAnyLong
tostringConvert argument to stringAnyString
torawConvert argument to rawAnyRaw
### Raw data expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| cat | Cat the binary representation of the arguments together | Any+ | Raw | -| md5 | Does an MD5 over the binary representation of the argument, and keeps the lowest 'width' bits | Any, Numeric(width) | Raw | -| xorbit | Does an XOR of 'width' bits over the binary representation of the argument. Width is rounded up to a multiple of 8 | Any, Numeric(width) | Raw | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
catCat the binary representation of the arguments togetherAny+Raw
md5Does an MD5 over the binary representation of the argument, and keeps the lowest 'width' bitsAny, Numeric(width)Raw
xorbitDoes an XOR of 'width' bits over the binary representation of the argument. Width is rounded up to a multiple of 8Any, Numeric(width)Raw
### Accessor expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| relevance | Return the computed rank of a document | None | Double | -| \ | Return the value of the named attribute | None | Any | -| array.at | Array element access. The expression `array.at(myarray, idx)` returns one value per document by evaluating the `idx` expression and using it as an index into the array. The expression can then be used to build bigger expressions such as `output(sum(array.at(myarray, 0)))` which will sum the first element in the array of each document.
- The `idx` expression is capped to `[0, size(myarray)-1]`
- If \> array size, the last element is returned
- If \< 0, the first element is returned | Array, Numeric | Any | -| interpolatedlookup | Counts elements in a sorted array that are less than an expression, with linear interpolation if the expression is between element values. The operation `interpolatedlookup(myarray, expr)` is intended for generic graph/function lookup. The data in `myarray` should be numerical values sorted in ascending order. The operation will then scan from the start of the array to find the position where the element values become equal to (or greater than) the value of the `expr` lookup argument, and return the index of that position.
When the lookup argument's value is between two consecutive array element values, the returned position will be a linear interpolation between their respective indexes. The return value is always in the range `[0, size(myarray)-1]` of the valid index values for an array.
Assume `myarray` is a sorted array of type `array` in each document: The expression `interpolatedlookup(myarray, 4.2)` is now a per-document expression that first evaluates the lookup argument, here a constant expression 4.2, and then looks at the contents of `myarray` in the document. The scan starts at the first element and proceeds until it hits an element value greater than 4.2 in the array. This means that:
- If the first element in the array is greater than 4.2, the expression returns 0
- If the first element in the array is exactly 4.2, the expression still returns 0
- If the first element in the array is 1.7 while the **second** element value is exactly 4.2, the expression returns 1.0 - the index of the second element
- If **all** the elements in the array are less than 4.2, the last valid array index `size(myarray)-1` is returned
- If the first 5 elements in the array have values smaller than the lookup argument, and the lookup argument is halfway between the fifth and sixth element, a value of 4.5 is returned - halfway between the array indexes of the fifth and sixth elements
- Similarly, if the elements in the array are `{0, 1, 2, 4, 8}` then passing a lookup argument of "5" would return 3.25 (linear interpolation between `indexOf(4)==3` and `indexOf(8)==4`)
| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
relevanceReturn the computed rank of a documentNoneDouble
<attribute-name>Return the value of the named attributeNoneAny
array.atArray element access. The expression {`array.at(myarray, idx)`} returns one value per document by evaluating the {`idx`} expression and using it as an index into the array. The expression can then be used to build bigger expressions such as {`output(sum(array.at(myarray, 0)))`} which will sum the first element in the array of each document.
- The {`idx`} expression is capped to {`[0, size(myarray)-1]`}
- If > array size, the last element is returned
- If < 0, the first element is returned
Array, NumericAny
interpolatedlookupCounts elements in a sorted array that are less than an expression, with linear interpolation if the expression is between element values. The operation {`interpolatedlookup(myarray, expr)`} is intended for generic graph/function lookup. The data in {`myarray`} should be numerical values sorted in ascending order. The operation will then scan from the start of the array to find the position where the element values become equal to (or greater than) the value of the {`expr`} lookup argument, and return the index of that position.
When the lookup argument's value is between two consecutive array element values, the returned position will be a linear interpolation between their respective indexes. The return value is always in the range {`[0, size(myarray)-1]`} of the valid index values for an array.
Assume {`myarray`} is a sorted array of type {`array`} in each document: The expression {`interpolatedlookup(myarray, 4.2)`} is now a per-document expression that first evaluates the lookup argument, here a constant expression 4.2, and then looks at the contents of {`myarray`} in the document. The scan starts at the first element and proceeds until it hits an element value greater than 4.2 in the array. This means that:
- If the first element in the array is greater than 4.2, the expression returns 0
- If the first element in the array is exactly 4.2, the expression still returns 0
- If the first element in the array is 1.7 while the **second** element value is exactly 4.2, the expression returns 1.0 - the index of the second element
- If **all** the elements in the array are less than 4.2, the last valid array index {`size(myarray)-1`} is returned
- If the first 5 elements in the array have values smaller than the lookup argument, and the lookup argument is halfway between the fifth and sixth element, a value of 4.5 is returned - halfway between the array indexes of the fifth and sixth elements
- Similarly, if the elements in the array are {`{0, 1, 2, 4, 8}`} then passing a lookup argument of "5" would return 3.25 (linear interpolation between {`indexOf(4)==3`} and {`indexOf(8)==4`})
### Bucket expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| fixedwidth | Maps the value of the first argument into consecutive buckets whose width equals the second argument | Any, Numeric | NumericBucketList | -| predefined | Maps the value of the first argument into the given buckets.
- Standard mathematical start and end specifiers may be used to define the width of a `bucket`. The `(` and `)` evaluates to `[` and `>` by default.
- The buckets assume the type of the start/end specifiers (`string`, `long`, `double` or `raw`). Values are converted to this type before being compared with these specifiers (e.g., `double` values are rounded to the nearest integer for buckets of type `long`).
- The end specifier can be skipped. The buckets `bucket(3)`/`bucket[3]` are the same as `bucket[3,4>`. This is allowed for string expressions as well; `bucket("c")` is identical to `bucket["c", "c ">`. | Any, Bucket+ | BucketList | + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
fixedwidthMaps the value of the first argument into consecutive buckets whose width equals the second argumentAny, NumericNumericBucketList
predefinedMaps the value of the first argument into the given buckets.
- Standard mathematical start and end specifiers may be used to define the width of a {`bucket`}. The {`(`} and {`)`} evaluates to {`[`} and {`>`} by default.
- The buckets assume the type of the start/end specifiers ({`string`}, {`long`}, {`double`} or {`raw`}). Values are converted to this type before being compared with these specifiers (e.g., {`double`} values are rounded to the nearest integer for buckets of type {`long`}).
- The end specifier can be skipped. The buckets {`bucket(3)`}/{`bucket[3]`} are the same as {`bucket[3,4>`}. This is allowed for string expressions as well; {`bucket("c")`} is identical to {`bucket["c", "c ">`}.
Any, Bucket+BucketList
### Time expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| time.dayofmonth | Returns the day of month (1-31) for the given timestamp | Long | Long | -| time.dayofweek | Returns the day of week (0-6) for the given timestamp, Monday being 0 | Long | Long | -| time.dayofyear | Returns the day of year (0-365) for the given timestamp | Long | Long | -| time.hourofday | Returns the hour of day (0-23) for the given timestamp | Long | Long | -| time.minuteofhour | Returns the minute of hour (0-59) for the given timestamp | Long | Long | -| time.monthofyear | Returns the month of year (1-12) for the given timestamp | Long | Long | -| time.secondofminute | Returns the second of minute (0-59) for the given timestamp | Long | Long | -| time.year | Returns the full year (e.g. 2009) of the given timestamp | Long | Long | -| time.date | Returns the date (e.g. 2009-01-10) of the given timestamp | Long | Long | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
time.dayofmonthReturns the day of month (1-31) for the given timestampLongLong
time.dayofweekReturns the day of week (0-6) for the given timestamp, Monday being 0LongLong
time.dayofyearReturns the day of year (0-365) for the given timestampLongLong
time.hourofdayReturns the hour of day (0-23) for the given timestampLongLong
time.minuteofhourReturns the minute of hour (0-59) for the given timestampLongLong
time.monthofyearReturns the month of year (1-12) for the given timestampLongLong
time.secondofminuteReturns the second of minute (0-59) for the given timestampLongLong
time.yearReturns the full year (e.g. 2009) of the given timestampLongLong
time.dateReturns the date (e.g. 2009-01-10) of the given timestampLongLong
### List expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| size | Return the number of elements in the argument if it is a list. If not return 1 | Any | Long | -| sort | Sort the elements in the argument in ascending order if the argument is a list. If not, it is a NOP | Any | Any | -| reverse | Reverse the elements in the argument if the argument is a list. If not, it is a NOP | Any | Any | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
sizeReturn the number of elements in the argument if it is a list. If not return 1AnyLong
sortSort the elements in the argument in ascending order if the argument is a list. If not, it is a NOPAnyAny
reverseReverse the elements in the argument if the argument is a list. If not, it is a NOPAnyAny
### Other expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| zcurve.x | Returns the X component of the given [zcurve](https://en.wikipedia.org/wiki/Z-order_curve) encoded 2d point. All fields of type "position" have an accompanying "\\_zcurve" attribute that can be decoded using this expression, e.g. `zcurve.x(foo_zcurve)` | Long | Long | -| zcurve.y | Returns the Y component of the given zcurve encoded 2d point | Long | Long | -| geo\_distance | Computes the great-circle distance from a [position](/en/reference/schemas/schemas#position) field to a given point. The unit suffix `.km` or `.miles` selects the output unit. Works on both `position` and `array` fields. For arrays, the minimum distance across all positions in the document is returned. ```all( group(fixedwidth(geo_distance(attribute(location), 63.4, 10.4).km, 10)) each(output(count())) )``` Available since Vespa 8.664.22 . | Attribute(position), Double(lat), Double(lng) | Double | -| uca | Converts the attribute string using [unicode collation algorithm](https://www.unicode.org/reports/tr10/). Groups are sorted using locale-aware sorting, with the default and primary strength values, respectively: ```all( group(s) order(max(uca(s, "sv"))) each(output(count())) )``` ```all( group(s) order(max(uca(s, "sv", "PRIMARY"))) each(output(count())) )``` | Any, Locale(String), Strength(String) | Raw | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
zcurve.xReturns the X component of the given zcurve encoded 2d point. All fields of type "position" have an accompanying "<fieldName>_zcurve" attribute that can be decoded using this expression, e.g. {`zcurve.x(foo_zcurve)`}LongLong
zcurve.yReturns the Y component of the given zcurve encoded 2d pointLongLong
geo_distanceComputes the great-circle distance from a position field to a given point. The unit suffix {`.km`} or {`.miles`} selects the output unit. Works on both {`position`} and {`array`} fields. For arrays, the minimum distance across all positions in the document is returned.
{`( group(fixedwidth(geo_distance(attribute(location), 63.4, 10.4).km, 10)) each(output(count())) )`}
Available since Vespa 8.664.22 .
Attribute(position), Double(lat), Double(lng)Double
ucaConverts the attribute string using unicode collation algorithm. Groups are sorted using locale-aware sorting, with the default and primary strength values, respectively:
{`( group(s) order(max(uca(s, "sv"))) each(output(count())) )`}
{`( group(s) order(max(uca(s, "sv", "PRIMARY"))) each(output(count())) )`}
Any, Locale(String), Strength(String)Raw
### Single argument standard mathematical expressions These are the standard mathematical functions as found in the Java [Math](https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html) class. -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| math.exp |   | Double | Double | -| math.log |   | Double | Double | -| math.log1p |   | Double | Double | -| math.log10 |   | Double | Double | -| math.sqrt |   | Double | Double | -| math.cbrt |   | Double | Double | -| math.sin |   | Double | Double | -| math.cos |   | Double | Double | -| math.tan |   | Double | Double | -| math.asin |   | Double | Double | -| math.acos |   | Double | Double | -| math.atan |   | Double | Double | -| math.sinh |   | Double | Double | -| math.cosh |   | Double | Double | -| math.tanh |   | Double | Double | -| math.asinh |   | Double | Double | -| math.acosh |   | Double | Double | -| math.atanh |   | Double | Double | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
math.exp&nbsp;DoubleDouble
math.log&nbsp;DoubleDouble
math.log1p&nbsp;DoubleDouble
math.log10&nbsp;DoubleDouble
math.sqrt&nbsp;DoubleDouble
math.cbrt&nbsp;DoubleDouble
math.sin&nbsp;DoubleDouble
math.cos&nbsp;DoubleDouble
math.tan&nbsp;DoubleDouble
math.asin&nbsp;DoubleDouble
math.acos&nbsp;DoubleDouble
math.atan&nbsp;DoubleDouble
math.sinh&nbsp;DoubleDouble
math.cosh&nbsp;DoubleDouble
math.tanh&nbsp;DoubleDouble
math.asinh&nbsp;DoubleDouble
math.acosh&nbsp;DoubleDouble
math.atanh&nbsp;DoubleDouble
### Dual argument standard mathematical expressions -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| math.pow | Return X^Y. | Double, Double | Double | -| math.hypot | Return length of hypotenuse given X and Y sqrt(X^2 + Y^2) | Double, Double | Double | + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
math.powReturn X^Y.Double, DoubleDouble
math.hypotReturn length of hypotenuse given X and Y sqrt(X^2 + Y^2)Double, DoubleDouble
## Filters ### String filters -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| regex | Matches a field against a regular expression string. | String, Expression | Bool | + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
regexMatches a field against a regular expression string.String, ExpressionBool
### Numeric filters -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| range | Matches when a field is between a lower and upper bound. | Numeric, Numeric, Expression, Bool?, Bool? | Bool | + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
rangeMatches when a field is between a lower and upper bound.Numeric, Numeric, Expression, Bool?, Bool?Bool
### Boolean filters -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| istrue | Matches when a boolean expression evaluates to true. | Expression | Bool | + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
istrueMatches when a boolean expression evaluates to true.ExpressionBool
### Predicate filters -| Name | Description | Arguments | Result | -| :--- | :--- | :--- | :--- | -| and | Logical `and` between the arguments. | Filter, Filter | Bool | -| not | Logical `not` on the argument. | Filter | Bool | -| or | Logical `or` between the arguments. | Filter, Filter | Bool | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionArgumentsResult
andLogical {`and`} between the arguments.Filter, FilterBool
notLogical {`not`} on the argument.FilterBool
orLogical {`or`} between the arguments.Filter, FilterBool
## Grouping language grammar diff --git a/mintlify-docs/en/reference/querying/json-query-language.mdx b/mintlify-docs/en/reference/querying/json-query-language.mdx index 065ca6e3c8..43d419f6eb 100644 --- a/mintlify-docs/en/reference/querying/json-query-language.mdx +++ b/mintlify-docs/en/reference/querying/json-query-language.mdx @@ -127,6 +127,11 @@ Each array item is a grouping statement represented as JSON where - Each grouping function is represented by a JSON object where the name of the function is the field name and the value is the function content. - Lists of arguments are represented as JSON arrays. +- A direct `label` field on an `all` operation with a direct `each` labels the + group list produced by that `each`, equivalent to `each(...) as(label)` in the + [grouping language](/en/reference/querying/grouping-language#labels). +- Output expression labels use grouping language syntax inside `output`, for + example `"output": "count() as(total)"`. Examples: @@ -155,6 +160,51 @@ equivalent JSON `grouping`-argument: Grouping statement: +```bash +all( + group(year) + each(output(count())) as(by_year) +) +``` +equivalent JSON `grouping`-argument: + +```json +"grouping": [ + { + "all": { + "group": "year", + "label": "by_year", + "each": { + "output": "count()" + } + } + } +] +``` + +Grouping statement: + +```bash +all( + group(author) + output(count() as(authors_cardinality)) +) +``` +equivalent JSON `grouping`-argument: + +```json +"grouping": [ + { + "all": { + "group": "author", + "output": "count() as(authors_cardinality)" + } + } +] +``` + +Grouping statement: + ```bash all(group(predefined(foo, bucket[1, 2>, bucket[3, 4>))) ``` @@ -291,12 +341,32 @@ Format of this in JSON: The range query accepts the following parameters: -| Operator | Description | -| :--- | :--- | -| ≥ | Greater-than or equal to | -| `>` | Greater-than | -| `<` | Less-than | -| ≤ | Less-than or equal to | + + + + + + + + + + + + + + + + + + + + + + + + + +
OperatorDescription
Greater-than or equal to
{`>`}Greater-than
{`<`}Less-than
Less-than or equal to
YQL: `where range(field, 0, 500)`. diff --git a/mintlify-docs/en/reference/querying/page-result-format.mdx b/mintlify-docs/en/reference/querying/page-result-format.mdx index 2796758e05..5546f7df22 100644 --- a/mintlify-docs/en/reference/querying/page-result-format.mdx +++ b/mintlify-docs/en/reference/querying/page-result-format.mdx @@ -11,10 +11,27 @@ The tags of the format are described below. Subtags will be rendered in the orde The root tag of a page result: The single top-level section of the page. -| Attribute | Description | Present | -| :--- | :--- | :--- | -| version | The version of this format - currently 1.0. | Always | -| layout | The name of the top-level layout to use for this page. | If specified in the page template used. | + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionPresent
versionThe version of this format - currently 1.0.Always
layoutThe name of the top-level layout to use for this page.If specified in the page template used.
For regular permissible subtags, refer to [section](#
). @@ -22,61 +39,197 @@ For regular permissible subtags, refer to [section](#
). A layout "box" in a page. -| Attribute | Description | Present | -| :--- | :--- | :--- | -| id | The id of this section. | If specified in the page template used. | -| layout | The name of the top-level layout to use for this page. | If specified in the page template used. | -| region | The id of the region in the layout of the parent section where this should be placed. | If specified in the page template used. | - -| Subtag | Description | Present | -| :--- | :--- | :--- | -| [section](#
) | A nested section of this page | Zero or more. | -| [renderer](#) | The name of the rendering to use for this section. | Zero or more. | -| [source](#) | Used to specify where to fetch the content of this section if it is not sent with this page in a content tag. | One or zero. | -| [content](#) | Contains some "payload" of this page - a set of [hit](#) instances | One if this section has inlined content, zero otherwise. | + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionPresent
idThe id of this section.If specified in the page template used.
layoutThe name of the top-level layout to use for this page.If specified in the page template used.
regionThe id of the region in the layout of the parent section where this should be placed.If specified in the page template used.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SubtagDescriptionPresent
sectionA nested section of this pageZero or more.
rendererThe name of the rendering to use for this section.Zero or more.
sourceUsed to specify where to fetch the content of this section if it is not sent with this page in a content tag.One or zero.
contentContains some "payload" of this page - a set of hit instancesOne if this section has inlined content, zero otherwise.
## \ The way this section, or some of its content should be rendered. -| Attribute | Description | Present | -| :--- | :--- | :--- | -| for | The name of the content source which should use this renderer | If this is not present, the renderer should be used for the entire section. | - -| Subtag | Description | Present | -| :--- | :--- | :--- | -| parameter | A parameter to this renderer | Zero or more | + + + + + + + + + + + + + + + +
AttributeDescriptionPresent
forThe name of the content source which should use this rendererIf this is not present, the renderer should be used for the entire section.
+ + + + + + + + + + + + + + + + +
SubtagDescriptionPresent
parameterA parameter to this rendererZero or more
## \ The source to be used to fetch the content of a section, if it is not sent as inline [content](#). -| Attribute | Description | Present | -| :--- | :--- | :--- | -| url | The url at which the content should be fetched. | Always. | - -| Subtag | Description | Present | -| :--- | :--- | :--- | -| parameter | A parameter to use when fetching this content. | Zero or more | + + + + + + + + + + + + + + + +
AttributeDescriptionPresent
urlThe url at which the content should be fetched.Always.
+ + + + + + + + + + + + + + + + +
SubtagDescriptionPresent
parameterA parameter to use when fetching this content.Zero or more
## \ The content to render in a section. -| Subtag | Description | Present | -| :--- | :--- | :--- | -| [hit](#) | A content hit. | Zero or more. | -| [group](#) | A group of content hits. | Zero or more. | + + + + + + + + + + + + + + + + + + + + +
SubtagDescriptionPresent
hitA content hit.Zero or more.
groupA group of content hits.Zero or more.
## \ A single result content item. -| Attribute | Description | Present | -| :--- | :--- | :--- | -| relevance | The relevance of this item - usually a normalized number between 0 and 1. | Always | -| source | The name of the source producing this hit. | Always | -| type | A space-separated list of type identifiers of this hit. | If a type is set in the hit. | + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionPresent
relevanceThe relevance of this item - usually a normalized number between 0 and 1.Always
sourceThe name of the source producing this hit.Always
typeA space-separated list of type identifiers of this hit.If a type is set in the hit.
Subtags: diff --git a/mintlify-docs/en/reference/querying/page-templates.mdx b/mintlify-docs/en/reference/querying/page-templates.mdx index 7c559a7b32..6f96787292 100644 --- a/mintlify-docs/en/reference/querying/page-templates.mdx +++ b/mintlify-docs/en/reference/querying/page-templates.mdx @@ -82,75 +82,231 @@ The root tag of a page template. Defines a page, is also its root section. Attri A representation of an area of screen real-estate. At runtime a section will contain content from various sources. The final renderer will render the section with its data items and/or subsections in an area of screen real-estate determined by its containing tag. -| Attribute | Description | Default | -| :--- | :--- | :--- | -| id | A unique identifier of this section used for referring. | _No id_ | -| layout | An identifier. Permissible values are `row`, `column` and any additional layouts supported by the renderer i of the returned page. | `column` | -| region | An identifier. The permissible values, and whether this is mandatory is determined by the particular layout identifier of the containing section (`row` and `column` does not specify any region identifiers). | _None_ | -| source | A space-separated set of sources permissible within this. This is a shorthand for defining sources as subtags. The total source list of this section consists of both the sources listed here and as subtags. | _All sources are permissible if none are specified._ | -| max | The maximum number of items permissible within this section (including any subsections). Regardless of the blending method used, the most relevant items are kept. | _Unrestricted_ | -| min | The minimum number of items desired within this. | _Unrestricted_ | -| order | The method of ordering to use on the items displayed in this container. This may be any [sorting specification](/en/reference/querying/sorting-language) over the fields of the hits, plus the source name and relevance score, for example `[source]-[relevance] category` to group by source, sort each group primarily by decreasing relevance and secondarily by the "category" field. The `[source]` identifier will sort sources by the order in which they are listed in the template in use. | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionDefault
idA unique identifier of this section used for referring._No id_
layoutAn identifier. Permissible values are {`row`}, {`column`} and any additional layouts supported by the renderer i of the returned page.{`column`}
regionAn identifier. The permissible values, and whether this is mandatory is determined by the particular layout identifier of the containing section ({`row`} and {`column`} does not specify any region identifiers)._None_
sourceA space-separated set of sources permissible within this. This is a shorthand for defining sources as subtags. The total source list of this section consists of both the sources listed here and as subtags._All sources are permissible if none are specified._
maxThe maximum number of items permissible within this section (including any subsections). Regardless of the blending method used, the most relevant items are kept._Unrestricted_
minThe minimum number of items desired within this._Unrestricted_
orderThe method of ordering to use on the items displayed in this container. This may be any sorting specification over the fields of the hits, plus the source name and relevance score, for example {`[source]-[relevance] category`} to group by source, sort each group primarily by decreasing relevance and secondarily by the "category" field. The {`[source]`} identifier will sort sources by the order in which they are listed in the template in use.
## source A data source whose data should be placed in the containing section. -| Attribute | Description | Default | -| :--- | :--- | :--- | -| name | The name of this source. | _Mandatory_ | -| url | The url of this source. If this is set, the data of this source is _not_ fetched, but instead the source tag (with url) will appear in the returned page such that the frontend may fetch it. This is provided primarily as a migration path, as such data can not be inspected and processed to optimize the returned page. | _No url: Fetch this configured source from the container._ | + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionDefault
nameThe name of this source._Mandatory_
urlThe url of this source. If this is set, the data of this source is _not_ fetched, but instead the source tag (with url) will appear in the returned page such that the frontend may fetch it. This is provided primarily as a migration path, as such data can not be inspected and processed to optimize the returned page._No url: Fetch this configured source from the container._
## renderer A renderer to use to render a section of a data item (hit) of a particular type. -| Attribute | Description | Default | -| :--- | :--- | :--- | -| name | The name of this renderer. | _Mandatory_ | -| for | The name of a hit type or a source this is the renderer for. | _If in a section: This is the renderer for the whole section. + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionDefault
nameThe name of this renderer._Mandatory_
forThe name of a hit type or a source this is the renderer for._If in a section: This is the renderer for the whole section.
If in a source: This is the default renderer for hits from this source._ | ## choice A choice between multiple alternative (lists of) page elements. A resolver chooses between the possible alternatives for each request at runtime. The `alternative` tag is used to enclose an alternative. If an alternative consists of just one page element tag, the enclosing alternative tag may be skipped. -| Attribute | Description | Default | -| :--- | :--- | :--- | -| method | the name of the method for making the choice. Must be supported by the optimizer in use. | _Any method_ | + + + + + + + + + + + + + + + +
AttributeDescriptionDefault
methodthe name of the method for making the choice. Must be supported by the optimizer in use._Any method_
### Contained tags Either: -| Tag | Description | Default | -| :--- | :--- | :--- | -| [page-element] | An alternative consisting of a single page element. | 0-n | -| alternative | An alternative consisting of multiple page elements. | 0-n | + + + + + + + + + + + + + + + + + + + + +
TagDescriptionDefault
[page-element]An alternative consisting of a single page element.0-n
alternativeAn alternative consisting of multiple page elements.0-n
or -| Tag | Description | Default | -| :--- | :--- | :--- | -| [map](#map) | Specify all alternatives as a single mapping function. | 0-1 | + + + + + + + + + + + + + + + +
TagDescriptionDefault
mapSpecify all alternatives as a single mapping function.0-1
## map Specify all the alternatives of a choice as a mapping function of elements to placeholders. A map is a convenience shorthand of writing many alternatives in the case where a collection of elements should be mapped to a set of placeholders with the constraint that each placeholder should get a unique element. This is useful e.g. in the case where a set of sources are to be mapped to a set of sections. -| Attribute | Description | Default | -| :--- | :--- | :--- | -| to | A space-separated list of the placeholder id's the map values should be mapped to. There cannot be more placeholder id's than there are values in this map (but fewer is ok). | - -| Contained Tags | Description | Default | -| :--- | :--- | :--- | -| [page-element] | A map item consisting of a single page element to map to a placeholder. | 0-n | -| item | An item containing multiple page elements to be mapped to a single placeholder.| 0-n | + + + + + + + + + + + + + + +
AttributeDescriptionDefault
toA space-separated list of the placeholder id's the map values should be mapped to. There cannot be more placeholder id's than there are values in this map (but fewer is ok).
+ + + + + + + + + + + + + + + + + + + + + +
Contained TagsDescriptionDefault
[page-element]A map item consisting of a single page element to map to a placeholder.0-n
itemAn item containing multiple page elements to be mapped to a single placeholder.0-n
## include Includes the page elements contained directly in the `page` element in the given page template (the page tag itself is not included). Inclusion works exactly as if the `include` tag was literally replaced by the content of the included page. -| Attribute | Description | Default | -| :--- | :--- | :--- | -| idref | The id specification of the page to include. Portions of the version may be left unspecified to get the latest matching version. | _(Mandatory)_ | \ No newline at end of file + + + + + + + + + + + + + + + +
AttributeDescriptionDefault
idrefThe id specification of the page to include. Portions of the version may be left unspecified to get the latest matching version._(Mandatory)_
\ No newline at end of file diff --git a/mintlify-docs/en/reference/querying/query-profiles.mdx b/mintlify-docs/en/reference/querying/query-profiles.mdx index ce038d71a8..0e5278bf1c 100644 --- a/mintlify-docs/en/reference/querying/query-profiles.mdx +++ b/mintlify-docs/en/reference/querying/query-profiles.mdx @@ -44,10 +44,27 @@ Any omitted numeric version component missing is taken to mean 0, while a missin ### Optional `query-profile` attributes -| Name | Default | Description | -| :--- | :--- | :--- | -| type | _No type checking_ | The id of a query profile type which defines the possible content of this query profile | -| inherits | _No inclusion_ | A space-separated list of id's of the query profiles whose fields should be included in this profile. The fields are included exactly as if they were present in this profile. Order matters: If a field is present in multiple inherited profiles, the first one found in a depth first, left to right search will be used. Fields present in this profile always overrides the same field name in an inherited profile. | + + + + + + + + + + + + + + + + + + + + +
NameDefaultDescription
type_No type checking_The id of a query profile type which defines the possible content of this query profile
inherits_No inclusion_A space-separated list of id's of the query profiles whose fields should be included in this profile. The fields are included exactly as if they were present in this profile. Order matters: If a field is present in multiple inherited profiles, the first one found in a depth first, left to right search will be used. Fields present in this profile always overrides the same field name in an inherited profile.
### Description @@ -67,9 +84,22 @@ The name of the field, must be a valid [identifier](#identifiers). ### Optional `field` attributes -| Name | Default | Description | -| :--- | :--- | :--- | -| overridable | `true` | `true` or `false`. If this is `true`, this field can be overridden by a parameter of the same name in the search request. If it is `false`, it can not be overridden in the request. This attribute overrides the overridable setting in the field definition for this field (if any). If a non overridable value is attempted assigned a value later, the assignment will _not_ cause an error, but will simply be ignored.| + + + + + + + + + + + + + + + +
NameDefaultDescription
overridable{`true`}{`true`} or {`false`}. If this is {`true`}, this field can be overridden by a parameter of the same name in the search request. If it is {`false`}, it can not be overridden in the request. This attribute overrides the overridable setting in the field definition for this field (if any). If a non overridable value is attempted assigned a value later, the assignment will _not_ cause an error, but will simply be ignored.
### `field` value @@ -119,9 +149,22 @@ where `?` means optional tag and `*` means repeatable tag. These items are descr ### Optional `query-profile-type` attributes -| Name | Default | Description | -| :--- | :--- | :--- | -| inherits | _No inclusion_ | A space-separated list of id's of the query profile types whose field definitions should be included in this profile. The fields are included exactly as if they were present in this profile type. Order matters: If a field definition is present in multiple inherited profiles, the first one found in a depth first, left to right search will be used. A field definition in this type always overrides inherited ones. The same rules apply to other elements than fields. | + + + + + + + + + + + + + + + +
NameDefaultDescription
inherits_No inclusion_A space-separated list of id's of the query profile types whose field definitions should be included in this profile. The fields are included exactly as if they were present in this profile type. Order matters: If a field definition is present in multiple inherited profiles, the first one found in a depth first, left to right search will be used. A field definition in this type always overrides inherited ones. The same rules apply to other elements than fields.
### `match` @@ -153,26 +196,86 @@ This defines the name and type of a field of query profiles of this type. This defines the type of this field. The type is one of: -| Type name | Description | -| :--- | :--- | -| string | Any string | -| integer | A signed 32-bit whole number | -| long | A signed 64-bit whole number | -| float | A signed 32-bit float | -| double | A signed 64-bit float | -| boolean | A boolean value, `true` or `false` | -| [[tensor-type-spec]](/en/reference/ranking/tensor#tensor-type-spec) | A tensor type spec | -| query-profile | A reference to a query profile of any type | -| query-profile:[query-profile-type-id] | A reference to a query profile of the given type | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type nameDescription
stringAny string
integerA signed 32-bit whole number
longA signed 64-bit whole number
floatA signed 32-bit float
doubleA signed 64-bit float
booleanA boolean value, {`true`} or {`false`}
[tensor-type-spec]A tensor type spec
query-profileA reference to a query profile of any type
query-profile:[query-profile-type-id]A reference to a query profile of the given type
### Optional `field` definition attributes -| Name | Default | Description | -| :--- | :--- | :--- | -| mandatory | `false` | `true` or `false`. If this is `true`, this field _must_ be present in either the query profile of this type or explicitly in the request referencing it | -| overridable | `true` | `true` or `false`. If this is `true`, instances of this field can be overridden by a parameter of the same name in the search request. If it is `false`, it can not be overridden in the request | -| alias | _None_ | One or more space-separated aliases of the field name. Unlike field names, aliases are case-insensitive | -| description | _None_ | A textual description of the purpose of this field. Used for documentation | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefaultDescription
mandatory{`false`}{`true`} or {`false`}. If this is {`true`}, this field _must_ be present in either the query profile of this type or explicitly in the request referencing it
overridable{`true`}{`true`} or {`false`}. If this is {`true`}, instances of this field can be overridden by a parameter of the same name in the search request. If it is {`false`}, it can not be overridden in the request
alias_None_One or more space-separated aliases of the field name. Unlike field names, aliases are case-insensitive
description_None_A textual description of the purpose of this field. Used for documentation
### Identifiers diff --git a/mintlify-docs/en/reference/querying/semantic-rules.mdx b/mintlify-docs/en/reference/querying/semantic-rules.mdx index 44a273b478..3ed2918c7e 100644 --- a/mintlify-docs/en/reference/querying/semantic-rules.mdx +++ b/mintlify-docs/en/reference/querying/semantic-rules.mdx @@ -25,14 +25,47 @@ Production rules and named conditions are _statements_. Statements may span mult A directive is a "meta-level" statement which is not used during rule evaluation, but tells the rule engine how to use the rule base. A statement starts by `@` and ends by newline. They may take parameters. These directives exist: -| Statement | Usage | Location | -| --- | --- | --- | -| @default | Make this rule base the default, to be used with all queries | Anywhere outside other statements | -| @automata(\) | Use an automata file with this base | Anywhere outside other statements | -| @include(\) | Include all the statements of another rule base in this | Anywhere outside other statements | -| @super | Include the conditions of the same-named conditions from the included rule base | In a condition | -| @stemming(\) | Whether terms should match after stemming or exactly (true by default) | Before any rule | -| @language(\<[language-code](https://en.wikipedia.org/wiki/ISO_639-1)\>) | The language of the rule base, which should also be the query language. Influences stemming. | Before any rule | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StatementUsageLocation
@defaultMake this rule base the default, to be used with all queriesAnywhere outside other statements
@automata(<automata-filename>)Use an automata file with this baseAnywhere outside other statements
@include(<rulebase-name>)Include all the statements of another rule base in thisAnywhere outside other statements
@superInclude the conditions of the same-named conditions from the included rule baseIn a condition
@stemming(<true|false>)Whether terms should match after stemming or exactly (true by default)Before any rule
@language(<language-code>)The language of the rule base, which should also be the query language. Influences stemming.Before any rule
## Production Rules @@ -44,10 +77,27 @@ A production rule is of the form: This performs the production as defined by the operator if the condition matches. There are two kinds of production rules (and two operators), replacing and adding: -| Rule kind | Operator | Meaning | -| :--- | :--- | :--- | -| Replacing | -\> | _Replace_ the matched terms by the production | -| Adding | +\> | _Add_ the production to the matched terms | + + + + + + + + + + + + + + + + + + + + +
Rule kindOperatorMeaning
Replacing->_Replace_ the matched terms by the production
Adding+>_Add_ the production to the matched terms
## Namespaces @@ -64,10 +114,30 @@ To determine the namespace used to read from conditions or change in productions There are two namespaces defined during query processing: -| Namespace | Syntax | Positional | Description | -| :--- | :--- | :--- | :--- | -| Query | | Yes | The default namespace. References the terms of the query. The condition value returned will be the term itself. | -| Parameter | `parameter.` | No | References the parameter of the query. Conditions will be true if the parameter is set in the query. The value returned from conditions is the value of the parameter. Productions will need both a key and value specified to set a parameter value. | + + + + + + + + + + + + + + + + + + + + + + + +
NamespaceSyntaxPositionalDescription
QueryYesThe default namespace. References the terms of the query. The condition value returned will be the term itself.
Parameter{`parameter.`}NoReferences the parameter of the query. Conditions will be true if the parameter is set in the query. The value returned from conditions is the value of the parameter. Productions will need both a key and value specified to set a parameter value.
## Named Conditions @@ -103,35 +173,141 @@ If a label is specified, the condition will only match terms having that label ( These are the supported kinds of conditions: -| Condition | Syntax | Meaning | Returned value | -| :--- | :--- | :--- | :--- | -| Term | \ | True if this is the term at the current position | Determined by the [namespace](#namespaces) | -| Reference (produce the matched term(s)) | [\] | Evaluate a named condition | The matched term(s) of the condition | -| Reference (produce all terms in the condition) | [\\*] | Evaluate a named condition | All the terms in the condition | -| Sequence | \ \ | Match both conditions by consecutive terms in the right order in the sequence | The last nested condition value | -| Choice | \, \ | Match any one of the conditions, each one tried at the current position | The last nested condition value | -| Group | (\) | Evaluate the condition inside the grouping as a unit | The last nested condition value | -| Ellipsis | … | Matches any sequence to make the overall condition match | The matched sequence | -| Referable ellipsis | […] | An ellipsis where the matched sequence can be referenced from the production | The matched sequence | -| Not | !\ | Matches if the condition does not match | Nothing | -| And | \ & \ | Matches if all the conditions matches at the (same) current position | The last nested condition value | -| Comparison | \ [\](#operator) \ | True if the comparison is true for the values returned from the conditions | The last nested condition value | -| Literal | '\' | Returns a value for comparison. This always evaluates to true. | The literal value | -| Start anchor | . \ | Matches condition only if it matches the query from the start | The matched sequence | -| End anchor | \ . | Matches condition only if it matches the query to the end | The matched sequence | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConditionSyntaxMeaningReturned value
Term<term>True if this is the term at the current positionDetermined by the namespace
Reference (produce the matched term(s))[<condition-name>]Evaluate a named conditionThe matched term(s) of the condition
Reference (produce all terms in the condition)[<condition-name>*]Evaluate a named conditionAll the terms in the condition
Sequence<condition> <condition>Match both conditions by consecutive terms in the right order in the sequenceThe last nested condition value
Choice<condition>, <condition>Match any one of the conditions, each one tried at the current positionThe last nested condition value
Group(<condition>)Evaluate the condition inside the grouping as a unitThe last nested condition value
Ellipsis…Matches any sequence to make the overall condition matchThe matched sequence
Referable ellipsis[…]An ellipsis where the matched sequence can be referenced from the productionThe matched sequence
Not!<condition>Matches if the condition does not matchNothing
And<condition> & <condition>Matches if all the conditions matches at the (same) current positionThe last nested condition value
Comparison<condition> <operator> <condition>True if the comparison is true for the values returned from the conditionsThe last nested condition value
Literal'<literal>'Returns a value for comparison. This always evaluates to true.The literal value
Start anchor. <condition>Matches condition only if it matches the query from the startThe matched sequence
End anchor<condition> .Matches condition only if it matches the query to the endThe matched sequence
### Comparison Condition Operators The possible operators of a comparison condition are: -| Operator | Meaning | -| :--- | :--- | -| = | Left and right values are equal | -| \<= | Left value is smaller or equal | -| \>= | Left value is larger or equal | -| \< | Left value is smaller | -| \> | Left value is larger | -| =~ | Left value contains right value as a substring | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OperatorMeaning
=Left and right values are equal
<=Left value is smaller or equal
>=Left value is larger or equal
<Left value is smaller
>Left value is larger
=~Left value contains right value as a substring
## Production List @@ -145,13 +321,36 @@ A production list consists of a space-separated list of _productions_ which are The default term type is the term type of the context which the term is added to. The possible explicit term types are: -| Syntax | Meaning | -| :--- | :--- | -| ? | Insert as an OR term | -| = | Insert as an EQUIV term | -| + | Insert as an AND term | -| $ | Insert as a RANK term | -| - | Insert as a NOT term | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SyntaxMeaning
?Insert as an OR term
=Insert as an EQUIV term
+Insert as an AND term
$Insert as a RANK term
-Insert as a NOT term
### Label @@ -161,11 +360,32 @@ If included, the label decides the label the produced term(s) will have in the n There are three types of productions: -| Production | Syntax | Meaning | -| :--- | :--- | :--- | -| Literal term | \ | Produce this term literally | -| Literal term with value | \='\' | Produce this term and value literally. | -| Reference | [\] | Produce the terms matched by the referenced condition. The reference name is either the name of a named condition used in the condition, an ellipsis - `...` - or an explicit condition reference name. | + + + + + + + + + + + + + + + + + + + + + + + + + +
ProductionSyntaxMeaning
Literal term<term>Produce this term literally
Literal term with value<term>='<value>'Produce this term and value literally.
Reference[<condition-reference>]Produce the terms matched by the referenced condition. The reference name is either the name of a named condition used in the condition, an ellipsis - {`...`} - or an explicit condition reference name.
### Weight diff --git a/mintlify-docs/en/reference/querying/sorting-language.mdx b/mintlify-docs/en/reference/querying/sorting-language.mdx index a0fd3fe823..138f6a1054 100644 --- a/mintlify-docs/en/reference/querying/sorting-language.mdx +++ b/mintlify-docs/en/reference/querying/sorting-language.mdx @@ -70,12 +70,32 @@ Refer to [function](/en/reference/querying/yql#function). Three special attributes are available for sorting in addition to the index specific attributes: -| Attribute | Description | -| :--- | :--- | -| --- | --- | -| **\[relevance\]** | The document's relevance score for this query. This is the same as the default ordering when no sort specification is given (\[rank\] is a legacy alias for the same thing). | -| **\[source\]** | The document's source name. This is only relevant when querying multiple sources. | -| **\[docid\]** | The document's identification in the search backend. This will typically give you the documents in indexing order. **Keep in mind that this id is unique only to the backend node**. The same document might have different id on a different node. The same way a different document might have the same id on another node. This is just intended as a cheap way of getting an almost stable sort order. | + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescription
------
**[relevance]**The document's relevance score for this query. This is the same as the default ordering when no sort specification is given ([rank] is a legacy alias for the same thing).
**[source]**The document's source name. This is only relevant when querying multiple sources.
**[docid]**The document's identification in the search backend. This will typically give you the documents in indexing order. **Keep in mind that this id is unique only to the backend node**. The same document might have different id on a different node. The same way a different document might have the same id on another node. This is just intended as a cheap way of getting an almost stable sort order.
These special attributes are most useful as secondary sort expressions in a multilevel sort. This will allow you to sort groups of equal values for the primary expression in either relevancy or indexing order. Without this additional sort expression, the order within each equal group is not deterministic. @@ -87,12 +107,37 @@ These special attributes are most useful as secondary sort expressions in a mult A document might not have a value in the attribute. One of the following missing policies will then be applied: -| Policy | Example | Description | -| :--- | :--- | :--- | -| default | `+attr` | If the sort order is ascending and the attribute is single-valued then the document is sorted before any documents with values in the attribute. If the attribute is multi-valued or the sort order is descending then the document is sorted after any documents with values in the attribute. | -| first | `+missing(attr,first)` | The document is sorted before any documents with values in the attribute. | -| last | `+missing(attr,last)` | The document is sorted after any documents with values in the attribute. | -| as | `+missing(attr,as,42)` | The document is sorted as if it had the missing value specified in the [sorting specification](#sortspec). If the missing value cannot be converted to the attribute data type then an error is reported (query is aborted for indexed search, parts of the sort spec is ignored for streaming search). | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PolicyExampleDescription
default{`+attr`}If the sort order is ascending and the attribute is single-valued then the document is sorted before any documents with values in the attribute. If the attribute is multi-valued or the sort order is descending then the document is sorted after any documents with values in the attribute.
first{`+missing(attr,first)`}The document is sorted before any documents with values in the attribute.
last{`+missing(attr,last)`}The document is sorted after any documents with values in the attribute.
as{`+missing(attr,as,42)`}The document is sorted as if it had the missing value specified in the sorting specification. If the missing value cannot be converted to the attribute data type then an error is reported (query is aborted for indexed search, parts of the sort spec is ignored for streaming search).
Note that missing policies can be combined with other functions ,e.g. `+missing(lowercase(attr),as,"nothing here")`. diff --git a/mintlify-docs/en/reference/querying/yql.mdx b/mintlify-docs/en/reference/querying/yql.mdx index d8c46d929c..9eb3a48d41 100644 --- a/mintlify-docs/en/reference/querying/yql.mdx +++ b/mintlify-docs/en/reference/querying/yql.mdx @@ -53,11 +53,28 @@ select * from music where title contains "madonna" queries all document types in the _music_ content cluster or federation source. Query in: -| | | -|:-----------|:-----------| -| all sources | `select ... from sources * where ...` | -| a set of sources | `select ... from sources source1, source2 where ...` | -| a single source | `select ... from source1 where ...` | + + + + + + + + + + + + + + + + + + + + + +
all sources{`select ... from sources * where ...`}
a set of sources{`select ... from sources source1, source2 where ...`}
a single source{`select ... from source1 where ...`}
In other words, _sources_ is used for querying some/all sources. If only a single source is queried, the _sources_ keyword is dropped. To restrict the query to only one schema (aka document type) use the [model.restrict](/en/reference/api/query#model.restrict) URL parameter. Also see [federation](/en/querying/federation). @@ -65,38 +82,136 @@ In other words, _sources_ is used for querying some/all sources. If only a singl The `where` clause is a tree of operators: -| | | | | | | | | | | | | | | -| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| numeric | The following numeric operators are available: `= < > <= >= range(field, lower bound, upper bound)`. where 500 >= price where range(fieldname, 0, 5000000000L) Numbers must be in the signed 32-bit range. Input 64-bit signed numbers using `L` as suffix. For the `range` operator, one can also use the strings `Infinity` or `-Infinity`: where (range(year, 2000, Infinity)) \| Annotation \| Effect \| \| --- \| --- \| \| [bounds](#bounds) \| Range: open or closed interval. \| \| [hitLimit](#hitlimit) \| Used for *capped range search*. The `range()` query operator with `hitLimit` can be used to efficiently implement top-k selection for ranking a subset of the documents in the index. See [example and use cases](/en/performance/practical-search-performance-guide#advanced-range-search-with-hitlimit). \| The [weightedset](/en/reference/schemas/schemas#weightedset) field does not support filtering on weight. Solve this using the [map](/en/reference/schemas/schemas#map) type and [sameElement](#sameelement) query operator - see [example](/en/querying/query-language#map). | -| boolean | The boolean operator is: `=` where alive = true | -| contains | The right-hand side argument of the contains operator is either a string literal, or a function, like `phrase`. `contains` is the basic building block for text matching. The kind of [matching](/en/reference/schemas/schemas#match) to be done depends on the field settings in the schema. where title contains "madonna" \| Annotation \| Effect \| \| --- \| --- \| \| [stem](#stem) \| By default, the string literal is [tokenized](/en/linguistics/linguistics-opennlp#tokenization) to match the field(s) searched. Explicitly control tokenization by using [stem](#stem):where title contains ``` ({stem: false}"madonna")``` \| The matched field must be an [indexed field or attribute](/en/basics/schemas#document-fields). Fields inside structs are referenced using dot notation - e.g `mystruct.mystructfield`. | -| and | `and` accepts other `and` statements, `or` statements, [userQuery](#userquery), logically inverted statements - and contains statements as arguments: where title contains "madonna" and title contains "saint" | -| or | `or` accepts other `or` statements, `and` statements, [userQuery](#userquery) - and contains statements as arguments: where title contains "madonna" or title contains "saint" | -| not | Use the `!` operator to match document that does *not* satisfy some condition: where title contains "madonna" and !(title contains "saint") | -| phrase | Phrases are expressed as a function: where text contains phrase("st", "louis", "blues") | -| near | `near()` matches if all argument terms occur within the specified distance, in any order. Negative terms (prefixed with `!`) exclude matches where those terms appear within the exclusion distance. where field contains near("a", "b", "c") where field contains ```({distance: 5}near("web", "search"))``` where field contains near("sql", "database", !"nosql") \| Annotation \| Default \| Description \| \| --- \| --- \| --- \| \| [distance](#distance) \| 2 \| Maximum position difference for terms to match. \| \| exclusionDistance \| (distance+1)/2 \| Exclusion zone size around negative terms. \| Negative terms must come after all positive terms. For multi-value fields, setting [element-gap](/en/reference/schemas/schemas#rank-element-gap) for the field in the rank profile enables distance calculation between adjacent elements. Features below `near()` and `onear()` are filtered based on the spans for the operator match before they are exposed to the ranking features. Given the query text contains ```({distance:1}near("a","b"))```and two documents. The text field in the first document is `"a a a a a a b b b b b b"`. The spans for the near match are `[[5,6]]`. Only the last occurrence of `"a"` and the first occurrence of `"b"` are kept. The text field in the second document is `"a b c a b c a b c a b c"`. The spans for the near match are `[[0,1],[3,4],[6,7],[9,10]]`. All occurrences of `"a"` and `"b"` are kept. | -| onear | `onear()` (ordered near) is like `near()`, but requires terms to appear in the same order as specified in the query. With distance set to (number of terms - 1), `onear()` is equivalent to `phrase()`. where field contains onear("web", "search", "engine") where field contains ```({distance: 5}onear("neural", "network"))``` where field contains onear("java", "tutorial", !"script") \| Annotation \| Default \| Description \| \| --- \| --- \| --- \| \| [distance](#distance) \| 2 \| Maximum position difference for terms to match. \| \| exclusionDistance \| (distance+1)/2 \| Exclusion zone size around negative terms. \| Negative terms must come after all positive terms. For multi-value fields, setting [element-gap](/en/reference/schemas/schemas#rank-element-gap) for the field in the rank profile enables distance calculation between adjacent elements. | -| sameElement | The `sameElement()` operator lets you denote conditions that must match within the *same* element in multivalue fields containing structs or strings. By default, sameElement uses `AND` to combine the conditions: *All* the conditions must match in the same element to produce a match. For example, given this **struct**: struct person ```{ field first_name type string {} field last\_name type string {} field year\_of\_birth type int {} } field persons type array\ { indexing: summary struct-field first\_name { indexing: attribute } struct-field last\_name { indexing: attribute } struct-field year\_of\_birth { indexing: attribute } }``` We can use this query: where persons contains sameElement(first\_name contains 'Joe', last\_name contains 'Smith', year\_of\_birth \< 1940) to return all documents containing a Joe Smith born before 1940 in the `persons` array. Searching a **map** is done by treating it as an array of a struct with the field members `key` and `value`. For example, given this map: ```field identities type map\ { indexing: summary struct-field key { indexing: attribute } struct-field value.first_name { indexing: attribute } struct-field value.last_name { indexing: attribute } struct-field value.year_of_birth { indexing: attribute } }``` We can use this query: where identities contains sameElement(key contains 'father', value.first\_name contains 'Joe', value.last\_name contains 'Smith', value.year\_of\_birth < 1940) to return all documents that have a Joe Smith born before 1940 keyed as a 'father'. `sameElement()` may also be used to search **array of string** fields. Supported query operators inside sameElement() are `and`, `equiv`, `near`, `onear`, `or`, `rank` and `phrase`. `and` can be used with `!`. For example given this field: field chunks type ```array\ \{ indexing: index | summary } ``` We can use these queries: where chunks contains sameElement("one" and "two") where chunks contains sameElement("one" and equiv("two","three")) where chunks contains ```sameElement("one" and (\{distance: 5}near("two","three",!"four"))) ```where chunks contains sameElement("one" and phrase("two","three")) where chunks contains sameElement("one" and !"two") where chunks contains sameElement("one" or "two") where chunks contains sameElement(rank("one" and "two", "three")) Features inside sameElement() for indexed fields are filtered based on the matching elements, e.g. [elementwise(bm25(descriptions),x,double)](../ranking//en/reference/ranking/rank-features#elementwise-bm25) will only contain tensor cells based on the matching elements. Use the [`elementFilter`](#elementfilter) annotation to restrict matching to specific element indices. For example, given a field `my_numbers type array`: where```bash my_numbers contains (\{elementFilter:\[2\]}sameElement("42"))``` This only matches the element at index 2 in the array field. Multiple indices can be given: `{elementFilter:[0, 2, 5]}`. A shorthand form is also available: where my\_numbers\[2\] = 42 The shorthand form only supports a single index. Use the [`elementFilter`](#elementfilter) annotation to match multiple indices. | -| equiv | For cases where two terms in the same field should produce exactly the same behavior when matched, the `equiv()` operator can be used. This behaves like a special case of `or`. where fieldName contains equiv("A","B") The matching logic of equiv is the same as OR, and an OR does not have the limitations that EQUIV does (below). The difference is in how matches are visible to ranking functions. All words that are children of an OR count for ranking, while with EQUIV, they look like a single word to ranking: - Counts as only +1 for queryTermCount - Counts as 1 word for completeness measures - Proximity will not discriminate different words inside the EQUIV - Connectivity can be set between the entire EQUIV and the word before and after - Items inside the EQUIV are not directly visible to ranking features, so weight and connectivity on those will have no effect Limitations on how `equiv` can be used in a query: - `equiv` may not appear inside a phrase - It may only contain `TermItem` and `PhraseItem` instances. Operators like `and` cannot be placed inside `equiv` - `PhraseItems` inside `equiv` will rank like as if they have size 1 Learn how to use [equiv](/en/linguistics/query-rewriting#equiv). | -| uri | Used to search for urls indexed using the [uri field type](/en/reference/schemas/schemas#uri). where myUrlField contains uri("vespa.ai/foo") Various subfields are supported to search components of the URL, see the field type definition. \| Annotation \| Effect \| \| --- \| --- \| \| [startAnchor](#startanchor) \| Anchor uri.hostname at start. \| \| [endAnchor](#endanchor) \| Anchor uri.hostname at end. \| | -| fuzzy | [Levenshtein](https://en.wikipedia.org/wiki/Levenshtein_distance) edit distance search within a string or array\ [attribute](/en/reference/schemas/schemas#attribute). where myStringAttribute contains (\{prefixLength:1, maxEditDistance:2}fuzzy("parantesis")) Annotations below are configuring `fuzzy`: \| Annotation \| Effect \| \| --- \| --- \| \| [maxEditDistance](#maxeditdistance) \| An inclusive upper bound of edit distance between query and string attribute (default is 2). \| \| [prefixLength](#prefixlength) \| Number of characters that are considered frozen, so the fuzzy match will be performed only with the suffix left. Default is 0 (i.e. `fuzzy` will match across whole query) \| \| [prefix](#prefix) \| If `true`, a string is considered a match when it's possible to transform a *prefix* of the candidate string to the query string using at most `maxEditDistance` edits. See [fuzzy prefix match](/en/querying/text-matching#fuzzy-prefix-match). Default is `false`, which means that the entire string is considered. \| Find an example in [text matching](/en/querying/text-matching#fuzzy-match). **Important:** Only string [attribute](/en/reference/schemas/schemas#attribute) fields in [documents](/en/reference/applications/services/content#document) are supported (single, array or weightedset). Matching is optimized internally when `maxEditDistance` is 1 or 2. Setting [prefixLength](#prefixlength) greater than 0 narrows the match for the [fast-search](/en/reference/schemas/schemas#attribute), greatly reducing the number of terms that must be considered. | -| matches | Regular expression match is supported using [posix extended syntax](https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Extended_Regular_Expressions), with the limitation that it is **case-insensitive**. Example matching both `madonna`, `madona` and with any number of `n`s: where attribute\_field matches "mado\[n\]+a" Find more examples in the [text matching](/en/querying/text-matching#regular-expression-match) guide. **Important:** Only [attribute](/en/reference/schemas/schemas#attribute) fields in [documents](/en/reference/applications/services/content#document) is supported. It is not optimized for performance. Having a prefix using the `^` will be faster than not having one. Additionally, fields that serve as both attributes and indexes are not compatible. | -| text | *text()* accepts any text and tokenizes it into a set of tokens to be searched in a given field or fieldSet. By default, the tokens are searched with a [weakAnd](#weakand) operator. You can override the default behavior via annotations: `text()` supports the same annotations as [userInput()](#userinput). Example: where text\_field contains text("some text") With annotations: where text\_field contains (\{language:'en'}text("some text")) The text argument can be given as a reference using "@parameterName": yql=select \* from sources \* where text\_field contains (@text)&text=some text | -| userInput | *userInput()* parses text from end users or models that may contain query syntax for choosing the fields to search, specifying phrases and negative terms etc. Since the query in userInput can specify fields, there is no "contains field" prefix before the userInput operator. yql=select \* from sources \* where userInput('some text') The argument can be given as a reference using "@parameterName": yql=select \* from sources \* where userInput(@text)&text=some text Both of these will result in the query select \* from sources \* where weakAnd(default contains "some", default contains "text") The default behavior may be overridden by annotations: yql=select \* from sources \* where (\{grammar.syntax:'none',grammar.tokenization:'linguistics',grammar.composite:'near',distance:3}userInput('some text')) \| Annotation \| Effect \| \| --- \| --- \| \| [grammar](#grammar) \| Sets the query parse type to apply when interpreting the user input text. For any value of `grammar` other than `raw` or `segment`, only the following annotations are applied: - [defaultIndex](#defaultindex) - [totalTargetHits](#totaltargethits) (for weakAnd)- [targetHits](#targethits) (for weakAnd)- [distance](#distance) (for near/oNear)- [ranked](#ranked) - [filter](#filter) - [stem](#stem) - [normalizeCase](#normalizecase) - [accentDrop](#accentdrop) - [usePositionData](#usepositiondata) E.g. if annotating `userInput` with `phrase`, a `filter` annotation will have effect, but not `language`. See [isYqlDefault](/en/reference/api/query#model.type.isYqlDefault) on setting a default grammar in a request/query profile. \| \| [defaultIndex](#defaultindex) \| Same as [model.defaultIndex](/en/reference/api/query#model.defaultindex) in the query API. \| \| [language](#language) \| Language setting for the linguistics treatment of this userInput() call. \| \| [allowEmpty](#allowempty) \| Whether to allow empty input for query parsing and search terms. \| In addition, other annotations, like [stem](#stem) or [ranked](#ranked), will take effect as normal. More examples can be found in the [query API](/en/querying/query-api#input-examples) guide. | -| userQuery | *userQuery()* reads from [model.queryString](/en/reference/api/query#model.querystring) and parses the query using [simple query language](/en/reference/querying/simple-query-language). If set, [model.filter](/en/reference/api/query#model.filter) is combined with *model.queryString* before the parsing. The user query is first parsed, then the resulting tree is inserted into the corresponding place in the YQL query tree. Example: $ vespa query 'select \* from sources \* where vendor contains "brick and mortar" AND price < 50 AND userQuery()' \\ query="abc def -ghi" \\ type=all This evaluates to a query where: - the numeric field *price* must be less than 50 - *vendor* must match *brick and mortar* - the default index must contain the two terms *abc* and *def*, *and not* contain *ghi*. Use [model.defaultIndex](/en/reference/api/query#model.defaultindex) to specify a field or fieldset if not using *default* - see [example](/en/querying/query-api#fieldset). | -| rank | The first, and only the first, argument of the *rank()* function determines whether a document is a match, but all arguments are used for calculating rank features. The `rank` operator is useful for boosting documents based on the presence of certain terms without impacting matching or retrieval logic. where rank(a contains "A", b contains "B", c contains "C") It's also useful in hybrid search use cases. See [blog post](https://blog.vespa.ai/redefining-hybrid-search-possibilities-with-vespa/) for usage examples. For example, retrieve using the [nearestNeighbor](#nearestneighbor) query operator as the first argument and have matching features calculated for the other arguments. where rank(nearestNeighbor(field, queryVector), a contains "A", b contains "B", c contains "C") | -| in | The *in* operator is used to match a set of values in an integer or string field. A document is considered a match when at least one of the values matches the content of the field. This is an optimized shorthand for multiple OR conditions, and is similar to the IN operator in SQL. Available since Vespa 8.293.15 . Example: where integer\_field in (10, 20, 30) where string\_field in ('germany', 'france', 'norway') Where `string_field` is a field with `match:word`. There is no [linguistic](/en/linguistics/linguistics.html) processing like tokenization or stemming of the string values used in the *in* operator except lowercasing. See string [match](/en/reference/schemas/schemas#match).field string\_field type string \{ indexing: summary \| index # or attribute match: word rank:filter attribute: fast-search # if attribute } Using the *in* operator against string fields with `match:text` will cause recall issues because the field contents will be tokenized during indexing while the *in* operator does not tokenize the values. The argument before *in* is the name of the field or [fieldset](/en/reference/schemas/schemas#fieldset) to search. The argument after *in* is a comma-separated list of values, enclosed in parentheses. String values must be single or double-quoted if passed inline in YQL For multi-value fields (like arrays), the *in* operator works by checking if any element in the array matches any of the values in the set. This is similar to SQL's IN operator but more streamlined for array comparisons. Example: where integer\_array\_field in (10, 20, 30) If integer\_array\_field = \[5, 10, 15\], it will match because 10 is in the array. Similarly, if integer\_array\_field = \[20, 25, 30\], it will match because both 20 and 30 are in the array. For faster query parsing use [parameter substitution](#parameter-substitution) to submit the values as an additional request parameter. Quoting of string values are optional. Example: where integer\_field in (@integer\_values)&integer\_values=10,20,30 where string\_field in (@string\_values)&string\_values=germany,france,norway The *in* operator acts as a single term in the query tree, and does not provide any match information for text ranking features. For a discussion of usage and examples refer to: - [multivalue query operators](/en/ranking/multivalue-query-operators#in-example) - [multi-lookup set filtering](/en/performance/feature-tuning#multi-lookup-set-filtering) - [in operator system test](https://github.com/vespa-engine/system-test/tree/master/tests/search/in_operator) \| Field type \| Singlevalue or [multivalue](/en/querying/searching-multivalue-fields) [attribute or index field](/en/basics/schemas#document-fields) with basic type [byte](/en/reference/schemas/schemas#byte), [int](/en/reference/schemas/schemas#int), [long](/en/reference/schemas/schemas#long) or [string](/en/reference/schemas/schemas#string). String fields must have `match:word` or `match:exact`. \| \| --- \| --- \| \| Query model \| A set of values/tokens. \| \| Matching \| Documents where the field contains at least one of the values in the query. \| \| Ranking \| None. \| \| Java Query Item \| [NumericInItem](https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/NumericInItem.html) and [StringInItem](https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/StringInItem.html). \| **Important:** When using the *in* operator with an attribute field, set [fast-search](/en/content/attributes#fast-search) and [rank: filter](/en/reference/schemas/schemas#filter) for best possible performance. Always use `match:word` for string fields. | -| dotProduct | *dotProduct* calculates the dot product between the weighted set in the query and a weighted set field in the document as its rank score contribution: where dotProduct(description, \{"a":1, "b":2}) The result is stored as a [raw score](/en/ranking/multivalue-query-operators#raw-scores-and-query-item-labeling). A normal use case is a collection of weighted tokens produced by an algorithm, to match against a corpus containing weighted tokens produced by another algorithm in order to implement personalized content exploration. See example usage of *dotProduct* in [practical performance guide](/en/performance/practical-search-performance-guide#multi-valued-query-operators) . Refer to [multivalue query operators](/en/ranking/multivalue-query-operators) for a discussion of usage and examples. Keys must be single or double-quoted if passed inline in YQL - alternatively, use [parameter substitution](#parameter-substitution) to submit the weighted set with a simple format for faster query parsing - example: `where dotProduct(description, @myterms)`. \| Field type \| Weighted set attribute with fast-search. Note: Also supported for regular attribute or index fields, but then with much weaker performance). \| \| --- \| --- \| \| Query model \| Weighted set with \{token, weight} pairs \| \| Matching \| Documents where the weighted set field contains at least one of the tokens in the query. \| \| Ranking \| Dot product score between the weights of the matched query tokens and field tokens. This score is available using [rawScore](/en/reference/ranking/rank-features#rawScore(field)) or [itemRawScore](/en/reference/ranking/rank-features#itemRawScore(label)) rank features. \| \| Java Query Item \| [DotProductItem](https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/DotProductItem.html) \| | -| weightedSet | When using *weightedSet* to search a field, all tokens present in the searched field will be matched against the weighted set in the query. This means that using a weighted set to search a single-value attribute field will have similar semantics to using a normal term to search a weighted set field. The low-level matching information resulting from matching a document with a weighted set in the query will contain the weights of all the matched tokens in descending order. Each matched weight will be represented as a standard occurrence on position 0 in element 0. where weightedSet(description, \{"a":1, "b":2}) *weightedSet* has similar semantics to [equiv](#equiv), as it acts as a single term in the query. However, the restriction dictating that it contains a collection of weighted tokens directly enables specific back-end optimizations that improves performance for large sets of tokens compared to using the generic [equiv](#equiv) or [or](#or) operators. Keys must be single or double-quoted if passed inline in YQL - alternatively, use [parameter substitution](#parameter-substitution) to submit the weighted set with a simple format for faster query parsing - example: `where weightedSet(description, @myterms)`. \| Field type \| Singlevalue or [multivalue](/en/querying/searching-multivalue-fields) attribute or index field. (Note: Most use cases operates on a single value field). \| \| --- \| --- \| \| Query model \| Weighted set with \{token, weight} pairs. \| \| Matching \| Documents where the field contains at least one of the tokens in the query. For filtering use cases we recommend using the [in operator](#in) instead, as it is simpler to use and has slightly better performance. \| \| Ranking \| The operator will act as a single term in the back-end. The query term weight is the weight assigned to the operator itself and the match weight is the largest weight among matching tokens from the weighted set. This operator does not produce a raw score. Due to better ranking and performance we recommend using [dotProduct](#dotproduct) instead. \| \| Java Query Item \| [WeightedSetItem](https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/WeightedSetItem.html) \| | -| wand | `wand` can be used to search for documents where weighted tokens in a field matches a subset of weighted tokens in the query. At the same time, it internally calculates the dot product between token weights in the query and the field. `wand` is guaranteed to return the top-k hits according to its internal dot product rank score. It is an operator that scales adaptively from [or](#or) to [and](#and). Note that total hit count becomes inaccurate when using wand. `wand` optimizes the performance of using multiple threads per search in the backend, and is also called *Parallel Wand*. `wand` also allows numeric arguments, then the search argument is an array of arrays of length two. In each pair, the first number is the search term, the second its weight: where wand(description, \[\[11,1\], \[37,2\]\]) Keys must be single or double-quoted if passed inline in YQL - alternatively, use [parameter substitution](#parameter-substitution) to submit the weighted set with a simple format for faster query parsing - example: `where wand(description, @myterms)`. \| Annotation \| Effect \| \| --- \| --- \| \| [scoreThreshold](#scorethreshold) \| Minimum rank score for hits to include. \| \| [totalTargetHits](#totaltargethits) \| Wanted number of hits exposed to the first-phase ranking function in total over the content nodes evaluating the query. \| \| [targetHits](#targethits) \| Wanted number of hits exposed to the first-phase ranking function per content node. Prefer using [totalTargetHits](#totaltargethits) over this. \| where (\{scoreThreshold: 0.13, totalTargetHits: 7}wand(description, \{"a":1, "b":2})) Refer to [using wand](/en/ranking/wand) for introduction to the WAND algorithm and example usage of *wand* in [practical performance guide](/en/performance/practical-search-performance-guide#multi-valued-query-operators) . \| Field type \| Weighted set attribute with fast-search. Note: Also supported for regular attribute or index fields, but then with much weaker performance). \| \| --- \| --- \| \| Query model \| Weighted set with \{token, weight} pairs. \| \| Matching \| Documents where the weighted set field contains at least one of the tokens in the query and where the internal dot product score for this document, is larger than the worst among the current top-k best hits. This means that more than top-k documents are matched and returned for ranking. It also means that many documents are skipped, even they match several tokens in the query because the dot product score is too low. This skipping makes *wand* faster than [dotProduct](#dotproduct) in some cases. \| \| Ranking \| Dot product score between the weights of the matched query tokens and field tokens. This score is available using [rawScore](/en/reference/ranking/rank-features#rawScore(field)) or [itemRawScore](/en/reference/ranking/rank-features#itemRawScore(label)) rank features. Note that the top-k best hits are only guaranteed to be returned when using this internal score as the final ranking expression. \| \| Java Query Item \| [WandItem](https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/WandItem.html) \| | -| weakAnd | `weakAnd` is sometimes called *Vespa Wand*. Unlike [wand](#wand), it accepts arbitrary word matches (across arbitrary fields) as arguments. Only a limited number of documents are returned for ranking (default is 100), but it does not guarantee to return the best k hits. This function can be seen as an optimized [or](#or): where weakAnd(a contains "A", b contains "B") \| Annotation \| Effect \| \| --- \| --- \| \| [totalTargetHits](#totaltargethits) \| Wanted number of hits exposed to the first-phase ranking function in total over the content nodes evaluating the query. \| \| [targetHits](#targethits) \| Wanted number of hits exposed to the first-phase ranking function per content node. Prefer using [totalTargetHits](#totaltargethits) over this. \| where (\{totaltargetHits: 7}weakAnd(a contains "A", b contains "B")) Unlike [wand](#wand), `weakAnd` can be used to search across several fields of various types, but it does NOT guarantee to return the top-k best number of hits. It can however be combined with any ranking expression. Keep in mind that this expression should correlate with its simple internal ranking score that uses query term weight and inverse document frequency for matching terms. Refer to [using wand](/en/ranking/wand) for a usage and examples. \| Field type \| Multiple fields of all types (both attribute and index). \| \| --- \| --- \| \| Query model \| Arbitrary number of query items searching across different fields. \| \| Matching \| Documents that matches at least one of the tokens in the query and where the internal operator score for this document is larger than the worst among the current top-k best hits. As with [wand](#wand), this means that typically more than top-k documents are matched and a lot of documents are skipped. \| \| Ranking \| Internal ranking score based on query term weight and inverse document frequency for matching terms to find the top-k hits. This score is currently not available to the ranking framework. Matching terms are exposed to the ranking framework (same as when using [and](#and) or [or](#or)), so an arbitrary ranking expression can be used in combination with this operator. Note that the ranking expression used should correlate with this internal ranking score. [bm25](/en/reference/ranking/rank-features#bm25), [nativeFieldMatch](/en/reference/ranking/rank-features#nativeFieldMatch) and [nativeDotProduct](/en/reference/ranking/rank-features#nativeDotProduct(field)) rank features are good starting points. \| \| Java Query Item \| [WeakAndItem](https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/WeakAndItem.html) \| | -| geoLocation | `geoLocation` matches a [position](/en/reference/schemas/schemas#position) inside a geographical circle, specified as latitude, longitude, and a maximum distance (radius). See also [geoBoundingBox](#geoboundingbox). Example: where geoLocation(myfieldname, 63.5, 10.5, "200 km") In this example we search for documents near 63.5° north, 10.5° east, and within a 200 km radius. So a document with a "myfieldname" position in Trondheim, Norway at N63°25'47;E10°23'36 would match. The first parameter is the name of the attribute field. The second parameter is the latitude (positive for north, negative for south). The third parameter is the longitude (positive for east, negative for west). The fourth parameter must be a string specifying the radius and its units, where the supported units/suffixes include "km", "m" (abbr. for meters), "miles", "mi" (abbr. for miles), "deg" (abbr. for degrees) and "d" (contextual abbr. for degrees). The "deg" / "d" unit / suffix gives radius the same units as latitude. Any negative number for radius (e.g. "-1 m") is interpreted as an "infinite" radius, letting any geographical position at all match the geoLocation operator. The position attribute in the schema could look like: field myfieldname type position \{ indexing: attribute \| summary } Arrays of positions are also possible: field myfieldname type array\ \{ indexing: attribute } \| Annotation \| Effect \| \| --- \| --- \| \| [label](#label) \| Label for referring to this term during ranking. \| Properties: \| Field type \| position attribute (single-valued or array). \| \| --- \| --- \| \| Query parameters \| Field name, latitude, longitude, radius. \| \| Matching \| Returns documents inside the given geo circle. \| \| Ranking \| Use `closeness(myfieldname)`, or `distance(myfieldname)` in ranking calculations. See [closeness](/en/reference/ranking/rank-features#closeness(name)) and [distance](/en/reference/ranking/rank-features#distance(name)) documentation. \| \| Java Query Item \| [GeoLocationItem](https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/GeoLocationItem.html) \| | -| geoBoundingBox | `geoBoundingBox` requires a [position](/en/reference/schemas/schemas#position) to be inside a geographical rectangle; specified as 4 numbers (in degrees). The 4 numbers must be in a specific order: south-western corner (minimum latitude, minimum longitude) followed by north-eastern corner (maximum latitude, maximum longitude). Examples: where geoBoundingBox(myfieldname, 63.25, 10.01, 63.45, 10.61) where geoBoundingBox(myfieldname, -23.12, -43.85, -22.59, -42.89) In the first example we search for documents inside a rectangular map view around Trondheim, Norway. So a document with a "myfieldname" position at [63°25'50"N 10°23'42"E](https://www.google.com/maps/place/63%C2%B025'50.0%22N+10%C2%B023'42.0%22E) would match. The second example surrounds [Rio de Janeiro](https://www.google.com/maps/place/22%C2%B059'13.0%22S+43%C2%B012'10.0%22W), Brazil. - The first parameter is the name of the attribute field. - The 2nd parameter is the minimum (southern) latitude (positive for north, negative for south). - The 3rd parameter is the minimum (western) longitude (positive for east, negative for west). - The 4th parameter is the maximum (northern) latitude (positive for north, negative for south). - The 5th parameter is the maximum (eastern) longitude (positive for east, negative for west). See the [geoLocation](#geolocation) operator for more details about positions. Note that there is no ranking contribution from this operator; if you want to get the distance to the center of the box, you need an additional `geoLocation` item with that point. Properties: \| Field type \| position attribute (single-valued or array). \| \| --- \| --- \| \| Query parameters \| Field name, southern, western, northern, eastern limits. \| \| Matching \| Returns documents inside the given geo bounding box. \| \| Ranking \| None. \| \| Java Query Item \| [GeoLocationItem](https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/GeoLocationItem.html) \| | -| nearestNeighbor | `nearestNeighbor` matches the top-k nearest neighbors in a multidimensional vector space. Points in the vector space are specified as [tensors](/en/ranking/tensor-user-guide) with one indexed dimension, where the size of that dimension is equal to the dimensionality of the vector space. The document vectors are stored in a [tensor field attribute](/en/reference/schemas/schemas#tensor), and the query vector is sent with the query request. The following tensor field types are supported: - Single vector per document: Tensor type with one indexed dimension. Example: `tensor(x[3])` - Multiple vectors per document: Tensor type with one or more mapped dimensions and one indexed dimension. Examples: `tensor(m{},x[3])`, `tensor(m{},n{},x[3])` Euclidean distance is used as the default [distance metric](/en/reference/schemas/schemas#distance-metric) and the exact nearest neighbors are returned. When storing multiple vectors per document, the vector that is closest to the query vector is used when calculating the distance between the document and the query. If an [HNSW index](/en/reference/schemas/schemas#index-hnsw) is specified on the tensor field, the approximate nearest neighbors are returned. Example: where (\{totaltargetHits: 10}nearestNeighbor(doc\_vector, query\_vector))&input.query(query\_vector)=\[3,5,7\]&ranking=semantic In this example we search for the top 10 nearest neighbors in a 3-dimensional vector space. *totalTargetHits* specifies the top-k nearest neighbors to expose to a user defined `semantic` [rank profile](/en/basics/ranking). The [totalTargetHits](#totaltargethits) annotation is required. The first parameter of *nearestNeighbor* is the name of the tensor field attribute containing the document vectors (*doc\_vector*). The second parameter is the name of the tensor sent with the query request (*query\_vector*). Specifying *query\_vector* as the name means the query request must set this tensor as *input.query(query\_vector)* - see the [reference](/en/reference/api/query#ranking.features). The tensor type of the **input query vector must be defined** in the rank profile: rank-profile semantic \{ inputs \{ query(query\_vector) tensor\(x\[3\]) } first-phase: closeness(field, doc\_vector) } Also see [defining query feature types](../../ranking/ranking-expressions-features#query-feature-types). Failure to define the query input tensor in the schema will fail the request: Expected 'query(query\_vector)' to be a tensor, but it is the string '\[3,5,7\]' The document tensor field attribute is defined as follows: field doc\_vector type tensor\(x\[3\]) \{ indexing: attribute \| summary } The example above does not define HNSW `index` and the search for neighbors will be exact. See [Nearest Neighbor Search](/en/querying/nearest-neighbor-search), [Approximate Nearest Neighbor Search using HNSW Index](/en/querying/approximate-nn-hnsw) and [Nearest Neighbor Search Guide](/en/querying/nearest-neighbor-search-guide) for more detailed examples. \| Annotation \| Effect \| \| --- \| --- \| \| [totalTargetHits](#totaltargethits) \| Specifies the number of hits nearestNeighbor should expose to [ranking](/en/basics/ranking) in total over the content nodes evaluating the query. Note that more or less hits may actually be produced. Setting target hits is required. \| \| [minTargetHits](#mintargethits) \| Specifies the *minimum* target hits to produce in this nearest neighbor operator. The default value is 100. Exploring too little in a graph leads to bad quality, and this parameter protects against that when totalTargetHits leads to some node with little content otherwise getting a low targetHits. \| \| [targetHits](#targethits) \| Specifies the target hits *per node*. Prefer using [totalTargetHits](#totaltargethits) over this. \| \| [approximate](#approximate) \| The optional `approximate` annotation may be set to `false` to not use an approximate [HNSW index](/en/reference/schemas/schemas#index-hnsw). This is especially useful to compare exact and approximate results in order to perform tuning of HNSW parameters. This annotation is default `true` when an HNSW index is specified, otherwise it is always `false`. Setting this to `false` might trigger [graceful query degradation](../../performance/graceful-degradation.html). Adjust [timeout](#timeout) as needed. \| \| [hnsw.exploreAdditionalHits](#hnsw-exploreadditionalhits) \| Tune how many extra nodes in the HNSW graph (in addition to `totalTargetHits`) that should be explored before selecting the best hits. Default is `0`. Increasing this parameter increases the accuracy of the approximate search, at the cost of more distance computations. \| \| [label](#label) \| Use to mark the query operator with a label that can be referred to from the ranking expression in the rank profile. See the [closeness](/en/reference/ranking/rank-features#closeness\(dimension,name\)) and [distance](/en/reference/ranking/rank-features#distance\(dimension,name\)) rank features. Useful when having multiple `nearestNeighbor` operators in the same query, e.g., when the schema has multiple vector fields. See [nearest neighbor search guide](/en/querying/nearest-neighbor-search-guide#multiple-nearest-neighbor-search-operators-in-the-same-query) for usage example. \| \| [distanceThreshold](#distancethreshold) \| Use to filter out hits with a higher distance than a threshold. See [nearest neighbor search guide](/en/querying/nearest-neighbor-search-guide#strict-filters-and-distant-neighbors) for usage example. \| Properties: \| Field type \| Tensor attribute with one indexed dimension of size N or with one or more mapped dimensions and one indexed dimension of size N. \| \| --- \| --- \| \| Query model \| Tensor with one indexed dimension of size N. \| \| Matching \| Returns documents where the distance (according to the [distance metric](/en/reference/schemas/schemas#distance-metric) used) between the document tensor and the query tensor is less than the greatest distance among the current top-k best hits. This means that typically more than top-k documents are matched and returned for ranking. This is similar to the behavior of [wand](#wand). When an [HNSW index](/en/reference/schemas/schemas#index-hnsw) is used, the top-k best hits are calculated before regular matching happens, taking the rest of the query filters into account. \| \| Ranking \| Calculates a closeness score that is defined as `1 / (1 + d)`, where `d` is the distance between the document tensor and query tensor. This score is available using [rawScore](/en/reference/ranking/rank-features#rawScore(field)), [itemRawScore](/en/reference/ranking/rank-features#itemRawScore(label)), or [closeness](/en/reference/ranking/rank-features#closeness\(dimension,name\)) rank features. The raw distance is available using the [distance](/en/reference/ranking/rank-features#distance(dimension,name)) rank feature. \| \| Java Query Item \| [NearestNeighborItem](https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/NearestNeighborItem.html) \| | -| nonEmpty | *nonEmpty* takes as its only argument an arbitrary search expression. It will then perform a set of checks on that expression. If all the checks pass, the result is the same expression, otherwise the query will fail. The checks are as follows:
1. No empty search term
2. No empty operators, like phrases without terms
3. No null markers (NullItem) from e.g. failed query parsing ```yql=select * from sources * where bar contains "a" and nonEmpty(bar contains "bar" and foo contains @foo)&foo= ``` Note how "foo" is empty in this case, which will force the query to fail. If "foo" contained a searchable term, the query would not have failed. | -| predicate | *predicate()* specifies a predicate query - see [predicate fields](/en/schemas/predicate-fields). It takes three arguments: the predicate field to search, a map of attributes, and a map of range attributes: ```where predicate(predicate\_field,{"gender":"Female"},{"age":20L})``` Due to a quirk in YQL-parsing, one cannot specify an empty map, use the number 0 instead. ``` where predicate(predicate\_field,0,{"age":20L})``` | -| true | Matches all documents of any type. Care must be taken when using this since processing all documents as matches is expensive. At minimum, consider restricting to only one schema where you know the corpus isn't too big, see the [model.restrict](/en/reference/api/query#model.restrict) URL parameter. | -| false | Does not match any document at all. Not useful in itself, but could potentially be used as a placeholder in the query tree. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
numericThe following numeric operators are available: {`= < > <= >= range(field, lower bound, upper bound)`}. where 500 >= price where range(fieldname, 0, 5000000000L) Numbers must be in the signed 32-bit range. Input 64-bit signed numbers using {`L`} as suffix. For the {`range`} operator, one can also use the strings {`Infinity`} or {`-Infinity`}: where (range(year, 2000, Infinity)) An all-encompassing range matches every document that has a value set for the field. This is a way to select the documents where a numeric field is present: where range(size, -Infinity, Infinity) Documents where the field is unset are not matched. For the complementary query - finding documents *missing* a value - see count fields with NaN and the FAQ entry on querying for fields with no value. | Annotation | Effect | | --- | --- | | bounds | Range: open or closed interval. | | hitLimit | Used for *capped range search*. The {`range()`} query operator with {`hitLimit`} can be used to efficiently implement top-k selection for ranking a subset of the documents in the index. See example and use cases. | The weightedset field does not support filtering on weight. Solve this using the map type and sameElement query operator - see example.
booleanThe boolean operator is: {`=`} where alive = true
containsThe right-hand side argument of the contains operator is either a string literal, or a function, like {`phrase`}. {`contains`} is the basic building block for text matching. The kind of matching to be done depends on the field settings in the schema. where title contains "madonna" | Annotation | Effect | | --- | --- | | stem | By default, the string literal is tokenized to match the field(s) searched. Explicitly control tokenization by using stem:where title contains
{`({stem: false}"madonna")`}
| The matched field must be an indexed field or attribute. Fields inside structs are referenced using dot notation - e.g {`mystruct.mystructfield`}.
and{`and`} accepts other {`and`} statements, {`or`} statements, userQuery, logically inverted statements - and contains statements as arguments: where title contains "madonna" and title contains "saint"
or{`or`} accepts other {`or`} statements, {`and`} statements, userQuery - and contains statements as arguments: where title contains "madonna" or title contains "saint"
notUse the {`!`} operator to match document that does *not* satisfy some condition: where title contains "madonna" and !(title contains "saint")
phrasePhrases are expressed as a function: where text contains phrase("st", "louis", "blues")
near{`near()`} matches if all argument terms occur within the specified distance, in any order. Negative terms (prefixed with {`!`}) exclude matches where those terms appear within the exclusion distance. where field contains near("a", "b", "c") where field contains {``}{`({distance: 5}near("web", "search"))`}{``} where field contains near("sql", "database", !"nosql") | Annotation | Default | Description | | --- | --- | --- | | distance | 2 | Maximum position difference for terms to match. | | exclusionDistance | (distance+1)/2 | Exclusion zone size around negative terms. | Negative terms must come after all positive terms. For multi-value fields, setting element-gap for the field in the rank profile enables distance calculation between adjacent elements. Features below {`near()`} and {`onear()`} are filtered based on the spans for the operator match before they are exposed to the ranking features. Given the query text contains {``}{`({distance:1}near("a","b"))`}{``}and two documents. The text field in the first document is {`"a a a a a a b b b b b b"`}. The spans for the near match are {`[[5,6]]`}. Only the last occurrence of {`"a"`} and the first occurrence of {`"b"`} are kept. The text field in the second document is {`"a b c a b c a b c a b c"`}. The spans for the near match are {`[[0,1],[3,4],[6,7],[9,10]]`}. All occurrences of {`"a"`} and {`"b"`} are kept.
onear{`onear()`} (ordered near) is like {`near()`}, but requires terms to appear in the same order as specified in the query. With distance set to (number of terms - 1), {`onear()`} is equivalent to {`phrase()`}. where field contains onear("web", "search", "engine") where field contains {``}{`({distance: 5}onear("neural", "network"))`}{``} where field contains onear("java", "tutorial", !"script") | Annotation | Default | Description | | --- | --- | --- | | distance | 2 | Maximum position difference for terms to match. | | exclusionDistance | (distance+1)/2 | Exclusion zone size around negative terms. | Negative terms must come after all positive terms. For multi-value fields, setting element-gap for the field in the rank profile enables distance calculation between adjacent elements.
sameElementThe {`sameElement()`} operator lets you denote conditions that must match within the *same* element in multivalue fields containing structs or strings. By default, sameElement uses {`AND`} to combine the conditions: *All* the conditions must match in the same element to produce a match. For example, given this **struct**: struct person {``}{`{ field first_name type string {} field last_name type string {} field year_of_birth type int {} } field persons type array { indexing: summary struct-field first_name { indexing: attribute } struct-field last_name { indexing: attribute } struct-field year_of_birth { indexing: attribute } }`}{``} We can use this query: where persons contains sameElement(first_name contains 'Joe', last_name contains 'Smith', year_of_birth < 1940) to return all documents containing a Joe Smith born before 1940 in the {`persons`} array. Searching a **map** is done by treating it as an array of a struct with the field members {`key`} and {`value`}. For example, given this map: {``}{`field identities type map { indexing: summary struct-field key { indexing: attribute } struct-field value.first_name { indexing: attribute } struct-field value.last_name { indexing: attribute } struct-field value.year_of_birth { indexing: attribute } }`}{``} We can use this query: where identities contains sameElement(key contains 'father', value.first_name contains 'Joe', value.last_name contains 'Smith', value.year_of_birth < 1940) to return all documents that have a Joe Smith born before 1940 keyed as a 'father'. {`sameElement()`} may also be used to search **array of string** fields. Supported query operators inside sameElement() are {`and`}, {`equiv`}, {`near`}, {`onear`}, {`or`}, {`rank`} and {`phrase`}. {`and`} can be used with {`!`}. For example given this field: field chunks type {``}{`array { indexing: index | summary } `}{``} We can use these queries: where chunks contains sameElement("one" and "two") where chunks contains sameElement("one" and equiv("two","three")) where chunks contains {``}{`sameElement("one" and ({distance: 5}near("two","three",!"four"))) `}{``}where chunks contains sameElement("one" and phrase("two","three")) where chunks contains sameElement("one" and !"two") where chunks contains sameElement("one" or "two") where chunks contains sameElement(rank("one" and "two", "three")) Features inside sameElement() for indexed fields are filtered based on the matching elements, e.g. elementwise(bm25(descriptions),x,double) will only contain tensor cells based on the matching elements. Use the {`elementFilter`} annotation to restrict matching to specific element indices. For example, given a field {`my_numbers type array`}: where{``}{`bash my_numbers contains ({elementFilter:[2]}sameElement("42"))`}{``} This only matches the element at index 2 in the array field. Multiple indices can be given: {`{elementFilter:[0, 2, 5]}`}. A shorthand form is also available: where my_numbers[2] = 42 The shorthand form only supports a single index. Use the {`elementFilter`} annotation to match multiple indices.
equivFor cases where two terms in the same field should produce exactly the same behavior when matched, the {`equiv()`} operator can be used. This behaves like a special case of {`or`}. where fieldName contains equiv("A","B") The matching logic of equiv is the same as OR, and an OR does not have the limitations that EQUIV does (below). The difference is in how matches are visible to ranking functions. All words that are children of an OR count for ranking, while with EQUIV, they look like a single word to ranking: - Counts as only +1 for queryTermCount - Counts as 1 word for completeness measures - Proximity will not discriminate different words inside the EQUIV - Connectivity can be set between the entire EQUIV and the word before and after - Items inside the EQUIV are not directly visible to ranking features, so weight and connectivity on those will have no effect Limitations on how {`equiv`} can be used in a query: - {`equiv`} may not appear inside a phrase - It may only contain {`TermItem`} and {`PhraseItem`} instances. Operators like {`and`} cannot be placed inside {`equiv`} - {`PhraseItems`} inside {`equiv`} will rank like as if they have size 1 Learn how to use equiv.
uriUsed to search for urls indexed using the uri field type. where myUrlField contains uri("vespa.ai/foo") Various subfields are supported to search components of the URL, see the field type definition. | Annotation | Effect | | --- | --- | | startAnchor | Anchor uri.hostname at start. | | endAnchor | Anchor uri.hostname at end. |
fuzzyLevenshtein edit distance search within a string or array<string> attribute. where myStringAttribute contains ({prefixLength:1, maxEditDistance:2}fuzzy("parantesis")) Annotations below are configuring {`fuzzy`}: | Annotation | Effect | | --- | --- | | maxEditDistance | An inclusive upper bound of edit distance between query and string attribute (default is 2). | | prefixLength | Number of characters that are considered frozen, so the fuzzy match will be performed only with the suffix left. Default is 0 (i.e. {`fuzzy`} will match across whole query) | | prefix | If {`true`}, a string is considered a match when it's possible to transform a *prefix* of the candidate string to the query string using at most {`maxEditDistance`} edits. See fuzzy prefix match. Default is {`false`}, which means that the entire string is considered. | Find an example in text matching. **Important:** Only string attribute fields in documents are supported (single, array or weightedset). Matching is optimized internally when {`maxEditDistance`} is 1 or 2. Setting prefixLength greater than 0 narrows the match for the fast-search, greatly reducing the number of terms that must be considered.
matchesRegular expression match is supported using posix extended syntax, with the limitation that it is **case-insensitive**. Example matching both {`madonna`}, {`madona`} and with any number of {`n`}s: where attribute_field matches "mado[n]+a" Find more examples in the text matching guide. **Important:** Only attribute fields in documents is supported. It is not optimized for performance. Having a prefix using the {`^`} will be faster than not having one. Additionally, fields that serve as both attributes and indexes are not compatible.
text*text()* accepts any text and tokenizes it into a set of tokens to be searched in a given field or fieldSet. By default, the tokens are searched with a weakAnd operator. You can override the default behavior via annotations: {`text()`} supports the same annotations as userInput(). Example: where text_field contains text("some text") With annotations: where text_field contains ({language:'en'}text("some text")) The text argument can be given as a reference using "@parameterName": yql=select * from sources * where text_field contains (@text)&text=some text
userInput*userInput()* parses text from end users or models that may contain query syntax for choosing the fields to search, specifying phrases and negative terms etc. Since the query in userInput can specify fields, there is no "contains field" prefix before the userInput operator. yql=select * from sources * where userInput('some text') The argument can be given as a reference using "@parameterName": yql=select * from sources * where userInput(@text)&text=some text Both of these will result in the query select * from sources * where weakAnd(default contains "some", default contains "text") The default behavior may be overridden by annotations: yql=select * from sources * where ({grammar.syntax:'none',grammar.tokenization:'linguistics',grammar.composite:'near',distance:3}userInput('some text')) | Annotation | Effect | | --- | --- | | grammar | Sets the query parse type to apply when interpreting the user input text. For any value of {`grammar`} other than {`raw`} or {`segment`}, only the following annotations are applied: - defaultIndex - totalTargetHits (for weakAnd)- targetHits (for weakAnd)- distance (for near/oNear)- ranked - filter - stem - normalizeCase - accentDrop - usePositionData E.g. if annotating {`userInput`} with {`phrase`}, a {`filter`} annotation will have effect, but not {`language`}. See isYqlDefault on setting a default grammar in a request/query profile. | | defaultIndex | Same as model.defaultIndex in the query API. | | language | Language setting for the linguistics treatment of this userInput() call. | | allowEmpty | Whether to allow empty input for query parsing and search terms. | In addition, other annotations, like stem or ranked, will take effect as normal. More examples can be found in the query API guide.
userQuery*userQuery()* reads from model.queryString and parses the query using simple query language. If set, model.filter is combined with *model.queryString* before the parsing. The user query is first parsed, then the resulting tree is inserted into the corresponding place in the YQL query tree. Example: $ vespa query 'select * from sources * where vendor contains "brick and mortar" AND price < 50 AND userQuery()' \ query="abc def -ghi" \ type=all This evaluates to a query where: - the numeric field *price* must be less than 50 - *vendor* must match *brick and mortar* - the default index must contain the two terms *abc* and *def*, *and not* contain *ghi*. Use model.defaultIndex to specify a field or fieldset if not using *default* - see example.
rankThe first, and only the first, argument of the *rank()* function determines whether a document is a match, but all arguments are used for calculating rank features. The {`rank`} operator is useful for boosting documents based on the presence of certain terms without impacting matching or retrieval logic. where rank(a contains "A", b contains "B", c contains "C") It's also useful in hybrid search use cases. See blog post for usage examples. For example, retrieve using the nearestNeighbor query operator as the first argument and have matching features calculated for the other arguments. where rank(nearestNeighbor(field, queryVector), a contains "A", b contains "B", c contains "C")
inThe *in* operator is used to match a set of values in an integer or string field. A document is considered a match when at least one of the values matches the content of the field. This is an optimized shorthand for multiple OR conditions, and is similar to the IN operator in SQL. Available since Vespa 8.293.15 . Example: where integer_field in (10, 20, 30) where string_field in ('germany', 'france', 'norway') Where {`string_field`} is a field with {`match:word`}. There is no linguistic processing like tokenization or stemming of the string values used in the *in* operator except lowercasing. See string match.field string_field type string { indexing: summary | index # or attribute match: word rank:filter attribute: fast-search # if attribute } Using the *in* operator against string fields with {`match:text`} will cause recall issues because the field contents will be tokenized during indexing while the *in* operator does not tokenize the values. The argument before *in* is the name of the field or fieldset to search. The argument after *in* is a comma-separated list of values, enclosed in parentheses. String values must be single or double-quoted if passed inline in YQL For multi-value fields (like arrays), the *in* operator works by checking if any element in the array matches any of the values in the set. This is similar to SQL's IN operator but more streamlined for array comparisons. Example: where integer_array_field in (10, 20, 30) If integer_array_field = [5, 10, 15], it will match because 10 is in the array. Similarly, if integer_array_field = [20, 25, 30], it will match because both 20 and 30 are in the array. For faster query parsing use parameter substitution to submit the values as an additional request parameter. Quoting of string values are optional. Example: where integer_field in (@integer_values)&integer_values=10,20,30 where string_field in (@string_values)&string_values=germany,france,norway The *in* operator acts as a single term in the query tree, and does not provide any match information for text ranking features. For a discussion of usage and examples refer to: - multivalue query operators - multi-lookup set filtering - in operator system test | Field type | Singlevalue or multivalue attribute or index field with basic type byte, int, long or string. String fields must have {`match:word`} or {`match:exact`}. | | --- | --- | | Query model | A set of values/tokens. | | Matching | Documents where the field contains at least one of the values in the query. | | Ranking | None. | | Java Query Item | NumericInItem and StringInItem. | **Important:** When using the *in* operator with an attribute field, set fast-search and rank: filter for best possible performance. Always use {`match:word`} for string fields.
dotProduct*dotProduct* calculates the dot product between the weighted set in the query and a weighted set field in the document as its rank score contribution: where dotProduct(description, {"a":1, "b":2}) The result is stored as a raw score. A normal use case is a collection of weighted tokens produced by an algorithm, to match against a corpus containing weighted tokens produced by another algorithm in order to implement personalized content exploration. See example usage of *dotProduct* in practical performance guide . Refer to multivalue query operators for a discussion of usage and examples. Keys must be single or double-quoted if passed inline in YQL - alternatively, use parameter substitution to submit the weighted set with a simple format for faster query parsing - example: {`where dotProduct(description, @myterms)`}. | Field type | Weighted set attribute with fast-search. Note: Also supported for regular attribute or index fields, but then with much weaker performance). | | --- | --- | | Query model | Weighted set with {token, weight} pairs | | Matching | Documents where the weighted set field contains at least one of the tokens in the query. | | Ranking | Dot product score between the weights of the matched query tokens and field tokens. This score is available using rawScore or itemRawScore rank features. | | Java Query Item | DotProductItem |
weightedSetWhen using *weightedSet* to search a field, all tokens present in the searched field will be matched against the weighted set in the query. This means that using a weighted set to search a single-value attribute field will have similar semantics to using a normal term to search a weighted set field. The low-level matching information resulting from matching a document with a weighted set in the query will contain the weights of all the matched tokens in descending order. Each matched weight will be represented as a standard occurrence on position 0 in element 0. where weightedSet(description, {"a":1, "b":2}) *weightedSet* has similar semantics to equiv, as it acts as a single term in the query. However, the restriction dictating that it contains a collection of weighted tokens directly enables specific back-end optimizations that improves performance for large sets of tokens compared to using the generic equiv or or operators. Keys must be single or double-quoted if passed inline in YQL - alternatively, use parameter substitution to submit the weighted set with a simple format for faster query parsing - example: {`where weightedSet(description, @myterms)`}. | Field type | Singlevalue or multivalue attribute or index field. (Note: Most use cases operates on a single value field). | | --- | --- | | Query model | Weighted set with {token, weight} pairs. | | Matching | Documents where the field contains at least one of the tokens in the query. For filtering use cases we recommend using the in operator instead, as it is simpler to use and has slightly better performance. | | Ranking | The operator will act as a single term in the back-end. The query term weight is the weight assigned to the operator itself and the match weight is the largest weight among matching tokens from the weighted set. This operator does not produce a raw score. Due to better ranking and performance we recommend using dotProduct instead. | | Java Query Item | WeightedSetItem |
wand{`wand`} can be used to search for documents where weighted tokens in a field matches a subset of weighted tokens in the query. At the same time, it internally calculates the dot product between token weights in the query and the field. {`wand`} is guaranteed to return the top-k hits according to its internal dot product rank score. It is an operator that scales adaptively from or to and. Note that total hit count becomes inaccurate when using wand. {`wand`} optimizes the performance of using multiple threads per search in the backend, and is also called *Parallel Wand*. {`wand`} also allows numeric arguments, then the search argument is an array of arrays of length two. In each pair, the first number is the search term, the second its weight: where wand(description, [[11,1], [37,2]]) Keys must be single or double-quoted if passed inline in YQL - alternatively, use parameter substitution to submit the weighted set with a simple format for faster query parsing - example: {`where wand(description, @myterms)`}. | Annotation | Effect | | --- | --- | | scoreThreshold | Minimum rank score for hits to include. | | totalTargetHits | Wanted number of hits exposed to the first-phase ranking function in total over the content nodes evaluating the query. | | targetHits | Wanted number of hits exposed to the first-phase ranking function per content node. Prefer using totalTargetHits over this. | where ({scoreThreshold: 0.13, totalTargetHits: 7}wand(description, {"a":1, "b":2})) Refer to using wand for introduction to the WAND algorithm and example usage of *wand* in practical performance guide . | Field type | Weighted set attribute with fast-search. Note: Also supported for regular attribute or index fields, but then with much weaker performance). | | --- | --- | | Query model | Weighted set with {token, weight} pairs. | | Matching | Documents where the weighted set field contains at least one of the tokens in the query and where the internal dot product score for this document, is larger than the worst among the current top-k best hits. This means that more than top-k documents are matched and returned for ranking. It also means that many documents are skipped, even they match several tokens in the query because the dot product score is too low. This skipping makes *wand* faster than dotProduct in some cases. | | Ranking | Dot product score between the weights of the matched query tokens and field tokens. This score is available using rawScore or itemRawScore rank features. Note that the top-k best hits are only guaranteed to be returned when using this internal score as the final ranking expression. | | Java Query Item | WandItem |
weakAnd{`weakAnd`} is sometimes called *Vespa Wand*. Unlike wand, it accepts arbitrary word matches (across arbitrary fields) as arguments. Only a limited number of documents are returned for ranking (default is 100), but it does not guarantee to return the best k hits. This function can be seen as an optimized or: where weakAnd(a contains "A", b contains "B") | Annotation | Effect | | --- | --- | | totalTargetHits | Wanted number of hits exposed to the first-phase ranking function in total over the content nodes evaluating the query. | | targetHits | Wanted number of hits exposed to the first-phase ranking function per content node. Prefer using totalTargetHits over this. | where ({totaltargetHits: 7}weakAnd(a contains "A", b contains "B")) Unlike wand, {`weakAnd`} can be used to search across several fields of various types, but it does NOT guarantee to return the top-k best number of hits. It can however be combined with any ranking expression. Keep in mind that this expression should correlate with its simple internal ranking score that uses query term weight and inverse document frequency for matching terms. Refer to using wand for a usage and examples. | Field type | Multiple fields of all types (both attribute and index). | | --- | --- | | Query model | Arbitrary number of query items searching across different fields. | | Matching | Documents that matches at least one of the tokens in the query and where the internal operator score for this document is larger than the worst among the current top-k best hits. As with wand, this means that typically more than top-k documents are matched and a lot of documents are skipped. | | Ranking | Internal ranking score based on query term weight and inverse document frequency for matching terms to find the top-k hits. This score is currently not available to the ranking framework. Matching terms are exposed to the ranking framework (same as when using and or or), so an arbitrary ranking expression can be used in combination with this operator. Note that the ranking expression used should correlate with this internal ranking score. bm25, nativeFieldMatch and nativeDotProduct rank features are good starting points. | | Java Query Item | WeakAndItem |
geoLocation{`geoLocation`} matches a position inside a geographical circle, specified as latitude, longitude, and a maximum distance (radius). See also geoBoundingBox. Example: where geoLocation(myfieldname, 63.5, 10.5, "200 km") In this example we search for documents near 63.5° north, 10.5° east, and within a 200 km radius. So a document with a "myfieldname" position in Trondheim, Norway at N63°25'47;E10°23'36 would match. The first parameter is the name of the attribute field. The second parameter is the latitude (positive for north, negative for south). The third parameter is the longitude (positive for east, negative for west). The fourth parameter must be a string specifying the radius and its units, where the supported units/suffixes include "km", "m" (abbr. for meters), "miles", "mi" (abbr. for miles), "deg" (abbr. for degrees) and "d" (contextual abbr. for degrees). The "deg" / "d" unit / suffix gives radius the same units as latitude. Any negative number for radius (e.g. "-1 m") is interpreted as an "infinite" radius, letting any geographical position at all match the geoLocation operator. The position attribute in the schema could look like: field myfieldname type position { indexing: attribute | summary } Arrays of positions are also possible: field myfieldname type array<position> { indexing: attribute } | Annotation | Effect | | --- | --- | | label | Label for referring to this term during ranking. | Properties: | Field type | position attribute (single-valued or array). | | --- | --- | | Query parameters | Field name, latitude, longitude, radius. | | Matching | Returns documents inside the given geo circle. | | Ranking | Use {`closeness(myfieldname)`}, or {`distance(myfieldname)`} in ranking calculations. See closeness and distance documentation. | | Java Query Item | GeoLocationItem |
geoBoundingBox{`geoBoundingBox`} requires a position to be inside a geographical rectangle; specified as 4 numbers (in degrees). The 4 numbers must be in a specific order: south-western corner (minimum latitude, minimum longitude) followed by north-eastern corner (maximum latitude, maximum longitude). Examples: where geoBoundingBox(myfieldname, 63.25, 10.01, 63.45, 10.61) where geoBoundingBox(myfieldname, -23.12, -43.85, -22.59, -42.89) In the first example we search for documents inside a rectangular map view around Trondheim, Norway. So a document with a "myfieldname" position at 63°25'50"N 10°23'42"E would match. The second example surrounds Rio de Janeiro, Brazil. - The first parameter is the name of the attribute field. - The 2nd parameter is the minimum (southern) latitude (positive for north, negative for south). - The 3rd parameter is the minimum (western) longitude (positive for east, negative for west). - The 4th parameter is the maximum (northern) latitude (positive for north, negative for south). - The 5th parameter is the maximum (eastern) longitude (positive for east, negative for west). See the geoLocation operator for more details about positions. Note that there is no ranking contribution from this operator; if you want to get the distance to the center of the box, you need an additional {`geoLocation`} item with that point. Properties: | Field type | position attribute (single-valued or array). | | --- | --- | | Query parameters | Field name, southern, western, northern, eastern limits. | | Matching | Returns documents inside the given geo bounding box. | | Ranking | None. | | Java Query Item | GeoLocationItem |
nearestNeighbor{`nearestNeighbor`} matches the top-k nearest neighbors in a multidimensional vector space. Points in the vector space are specified as tensors with one indexed dimension, where the size of that dimension is equal to the dimensionality of the vector space. The document vectors are stored in a tensor field attribute, and the query vector is sent with the query request. The following tensor field types are supported: - Single vector per document: Tensor type with one indexed dimension. Example: {`tensor(x[3])`} - Multiple vectors per document: Tensor type with one or more mapped dimensions and one indexed dimension. Examples: {`tensor(m{},x[3])`}, {`tensor(m{},n{},x[3])`} Euclidean distance is used as the default distance metric and the exact nearest neighbors are returned. When storing multiple vectors per document, the vector that is closest to the query vector is used when calculating the distance between the document and the query. If an HNSW index is specified on the tensor field, the approximate nearest neighbors are returned. Example: where ({totaltargetHits: 10}nearestNeighbor(doc_vector, query_vector))&input.query(query_vector)=[3,5,7]&ranking=semantic In this example we search for the top 10 nearest neighbors in a 3-dimensional vector space. *totalTargetHits* specifies the top-k nearest neighbors to expose to a user defined {`semantic`} rank profile. The totalTargetHits annotation is required. The first parameter of *nearestNeighbor* is the name of the tensor field attribute containing the document vectors (*doc_vector*). The second parameter is the name of the tensor sent with the query request (*query_vector*). Specifying *query_vector* as the name means the query request must set this tensor as *input.query(query_vector)* - see the reference. The tensor type of the **input query vector must be defined** in the rank profile: rank-profile semantic { inputs { query(query_vector) tensor<float>(x[3]) } first-phase: closeness(field, doc_vector) } Also see defining query feature types. Failure to define the query input tensor in the schema will fail the request: Expected 'query(query_vector)' to be a tensor, but it is the string '[3,5,7]' The document tensor field attribute is defined as follows: field doc_vector type tensor<float>(x[3]) { indexing: attribute | summary } The example above does not define HNSW {`index`} and the search for neighbors will be exact. See Nearest Neighbor Search, Approximate Nearest Neighbor Search using HNSW Index and Nearest Neighbor Search Guide for more detailed examples. | Annotation | Effect | | --- | --- | | totalTargetHits | Specifies the number of hits nearestNeighbor should expose to ranking in total over the content nodes evaluating the query. Note that more or less hits may actually be produced. Setting target hits is required. | | minTargetHits | Specifies the *minimum* target hits to produce in this nearest neighbor operator. The default value is 100. Exploring too little in a graph leads to bad quality, and this parameter protects against that when totalTargetHits leads to some node with little content otherwise getting a low targetHits. | | targetHits | Specifies the target hits *per node*. Prefer using totalTargetHits over this. | | approximate | The optional {`approximate`} annotation may be set to {`false`} to not use an approximate HNSW index. This is especially useful to compare exact and approximate results in order to perform tuning of HNSW parameters. This annotation is default {`true`} when an HNSW index is specified, otherwise it is always {`false`}. Setting this to {`false`} might trigger graceful query degradation. Adjust timeout as needed. | | hnsw.exploreAdditionalHits | Tune how many extra nodes in the HNSW graph (in addition to {`totalTargetHits`}) that should be explored before selecting the best hits. Default is {`0`}. Increasing this parameter increases the accuracy of the approximate search, at the cost of more distance computations. | | label | Use to mark the query operator with a label that can be referred to from the ranking expression in the rank profile. See the closeness and distance rank features. Useful when having multiple {`nearestNeighbor`} operators in the same query, e.g., when the schema has multiple vector fields. See nearest neighbor search guide for usage example. | | distanceThreshold | Use to filter out hits with a higher distance than a threshold. See nearest neighbor search guide for usage example. | Properties: | Field type | Tensor attribute with one indexed dimension of size N or with one or more mapped dimensions and one indexed dimension of size N. | | --- | --- | | Query model | Tensor with one indexed dimension of size N. | | Matching | Returns documents where the distance (according to the distance metric used) between the document tensor and the query tensor is less than the greatest distance among the current top-k best hits. This means that typically more than top-k documents are matched and returned for ranking. This is similar to the behavior of wand. When an HNSW index is used, the top-k best hits are calculated before regular matching happens, taking the rest of the query filters into account. | | Ranking | Calculates a closeness score that is defined as {`1 / (1 + d)`}, where {`d`} is the distance between the document tensor and query tensor. This score is available using rawScore, itemRawScore, or closeness rank features. The raw distance is available using the distance rank feature. | | Java Query Item | NearestNeighborItem |
nonEmpty*nonEmpty* takes as its only argument an arbitrary search expression. It will then perform a set of checks on that expression. If all the checks pass, the result is the same expression, otherwise the query will fail. The checks are as follows:
1. No empty search term
2. No empty operators, like phrases without terms
3. No null markers (NullItem) from e.g. failed query parsing
{`=select * from sources * where bar contains "a" and nonEmpty(bar contains "bar" and foo contains @foo)&foo=`}
Note how "foo" is empty in this case, which will force the query to fail. If "foo" contained a searchable term, the query would not have failed.
predicate*predicate()* specifies a predicate query - see predicate fields. It takes three arguments: the predicate field to search, a map of attributes, and a map of range attributes:
{`predicate(predicate_field,{"gender":"Female"},{"age":20L})`}
Due to a quirk in YQL-parsing, one cannot specify an empty map, use the number 0 instead.
{`where predicate(predicate_field,0,{"age":20L})`}
trueMatches all documents of any type. Care must be taken when using this since processing all documents as matches is expensive. At minimum, consider restricting to only one schema where you know the corpus isn't too big, see the model.restrict URL parameter.
falseDoes not match any document at all. Not useful in itself, but could potentially be used as a placeholder in the query tree.
## order by @@ -117,11 +232,28 @@ The [rank profile](/en/basics/ranking) determines the rank score each document w To do a primary ordering on the rank score, and a secondary sort on an attribute, use `'[relevance]'` as the first order by attribute. See [Special sorting attributes](/en/reference/querying/sorting-language#special-sorting-attributes) for more details. -| Annotation | Effect | -| :--- | :--- | -| [function](#function) | Sort function, default UCA. | -| [locale](#locale) | Locale identifier for the [UCA sort function](#function). | -| [strength](#strength) | Strength setting for the [UCA sort function](#function). | + + + + + + + + + + + + + + + + + + + + + +
AnnotationEffect
functionSort function, default UCA.
localeLocale identifier for the UCA sort function.
strengthStrength setting for the UCA sort function.
## limit / offset @@ -182,51 +314,276 @@ All annotations are supported by the string arguments to functions like and phra Refer to [SelectTestCase.java](https://github.com/vespa-engine/vespa/blob/master/container-search/src/test/java/com/yahoo/select/SelectTestCase.java) for sample usage. -| Annotation | Default | Values | Description | -| --- | --- | --- | --- | -| accentDrop | true | boolean | Remove accents from this term if it is the setting for this field. Refer to [linguistics](/en/linguistics/linguistics-opennlp#normalization). | -| allowEmpty | false | boolean | Whether to allow empty input for query parsing and query terms in [text](#text)/[userInput](#userinput). If `true`, a NullItem instance is inserted in the proper place in the query tree. If `false`, the query will fail if the user provided input can not be parsed or is empty. | -| andSegmenting | | true\|false | Force phrase or AND operator if re-segmenting (e.g. in stemming) this term results in multiple terms. Default is choosing from language settings. | -| annotations | | map | Map of `string: string`. Custom annotations. No special semantics inside the YQL layer. Example: ``` annotations : {cox: "another"}``` | -| approximate | | boolean | Used in [nearestNeighbor](#nearestneighbor). The optional *approximate* annotation may be set to `false` to disallow usage of an approximate [HNSW index](/en/reference/schemas/schemas#index-hnsw). This is especially useful to compare exact and approximate results in order to perform tuning of other parameters. This annotation is default `true` when an HNSW index is specified, otherwise it is always `false`. | -| ascending | | boolean | Ascending hit order. Used by [hitLimit](#hitlimit). | -| bounds | `closed` | enum | A [numeric](#numeric) interval is by default a closed interval. If the lower bound is exclusive, set to `leftOpen`. If the upper bound is exclusive, set to `rightOpen`. If both bounds are exclusive, set the annotation to `open`. Example: ```where ({bounds:"rightOpen"}range(year, 2000, 2018))``` | -| connectivity | | map | Map of `id: int, weight: double` of explicit connectivity between this item and the item with the given [id](#id) - see [text matching and ranking](/en/ranking/nativerank#weight-significance-and-connectedness). Example: ```connectivity: {id: 4, weight: 0.8}``` | -| descending | | boolean | Descending hit order. Used by [hitLimit](#hitlimit). | -| defaultIndex | `default` | Any searchable field in the schema. | Used by [userInput](#userinput). Same as [model.defaultIndex](/en/reference/api/query#model.defaultindex) in the query API. If [grammar](#grammar) is set to `raw` or `segment`, this will be the field searched. | -| distance | 2 | int | The *distance* annotation sets the maximum position difference to count as a match, see [near](#near) / [onear](#onear). All matching terms must fit within positions \[P, P+distance\] where P is the first term's position. Default is 2. ``` where text contains ({distance: 5}near("a", "b"))``` | -| elementFilter | | list of int | Used with [sameElement](#sameelement). Restricts matching in an array field to specific indices. A non-empty list makes sameElement match if and only if there is a match at one or more of the specified indices. where my\_numbers contains ```({elementFilter:\[0, 2, 5\]}sameElement("42")) ```| -| distanceThreshold | +infinity | double | Used in [nearestNeighbor](#nearestneighbor). The `distanceThreshold` annotation may be used to filter away hits with a higher distance than the given threshold from the results. Note that one will never get more hits with `distanceThreshold` than you would get without it - to get more hits, increase [totalTargetHits](#totaltargethits), too. The units for the threshold depends on the [distance metric](/en/reference/schemas/schemas#distance-metric) used. | -| endAnchor | true | boolean | The `hostname` subfield of [uri](#uri) supports anchoring to the start and/or end of the hostname, controlled by the `startAnchor` and `endAnchor` annotations. Anchoring to the end is on by default while anchoring to the start is not. Hence where myUrlField.hostname contains uri("vespa.ai") will match *vespa.ai* and *docs.vespa.ai*, while ```where myUrlField.hostname contains ({startAnchor: true}uri("vespa.ai")) ``` will only match vespa.ai. | -| filter | false | boolean | Regard this term as a "filter" term and not a term from the end user. Terms that are annotated with "filter:true" are not bolded. See also [model.filter](/en/reference/api/query#model.filter). Bolding of terms is controlled by [schema:bolding](/en/reference/schemas/schemas#bolding). | -| function | | | Default sort function for strings is `uca`. Field sort specification can be configured in the [schema](/en/reference/schemas/schemas#sorting), values in the query overrides the schema settings. Numeric fields are numerically sorted. \| Function \| Description \| \| --- \| --- \| \| `uca` \| This sorting is based on the [icu](https://icu.unicode.org/) library that follows the [Universal Collation Algorithm](https://unicode.org/reports/tr10/). The specifications of [locale](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4j/com/ibm/icu/util/ULocale.html) and [strength](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4j/com/ibm/icu/text/Collator.html) are identical to how [icu](https://icu.unicode.org/) specifies them. Both [locale](#locale) and [strength](#strength) are optional, however `strength` requires `locale`. The [locale](#locale) query annotation will override locale-setting in the [schema](/en/reference/schemas/schemas#sorting). If `locale` is missing from both, the `lowercase` function will be used by default. \| \| `lowercase` \| This improves the sorting by first lowercasing and normalising the strings before sorting. This is slightly more correct and might be enough for the use case. It is not that much more costly than `raw` sort, and less expensive than `uca`. \| \| `raw` \| Raw byteorder is a simple and fast ordering based on memcmp of utf8 for strings and correct sort order compliant binary rep for other fields is done. However, that is not correct for anything except computers, looking only at the binary representation. \| | -| grammar | `weakAnd` | `raw`, `segment` and all values accepted for the [model.type](/en/reference/api/query#model.type) argument in the query API. | How to parse [userInput](#userinput). `raw` will treat the user input as a string to be matched without any processing, `segment` will do a first pass through the linguistic libraries, while the rest of the values will treat the string as a query to be parsed. The individual model.type settings can also be set, using `grammar.composite`, `grammar.tokenization`, `grammar.syntax`, and `grammar.profile`—refer to the [model.type](/en/reference/api/query#model.type) documentation. See also [userInput examples](/en/querying/query-api#input-examples). | -| hitLimit | | int | [Numeric](#numeric) operations support `hitLimit`. This is used for *capped range search*. An alternative to using negative and positive values for hitLimit is always using a positive number of hits (as a negative number of hits does not make much sense) and combine this with either of the [ascending](#ascending) and [descending](#descending) annotations (but not both). Example: `{hitLimit: 38, descending: true}` would be equivalent to setting it to -38, i.e. only populate with 38 hits and start from upper boundary, i.e. descending order. Note that `hitLimit` will limit the number of documents that are considered. This is a powerful optimisation that must be used with care, particularly in combination with other filters. The set of documents to be considered will be limited upfront by only selecting the N best according to the range query and the hitLimit annotation, for further query evaluation. `hitLimit` is not exact, but "at least". In addition, it will only kick in if the attribute has [fast-search](/en/reference/schemas/schemas#attribute). It will look up the upper or lower bound in the range in the dictionary and scan in ascending or descending order and select entries until it has satisfied hitLimit. You will get all documents for all the dictionary entries selected. See the [practical-search-performance-guide](/en/performance/practical-search-performance-guide#advanced-range-search-with-hitlimit) for an example. | -| hnsw.exploreAdditionalHits | | | Used in [nearestNeighbor](#nearestneighbor). When using an [HNSW index](/en/reference/schemas/schemas#index-hnsw), the optional `hnsw.exploreAdditionalHits` annotation can be used to tune how many extra nodes in the graph (in addition to `totalTargetHits`) should be explored before selecting the best hits. Using a greater number here gives better quality, but worse performance. | -| id | | int | Unique ID used for e.g. [connectivity](#connectivity). | -| implicitTransforms | true | boolean | Implicit term transformations (field defaults). If `implicitTransforms` is true, the settings for the field in the schema will be honored in term transforms, e.g. if the field has stemming, this term will be stemmed. If `implicitTransforms` is false, the search backend will receive the term exactly as written in the initial YQL expression. This is in other words a top level switch to turn off all other [stemming](/en/linguistics/linguistics-opennlp#stemming), accent removal, Unicode [normalizations](/en/linguistics/linguistics-opennlp#normalization) and so on. | -| label | | string | Used by [geoLocation](#geolocation) and [nearestNeighbor](#nearestneighbor). Label for referring to this term/operator during ranking. | -| language | | RFC 3066 language code | Language setting for the linguistics handling of [text](#text) and [userInput](#userinput), also see [model.language](/en/reference/api/query#model.language) in the query API reference. | -| locale | | | Used by the [UCA sort function](#function). An identifier following [unicode locale identifiers](https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers), e.g. `en_US`. | -| maxEditDistance | 2 | int | Used in [fuzzy](#fuzzy). An inclusive upper bound of edit distance between query and string attribute. | -| nfkc | true | boolean | NFKC [normalization](/en/linguistics/linguistics-opennlp#normalization). | -| normalizeCase | true | boolean | Normalize casing of this term if it is the setting for this field. | -| origin | | map | Map of `original: string, offset: int, length: int`. The (sub-)string which produced this term. Default unset. Example: ``` origin: {original: "abc", offset: 1, length: 2}``` | -| prefix | false | boolean | Do [prefix matching](/en/reference/schemas/schemas#prefix) for this term, e.g. search for "word\*". | -| substring | false | boolean | Do substring matching for this word if available in the index. ("Search for "\*word\*".") Only supported for [streaming search](/en/performance/streaming-search). | -| prefixLength | 0 | int | Used in [fuzzy](#fuzzy). Number of characters that are considered frozen, so the fuzzy match will be performed with the suffix left. | -| ranked | true | boolean | Include this term for ranking calculation. Setting ranked to false can speed up query evaluation. Read more about [schema reference](/en/reference/schemas/schemas#rank). [Example](/en/ranking/ranking-expressions-features#dumping-rank-features-for-specific-documents) | -| scoreThreshold | | double | A threshold in [wand](#wand) for the minimum score of hits to include as matches. | -| significance | | double | Significance value for text ranking features - see [text matching and ranking](/en/ranking/nativerank#weight-significance-and-connectedness). | -| startAnchor | false | boolean | See [endAnchor](#endanchor). | -| stem | true | boolean | Stem this term if it is the setting for this field. | -| strength | `PRIMARY` | - `PRIMARY` - `SECONDARY` - `TERTIARY` - `QUATERNARY` - `IDENTICAL` | Used by the [UCA sort function](#function). Default is `PRIMARY`, which only sorts on primary differentiating characteristics; this means that letters in uppercase/lowercase or with differences in accents only are considered equal. | -| suffix | false | boolean | Do *suffix matching* for this term, e.g. search for "\*word". | -| totalTargetHits | 100 | int | Used with [wand](#wand) and [weakAnd](#weakand), where the default is 100, and with [nearestNeighbor](#nearestneighbor), where it has no default. This sets the wanted number of hits exposed to the first-phase ranking function in total over the content nodes evaluating the query (a *group*). If additional second phase ranking is used, do not set `totalTargetHits` less than the configured rank-profile's [total-rerank-count](/en/reference/schemas/schemas#secondphase-total-rerank-count). See examples in [nearest neighbor search](/en/querying/nearest-neighbor-search). | -| minTargetHits | 100 | int | Used with [nearestNeighbor](#nearestneighbor). Specifies the *minimum* target hits to produce in this nearest neighbor operator. The default value is 100. Exploring too little in a graph leads to bad quality, and this parameter protects against that when totalTargetHits leads to some node with little content otherwise getting a low targetHits. | -| targetHits | 100 | int | Sets target hits per node. Prefer using [totalTargetHits](#totaltargethits) over this. | -| usePositionData | true | boolean | Use term position data for text ranking features such as [nativeRank](/en/ranking/nativerank). This is *term* position, not to be confused with [geo searches](/en/querying/geo-search). Setting "usePositionData:false" can improve query performance. | -| weight | 100 | int | Term weight, used in some text ranking features - see [text matching and ranking](/en/ranking/nativerank#weight-significance-and-connectedness). ```where title contains ({weight:200}"heads")``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AnnotationDefaultValuesDescription
accentDroptruebooleanRemove accents from this term if it is the setting for this field. Refer to linguistics.
allowEmptyfalsebooleanWhether to allow empty input for query parsing and query terms in text/userInput. If {`true`}, a NullItem instance is inserted in the proper place in the query tree. If {`false`}, the query will fail if the user provided input can not be parsed or is empty.
andSegmentingtrue|falseForce phrase or AND operator if re-segmenting (e.g. in stemming) this term results in multiple terms. Default is choosing from language settings.
annotationsmapMap of {`string: string`}. Custom annotations. No special semantics inside the YQL layer. Example: {``}{` annotations : {cox: "another"}`}{``}
approximatebooleanUsed in nearestNeighbor. The optional *approximate* annotation may be set to {`false`} to disallow usage of an approximate HNSW index. This is especially useful to compare exact and approximate results in order to perform tuning of other parameters. This annotation is default {`true`} when an HNSW index is specified, otherwise it is always {`false`}.
ascendingbooleanAscending hit order. Used by hitLimit.
bounds{`closed`}enumA numeric interval is by default a closed interval. If the lower bound is exclusive, set to {`leftOpen`}. If the upper bound is exclusive, set to {`rightOpen`}. If both bounds are exclusive, set the annotation to {`open`}. Example: {``}{`where ({bounds:"rightOpen"}range(year, 2000, 2018))`}{``}
connectivitymapMap of {`id: int, weight: double`} of explicit connectivity between this item and the item with the given id - see text matching and ranking. Example: {``}{`connectivity: {id: 4, weight: 0.8}`}{``}
descendingbooleanDescending hit order. Used by hitLimit.
defaultIndex{`default`}Any searchable field in the schema.Used by userInput. Same as model.defaultIndex in the query API. If grammar is set to {`raw`} or {`segment`}, this will be the field searched.
distance2intThe *distance* annotation sets the maximum position difference to count as a match, see near / onear. All matching terms must fit within positions [P, P+distance] where P is the first term's position. Default is 2. {``}{` where text contains ({distance: 5}near("a", "b"))`}{``}
elementFilterlist of intUsed with sameElement. Restricts matching in an array field to specific indices. A non-empty list makes sameElement match if and only if there is a match at one or more of the specified indices. where my_numbers contains {``}{`({elementFilter:[0, 2, 5]}sameElement("42")) `}{``}
distanceThreshold+infinitydoubleUsed in nearestNeighbor. The {`distanceThreshold`} annotation may be used to filter away hits with a higher distance than the given threshold from the results. Note that one will never get more hits with {`distanceThreshold`} than you would get without it - to get more hits, increase totalTargetHits, too. The units for the threshold depends on the distance metric used.
endAnchortruebooleanThe {`hostname`} subfield of uri supports anchoring to the start and/or end of the hostname, controlled by the {`startAnchor`} and {`endAnchor`} annotations. Anchoring to the end is on by default while anchoring to the start is not. Hence where myUrlField.hostname contains uri("vespa.ai") will match *vespa.ai* and *docs.vespa.ai*, while {``}{`where myUrlField.hostname contains ({startAnchor: true}uri("vespa.ai")) `}{``} will only match vespa.ai.
filterfalsebooleanRegard this term as a "filter" term and not a term from the end user. Terms that are annotated with "filter:true" are not bolded. See also model.filter. Bolding of terms is controlled by schema:bolding.
functionDefault sort function for strings is {`uca`}. Field sort specification can be configured in the schema, values in the query overrides the schema settings. Numeric fields are numerically sorted. | Function | Description | | --- | --- | | {`uca`} | This sorting is based on the icu library that follows the Universal Collation Algorithm. The specifications of locale and strength are identical to how icu specifies them. Both locale and strength are optional, however {`strength`} requires {`locale`}. The locale query annotation will override locale-setting in the schema. If {`locale`} is missing from both, the {`lowercase`} function will be used by default. | | {`lowercase`} | This improves the sorting by first lowercasing and normalising the strings before sorting. This is slightly more correct and might be enough for the use case. It is not that much more costly than {`raw`} sort, and less expensive than {`uca`}. | | {`raw`} | Raw byteorder is a simple and fast ordering based on memcmp of utf8 for strings and correct sort order compliant binary rep for other fields is done. However, that is not correct for anything except computers, looking only at the binary representation. |
grammar{`weakAnd`}{`raw`}, {`segment`} and all values accepted for the model.type argument in the query API.How to parse userInput. {`raw`} will treat the user input as a string to be matched without any processing, {`segment`} will do a first pass through the linguistic libraries, while the rest of the values will treat the string as a query to be parsed. The individual model.type settings can also be set, using {`grammar.composite`}, {`grammar.tokenization`}, {`grammar.syntax`}, and {`grammar.profile`}—refer to the model.type documentation. See also userInput examples.
hitLimitintNumeric operations support {`hitLimit`}. This is used for *capped range search*. An alternative to using negative and positive values for hitLimit is always using a positive number of hits (as a negative number of hits does not make much sense) and combine this with either of the ascending and descending annotations (but not both). Example: {`{hitLimit: 38, descending: true}`} would be equivalent to setting it to -38, i.e. only populate with 38 hits and start from upper boundary, i.e. descending order. Note that {`hitLimit`} will limit the number of documents that are considered. This is a powerful optimisation that must be used with care, particularly in combination with other filters. The set of documents to be considered will be limited upfront by only selecting the N best according to the range query and the hitLimit annotation, for further query evaluation. {`hitLimit`} is not exact, but "at least". In addition, it will only kick in if the attribute has fast-search. It will look up the upper or lower bound in the range in the dictionary and scan in ascending or descending order and select entries until it has satisfied hitLimit. You will get all documents for all the dictionary entries selected. See the practical-search-performance-guide for an example.
hnsw.exploreAdditionalHitsUsed in nearestNeighbor. When using an HNSW index, the optional {`hnsw.exploreAdditionalHits`} annotation can be used to tune how many extra nodes in the graph (in addition to {`totalTargetHits`}) should be explored before selecting the best hits. Using a greater number here gives better quality, but worse performance.
idintUnique ID used for e.g. connectivity.
implicitTransformstruebooleanImplicit term transformations (field defaults). If {`implicitTransforms`} is true, the settings for the field in the schema will be honored in term transforms, e.g. if the field has stemming, this term will be stemmed. If {`implicitTransforms`} is false, the search backend will receive the term exactly as written in the initial YQL expression. This is in other words a top level switch to turn off all other stemming, accent removal, Unicode normalizations and so on.
labelstringUsed by geoLocation and nearestNeighbor. Label for referring to this term/operator during ranking.
languageRFC 3066 language codeLanguage setting for the linguistics handling of text and userInput, also see model.language in the query API reference.
localeUsed by the UCA sort function. An identifier following unicode locale identifiers, e.g. {`en_US`}.
maxEditDistance2intUsed in fuzzy. An inclusive upper bound of edit distance between query and string attribute.
nfkctruebooleanNFKC normalization.
normalizeCasetruebooleanNormalize casing of this term if it is the setting for this field.
originmapMap of {`original: string, offset: int, length: int`}. The (sub-)string which produced this term. Default unset. Example: {``}{` origin: {original: "abc", offset: 1, length: 2}`}{``}
prefixfalsebooleanDo prefix matching for this term, e.g. search for "word*".
substringfalsebooleanDo substring matching for this word if available in the index. ("Search for "*word*".") Only supported for streaming search.
prefixLength0intUsed in fuzzy. Number of characters that are considered frozen, so the fuzzy match will be performed with the suffix left.
rankedtruebooleanInclude this term for ranking calculation. Setting ranked to false can speed up query evaluation. Read more about schema reference. Example
scoreThresholddoubleA threshold in wand for the minimum score of hits to include as matches.
significancedoubleSignificance value for text ranking features - see text matching and ranking.
startAnchorfalsebooleanSee endAnchor.
stemtruebooleanStem this term if it is the setting for this field.
strength{`PRIMARY`}- {`PRIMARY`} - {`SECONDARY`} - {`TERTIARY`} - {`QUATERNARY`} - {`IDENTICAL`}Used by the UCA sort function. Default is {`PRIMARY`}, which only sorts on primary differentiating characteristics; this means that letters in uppercase/lowercase or with differences in accents only are considered equal.
suffixfalsebooleanDo *suffix matching* for this term, e.g. search for "*word".
totalTargetHits100intUsed with wand and weakAnd, where the default is 100, and with nearestNeighbor, where it has no default. This sets the wanted number of hits exposed to the first-phase ranking function in total over the content nodes evaluating the query (a *group*). If additional second phase ranking is used, do not set {`totalTargetHits`} less than the configured rank-profile's total-rerank-count. See examples in nearest neighbor search.
minTargetHits100intUsed with nearestNeighbor. Specifies the *minimum* target hits to produce in this nearest neighbor operator. The default value is 100. Exploring too little in a graph leads to bad quality, and this parameter protects against that when totalTargetHits leads to some node with little content otherwise getting a low targetHits. Each content node resolves its per-node target hits as {`max(minTargetHits, ceil(totalTargetHits × share))`}, where {`share`} is the node's share of the active documents in the group serving the query - not across the whole cluster, since a query is dispatched to a single group. A node that has just joined the cluster, or is still receiving documents after a topology change, temporarily holds little content and would get too few hits from {`totalTargetHits`} alone without this floor. **Note:** Setting minTargetHits higher than a node's expected share of totalTargetHits makes minTargetHits the effective value, and totalTargetHits has no further effect until it exceeds the floor. This is easy to hit when moving from a flat to a grouped topology, since a group typically has fewer nodes than the full cluster.
targetHits100intSets target hits per node. Prefer using totalTargetHits over this.
usePositionDatatruebooleanUse term position data for text ranking features such as nativeRank. This is *term* position, not to be confused with geo searches. Setting "usePositionData:false" can improve query performance.
weight100intTerm weight, used in some text ranking features - see text matching and ranking. {``}{`where title contains ({weight:200}"heads")`}{``}
### Annotations of sub-expressions @@ -246,15 +603,44 @@ How annotations behave may be easier to understand of expressing a boolean query The annotation scopes would then be as follows, i.e. annotations on which elements will be checked when determining the settings for a given term: -| | | -| :--- | :--- | -| term1 | term1 itself, and the first AND | -| term2 | term2 itself, and the first AND | -| term3 | term3 itself, the first OR and the first AND | -| term4 | term4 itself, the first OR and the first AND | -| term5 | term5 itself, the second OR and the first AND | -| term6 | term6 itself, the second AND, the second OR and the first AND | -| term7 | term7 itself, the second AND, the second OR and the first AND | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
term1term1 itself, and the first AND
term2term2 itself, and the first AND
term3term3 itself, the first OR and the first AND
term4term4 itself, the first OR and the first AND
term5term5 itself, the second OR and the first AND
term6term6 itself, the second AND, the second OR and the first AND
term7term7 itself, the second AND, the second OR and the first AND
## Query properties diff --git a/mintlify-docs/en/reference/rag/chunking.mdx b/mintlify-docs/en/reference/rag/chunking.mdx index 03cfdb22c8..61ef05e0b9 100644 --- a/mintlify-docs/en/reference/rag/chunking.mdx +++ b/mintlify-docs/en/reference/rag/chunking.mdx @@ -15,10 +15,27 @@ See also the [guide to working with chunks](/en/rag/working-with-chunks). Vespa provides these built-in chunkers: -| Chunker id | Arguments | Description | -| --- | --- | --- | -| sentence | \- | Splits the text into chunks at sentence boundaries. | -| fixed-length | target chunk length in characters | Splits the text into chunks with roughly equal length. This will prefer to make chunks of similar length, and to split at reasonable locations over matching the target length exactly. | + + + + + + + + + + + + + + + + + + + + +
Chunker idArgumentsDescription
sentence-Splits the text into chunks at sentence boundaries.
fixed-lengthtarget chunk length in charactersSplits the text into chunks with roughly equal length. This will prefer to make chunks of similar length, and to split at reasonable locations over matching the target length exactly.
## Chunker components diff --git a/mintlify-docs/en/reference/rag/embedding.mdx b/mintlify-docs/en/reference/rag/embedding.mdx index 0d92b79a15..dfc042f517 100644 --- a/mintlify-docs/en/reference/rag/embedding.mdx +++ b/mintlify-docs/en/reference/rag/embedding.mdx @@ -56,18 +56,89 @@ Retrieve an API key from Huggingface with the appropriate permissions, and add i In addition to [embedder ONNX parameters](#embedder-onnx-reference-config): -| Name | Occurrence | Description | Type | Default | -| --- | --- | --- | --- | --- | -| transformer-model | One | Use to point to the transformer ONNX model file | [model-type](#model-config-reference) | N/A | -| tokenizer-model | One | Use to point to the `tokenizer.json` Huggingface tokenizer configuration file | [model-type](#model-config-reference) | N/A | -| max-tokens | One | The maximum number of tokens accepted by the transformer model | numeric | 512 | -| transformer-input-ids | One | The name or identifier for the transformer input IDs | string | input\_ids | -| transformer-attention-mask | One | The name or identifier for the transformer attention mask | string | attention\_mask | -| transformer-token-type-ids | One | The name or identifier for the transformer token type IDs. If the model does not use `token_type_ids` use `` | string | token\_type\_ids | -| transformer-output | One | The name or identifier for the transformer output | string | last\_hidden\_state | -| pooling-strategy | One | How the output vectors of the ONNX model is pooled to obtain a single vector representation. Valid values are `mean`,`cls` and `none` | string | mean | -| normalize | One | A boolean indicating whether to normalize the output embedding vector to unit length (length 1). Useful for `prenormalized-angular` [distance-metric](/en/reference/schemas/schemas#distance-metric) | boolean | false | -| prepend | Optional | Prepend instructions that are prepended to the text input before tokenization and inference. Useful for models that have been trained with specific prompt instructions. The instructions are prepended to the input text.

• Element `` - Optional query prepend instruction.
• Element `` - Optional document prepend instruction.

``
`query:`
`passage:`
`
` | Optional ` ` elements. | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescriptionTypeDefault
transformer-modelOneUse to point to the transformer ONNX model filemodel-typeN/A
tokenizer-modelOneUse to point to the {`tokenizer.json`} Huggingface tokenizer configuration filemodel-typeN/A
max-tokensOneThe maximum number of tokens accepted by the transformer modelnumeric512
transformer-input-idsOneThe name or identifier for the transformer input IDsstringinput_ids
transformer-attention-maskOneThe name or identifier for the transformer attention maskstringattention_mask
transformer-token-type-idsOneThe name or identifier for the transformer token type IDs. If the model does not use {`token_type_ids`} use {``}stringtoken_type_ids
transformer-outputOneThe name or identifier for the transformer outputstringlast_hidden_state
pooling-strategyOneHow the output vectors of the ONNX model is pooled to obtain a single vector representation. Valid values are {`mean`},{`cls`} and {`none`}stringmean
normalizeOneA boolean indicating whether to normalize the output embedding vector to unit length (length 1). Useful for {`prenormalized-angular`} distance-metricbooleanfalse
prependOptionalPrepend instructions that are prepended to the text input before tokenization and inference. Useful for models that have been trained with specific prompt instructions. The instructions are prepended to the input text.

• Element {``} - Optional query prepend instruction.
• Element {``} - Optional document prepend instruction.

{``}
{`query:`}
{`passage:`}
{``}
Optional {` `} elements.
## Bert embedder @@ -86,18 +157,89 @@ The Bert embedder is configured in [services.xml](/en/reference/applications/ser In addition to [embedder ONNX parameters](#embedder-onnx-reference-config): -| Name | Occurrence | Description | Type | Default | -| --- | --- | --- | --- | --- | -| transformer-model | One | Use to point to the transformer ONNX model file | [model-type](#model-config-reference) | N/A | -| tokenizer-vocab | One | Use to point to the Huggingface `vocab.txt` tokenizer file with valid wordpiece tokens. Does not support `tokenizer.json` format. | [model-type](#model-config-reference) | N/A | -| max-tokens | One | The maximum number of tokens allowed in the input | integer | 384 | -| transformer-input-ids | One | The name or identifier for the transformer input IDs | string | input\_ids | -| transformer-attention-mask | One | The name or identifier for the transformer attention mask | string | attention\_mask | -| transformer-token-type-ids | One | The name or identifier for the transformer token type IDs. If the model does not use `token_type_ids` use `` | string | token\_type\_ids | -| transformer-output | One | The name or identifier for the transformer output | string | output\_0 | -| transformer-start-sequence-token | One | The start of sequence token | numeric | 101 | -| transformer-end-sequence-token | One | The start of sequence token | numeric | 102 | -| pooling-strategy | One | How the output vectors of the ONNX model is pooled to obtain a single vector representation. Valid values are `mean` and `cls` | string | mean | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescriptionTypeDefault
transformer-modelOneUse to point to the transformer ONNX model filemodel-typeN/A
tokenizer-vocabOneUse to point to the Huggingface {`vocab.txt`} tokenizer file with valid wordpiece tokens. Does not support {`tokenizer.json`} format.model-typeN/A
max-tokensOneThe maximum number of tokens allowed in the inputinteger384
transformer-input-idsOneThe name or identifier for the transformer input IDsstringinput_ids
transformer-attention-maskOneThe name or identifier for the transformer attention maskstringattention_mask
transformer-token-type-idsOneThe name or identifier for the transformer token type IDs. If the model does not use {`token_type_ids`} use {``}stringtoken_type_ids
transformer-outputOneThe name or identifier for the transformer outputstringoutput_0
transformer-start-sequence-tokenOneThe start of sequence tokennumeric101
transformer-end-sequence-tokenOneThe start of sequence tokennumeric102
pooling-strategyOneHow the output vectors of the ONNX model is pooled to obtain a single vector representation. Valid values are {`mean`} and {`cls`}stringmean
## colbert embedder @@ -120,22 +262,117 @@ The Vespa colbert implementation works with default configurations for transform In addition to [embedder ONNX parameters](#embedder-onnx-reference-config): -| Name | Occurrence | Description | Type | Default | -| --- | --- | --- | --- | --- | -| transformer-model | One | Use to point to the transformer ColBERT ONNX model file | [model-type](#model-config-reference) | N/A | -| tokenizer-model | One | Use to point to the `tokenizer.json` Huggingface tokenizer configuration file | [model-type](#model-config-reference) | N/A | -| max-tokens | One | Max length of token sequence the transformer-model can handle | numeric | 512 | -| max-query-tokens | One | The maximum number of ColBERT query token embeddings. Queries are padded to this length. Must be lower than max-tokens | numeric | 32 | -| max-document-tokens | One | The maximum number of ColBERT document token embeddings. Documents are not padded. Must be lower than max-tokens | numeric | 512 | -| transformer-input-ids | One | The name or identifier for the transformer input IDs | string | input\_ids | -| transformer-attention-mask | One | The name or identifier for the transformer attention mask | string | attention\_mask | -| transformer-mask-token | One | The mask token id used for ColBERT query padding | numeric | 103 | -| transformer-start-sequence-token | One | The start of sequence token id | numeric | 101 | -| transformer-end-sequence-token | One | The end of sequence token id | numeric | 102 | -| transformer-pad-token | One | The pad sequence token id | numeric | 0 | -| query-token-id | One | The colbert query token marker id | numeric | 1 | -| document-token-id | One | The colbert document token marker id | numeric | 2 | -| transformer-output | One | The name or identifier for the transformer output | string | contextual | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescriptionTypeDefault
transformer-modelOneUse to point to the transformer ColBERT ONNX model filemodel-typeN/A
tokenizer-modelOneUse to point to the {`tokenizer.json`} Huggingface tokenizer configuration filemodel-typeN/A
max-tokensOneMax length of token sequence the transformer-model can handlenumeric512
max-query-tokensOneThe maximum number of ColBERT query token embeddings. Queries are padded to this length. Must be lower than max-tokensnumeric32
max-document-tokensOneThe maximum number of ColBERT document token embeddings. Documents are not padded. Must be lower than max-tokensnumeric512
transformer-input-idsOneThe name or identifier for the transformer input IDsstringinput_ids
transformer-attention-maskOneThe name or identifier for the transformer attention maskstringattention_mask
transformer-mask-tokenOneThe mask token id used for ColBERT query paddingnumeric103
transformer-start-sequence-tokenOneThe start of sequence token idnumeric101
transformer-end-sequence-tokenOneThe end of sequence token idnumeric102
transformer-pad-tokenOneThe pad sequence token idnumeric0
query-token-idOneThe colbert query token marker idnumeric1
document-token-idOneThe colbert document token marker idnumeric2
transformer-outputOneThe name or identifier for the transformer outputstringcontextual
The Vespa colbert-embedder uses `[unused0]`token id 1 for `query-token-id`, and `[unused1]`, token id 2 for ` document-token-id`document marker. Document punctuation chars are filtered (not configurable). The following characters are removed ``!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~``. @@ -143,16 +380,75 @@ The Vespa colbert-embedder uses `[unused0]`token id 1 for `query-token-id`, and In addition to [embedder ONNX parameters](#embedder-onnx-reference-config): -| Name | Occurrence | Description | Type | Default | -| --- | --- | --- | --- | --- | -| transformer-model | One | Use to point to the transformer ONNX model file | [model-type](#model-config-reference) | N/A | -| tokenizer-model | One | Use to point to the `tokenizer.json` Huggingface tokenizer configuration file | [model-type](#model-config-reference) | N/A | -| term-score-threshold | One | An optional threshold to increase sparseness, tokens/terms with a score lower than this is not retained. | numeric | N/A | -| max-tokens | One | The maximum number of tokens accepted by the transformer model | numeric | 512 | -| transformer-input-ids | One | The name or identifier for the transformer input IDs | string | input\_ids | -| transformer-attention-mask | One | The name or identifier for the transformer attention mask | string | attention\_mask | -| transformer-token-type-ids | One | The name or identifier for the transformer token type IDs. If the model does not use `token_type_ids` use `` | string | token\_type\_ids | -| transformer-output | One | The name or identifier for the transformer output | string | logits | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescriptionTypeDefault
transformer-modelOneUse to point to the transformer ONNX model filemodel-typeN/A
tokenizer-modelOneUse to point to the {`tokenizer.json`} Huggingface tokenizer configuration filemodel-typeN/A
term-score-thresholdOneAn optional threshold to increase sparseness, tokens/terms with a score lower than this is not retained.numericN/A
max-tokensOneThe maximum number of tokens accepted by the transformer modelnumeric512
transformer-input-idsOneThe name or identifier for the transformer input IDsstringinput_ids
transformer-attention-maskOneThe name or identifier for the transformer attention maskstringattention_mask
transformer-token-type-idsOneThe name or identifier for the transformer token type IDs. If the model does not use {`token_type_ids`} use {``}stringtoken_type_ids
transformer-outputOneThe name or identifier for the transformer outputstringlogits
`Vespa Cloud` @@ -177,15 +473,68 @@ The VoyageAI embedder is configured in [services.xml](/en/reference/applications ### VoyageAI embedder reference config -| Name | Occurrence | Description | Type | Default | -| --- | --- | --- | --- | --- | -| model | One | **Required**. The VoyageAI model to use. See the [VoyageAI embeddings documentation](https://docs.voyageai.com/docs/embeddings) for the complete list of available models including general-purpose, specialized, [contextualized](https://docs.voyageai.com/docs/contextualized-chunk-embeddings), and [multimodal](https://docs.voyageai.com/docs/multimodal-embeddings) models. | string | N/A | -| dimensions | One | **Required**. The number of dimensions for the output embedding vectors. Must match the tensor field definition in your schema. Valid values are `256`, `512`, `1024`, `1536`, or `2048`. See the [VoyageAI embeddings documentation](https://docs.voyageai.com/docs/embeddings) for model-specific dimension support. | integer | N/A | -| api-key-secret-ref | One | **Required**. Reference to the secret in Vespa's [secret store](/en/security/secret-store) containing the VoyageAI API key. | string | N/A | -| endpoint | Optional | VoyageAI API endpoint URL. | string | https://api.voyageai.com/v1/embeddings | -| truncate | Optional | Whether to truncate input text exceeding model limits. When enabled, text is automatically truncated. When disabled, requests with too-long text will fail. | boolean | true | -| quantization | Optional | Output quantization format for embedding vectors. Valid values are `auto`, `float`, `int8`, or `binary`. When set to `auto`, the embedder infers the appropriate quantization from the dimensions and cell type of the destination tensor in your schema. The `float` value also applies to `bfloat16` destination tensors. When using `binary` quantization, the destination tensor field must use `int8` cell type with 1/8 of the dimensions specified in the embedder configuration (e.g., 1024 dimensions → `tensor(x[128])`). See the [VoyageAI quantization documentation](https://docs.voyageai.com/docs/flexible-dimensions-and-quantization#quantization) for details on quantization options and [binarizing vectors](/en/rag/binarizing-vectors) for more on binary quantization in Vespa. | string | auto | -| batching | Optional | Enables dynamic batching of concurrent embedding requests into single VoyageAI API calls. When enabled, the embedder collects concurrent requests and sends them as a single batch, reducing the number of API calls and improving throughput.

• `max-size` — Maximum number of requests to include in a single batch.
• `max-delay` — Maximum time to wait for a full batch before sending a partial one (e.g., `200ms`). | element | disabled | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescriptionTypeDefault
modelOne**Required**. The VoyageAI model to use. See the VoyageAI embeddings documentation for the complete list of available models including general-purpose, specialized, contextualized, and multimodal models.stringN/A
dimensionsOne**Required**. The number of dimensions for the output embedding vectors. Must match the tensor field definition in your schema. Valid values are {`256`}, {`512`}, {`1024`}, {`1536`}, or {`2048`}. See the VoyageAI embeddings documentation for model-specific dimension support.integerN/A
api-key-secret-refOne**Required**. Reference to the secret in Vespa's secret store containing the VoyageAI API key.stringN/A
endpointOptionalVoyageAI API endpoint URL.stringhttps://api.voyageai.com/v1/embeddings
truncateOptionalWhether to truncate input text exceeding model limits. When enabled, text is automatically truncated. When disabled, requests with too-long text will fail.booleantrue
quantizationOptionalOutput quantization format for embedding vectors. Valid values are {`auto`}, {`float`}, {`int8`}, or {`binary`}. When set to {`auto`}, the embedder infers the appropriate quantization from the dimensions and cell type of the destination tensor in your schema. The {`float`} value also applies to {`bfloat16`} destination tensors. When using {`binary`} quantization, the destination tensor field must use {`int8`} cell type with 1/8 of the dimensions specified in the embedder configuration (e.g., 1024 dimensions → {`tensor(x[128])`}). See the VoyageAI quantization documentation for details on quantization options and binarizing vectors for more on binary quantization in Vespa.stringauto
batchingOptionalEnables dynamic batching of concurrent embedding requests into single VoyageAI API calls. When enabled, the embedder collects concurrent requests and sends them as a single batch, reducing the number of API calls and improving throughput.

{`max-size`} — Maximum number of requests to include in a single batch.
{`max-delay`} — Maximum time to wait for a full batch before sending a partial one (e.g., {`200ms`}).
elementdisabled
## OpenAI Embedder @@ -208,14 +557,61 @@ The OpenAI embedder is configured in [services.xml](/en/reference/applications/s ### OpenAI embedder reference config -| Name | Occurrence | Description | Type | Default | -| --- | --- | --- | --- | --- | -| model | One | **Required**. The OpenAI model to use, for example `text-embedding-3-small` or `text-embedding-3-large`. See the [OpenAI embeddings documentation](https://platform.openai.com/docs/guides/embeddings) for the complete list of available models. | string | N/A | -| dimensions | One | **Required**. The number of dimensions for the output embedding vectors. Must match the tensor field definition in your schema. The destination tensor field must use `float` or `bfloat16` cell type — the OpenAI API does not support quantization. | integer | N/A | -| api-key-secret-ref | Optional | Reference to the secret in Vespa's [secret store](/en/security/secret-store) containing the OpenAI API key. When unset, requests are sent without an `Authorization` header. | string | "" (no auth) | -| endpoint | Optional | OpenAI API endpoint URL. Set this to target a specific OpenAI-compatible API. | string | https://api.openai.com/v1/embeddings | -| batching | Optional | Enables dynamic batching of concurrent embedding requests into single OpenAI API calls. When enabled, the embedder collects concurrent requests and sends them as a single batch, reducing the number of API calls and improving throughput.

• `max-size` — Maximum number of requests to include in a single batch.
• `max-delay` — Maximum time to wait for a full batch before sending a partial one (e.g., `200ms`). | element | disabled | -| prepend | Optional | Strings prepended to the text input before sending the embedding request. Useful for OpenAI-compatible instruction-tuned models that expect a task-specific prefix.

• Element `` - Optional query prepend instruction.
• Element `` - Optional document prepend instruction.

``
`query: `
`passage: `
`
` | Optional ` ` elements. | | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescriptionTypeDefault
modelOne**Required**. The OpenAI model to use, for example {`text-embedding-3-small`} or {`text-embedding-3-large`}. See the OpenAI embeddings documentation for the complete list of available models.stringN/A
dimensionsOne**Required**. The number of dimensions for the output embedding vectors. Must match the tensor field definition in your schema. The destination tensor field must use {`float`} or {`bfloat16`} cell type — the OpenAI API does not support quantization.integerN/A
api-key-secret-refOptionalReference to the secret in Vespa's secret store containing the OpenAI API key. When unset, requests are sent without an {`Authorization`} header.string"" (no auth)
endpointOptionalOpenAI API endpoint URL. Set this to target a specific OpenAI-compatible API.stringhttps://api.openai.com/v1/embeddings
batchingOptionalEnables dynamic batching of concurrent embedding requests into single OpenAI API calls. When enabled, the embedder collects concurrent requests and sends them as a single batch, reducing the number of API calls and improving throughput.

{`max-size`} — Maximum number of requests to include in a single batch.
{`max-delay`} — Maximum time to wait for a full batch before sending a partial one (e.g., {`200ms`}).
elementdisabled
prependOptionalStrings prepended to the text input before sending the embedding request. Useful for OpenAI-compatible instruction-tuned models that expect a task-specific prefix.

• Element {``} - Optional query prepend instruction.
• Element {``} - Optional document prepend instruction.

{``}
{`query: `}
{`passage: `}
{``}
Optional {` `} elements.
## Mistral Embedder @@ -238,13 +634,54 @@ The Mistral embedder is configured in [services.xml](/en/reference/applications/ ### Mistral embedder reference config -| Name | Occurrence | Description | Type | Default | -| --- | --- | --- | --- | --- | -| model | One | **Required**. The Mistral model to use, for example `mistral-embed` or `codestral-embed`. See the [Mistral embeddings documentation](https://docs.mistral.ai/capabilities/embeddings/overview/) for the complete list of available models. | string | N/A | -| api-key-secret-ref | One | **Required**. Reference to the secret in Vespa's [secret store](/en/security/secret-store) containing the Mistral API key. | string | N/A | -| dimensions | One | **Required**. The number of dimensions for the output embedding vectors. Must match the tensor field definition in your schema. See the [Mistral embeddings documentation](https://docs.mistral.ai/capabilities/embeddings/overview/) for model-specific dimension support. | integer | N/A | -| quantization | Optional | Output quantization format for embedding vectors. Valid values are `auto`, `float`, `int8`, or `binary`. See the `quantization` row of the [VoyageAI embedder reference config](#voyageai-embedder-reference-config) for details on `auto` resolution and the destination tensor layout required for `int8` and `binary`. Note that not all Mistral models support `int8` and `binary` quantization — see the [Mistral embeddings documentation](https://docs.mistral.ai/capabilities/embeddings/overview/) for per-model support. | string | auto | -| batching | Optional | Enables dynamic batching of concurrent embedding requests into single Mistral API calls. When enabled, the embedder collects concurrent requests and sends them as a single batch, reducing the number of API calls and improving throughput.

• `max-size` — Maximum number of requests to include in a single batch.
• `max-delay` — Maximum time to wait for a full batch before sending a partial one (e.g., `200ms`). | element | disabled | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescriptionTypeDefault
modelOne**Required**. The Mistral model to use, for example {`mistral-embed`} or {`codestral-embed`}. See the Mistral embeddings documentation for the complete list of available models.stringN/A
api-key-secret-refOne**Required**. Reference to the secret in Vespa's secret store containing the Mistral API key.stringN/A
dimensionsOne**Required**. The number of dimensions for the output embedding vectors. Must match the tensor field definition in your schema. See the Mistral embeddings documentation for model-specific dimension support.integerN/A
quantizationOptionalOutput quantization format for embedding vectors. Valid values are {`auto`}, {`float`}, {`int8`}, or {`binary`}. See the {`quantization`} row of the VoyageAI embedder reference config for details on {`auto`} resolution and the destination tensor layout required for {`int8`} and {`binary`}. Note that not all Mistral models support {`int8`} and {`binary`} quantization — see the Mistral embeddings documentation for per-model support.stringauto
batchingOptionalEnables dynamic batching of concurrent embedding requests into single Mistral API calls. When enabled, the embedder collects concurrent requests and sends them as a single batch, reducing the number of API calls and improving throughput.

{`max-size`} — Maximum number of requests to include in a single batch.
{`max-delay`} — Maximum time to wait for a full batch before sending a partial one (e.g., {`200ms`}).
elementdisabled
## Huggingface tokenizer embedder @@ -260,20 +697,72 @@ The Huggingface tokenizer embedder is configured in [services.xml](/en/reference ### Huggingface tokenizer reference config -| Name | Occurrence | Description | Type | Default | -| --- | --- | --- | --- | --- | -| model | One To Many | Use to point to the `tokenizer.json` Huggingface tokenizer configuration file. Also supports `language`, which is only relevant if one wants to tokenize differently based on the document language. Use "unknown" for a model to be used for any language (i.e. by default). | [model-type](#model-config-reference) | N/A | + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescriptionTypeDefault
modelOne To ManyUse to point to the {`tokenizer.json`} Huggingface tokenizer configuration file. Also supports {`language`}, which is only relevant if one wants to tokenize differently based on the document language. Use "unknown" for a model to be used for any language (i.e. by default).model-typeN/A
## Embedder ONNX reference config Vespa uses [ONNX Runtime](https://onnxruntime.ai/) to accelerate inference of embedding models. These parameters are valid for both [Bert embedder](#bert-embedder) and [Huggingface embedder](#huggingface-embedder). -| Name | Occurrence | Description | Type | Default | -| --- | --- | --- | --- | --- | -| onnx-execution-mode | One | Low level ONNX execution model. Valid values are `parallel` or `sequential`. Only relevant for inference on CPU. See [ONNX runtime documentation](https://onnxruntime.ai/docs/performance/tune-performance/threading.html) on threading. | string | sequential | -| onnx-interop-threads | One | Low level ONNX setting.Only relevant for inference on CPU. | numeric | 1 | -| onnx-intraop-threads | One | Low level ONNX setting. Only relevant for inference on CPU. | numeric | 4 | -| onnx-gpu-device | One | The GPU device to run the model on. See [configuring GPU for Vespa container image](/en/operations/self-managed/vespa-gpu-container). Use `-1` to not use GPU for the model, even if the instance has available GPUs. | numeric | 0 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescriptionTypeDefault
onnx-execution-modeOneLow level ONNX execution model. Valid values are {`parallel`} or {`sequential`}. Only relevant for inference on CPU. See ONNX runtime documentation on threading.stringsequential
onnx-interop-threadsOneLow level ONNX setting.Only relevant for inference on CPU.numeric1
onnx-intraop-threadsOneLow level ONNX setting. Only relevant for inference on CPU.numeric4
onnx-gpu-deviceOneThe GPU device to run the model on. See configuring GPU for Vespa container image. Use {`-1`} to not use GPU for the model, even if the instance has available GPUs.numeric0
## SentencePiece embedder diff --git a/mintlify-docs/en/reference/ranking/model-files.mdx b/mintlify-docs/en/reference/ranking/model-files.mdx index c31e3bbc6a..3ed4bab983 100644 --- a/mintlify-docs/en/reference/ranking/model-files.mdx +++ b/mintlify-docs/en/reference/ranking/model-files.mdx @@ -13,22 +13,23 @@ _.model_ files are used in [stateless model evaluation](/en/ranking/stateless-mo ## .model file format specification - -model [name] \{ +```txt +model [name] { - inputs \{ - ([input-name] [[input-type](/en/reference/ranking/tensor#tensor-type-spec)])* - \} + inputs { + ([input-name] [input-type])* + } - constants \{[constant](#constant)* - \} + constants { + [constant]* + } - (function [name](\[argument-name\]*) \{ - expression: [[ranking expression](/en/reference/ranking/ranking-expressions)] - \})* + (function [name]([argument-name]*) { + expression: [ranking expression] + })* -\} - +} +``` The elements can appear in any order (and number). @@ -38,11 +39,28 @@ The elements can appear in any order (and number). [constant-name] [type]?: [scalar, [tensor on literal form](/en/reference/ranking/tensor#tensor-literal-form), or `file:` followed by a file reference] -| Name | Description | -| :--- | :--- | -| name | The name of the constant, written either the full feature name `constant(myName)`, or just as `name`. | -| type | The type of the constant, either `double` or a [tensor type](/en/reference/ranking/tensor#tensor-type-spec). If omitted, the type is double. | -| value | A number, a [tensor on literal form](/en/reference/ranking/tensor#tensor-literal-form), or `file:` followed by a path relative to the model file to a file containing the constant. The file must be stored on the [tensor JSON Format](/en/reference/schemas/schemas#tensor) and end with `.json`. The file may be lz4 compressed, in which case the ending must be `.json.lz4`. | + + + + + + + + + + + + + + + + + + + + + +
NameDescription
nameThe name of the constant, written either the full feature name {`constant(myName)`}, or just as {`name`}.
typeThe type of the constant, either {`double`} or a tensor type. If omitted, the type is double.
valueA number, a tensor on literal form, or {`file:`} followed by a path relative to the model file to a file containing the constant. The file must be stored on the tensor JSON Format and end with {`.json`}. The file may be lz4 compressed, in which case the ending must be {`.json.lz4`}.
Constant examples: diff --git a/mintlify-docs/en/reference/ranking/nativerank.mdx b/mintlify-docs/en/reference/ranking/nativerank.mdx index 175f01a511..5eed7ed545 100644 --- a/mintlify-docs/en/reference/ranking/nativerank.mdx +++ b/mintlify-docs/en/reference/ranking/nativerank.mdx @@ -234,11 +234,32 @@ See the [search definitions](/en/reference/schemas/schemas#rank-properties) refe The following boost tables are supported by the native rank features: -| Name | Function | Description | -| :--- | :--- | :--- | -| expdecay(w,t) | `w * exp(-x/t)` | Represents an exponential decay function where _w_ is the weight controlling the amplitude and _t_ is the tune parameter controlling the slope. | -| loggrowth(w,t,s) | `w * log(1 + (x/s)) + t` | Represents a logarithmic growth function where _w_ is the weight controlling the amplitude, _t_ is the tune parameter controlling the offset, and _s_ is a scale parameter controlling the sensitivity to the variable _x_ | -| linear(w,t) | `w * x + t` | Represents a linear function where _w_ controls the slope and _t_ controls the offset. | + + + + + + + + + + + + + + + + + + + + + + + + + +
NameFunctionDescription
expdecay(w,t){`w * exp(-x/t)`}Represents an exponential decay function where _w_ is the weight controlling the amplitude and _t_ is the tune parameter controlling the slope.
loggrowth(w,t,s){`w * log(1 + (x/s)) + t`}Represents a logarithmic growth function where _w_ is the weight controlling the amplitude, _t_ is the tune parameter controlling the offset, and _s_ is a scale parameter controlling the sensitivity to the variable _x_
linear(w,t){`w * x + t`}Represents a linear function where _w_ controls the slope and _t_ controls the offset.
The parameters _w_, _t_, and _s_ are floating point numbers, the same as the content of the tables. The default table size is 256 with x in the interval [0,255]. You can override this default size by specifying an optional last parameter to the table name. For instance, if you use _linear(1.5,0,512)_ you get a table with size 512 populated with the result of evaluating the function \(1.5 \times x + 0\) for all x in the interval [0,511]. diff --git a/mintlify-docs/en/reference/ranking/rank-feature-configuration.mdx b/mintlify-docs/en/reference/ranking/rank-feature-configuration.mdx index a6f6d57a7e..8ed242d546 100644 --- a/mintlify-docs/en/reference/ranking/rank-feature-configuration.mdx +++ b/mintlify-docs/en/reference/ranking/rank-feature-configuration.mdx @@ -46,40 +46,225 @@ Rank profiles are inherited like other content of rank profiles. An incomplete list of rank properties by the feature they apply to. -| Feature | Parameter | Default | Description | -|----------------------------------------------|------------------------------|---------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| term | numTerms | 5 | The number of terms for which this is included in the rank features dump in the summary | -| [bm25(*fieldname*)](/en/reference/ranking/rank-features#bm25) | k1 | 1.2 | Used to limit how much a single query term can affect the score for a document. | -| | b | 0.75 | Used to control the effect of the field length compared to the average field length. | -| | averageFieldLength | Automatically calculated per field per content node for [indexed search](/en/reference/applications/services/content#document), 100 for [streaming search](/en/performance/streaming-search). | Used to set an explicit value for the average field length (in number of words). When using [streaming search](/en/performance/streaming-search#differences-in-streaming-search), no index structures are generated, and the average field length is not automatically calculated. Instead, manually set an average field length for a more precise BM25 score. | -| [elementwise(bm25(*fieldname*,x,*celltype*))](/en/reference/ranking/rank-features#elementwise-bm25) | k1 | 1.2 | Used to limit how much a single query term can affect the score for a document. Note that `bm25(fieldname).k1` will be used as a fallback before the default. | -| | b | 0.75 | Used to control the effect of the element length compared to the average element length. Note that `bm25(fieldname).b` will be used as a fallback before the default. | -| | averageElementLength | Automatically calculated per field element per content node for [indexed search](/en/reference/applications/services/content#document), 100 for [streaming search](/en/performance/streaming-search). | Used to set an explicit value for the average element length (in number of words). When using [streaming search](/en/performance/streaming-search#differences-in-streaming-search), no index structures are generated and the average element length is not automatically calculated. Instead, manually set an average element length for a more precise elementwise BM25 score. It should also be manually set for multi-node indexed search to get consistent scoring across the nodes. Note that `bm25(fieldname).averageFieldLength` will be used as a fallback before the default. | -| nativeRank | | | See the [nativeRank configuration](/en/reference/ranking/nativerank#configuration-properties) documentation | -| nativeFieldMatch | | | See the [nativeRank configuration](/en/reference/ranking/nativerank#configuration-properties) documentation | -| nativeProximity | | | See the [nativeRank configuration](/en/reference/ranking/nativerank#configuration-properties) documentation | -| fieldMatch | proximityLimit | 10 | The maximum allowed gap within a segment. | -| | proximityTable | 1/(2^(i/2)/3) for i in 9..0 followed by 1/2^(i/2) for i in 0..10 | The proximity table deciding the importance of separations of various distances. The table must have size proximityLimit\*2+1, where the first half is for reverse direction distances. The table must only contain values between 0 and 1, where 1 is "perfect" and 0 is "worst". | -| | maxAlternativeSegmentations | 10000 | The maximum number of *alternative* segmentations allowed in addition to the first one found. This will prefer to not consider iterations on segments that are far out in the field, and which start late in the query. | -| | maxOccurrences | 100 | The number of occurrences of each word is normalized against. This should be set as the number above which additional occurrences of the term have no real significance. | -| | proximityCompletenessImportance | 0.9 | A number between 0 and 1 that determines the importance of field completeness in relation to query completeness in the `match` and `completeness` metrics. | -| | relatednessImportance | 0.9 | The normalized importance of relatedness used in the `match` metric. | -| | earlinessImportance | 0.05 | The importance of the match occurring early in the query, relative to segmentProximityImportance, occurrenceImportance and proximityCompletenessImportance in the `match` metric. | -| | segmentProximityImportance | 0.05 | The importance of multiple segments being close to each other, relative to earlinessImportance, occurrenceImportance and proximityCompletenessImportance in the `match` metric. | -| | occurrenceImportance | 0.05 | The importance of having many occurrences of the query terms, relative to earlinessImportance, segmentProximityImportance and proximityCompletenessImportance in the `match` metric. | -| | fieldCompletenessImportance | 0.05 | A number between 0 and 1 that determines the importance of field completeness in relation to query completeness in the `match` and `completeness` metrics. | -| fieldTermMatch | numTerms | 5 | The number of terms for which this is included in the rank features dump in the summary | -| | numTerms.*fieldName* | 5 | The number of terms for which this is included in the rank features dump in the summary for the specified field. Also configurable using `fieldTermMatch(fieldName).numTerms` as the property name. | -| elementCompleteness | fieldCompletenessImportance | 0.5 | Higher values favor field completeness, lower values favor query completeness. Adjusting this parameter will also affect which element is selected as the best. | -| elementSimilarity | output.default | "max( (0.35*p + 0.15*o + 0.30*q + 0.20*f) * w)" | Describes how the default output should be calculated. The value must be on the form `aggregator(expression)`. The expression is used to combine the low-level similarity measures between the query and individual elements in the field that matched the query. The aggregator will be used to aggregate the output of the expression across matched elements. The available aggregators are `max`, `avg`, and `sum`. The available expression operators are `+`, `-`, `*`, `/`, and `^`. Parentheses may be used to override default operator precedence. Note that you must quote the expression using `"expression"`.

Terminals can be numbers or any of the following symbols:

| Symbol | Meaning |
|--------|----------------------------|
| **p** | normalized proximity measure |
| **o** | normalized ordering measure |
| **q** | normalized query coverage |
| **f** | normalized field coverage |
| **w** | element weight | | -| | output.name | N/A | Define an additional feature output called `name`. The value describes how the output should be calculated and has the same syntax as the `default` output described above. Example create a new output which can be accessed as `elementSimilarity(tags).sumW`:
`elementSimilarity(tags).output.sumW: "sum(w)"` | -| attributeMatch | fieldCompletenessImportance | 0.05 | A number between 0 and 1 that determines the importance of field completeness in relation to query completeness in the `match` and `completeness` metrics. | -| | maxWeight | 256 | The maximal weight when calculating `attributeMatch(name).normalizedWeight`. Weights higher than this will not have any effect on this feature. | -| closeness | maxDistance | 9013305.0 | The maximal distance when calculating `closeness(name)`. Distances higher than this will not have any effect on this feature. The default is about 1000 km (1 km is about 9013.305 microdegrees). | -| | scaleDistance | 45066.525 | Basic scale for distances when calculating `closeness(name).logscale`. The default is about 5 km.
**Deprecated:** use `halfResponse` instead | -| | halfResponse | 593861.739 | The distance that should give an output of 0.5 when calculating `closeness(name).logscale`. The default is about 65.89 km (must be in the range [1, maxDistance/2>). Use this parameter to fine-tune the distance range where half of the dynamics of the logscale function will be used. | -| freshness | maxAge | 3*30*24*60*60 | The maximal age in seconds when calculating `freshness(name)`. Ages older than this will not have any effect on this feature. The default is about 3 months. | -| | halfResponse | 7*24*60*60 | The age in seconds that should give an output of 0.5 when calculating `freshness(name).logscale`. The default is 7 days (must be in the range [1, maxAge/2>). Use this parameter to fine-tune the age range where half of the dynamics of the logscale function will be used. | -| random | seed | Current time in microseconds | The random seed. | -| randomNormal | seed | Current time in microseconds | The random seed for randomNormal. | -| foreach | maxTerms | | | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureParameterDefaultDescription
termnumTerms5The number of terms for which this is included in the rank features dump in the summary
bm25(*fieldname*)k11.2Used to limit how much a single query term can affect the score for a document.
b0.75Used to control the effect of the field length compared to the average field length.
averageFieldLengthAutomatically calculated per field per content node for indexed search, 100 for streaming search.Used to set an explicit value for the average field length (in number of words). When using streaming search, no index structures are generated, and the average field length is not automatically calculated. Instead, manually set an average field length for a more precise BM25 score.
elementwise(bm25(*fieldname*,x,*celltype*))k11.2Used to limit how much a single query term can affect the score for a document. Note that {`bm25(fieldname).k1`} will be used as a fallback before the default.
b0.75Used to control the effect of the element length compared to the average element length. Note that {`bm25(fieldname).b`} will be used as a fallback before the default.
averageElementLengthAutomatically calculated per field element per content node for indexed search, 100 for streaming search.Used to set an explicit value for the average element length (in number of words). When using streaming search, no index structures are generated and the average element length is not automatically calculated. Instead, manually set an average element length for a more precise elementwise BM25 score. It should also be manually set for multi-node indexed search to get consistent scoring across the nodes. Note that {`bm25(fieldname).averageFieldLength`} will be used as a fallback before the default.
nativeRankSee the nativeRank configuration documentation
nativeFieldMatchSee the nativeRank configuration documentation
nativeProximitySee the nativeRank configuration documentation
fieldMatchproximityLimit10The maximum allowed gap within a segment.
proximityTable1/(2^(i/2)/3) for i in 9..0 followed by 1/2^(i/2) for i in 0..10The proximity table deciding the importance of separations of various distances. The table must have size proximityLimit*2+1, where the first half is for reverse direction distances. The table must only contain values between 0 and 1, where 1 is "perfect" and 0 is "worst".
maxAlternativeSegmentations10000The maximum number of *alternative* segmentations allowed in addition to the first one found. This will prefer to not consider iterations on segments that are far out in the field, and which start late in the query.
maxOccurrences100The number of occurrences of each word is normalized against. This should be set as the number above which additional occurrences of the term have no real significance.
proximityCompletenessImportance0.9A number between 0 and 1 that determines the importance of field completeness in relation to query completeness in the {`match`} and {`completeness`} metrics.
relatednessImportance0.9The normalized importance of relatedness used in the {`match`} metric.
earlinessImportance0.05The importance of the match occurring early in the query, relative to segmentProximityImportance, occurrenceImportance and proximityCompletenessImportance in the {`match`} metric.
segmentProximityImportance0.05The importance of multiple segments being close to each other, relative to earlinessImportance, occurrenceImportance and proximityCompletenessImportance in the {`match`} metric.
occurrenceImportance0.05The importance of having many occurrences of the query terms, relative to earlinessImportance, segmentProximityImportance and proximityCompletenessImportance in the {`match`} metric.
fieldCompletenessImportance0.05A number between 0 and 1 that determines the importance of field completeness in relation to query completeness in the {`match`} and {`completeness`} metrics.
fieldTermMatchnumTerms5The number of terms for which this is included in the rank features dump in the summary
numTerms.*fieldName*5The number of terms for which this is included in the rank features dump in the summary for the specified field. Also configurable using {`fieldTermMatch(fieldName).numTerms`} as the property name.
elementCompletenessfieldCompletenessImportance0.5Higher values favor field completeness, lower values favor query completeness. Adjusting this parameter will also affect which element is selected as the best.
elementSimilarityoutput.default"max( (0.35*p + 0.15*o + 0.30*q + 0.20*f) * w)"Describes how the default output should be calculated. The value must be on the form {`aggregator(expression)`}. The expression is used to combine the low-level similarity measures between the query and individual elements in the field that matched the query. The aggregator will be used to aggregate the output of the expression across matched elements. The available aggregators are {`max`}, {`avg`}, and {`sum`}. The available expression operators are {`+`}, {`-`}, {`*`}, {`/`}, and {`^`}. Parentheses may be used to override default operator precedence. Note that you must quote the expression using {`"expression"`}.

Terminals can be numbers or any of the following symbols:

| Symbol | Meaning |
| -------- | ---------------------------- |
| **p** | normalized proximity measure |
| **o** | normalized ordering measure |
| **q** | normalized query coverage |
| **f** | normalized field coverage |
| **w** | element weight |
output.nameN/ADefine an additional feature output called {`name`}. The value describes how the output should be calculated and has the same syntax as the {`default`} output described above. Example create a new output which can be accessed as {`elementSimilarity(tags).sumW`}:
{`elementSimilarity(tags).output.sumW: "sum(w)"`}
attributeMatchfieldCompletenessImportance0.05A number between 0 and 1 that determines the importance of field completeness in relation to query completeness in the {`match`} and {`completeness`} metrics.
maxWeight256The maximal weight when calculating {`attributeMatch(name).normalizedWeight`}. Weights higher than this will not have any effect on this feature.
closenessmaxDistance9013305.0The maximal distance when calculating {`closeness(name)`}. Distances higher than this will not have any effect on this feature. The default is about 1000 km (1 km is about 9013.305 microdegrees).
scaleDistance45066.525Basic scale for distances when calculating {`closeness(name).logscale`}. The default is about 5 km.
**Deprecated:** use {`halfResponse`} instead
halfResponse593861.739The distance that should give an output of 0.5 when calculating {`closeness(name).logscale`}. The default is about 65.89 km (must be in the range [1, maxDistance/2>). Use this parameter to fine-tune the distance range where half of the dynamics of the logscale function will be used.
freshnessmaxAge3*30*24*60*60The maximal age in seconds when calculating {`freshness(name)`}. Ages older than this will not have any effect on this feature. The default is about 3 months.
halfResponse7*24*60*60The age in seconds that should give an output of 0.5 when calculating {`freshness(name).logscale`}. The default is 7 days (must be in the range [1, maxAge/2>). Use this parameter to fine-tune the age range where half of the dynamics of the logscale function will be used.
randomseedCurrent time in microsecondsThe random seed.
randomNormalseedCurrent time in microsecondsThe random seed for randomNormal.
foreachmaxTerms
\ No newline at end of file diff --git a/mintlify-docs/en/reference/ranking/rank-features.mdx b/mintlify-docs/en/reference/ranking/rank-features.mdx index 5e7c1aa2d9..48f57ffb36 100644 --- a/mintlify-docs/en/reference/ranking/rank-features.mdx +++ b/mintlify-docs/en/reference/ranking/rank-features.mdx @@ -49,6 +49,25 @@ See also [the overview of the ranking framework](/en/basics/ranking), and [rank Default: 1000000 The number of terms in this field if one or more query term matched the field, 1000000 if no query term matched the field. +- **queryTermDocumentFrequency(name)**
+ Default: empty tensor + + A `tensor(term{})` holding the document frequency that [BM25](/en/ranking/bm25) would use for each query term that searches the [index](/en/reference/schemas/schemas#indexing-index) field *name*. The document frequency is the number of documents that contain the term; it is the input to the inverse document frequency (IDF) component of BM25. This feature is exposed for debugging and for use in custom text ranking formulas such as [BM25F](https://github.com/vespa-engine/sample-apps/tree/master/examples/bm25f) or [Bayesian BM25](https://github.com/vespa-engine/sample-apps/tree/master/examples/bayesian_bm25). + + The tensor has one cell per query term that searches *name*; terms that do not search the field are not included. Each cell is labeled with the index of the term in the query (as a string, starting at 0), and the labels keep their original query-term index rather than being renumbered. For a term that searches several fields, the cell holds the frequency for the specific field (here, `name`). + + Example: for a query where term 0 and term 2 search the `content` field (term 1 searches a different field), `queryTermDocumentFrequency(content)` is: + + ```bash + tensor(term{}):{ {term:0}:1200.0, {term:2}:57.0 } + ``` + Each value is a query-provided override from the [significance model](/en/ranking/significance) if one is present, otherwise the local content node index statistic - the same value BM25 uses. See also [term(n).significance](/en/reference/ranking/rank-features#term(n).significance), which is derived from this document frequency. + + *name* must be a configured index field; referencing an unknown or non-index field is a configuration error, and the tensor is empty when no query term searches the field. + + **Note:** The value is a per-content-node statistic unless overridden by the significance model, so it may differ between nodes. In [streaming search](/en/performance/streaming-search), non-overridden values are 0. + + - **attribute(name)**
Default: null @@ -677,6 +696,14 @@ fieldMatch features provide a good measure of the degree to which a query matche Default: n/a Time at which the query is executed in unix-time (seconds since epoch) +- **num_docs_indexed**
+ Default: n/a + + The local document count used as [BM25](/en/ranking/bm25)'s total document count when no per-term document-frequency override is present. This is the *N* term used by the BM25 inverse document frequency calculation. + + **Note:** The value is a per-content-node statistic computed locally; it is *not* cluster-wide and may differ between nodes. For [streaming search](/en/performance/streaming-search), this feature returns 1. + + - **random**
Default: n/a diff --git a/mintlify-docs/en/reference/ranking/ranking-expressions.mdx b/mintlify-docs/en/reference/ranking/ranking-expressions.mdx index d5773a420a..69d9f5e329 100644 --- a/mintlify-docs/en/reference/ranking/ranking-expressions.mdx +++ b/mintlify-docs/en/reference/ranking/ranking-expressions.mdx @@ -7,8 +7,18 @@ This is a complete reference to the _ranking expressions_ used to configure appl Ranking expressions are written in a simple language similar to ordinary functional notation. The atoms in ranking expressions are _rank features_ and _constants_. These atoms can be combined by _arithmetic operations_ and other _built-in functions_ over scalars and tensor. -| Rank Features | A rank feature is a named value calculated or looked up by vespa for each query/document combination. See the [rank feature reference](/en/reference/ranking/rank-features) for a list of all the rank features available to ranking expressions.| -| Constants | A constant is either a floating point number, a boolean (true/false) or a quoted string. Since ranking expressions can only work on scalars and tensors, strings and booleans are immediately converted to scalars - true becomes 1.0, false 0.0 and a string its hash value. This means that **strings can only be used for equality comparisons**, other purposes such as parametrizing the key to slice out of a tensor will not work correctly.| + + + + + + + + + + + +
Rank FeaturesA rank feature is a named value calculated or looked up by vespa for each query/document combination. See the rank feature reference for a list of all the rank features available to ranking expressions.
ConstantsA constant is either a floating point number, a boolean (true/false) or a quoted string. Since ranking expressions can only work on scalars and tensors, strings and booleans are immediately converted to scalars - true becomes 1.0, false 0.0 and a string its hash value. This means that **strings can only be used for equality comparisons**, other purposes such as parametrizing the key to slice out of a tensor will not work correctly.
## Arithmetic operations @@ -22,50 +32,177 @@ Arithmetic operations work on any tensor in addition to scalars, and are a short All arithmetic operators in order of decreasing precedence: -| Arithmetic operator | Description | -| :--- | :--- | -| ^ | Power | -| % | Modulo | -| / | Division | -| \* | Multiplication | -| - | Subtraction | -| + | Addition | -| && | And: 1 if both arguments are non-zero, 0 otherwise. | -| || | Or: 1 if either argument is non-zero, 0 otherwise. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Arithmetic operatorDescription
^Power
%Modulo
/Division
*Multiplication
-Subtraction
+Addition
&&And: 1 if both arguments are non-zero, 0 otherwise.
||Or: 1 if either argument is non-zero, 0 otherwise.
## Mathematical scalar functions -| Function | Description | -| :--- | :--- | -| acos(*x*) | Inverse cosine of *x* | -| asin(*x*) | Inverse sine of *x* | -| atan(*x*) | Inverse tangent of *x* | -| atan2(*y*, *x*) | Inverse tangent of *y / x*, using signs of both arguments to determine correct quadrant. | -| bit(*x*, *y*) | Returns value of bit *y* in value *x* (for int8 values) | -| ceil(*x*) | Lowest integral value not less than *x* | -| cos(*x*) | Cosine of *x* | -| cosh(*x*) | Hyperbolic cosine of *x* | -| elu(*x*) | The Exponential Linear Unit activation function for value *x* | -| erf(*x*) | The Gauss error function for value *x* | -| exp(*x*) | Base-e exponential function. | -| fabs(*x*) | Absolute value of (floating-point) number *x* | -| floor(*x*) | Largest integral value not greater than *x* | -| fmod(*x*, *y*) | Remainder of *x / y* | -| isNan(*x*) | Returns 1.0 if *x* is NaN, 0.0 otherwise | -| ldexp(*x*, *exp*) | Multiply *x* by 2 to the power of *exp* | -| log(*x*) | Base-e logarithm of *x* | -| log10(*x*) | Base-10 logarithm of *x* | -| max(*x*, *y*) | Larger of *x* and *y* | -| min(*x*, *y*) | Smaller of *x* and *y* | -| pow(*x*, *y*) | Return *x* raised to the power of *y* | -| relu(*x*) | The Rectified Linear Unit activation function for value *x* | -| sigmoid(*x*) | The sigmoid (logistic) activation function for value *x* | -| sin(*x*) | Sine of *x* | -| sinh(*x*) | Hyperbolic sine of *x* | -| sqrt(*x*) | Square root of *x* | -| tan(*x*) | Tangent of *x* | -| tanh(*x*) | Hyperbolic tangent of *x* | -| hamming(*x*, *y*) | Hamming (bit-wise) distance between *x* and *y* (considered as 8-bit integers). | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionDescription
acos(*x*)Inverse cosine of *x*
asin(*x*)Inverse sine of *x*
atan(*x*)Inverse tangent of *x*
atan2(*y*, *x*)Inverse tangent of *y / x*, using signs of both arguments to determine correct quadrant.
bit(*x*, *y*)Returns value of bit *y* in value *x* (for int8 values)
ceil(*x*)Lowest integral value not less than *x*
cos(*x*)Cosine of *x*
cosh(*x*)Hyperbolic cosine of *x*
elu(*x*)The Exponential Linear Unit activation function for value *x*
erf(*x*)The Gauss error function for value *x*
exp(*x*)Base-e exponential function.
fabs(*x*)Absolute value of (floating-point) number *x*
floor(*x*)Largest integral value not greater than *x*
fmod(*x*, *y*)Remainder of *x / y*
isNan(*x*)Returns 1.0 if *x* is NaN, 0.0 otherwise
ldexp(*x*, *exp*)Multiply *x* by 2 to the power of *exp*
log(*x*)Base-e logarithm of *x*
log10(*x*)Base-10 logarithm of *x*
max(*x*, *y*)Larger of *x* and *y*
min(*x*, *y*)Smaller of *x* and *y*
pow(*x*, *y*)Return *x* raised to the power of *y*
relu(*x*)The Rectified Linear Unit activation function for value *x*
sigmoid(*x*)The sigmoid (logistic) activation function for value *x*
sin(*x*)Sine of *x*
sinh(*x*)Hyperbolic sine of *x*
sqrt(*x*)Square root of *x*
tan(*x*)Tangent of *x*
tanh(*x*)Hyperbolic tangent of *x*
hamming(*x*, *y*)Hamming (bit-wise) distance between *x* and *y* (considered as 8-bit integers).
`x` and `y` may be any ranking expression. @@ -79,14 +216,40 @@ if (expression1operatorexpression2, trueExpression, falseExpression) If the condition given in the first argument is true, the expression in argument 2 is used, otherwise argument 3. The four expressions may be any ranking expression. Conditional operators in ranking expression if functions: -| Boolean operator | Description | -| :--- | :--- | -| \<= | Less than or equal | -| \< | Less than | -| == | Equal | -| ~= | Approximately equal | -| \>= | Greater than or equal | -| \> | Greater than | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Boolean operatorDescription
<=Less than or equal
<Less than
==Equal
~=Approximately equal
>=Greater than or equal
>Greater than
The `in` membership operator uses a slightly modified if-syntax: @@ -125,21 +288,68 @@ The following set of tensors functions are available to use in ranking expressio ### Primitive functions -| Function | Description | -| :--- | :--- | -| **map( tensor, f(x)(expr) )** | Returns a new tensor with the lambda function defined in `f(x)(expr)` applied to each cell. Arguments:

- `tensor`: a tensor expression. For example `attribute(tensor_field)`
- `f(x)(expr)`: a [lambda function](#lambda-functions-in-primitive-functions) with one argument.

Returns a new tensor where the expression in the lambda function is evaluated in each cell in `tensor`.

Examples: ```bash map(t, f(x)(x\*x)) ```

[playground example map](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEcBXAgJwE8AKAFwEoSZGpCIJIPArQDOWNgB5oAGywBDHgD4uAD0QAWALp84iAAzEAjMQBMxAMz7IQiAF8hz0hmrlcDIh+GUaE50DAC2KjgA+gRaKqE4in7BECJhEVws7Nz8xGDQ2nzaAHpWfALBrhiVYPogzkA) | -| **map\_subspaces( tensor, f(x)(expr) )** | Returns a new tensor with the lambda function defined in `f(x)(expr)` applied to each dense subspace.
Arguments:

- `tensor`: a tensor expression. For example `attribute(tensor_field)`
- `f(x)(expr)`: a [lambda function](#lambda-functions-in-primitive-functions) with one argument. Returns a new tensor where the lambda function is evaluated for each dense subspace in `tensor`. This is an advanced feature that enables using dense [tensor generator](#tensor) expressions to transform mixed tensors.
Example:
``` map\_subspaces(tensor(x{},y\[3\]):{a:\[1,2,3\]},f(d)(tensor(z\[2\])(d{y:(z)}+d{y:(z+1)})))```
[playground example for map\_subspaces](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEcBXAgJwE8AKAFwEoSZGpCIJIPArQDOWNgB4AlrR4AOAHxcAHsAC+xDogBMAXT5xgAQziIAjAFZiAWhsA2YzshCIOoXqHVyXAYiUhooSjQvOgZmWhwLAGMAawB9ACMFHikUgHdMgAsUgFsLHBSpZjSpeISCKUEwiBEGErKKqpq6rhZ2bn5iaC4AEz5eSRl5JVUNA1dTLgyeYeAOOC4OAHoVPj0AdkcOAFJtvlPPMJ8MS7BjEB0gA) | -| **filter\_subspaces( tensor, f(x)(expr) )** | Returns a new tensor containing only the subspaces for which the lambda function defined in `f(x)(expr)` returns true.
Arguments:
- `tensor`: a tensor expression. Must have at least one mapped dimension.
- `f(x)(expr)`: a [lambda function](#lambda-functions-in-primitive-functions) with one argument.
Returns a new tensor containing only the subspaces for which the lambda function defined in `f(x)(expr)` returns true. Typically used to get rid of unneeded values in sparse tensors. Example: ``` filter\_subspaces(tensor(x{}):{a:1,b:2,c:3,d:4},f(value)(value>2)) # tensor(x{}):{c:3,d:4} ```

[playground example for filter\_subspaces](https://docs.vespa.ai/playground/#N4IgZiBcDaoPYAcogMYgDQiZUAXZABLgBYCmBAjgK4CGANgJa4CeBcYB9dBKxVAdgGsAziAC+Y9PGwhSGLFFD9kuAIzy5kELlL9hcAE4AeMHTg1cAPgAUvAYOBiAlDgAMkVQGZ0qyAHZ0ACZIAFZ0Tw8wgBZIT1d0EMhAsXFJaWQ0TGw8QgA5AgZhAgATZn4aAFsGNAkpEERkOSzFEGUtXI1kT1S6hq1MhRxtQjAGfmK2A2LSAzGAczYOFFI6OlFa9K0mwaUVQM7+lboAfUNpg2s1dAIKmgAPJx7N1Hls4a0bmkFyGk-hQQIYEMRDIBAARqRhLgCB0NvUZNs3m1tN1MJptIEjLC0vCMq8WvgPsUDIhOKsCMIqGDhAgaMsimASRUQeRbv8QRZOAZyGB6MI5HC+rJ8UNkbgogdwAw6DoDMdKdTafTLt5AdZhE51U5HoKZAM3oSQDw4BUwWMedLZaQJmyAQB3JjESYMOZjehEXT6AyA4Hcykyp64rYi3ZaXAhSXigBUalSAF0xEA) | -| **reduce( tensor, aggregator, dim1, dim2, ... )** | Returns a new tensor with the `aggregator` applied across dimensions dim1, dim2, etc. If no dimensions are specified, reduce over all dimensions.
Arguments:
- `tensor`: a tensor expression.
- `aggregator`: the aggregator to use. See below.
- `dim1, dim2, ...`: the dimensions to reduce over. Optional.
Returns a new tensor with the aggregator applied across dimensions `dim1`, `dim2`, etc. If no dimensions are specified, reduce over all dimensions.
Available aggregators are:
- `avg`: arithmetic mean
- `count`: number of elements
- `max`: maximum value
- `median`: median value
- `min`: minimum value
- `prod`: product of all values
- `sum`: sum of all values
Examples:
``` reduce(t, sum) # Sum all values in tensor reduce(t, count, x) # Count number of cells along dimension x ```
[playground example reduce](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEcBXAgJwE8AKAFwEoSZGpCIJIPArQDOWNgB5oAGywBDHgD4uAD0QAWALp84iAAzEAjMQBMxAMz7IQiAF8hz0hmrlcDIh+GUaE50DGwEACbMAMYEAPpSzAC2sQRaKok4in7BECKhEdEEXCzs3PzEYAmJAsGuGHVg+iDOQA) | -| **join( tensor1, tensor2, f(x,y)(expr) )** | Returns a new tensor constructed from the *natural join* between `tensor1` and `tensor2`, with the resulting cells having the value as calculated from `f(x,y)(expr)`, where `x` is the cell value from `tensor1` and `y` from `tensor2`.
Arguments:
- `tensor1`: a tensor expression.
- `tensor2`: a tensor expression.
- `f(x,y)(expr)`: a [lambda function](#lambda-functions-in-primitive-functions) with two arguments. Returns a new tensor constructed from the *natural join* between `tensor1` and `tensor2`, with the resulting cells having the value as calculated from `f(x,y)(expr)`, where `x` is the cell value from `tensor1` and `y` from `tensor2`.
Formally, the result of the `join` is a new tensor with dimensions the union of dimension between `tensor1` and `tensor2`. The cells are the set of all combinations of cells that have equal values on their common dimensions. Examples:
``` join(t1, t2, f(x,y)(x \* y)) ```
[playground example join](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEcBXAgJwE8AKAFwEoSZGpCIJIPArQDOWNgB5oAGywBDHgD4uAD2ABfPnGDAtcAAy6EARgB0p4mhOWLYAEy3dkIRF1DdpDNTkuAxE-sKUaF50DGo8bACWAEbMErwCYTSEDBLSsgrKapo6fhx6BkYmdhxmzgDMtvbGZsTVTggALA0OcJYtNQgArF1Nva3OAGzunpk+GH5CgZjBYqFRFPiL5PRiAFZY8fQZwqJQewdcLOzc-PaxCcmpN2DQ2i182mAAVGAcfAJRs1QgIAuiBdEA) | -| **merge( tensor1, tensor2, f(x,y)(expr) )** | Returns a new tensor consisting of all cells from both the arguments, where the lambda function is used to produce a single value in the cases where both arguments provide a value for a cell.
Arguments:
- `tensor1`: a tensor expression.
- `tensor2`: a tensor expression.
- `f(x,y)(expr)`: a [lambda function](#lambda-functions-in-primitive-functions) with two arguments.
Returns a new tensor having all the cells of both arguments, where the lambda is invoked to produce a single value only when both arguments have a value for the same cell.
The argument tensors must have the same type, and that will be the type of the resulting tensor. Example: ``` merge(t1, t2, f(left,right)(right)) ```
[playground example merge](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gEcBXAgJwE8AKAFwEoSZGpCIJIPArQDOWNlwDWBDsAC+xAB6IATAF0+cYAEM4iAIzFdxAEYmAzMQAsOlZCEQVQtUOrlcDIqQ0UJRobnQMhjw8bACWVswSvAKBQYQMEtKyCkqqGtp6BjaIAKzEAGw6xADGJgDsxAAczq5BHhheGD6YfmIBYRT4XeT0YgC27ADmBAD6BOqGozgANn2paWOTBFws7Nz8xGCR0XEJW-tg0Fwr0DzEsRMAFvxc9098AmFtqF86ICpAA) | -| **tensor( tensor-type-spec )(expr)** | Generates new tensors according to type specification and expression `expr`. Arguments: - `tensor-type-spec`: an [indexed tensor type specification.](/en/reference/ranking/tensor#tensor-type-spec) - `(expression)`: a [lambda function](#lambda-functions-in-primitive-functions) expressing how to generate the tensor. Generates new tensors according to the type specification and expression `expr`. The tensor type must be an indexed tensor (e.g. `tensor(x[10])`). The expression in `expr` will be evaluated for each cell. The arguments in the expression is implicitly the names of the dimensions defined in the type spec.
Useful for creating transformation tensors.
Examples:
``` tensor(x\[3\])(x) ```
[playground generate examples](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gHMDaCAnAQwBcCB9VgO4kyNSEQSQetAM5Y2ACgAeiAMwBdAJRKNkERAC+I-aQzVyuBkROjKaPXQbNWnHvwIDeAJmE1M4qFKybAA80AA2WNwAfEqInmrEAJ5xmkpgALzpYIk69oYYxiJmmBYSVvYU+MXk9BJcPr6EDIFysQAsmnCIAIwAdAAMxGCeA0Mqo2BtA2q6vvmohaYVpU3W5LbVDhJO7Nx8grzQbFgAtrwctFhcABbsvC1sDb5izSxB8tApWlzAinDQAGpuvpcnMjCg1CB9EA) | -| **rename( tensor, dim-to-rename, new-names )** | Renames one or more dimensions in the tensor.
Arguments:
- `tensor`: a tensor expression.
- `dim-to-rename`: a dimension, or list of dimensions, to rename.
- `new-names`: new names for the dimensions listed above. Returns a new tensor with one or more dimension renamed. Examples:
``` rename(t1,x,z)```
[playground rename examples](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gBcSybIiEmDaBnLAJwAUAD2ABfYgE9xASjjBgwuAAYpKsQgCMAOlVolqyXE0awy3cX3G1y0+b2LrRk1t1jIrCGNYTW1crgMRKQ0UJRonnQM-NwAhgC2BAD6BMIJOAA2wZEQ7NFxiYKMxMLEAF4yHqHeGL4Y-piBnNmhFPgN5PScMbQJyanpWUmMAO5YLKG5HFA9fUXEIlIyCwCWxABWMpWRNai7ALogYkA) | -| **concat( tensor1, tensor2, dim )** | Concatenates two tensors along dimension `dim`.
Arguments:
- `tensor1`: a tensor expression.
- `tensor2`: a tensor expression.
- `dim`: the dimension to concatenate along.
Returns a new tensor with the two tensors `tensor1` and `tensor2` concatenated along dimension `dim`.
Examples:
``` concat(t,t2,x) ```
[playground concat examples](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gBcSybIiEmDaBnLAJwAUAD0QBmALoBKOIgAsxAKzEAbBMisIAX1ZbSGauVwMi+tpTSa6DRgCYWNTByiNufIaNvTZY4nPVWOhh6rIaYxpymVhT4YeT0nADGWLSJAIbMZo7sDMmpGYKMxHbEwlIajkGoIQbREYQO5rFWEJAJUHnpjAD6WIwAFgT83QDuaQCejdnOkJ0FJUVlFTRV2igSIFpAA) | -| **(tensor)partial-address** | Slice - returns a new tensor containing the cells matching the partial address.
Arguments:
- `tensor`: a tensor expression.
- `partial-address`: Can be given in the form of a tensor address `{dimension:label,..}`, or for tensors referenced directly and having a single mapped or indexed type respectively as just a label in curly brackets `{label}` or just an index in square brackets, `[index]`. Index labels may be specified by a lambda expression enclosed in parentheses.
Returns a new tensor containing the cells matching the partial address. A common special case is producing a single value by specifying a full address. The type of the resulting tensor is the dimensions of the argument tensor not specified by the partial address.
Examples:
``` # a_tensor is of type tensor(key{},x\[2\]) a_tensor{key:key1,x:1} ```
[playground slice examples](https://docs.vespa.ai/playground/#N4KABGBEBmkFxgNrgmUrWQPYAd5QFNIAaFDSPBdDTAO30gBcSybIiEmDaBnLAJwAUAD0QBmALoBKOIgAsxAKzEAbBMisIAX1ZbSGauVwMi+tpTSa6DHgBsAlgGNTViOwaNgwuAAYtGmjAdDD1WQ0xjThdAinxw8npOOycCAH0AJhZAtw4oT290-ytg1FCDK2wLdzNyC3jrTkZMmrZcrl4BQQBrAgBPYD1RdOk4YDAe3oBGWUmAOh9iMHT5iUWJ9NkxecW5FaCAmhLtFvrKkyzzONcoRKhk51SAWwBDHBwCABNU+1oPgmFPhcYm0msAJnAJpNiN5JkVAkcgicKpFCEDMHVrpBbpB7mkXm9Pt9fv9Cc1MSD0mC+hC+lDvIIxABadJSOGHXQoCQgLRAA) | -| **tensor-literal-form** | Returns a new tensor having the type and cell values given explicitly. Each cell value may be supplied by a lambda which can access other features.
Returns a new tensor from the [literal form](/en/reference/ranking/tensor#tensor-literal-form), where the type must be specified explicitly. Each value may be supplied by a lambda, which - in contrast to all other lambdas - *may refer to features and expressions from the context*.
Examples: ``` # Declare an indexed tensor tensor(x[2]):[1.0, 2.0] # Declare an mapped tensor tensor(x{}):{x1:3, x2:4} ``` | -| **cell_cast( tensor, cell_type )** | Returns a new tensor that is the same as the argument, except that all cell values are converted to the given [cell type](/en/reference/ranking/tensor#tensor-type-spec).
Arguments:
- `tensor`: a tensor expression.
- `cell_type`: wanted cell type.
Example, casting from `bfloat16` to `float`:
``` # With a tensor t of the type tensor(x\[5\])(x+1) cell_cast(t, float)``` | -| **cell_order( tensor, order )** | Returns a new tensor with the rank of the original cells based on the given order.
Arguments:
- `tensor`: a tensor expression.
- `order`: `max` or `min`
Returns a new tensor with the rank of the original cells based on the given order. With `max` the largest value gets rank 0. With `min` the smallest value gets rank 0.
Examples:
``` cell_order(tensor(x\[3\]):\[2,3,1\],max) # tensor(x\[3\]):\[1,0,2\] cell_order(tensor(x\[3\]):\[2,3,1\],min) # tensor(x\[3\]):\[1,2,0\] ```
[playground example for cell_order](https://docs.vespa.ai/playground/#N4IgZiBcDaoPYAcogMYgDQiZUAXZABLgBYCmBAjgK4CGANgJa4CeBcYB9dBKxVAdgGsAziAC+Y9PGwhSGLFFD9kuAIzy5kELlL9hcAE4AeMHTg1cAPgAUvAYOBiAlDgAMkVQGZ0qyAHZ0ACZIAFZ0Tw8wgBZIT1d0EMhAsXFJaWQ0TGw8QgA5AgZhAgATZn4aAFsGNAkpEERkOSzFEGUtXI1kT1S6hq1MhRxtQjAGfmK2A2LSAzGAczYOFFI6OlFa9K0mwaUVQM7+lboAfUNpg2s1dAIKmgAPJx7N1Hls4a0bmkFyGk-hQQIYEMRDIBAARqRhLgCB0NvUZNs3m1tN1MJptIEjLC0vCMq8WvgPsUDIhOKsCMIqGDhAgaMsimASRUQeRbv8QRZOAZyGB6MI5HC+rJ8UNkbgogdwAw6DoDMdKdTafTLt5AdZhE51U5HoKZAM3oSQDw4BUwWMedLZaQJmyAQB3JjESYMOZjehEXT6AyA4Hcykyp64rYi3ZaXAhSXigBUalSAF0xEA) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionDescription
**map( tensor, f(x)(expr) )**Returns a new tensor with the lambda function defined in {`f(x)(expr)`} applied to each cell. Arguments:

- {`tensor`}: a tensor expression. For example {`attribute(tensor_field)`}
- {`f(x)(expr)`}: a lambda function with one argument.

Returns a new tensor where the expression in the lambda function is evaluated in each cell in {`tensor`}.

Examples: {``}{`bash map(t, f(x)(x*x)) `}{``}

playground example map
**map_subspaces( tensor, f(x)(expr) )**Returns a new tensor with the lambda function defined in {`f(x)(expr)`} applied to each dense subspace.
Arguments:

- {`tensor`}: a tensor expression. For example {`attribute(tensor_field)`}
- {`f(x)(expr)`}: a lambda function with one argument. Returns a new tensor where the lambda function is evaluated for each dense subspace in {`tensor`}. This is an advanced feature that enables using dense tensor generator expressions to transform mixed tensors.
Example:
{``}{` map_subspaces(tensor(x{},y[3]):{a:[1,2,3]},f(d)(tensor(z[2])(d{y:(z)}+d{y:(z+1)})))`}{``}
playground example for map_subspaces
**filter_subspaces( tensor, f(x)(expr) )**Returns a new tensor containing only the subspaces for which the lambda function defined in {`f(x)(expr)`} returns true.
Arguments:
- {`tensor`}: a tensor expression. Must have at least one mapped dimension.
- {`f(x)(expr)`}: a lambda function with one argument.
Returns a new tensor containing only the subspaces for which the lambda function defined in {`f(x)(expr)`} returns true. Typically used to get rid of unneeded values in sparse tensors. Example: {``}{` filter_subspaces(tensor(x{}):{a:1,b:2,c:3,d:4},f(value)(value>2)) # tensor(x{}):{c:3,d:4} `}{``}

playground example for filter_subspaces
**reduce( tensor, aggregator, dim1, dim2, ... )**Returns a new tensor with the {`aggregator`} applied across dimensions dim1, dim2, etc. If no dimensions are specified, reduce over all dimensions.
Arguments:
- {`tensor`}: a tensor expression.
- {`aggregator`}: the aggregator to use. See below.
- {`dim1, dim2, ...`}: the dimensions to reduce over. Optional.
Returns a new tensor with the aggregator applied across dimensions {`dim1`}, {`dim2`}, etc. If no dimensions are specified, reduce over all dimensions.
Available aggregators are:
- {`avg`}: arithmetic mean
- {`count`}: number of elements
- {`max`}: maximum value
- {`median`}: median value
- {`min`}: minimum value
- {`prod`}: product of all values
- {`sum`}: sum of all values
Examples:
{``}{` reduce(t, sum) # Sum all values in tensor reduce(t, count, x) # Count number of cells along dimension x `}{``}
playground example reduce
**join( tensor1, tensor2, f(x,y)(expr) )**Returns a new tensor constructed from the *natural join* between {`tensor1`} and {`tensor2`}, with the resulting cells having the value as calculated from {`f(x,y)(expr)`}, where {`x`} is the cell value from {`tensor1`} and {`y`} from {`tensor2`}.
Arguments:
- {`tensor1`}: a tensor expression.
- {`tensor2`}: a tensor expression.
- {`f(x,y)(expr)`}: a lambda function with two arguments. Returns a new tensor constructed from the *natural join* between {`tensor1`} and {`tensor2`}, with the resulting cells having the value as calculated from {`f(x,y)(expr)`}, where {`x`} is the cell value from {`tensor1`} and {`y`} from {`tensor2`}.
Formally, the result of the {`join`} is a new tensor with dimensions the union of dimension between {`tensor1`} and {`tensor2`}. The cells are the set of all combinations of cells that have equal values on their common dimensions. Examples:
{``}{` join(t1, t2, f(x,y)(x * y)) `}{``}
playground example join
**merge( tensor1, tensor2, f(x,y)(expr) )**Returns a new tensor consisting of all cells from both the arguments, where the lambda function is used to produce a single value in the cases where both arguments provide a value for a cell.
Arguments:
- {`tensor1`}: a tensor expression.
- {`tensor2`}: a tensor expression.
- {`f(x,y)(expr)`}: a lambda function with two arguments.
Returns a new tensor having all the cells of both arguments, where the lambda is invoked to produce a single value only when both arguments have a value for the same cell.
The argument tensors must have the same type, and that will be the type of the resulting tensor. Example: {``}{` merge(t1, t2, f(left,right)(right)) `}{``}
playground example merge
**tensor( tensor-type-spec )(expr)**Generates new tensors according to type specification and expression {`expr`}. Arguments: - {`tensor-type-spec`}: an indexed tensor type specification. - {`(expression)`}: a lambda function expressing how to generate the tensor. Generates new tensors according to the type specification and expression {`expr`}. The tensor type must be an indexed tensor (e.g. {`tensor(x[10])`}). The expression in {`expr`} will be evaluated for each cell. The arguments in the expression is implicitly the names of the dimensions defined in the type spec.
Useful for creating transformation tensors.
Examples:
{``}{` tensor(x[3])(x) `}{``}
playground generate examples
**rename( tensor, dim-to-rename, new-names )**Renames one or more dimensions in the tensor.
Arguments:
- {`tensor`}: a tensor expression.
- {`dim-to-rename`}: a dimension, or list of dimensions, to rename.
- {`new-names`}: new names for the dimensions listed above. Returns a new tensor with one or more dimension renamed. Examples:
{``}{` rename(t1,x,z)`}{``}
playground rename examples
**concat( tensor1, tensor2, dim )**Concatenates two tensors along dimension {`dim`}.
Arguments:
- {`tensor1`}: a tensor expression.
- {`tensor2`}: a tensor expression.
- {`dim`}: the dimension to concatenate along.
Returns a new tensor with the two tensors {`tensor1`} and {`tensor2`} concatenated along dimension {`dim`}.
Examples:
{``}{` concat(t,t2,x) `}{``}
playground concat examples
**(tensor)partial-address**Slice - returns a new tensor containing the cells matching the partial address.
Arguments:
- {`tensor`}: a tensor expression.
- {`partial-address`}: Can be given in the form of a tensor address {`{dimension:label,..}`}, or for tensors referenced directly and having a single mapped or indexed type respectively as just a label in curly brackets {`{label}`} or just an index in square brackets, {`[index]`}. Index labels may be specified by a lambda expression enclosed in parentheses.
Returns a new tensor containing the cells matching the partial address. A common special case is producing a single value by specifying a full address. The type of the resulting tensor is the dimensions of the argument tensor not specified by the partial address.
Examples:
{``}{` # a_tensor is of type tensor(key{},x[2]) a_tensor{key:key1,x:1} `}{``}
playground slice examples
**tensor-literal-form**Returns a new tensor having the type and cell values given explicitly. Each cell value may be supplied by a lambda which can access other features.
Returns a new tensor from the literal form, where the type must be specified explicitly. Each value may be supplied by a lambda, which - in contrast to all other lambdas - *may refer to features and expressions from the context*.
Examples: {``}{` # Declare an indexed tensor tensor(x[2]):[1.0, 2.0] # Declare an mapped tensor tensor(x{}):{x1:3, x2:4} `}{``}
**cell_cast( tensor, cell_type )**Returns a new tensor that is the same as the argument, except that all cell values are converted to the given cell type.
Arguments:
- {`tensor`}: a tensor expression.
- {`cell_type`}: wanted cell type.
Example, casting from {`bfloat16`} to {`float`}:
{``}{` # With a tensor t of the type tensor(x[5])(x+1) cell_cast(t, float)`}{``}
**cell_order( tensor, order )**Returns a new tensor with the rank of the original cells based on the given order.
Arguments:
- {`tensor`}: a tensor expression.
- {`order`}: {`max`} or {`min`}
Returns a new tensor with the rank of the original cells based on the given order. With {`max`} the largest value gets rank 0. With {`min`} the smallest value gets rank 0.
Examples:
{``}{` cell_order(tensor(x[3]):[2,3,1],max) # tensor(x[3]):[1,0,2] cell_order(tensor(x[3]):[2,3,1],min) # tensor(x[3]):[1,2,0] `}{``}
playground example for cell_order
### Lambda functions in primitive functions @@ -158,33 +368,125 @@ f(x,y)(if(x < y, 0, 1)) Non-primitive functions can be implemented by primitive functions, but are not necessarily so for performance reasons. Note that all the arithmetic operators, comparison operators, and scalar operations can also be applied to tensors directly, those are not repeated below here. -| Function | Description | -| :--- | :--- | -| **argmax(t, dim)** | `join(t, reduce(t, max, dim), f(x,y)(if (x == y, 1, 0)))`
Returns a tensor with cell(s) of the highest value(s) in the tensor set to 1. The dimension argument follows the same format as reduce as multiple dimensions can be given and is optional. | -| **argmin(t, dim)** | `join(t, reduce(t, min, dim), f(x,y)(if (x == y, 1, 0)))`
Returns a tensor with cell(s) of the lowest value(s) in the tensor set to 1. The dimension argument follows the same format as reduce as multiple dimensions can be given and is optional. | -| **avg(t, dim)** | `reduce(t, avg, dim)`
Reduce the tensor with the `average` aggregator along dimension `dim`. If the dimension argument is omitted, this reduces over all dimensions. | -| **count(t, dim)** | `reduce(t, count, dim)`
Reduce the tensor with the `count` aggregator along dimension `dim`. If the dimension argument is omitted, this reduces over all dimensions. | -| **cosine_similarity(t1, t2, dim)** | `reduce(t1*t2, sum, dim) / sqrt(reduce(t1*t1, sum, dim) * reduce(t2*t2, sum, dim))`
The cosine similarity between the two vectors in the given dimension. | -| **diag(n1, n2)** | `tensor(i[n1],j[n2])(if (i==j, 1.0, 0.0)))`
Returns a tensor with the diagonal set to 1.0. | -| **elu(t)** | `map(t, f(x)(if(x < 0, exp(x)-1, x)))`
[Exponential linear unit](https://arxiv.org/abs/1511.07289). | -| **euclidean_distance(t1, t2, dim)** | `join(reduce(map(join(t1, t2, f(x,y)(x-y)), f(x)(x * x)), sum, dim), f(x)(sqrt(x)))`
euclidean_distance: `sqrt(sum((t1-t2)^2, dim))`. | -| **expand(t, dim)** | `t * tensor(dim[1])(1)`
Adds an indexed dimension with name `dim` to the tensor `t`. | -| **hamming(t1, t2)** | `join(t1, t2, f(x,y)(hamming(x,y)))`
Join and return the Hamming distance between matching cells of `t1` and `t2`. This function is mostly useful when the input contains vectors with binary data and summing the hamming distance over the vector dimension, e.g.:
| type of input *t1* → | `tensor(dimone{},z[32])`
| type of input *t2* → | `tensor(dimtwo{},z[32])`
| expression → `reduce(join(t1, t2, f(a,b)(hamming(a,b)), sum, z)`| |output type → `tensor(dimone{},dimtwo{})`|
Note that the cell values are always treated as if they were both 8-bit integers in the range \[-128,127\], and only then counting the number of bits that are different. See also the corresponding [distance metric](/en/reference/schemas/schemas#distance-metric). Arguments can be scalars. | -| **l1_normalize(t, dim)** | `join(t, reduce(t, sum, dim), f(x,y) (x / y))`
L1 normalization: `t / sum(t, dim)`. | -| **l2_normalize(t, dim)** | `join(t, map(reduce(map(t, f(x)(x * x)), sum, dim), f(x)(sqrt(x))), f(x,y)(x / y))`
L2 normalization: `t / sqrt(sum(t^2, dim)`. | -| **matmul(t1, t2, dim)** | `reduce(join(t1, t2, f(x,y)(x * y)), sum, dim)`
Matrix multiplication of two tensors. This is the product of the two tensors summed along a shared dimension. | -| **max(t, dim)** | `reduce(t, max, dim)`
Reduce the tensor with the `max` aggregator along dimension `dim`. | -| **median(t, dim)** | `reduce(t, median, dim)`
Reduce the tensor with the `median` aggregator along dimension `dim`. If the dimension argument is omitted, this reduces over all dimensions. | -| **min(t, dim)** | `reduce(t, min, dim)`
Reduce the tensor with the `min` aggregator along dimension `dim`. | -| **prod(t, dim)** | `reduce(t, prod, dim)`
Reduce the tensor with the `product` aggregator along dimension `dim`. If the dimension argument is omitted, this reduces over all dimensions. | -| **random(n1, n2, ...)** | `tensor(i1[n1],i2[n2],...)(random(1.0))`
Returns a tensor with random values between 0.0 and 1.0, uniform distribution. | -| **range(n)** | `tensor(i[n])(i)`
Returns a tensor with increasing values. | -| **relu(t)** | `map(t, f(x)(max(0,x)))`
Rectified linear unit. | -| **sigmoid(t)** | `map(t, f(x)(1.0 / (1.0 + exp(0.0-x))))`
Returns the sigmoid of each element. | -| **softmax(t, dim)** | `join(map(t, f(x)(exp(x))), reduce(map(t, f(x)(exp(x))), sum, dim), f(x,y)(x / y))`
The softmax of the tensor, e.g. `e^x / sum(e^x)`. | -| **sum(t, dim)** | `reduce(t, sum, dim)`
Reduce the tensor with the `summation` aggregator along dimension `dim`. If the dimension argument is omitted, this reduces over all dimensions. | -| **top(n, t)** | `t * filter_subspaces(cell_order(t, max) < n, f(s)(s))`
top N function: Picks top N cells in a simple mapped tensor. | -| **unpack_bits(t)** | unpacks bits from int8 input to 8 times as many floats The innermost indexed dimension will expand to have 8 times as many cells, each with a float value of either 0.0 or 1.0 determined by one bit in the 8-bit input value. Comparable to `numpy.unpackbits` which gives the same basic functionality. A minimal input such as `tensor(x[1]):[9]` would give output `tensor(x[8]):[0,0,0,0,1,0,0,1]` (default bit-order is big-endian). As a very complex example, an input with type `tensor(foo{},x[3],y[11],z{})` will produce output with type `tensor(foo{},x[3],y[88],z{})` where "foo", "x" and "z" are unchanged, as "y" is the innermost indexed dimension. | -| **unpack_bits(t, cell_type)** | unpacks bits from int8 input to 8 times as many values
Same as above, but with optionally different cell\_type (could be `double` for example, if you will combine the output with other tensors using double). | -| unpack\_bits(t, cell\_type, endian) | unpacks bits from int8 input to 8 times as many values
Same as above, but also optionally different endian for the bits; must be either `big` (default) or `little`. | -| xw\_plus\_b(x, w, b, dim) | `join(reduce(join(x, w, f(x,y)(x * y)), sum, dim), b, f(x,y)(x+y))`
Matrix multiplication of `x` (usually a vector) and `w` (weights), with `b` added (bias). A typical operation for activations in a neural network layer, e.g. `sigmoid(xw_plus_b(x,w,b)))`. | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionDescription
**argmax(t, dim)**{`join(t, reduce(t, max, dim), f(x,y)(if (x == y, 1, 0)))`}
Returns a tensor with cell(s) of the highest value(s) in the tensor set to 1. The dimension argument follows the same format as reduce as multiple dimensions can be given and is optional.
**argmin(t, dim)**{`join(t, reduce(t, min, dim), f(x,y)(if (x == y, 1, 0)))`}
Returns a tensor with cell(s) of the lowest value(s) in the tensor set to 1. The dimension argument follows the same format as reduce as multiple dimensions can be given and is optional.
**avg(t, dim)**{`reduce(t, avg, dim)`}
Reduce the tensor with the {`average`} aggregator along dimension {`dim`}. If the dimension argument is omitted, this reduces over all dimensions.
**count(t, dim)**{`reduce(t, count, dim)`}
Reduce the tensor with the {`count`} aggregator along dimension {`dim`}. If the dimension argument is omitted, this reduces over all dimensions.
**cosine_similarity(t1, t2, dim)**{`reduce(t1*t2, sum, dim) / sqrt(reduce(t1*t1, sum, dim) * reduce(t2*t2, sum, dim))`}
The cosine similarity between the two vectors in the given dimension.
**diag(n1, n2)**{`tensor(i[n1],j[n2])(if (i==j, 1.0, 0.0)))`}
Returns a tensor with the diagonal set to 1.0.
**elu(t)**{`map(t, f(x)(if(x < 0, exp(x)-1, x)))`}
Exponential linear unit.
**euclidean_distance(t1, t2, dim)**{`join(reduce(map(join(t1, t2, f(x,y)(x-y)), f(x)(x * x)), sum, dim), f(x)(sqrt(x)))`}
euclidean_distance: {`sqrt(sum((t1-t2)^2, dim))`}.
**expand(t, dim)**{`t * tensor(dim[1])(1)`}
Adds an indexed dimension with name {`dim`} to the tensor {`t`}.
**hamming(t1, t2)**{`join(t1, t2, f(x,y)(hamming(x,y)))`}
Join and return the Hamming distance between matching cells of {`t1`} and {`t2`}. This function is mostly useful when the input contains vectors with binary data and summing the hamming distance over the vector dimension, e.g.:
| type of input *t1* → | {`tensor(dimone{},z[32])`}
| type of input *t2* → | {`tensor(dimtwo{},z[32])`}
| expression → {`reduce(join(t1, t2, f(a,b)(hamming(a,b)), sum, z)`} | | output type → {`tensor(dimone{},dimtwo{})`} |
Note that the cell values are always treated as if they were both 8-bit integers in the range [-128,127], and only then counting the number of bits that are different. See also the corresponding distance metric. Arguments can be scalars.
**l1_normalize(t, dim)**{`join(t, reduce(t, sum, dim), f(x,y) (x / y))`}
L1 normalization: {`t / sum(t, dim)`}.
**l2_normalize(t, dim)**{`join(t, map(reduce(map(t, f(x)(x * x)), sum, dim), f(x)(sqrt(x))), f(x,y)(x / y))`}
L2 normalization: {`t / sqrt(sum(t^2, dim)`}.
**matmul(t1, t2, dim)**{`reduce(join(t1, t2, f(x,y)(x * y)), sum, dim)`}
Matrix multiplication of two tensors. This is the product of the two tensors summed along a shared dimension.
**max(t, dim)**{`reduce(t, max, dim)`}
Reduce the tensor with the {`max`} aggregator along dimension {`dim`}.
**median(t, dim)**{`reduce(t, median, dim)`}
Reduce the tensor with the {`median`} aggregator along dimension {`dim`}. If the dimension argument is omitted, this reduces over all dimensions.
**min(t, dim)**{`reduce(t, min, dim)`}
Reduce the tensor with the {`min`} aggregator along dimension {`dim`}.
**prod(t, dim)**{`reduce(t, prod, dim)`}
Reduce the tensor with the {`product`} aggregator along dimension {`dim`}. If the dimension argument is omitted, this reduces over all dimensions.
**random(n1, n2, ...)**{`tensor(i1[n1],i2[n2],...)(random(1.0))`}
Returns a tensor with random values between 0.0 and 1.0, uniform distribution.
**range(n)**{`tensor(i[n])(i)`}
Returns a tensor with increasing values.
**relu(t)**{`map(t, f(x)(max(0,x)))`}
Rectified linear unit.
**sigmoid(t)**{`map(t, f(x)(1.0 / (1.0 + exp(0.0-x))))`}
Returns the sigmoid of each element.
**softmax(t, dim)**{`join(map(t, f(x)(exp(x))), reduce(map(t, f(x)(exp(x))), sum, dim), f(x,y)(x / y))`}
The softmax of the tensor, e.g. {`e^x / sum(e^x)`}.
**sum(t, dim)**{`reduce(t, sum, dim)`}
Reduce the tensor with the {`summation`} aggregator along dimension {`dim`}. If the dimension argument is omitted, this reduces over all dimensions.
**top(n, t)**{`t * filter_subspaces(cell_order(t, max) < n, f(s)(s))`}
top N function: Picks top N cells in a simple mapped tensor.
**unpack_bits(t)**unpacks bits from int8 input to 8 times as many floats The innermost indexed dimension will expand to have 8 times as many cells, each with a float value of either 0.0 or 1.0 determined by one bit in the 8-bit input value. Comparable to {`numpy.unpackbits`} which gives the same basic functionality. A minimal input such as {`tensor(x[1]):[9]`} would give output {`tensor(x[8]):[0,0,0,0,1,0,0,1]`} (default bit-order is big-endian). As a very complex example, an input with type {`tensor(foo{},x[3],y[11],z{})`} will produce output with type {`tensor(foo{},x[3],y[88],z{})`} where "foo", "x" and "z" are unchanged, as "y" is the innermost indexed dimension.
**unpack_bits(t, cell_type)**unpacks bits from int8 input to 8 times as many values
Same as above, but with optionally different cell_type (could be {`double`} for example, if you will combine the output with other tensors using double).
unpack_bits(t, cell_type, endian)unpacks bits from int8 input to 8 times as many values
Same as above, but also optionally different endian for the bits; must be either {`big`} (default) or {`little`}.
xw_plus_b(x, w, b, dim){`join(reduce(join(x, w, f(x,y)(x * y)), sum, dim), b, f(x,y)(x+y))`}
Matrix multiplication of {`x`} (usually a vector) and {`w`} (weights), with {`b`} added (bias). A typical operation for activations in a neural network layer, e.g. {`sigmoid(xw_plus_b(x,w,b)))`}.
\ No newline at end of file diff --git a/mintlify-docs/en/reference/ranking/string-segment-match.mdx b/mintlify-docs/en/reference/ranking/string-segment-match.mdx index d13981554b..63f938c8f9 100644 --- a/mintlify-docs/en/reference/ranking/string-segment-match.mdx +++ b/mintlify-docs/en/reference/ranking/string-segment-match.mdx @@ -149,15 +149,64 @@ The metric set contains both low level, un-normalized metrics corresponding dire The algorithm has the following configuration parameters, where the three first are fundamental parameters of the algorithm, and the others are used to normalize or combine certain features. Configure using [rank feature configuration](/en/reference/ranking/rank-feature-configuration): -| Parameter | Default | Description | -| --- | --- | --- | -| `proximityLimit` | 10 | The maximum allowed gap within a segment. | -| `proximityTable` | 1/(2^(i/2)/3) for i in 9..0 followed by 1/2^(i/2) for i in 0..10 | The proximity table deciding the importance of separations of various distances, The table must have size proximityLimit\*2+1, where the first half is for reverse direction distances. The table must only contain values between 0 and 1, where 1 is "perfect" and 0 is "worst". | -| `maxAlternativeSegmentations` | 10000 | The maximum number of _alternative_ segmentations allowed in addition to the first one found. This will prefer to not consider iterations on segments that are far out in the field, and which starts late in the query. | -| `maxOccurrences` | 100 | The number of occurrences the number of occurrences of each word is normalized against. This should be set as the number above which additional occurrences of the term has no real significance. | -| `proximityCompletenessImportance` | 0.9 | A number between 0 and 1 which determines the importance of field completeness in relation to query completeness in the `match` and `completeness` metrics. | -| `relatednessImportance` | 0.9 | The normalized importance of relatedness used in the `match` metric. | -| `earlinessImportance` | 0.05 | The importance of the match occurring early in the query, relative to segmentProximityImportance, occurrenceImportance and proximityCompletenessImportance in the `match` metric. | -| `segmentProximityImportance` | 0.05 | The importance of multiple segments being close to each other, relative to earlinessImportance, occurrenceImportance and proximityCompletenessImportance in the `match` metric. | -| `occurrenceImportance` | 0.05 | The importance of having many occurrences of the query terms, relative to earlinessImportance, segmentProximityImportance and proximityCompletenessImportance in the `match` metric. | -| `fieldCompletenessImportance` | 0.05 | A number between 0 and 1 which determines the importance of field completeness in relation to query completeness in the `match` and `completeness` metrics. | \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDefaultDescription
{`proximityLimit`}10The maximum allowed gap within a segment.
{`proximityTable`}1/(2^(i/2)/3) for i in 9..0 followed by 1/2^(i/2) for i in 0..10The proximity table deciding the importance of separations of various distances, The table must have size proximityLimit*2+1, where the first half is for reverse direction distances. The table must only contain values between 0 and 1, where 1 is "perfect" and 0 is "worst".
{`maxAlternativeSegmentations`}10000The maximum number of _alternative_ segmentations allowed in addition to the first one found. This will prefer to not consider iterations on segments that are far out in the field, and which starts late in the query.
{`maxOccurrences`}100The number of occurrences the number of occurrences of each word is normalized against. This should be set as the number above which additional occurrences of the term has no real significance.
{`proximityCompletenessImportance`}0.9A number between 0 and 1 which determines the importance of field completeness in relation to query completeness in the {`match`} and {`completeness`} metrics.
{`relatednessImportance`}0.9The normalized importance of relatedness used in the {`match`} metric.
{`earlinessImportance`}0.05The importance of the match occurring early in the query, relative to segmentProximityImportance, occurrenceImportance and proximityCompletenessImportance in the {`match`} metric.
{`segmentProximityImportance`}0.05The importance of multiple segments being close to each other, relative to earlinessImportance, occurrenceImportance and proximityCompletenessImportance in the {`match`} metric.
{`occurrenceImportance`}0.05The importance of having many occurrences of the query terms, relative to earlinessImportance, segmentProximityImportance and proximityCompletenessImportance in the {`match`} metric.
{`fieldCompletenessImportance`}0.05A number between 0 and 1 which determines the importance of field completeness in relation to query completeness in the {`match`} and {`completeness`} metrics.
\ No newline at end of file diff --git a/mintlify-docs/en/reference/ranking/tensor.mdx b/mintlify-docs/en/reference/ranking/tensor.mdx index d7c499d07c..a7f4c940cf 100644 --- a/mintlify-docs/en/reference/ranking/tensor.mdx +++ b/mintlify-docs/en/reference/ranking/tensor.mdx @@ -20,12 +20,32 @@ tensor(dimension-1,dimension-2,...,dimension-N) The value-type is one of: -| Type | Description | -| :--- | :--- | -| float | 32-bit IEEE 754 floating point | -| double | 64-bit IEEE 754 floating point | -| int8 | signed 8-bit integer - see [performance considerations](/en/performance/feature-tuning#cell-value-types) | -| bfloat16 | first 16 bits of 32-bit IEEE 754 floating point - see [performance considerations](/en/performance/feature-tuning#cell-value-types) | + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
float32-bit IEEE 754 floating point
double64-bit IEEE 754 floating point
int8signed 8-bit integer - see performance considerations
bfloat16first 16 bits of 32-bit IEEE 754 floating point - see performance considerations
A dimension is specified as follows: diff --git a/mintlify-docs/en/reference/release-notes/vespa7.mdx b/mintlify-docs/en/reference/release-notes/vespa7.mdx index ca0d679589..696ec15782 100644 --- a/mintlify-docs/en/reference/release-notes/vespa7.mdx +++ b/mintlify-docs/en/reference/release-notes/vespa7.mdx @@ -23,15 +23,44 @@ The following sections lists the changes on moving from Vespa 6 to Vespa 7 which The following defaults have changed: -| Change | Configuration required to avoid change on Vespa 7 | -| --- | --- | -| `stemming: shortest` changed to `stemming: best` | Add [stemming: shortest](/en/reference/schemas/schemas#stemming) to the `schema` block of all schemas. | -| Default linguistics component changed from SimpleLinguistics to OpenNlpLinguistics, including language detection using Optimaize turned on by default. | Configure `com.yahoo.language.simple.SimpleLinguistics` as a component in services.xml as described in [linguistics in Vespa](/en/linguistics/linguistics) | -| The default format accepted by the Java HTTP client is changed from XML to [JSON](/en/reference/schemas/document-json-format) | To keep using XML:

• **Java API**: When calling `FeedClientFactory.create(sessionParams, ...)`, pass a `SessionParams` instance which has a `FeedParams` instance which have `dataFormat` set to `FeedParams.DataFormat.XML_UTF8`
• **Command line**: Pass the `--xmloutput` option. | -| Query timeout changed from 5000 ms to 500 ms. | Set the [timeout](/en/reference/api/query#timeout) parameter explicitly in requests or query profiles. | -| [ranking.softtimeout.enable](/en/reference/api/query#ranking.softtimeout.enable) changed to default true | Set to `false` in requests or a query profile. | -| The default access log format is changed to [JSON](/en/operations/access-logging). | To keep the old proprietary format, set accesslog type=vespa in services.xml as described in [the accesslog reference](/en/reference/applications/services/container#accesslog). | -| Default return format in vespa-visit and vespa-get is changed to JSON | To get XML output specify the --xmloutput method | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ChangeConfiguration required to avoid change on Vespa 7
{`stemming: shortest`} changed to {`stemming: best`}Add stemming: shortest to the {`schema`} block of all schemas.
Default linguistics component changed from SimpleLinguistics to OpenNlpLinguistics, including language detection using Optimaize turned on by default.Configure {`com.yahoo.language.simple.SimpleLinguistics`} as a component in services.xml as described in linguistics in Vespa
The default format accepted by the Java HTTP client is changed from XML to JSONTo keep using XML:

• **Java API**: When calling {`FeedClientFactory.create(sessionParams, ...)`}, pass a {`SessionParams`} instance which has a {`FeedParams`} instance which have {`dataFormat`} set to {`FeedParams.DataFormat.XML_UTF8`}
• **Command line**: Pass the {`--xmloutput`} option.
Query timeout changed from 5000 ms to 500 ms.Set the timeout parameter explicitly in requests or query profiles.
ranking.softtimeout.enable changed to default trueSet to {`false`} in requests or a query profile.
The default access log format is changed to JSON.To keep the old proprietary format, set accesslog type=vespa in services.xml as described in the accesslog reference.
Default return format in vespa-visit and vespa-get is changed to JSONTo get XML output specify the --xmloutput method
### JDK version @@ -55,59 +84,155 @@ If you need any of these dependencies, they must be embedded in your bundle by a The following HTTP APIs are removed: -| Name | Replacement | -| --- | --- | -| Legacy HTTP apis for document feeding:
• /feed
• /remove
• /removelocation
• /get
• /visit
• /document | The [/document/v1/](/en/reference/api/document-v1) web service API, or (for high throughput) the vespa-http-client. | + + + + + + + + + + + + + +
NameReplacement
Legacy HTTP apis for document feeding:
• /feed
• /remove
• /removelocation
• /get
• /visit
• /document
The /document/v1/ web service API, or (for high throughput) the vespa-http-client.
### Removed HTTP API parameters The following HTTP API parameters are removed -| Name | Replacement | -| --- | --- | -| The `defidx` parameter in the search API | Use a custom searcher if this functionality is needed. | + + + + + + + + + + + + + +
NameReplacement
The {`defidx`} parameter in the search APIUse a custom searcher if this functionality is needed.
### Removed command line tools The following command line tools are removed: -| Name | Replacement | -| --- | --- | -| Vespa spooler | Custom client using the Java HTTP client | + + + + + + + + + + + + + +
NameReplacement
Vespa spoolerCustom client using the Java HTTP client
### Removed settings from schemas The following settings are removed from [schemas](/en/reference/schemas/schemas): -| Name | Replacement | -| --- | --- | -| header | None. This setting doesn't have any effect | -| body | None. This setting doesn't have any effect | + + + + + + + + + + + + + + + + + +
NameReplacement
headerNone. This setting doesn't have any effect
bodyNone. This setting doesn't have any effect
### Removed constructs from services.xml The following tags and attributes are removed from services.xml: -| Name | Replacement | -| --- | --- | -| ‘rotationScheme’ attribute in `` | None, rotation scheme ‘date’ will always be used | -| `` tag | `` | + + + + + + + + + + + + + + + + + +
NameReplacement
‘rotationScheme’ attribute in {``}None, rotation scheme ‘date’ will always be used
{``} tag{``}
### Removed metrics The following metrics are removed: -| Name | Replacement | -| --- | --- | -| free/used/totalMemoryBytes | mem.heap.free/used/total | -| http.in.bytes | serverBytesReceived | -| http.out.bytes | serverBytesSent | -| http.requests | serverNumRequests | -| http.latency | serverTotalSuccessfulResponseLatency | -| http.out.firstbytetime | serverTimeToFirstByte | -| proc.uptime | serverStartedMillis | -| proton.\* | content.proton.\* (note that metrics might have different structure and names in new namespace) | -| vds.filestor.spi.\* | vds.filestor.alldisks.allthreads.\* | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameReplacement
free/used/totalMemoryBytesmem.heap.free/used/total
http.in.bytesserverBytesReceived
http.out.bytesserverBytesSent
http.requestsserverNumRequests
http.latencyserverTotalSuccessfulResponseLatency
http.out.firstbytetimeserverTimeToFirstByte
proc.uptimeserverStartedMillis
proton.*content.proton.* (note that metrics might have different structure and names in new namespace)
vds.filestor.spi.*vds.filestor.alldisks.allthreads.*
### Empty fields @@ -117,14 +242,40 @@ Fields containing no value will not be included in responses on Vespa 7. Vespa 6 allowed some special characters in raw form in the query component of request URIs. Vespa 7 requires these characters to be properly percent-encoded (RFC 2396). -| Character | Percent-encoding | -| --- | --- | -| `\` | `%5C` | -| `^` | `%5E` | -| `\` | `%60` | -| `{` | `%7B` | -| `\|` | `%7C` | -| `}` | `%7D` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CharacterPercent-encoding
{`\\`}{`%5C`}
{`^`}{`%5E`}
{`\\`}{`%60`}
{`{`}{`%7B`}
{`|`}{`%7C`}
{`}`}{`%7D`}
### Changes to the default JSON result format @@ -148,83 +299,316 @@ but is now instead rendered as a JSON map: The following metrics are renamed: -| Old Name | New Name | -| --- | --- | -| 95p\_query\_latency | query\_latency.95percentile | -| 99p\_query\_latency | query\_latency.99percentile | -| active\_queries | active\_queries.average | -| athenz-tenant-cert.expiry.seconds | athenz-tenant-cert.expiry.seconds.last | -| bytes | vds.datastored.alldisks.bytes.average | -| configserver.cacheChecksumElems | configserver.cacheChecksumElems.last | -| configserver.cacheConfigElems | configserver.cacheConfigElems.last | -| configserver.delayedResponses | configserver.delayedResponses.count | -| configserver.failedRequests | configserver.failedRequests.count | -| configserver.hosts | configserver.hosts.last | -| configserver.latency | configserver.latency.average | -| configserver.requests | configserver.requests.count | -| configserver.sessionChangeErrors | configserver.sessionChangeErrors.count | -| configserver.zkAvgLatency | configserver.zkAvgLatency.last | -| configserver.zkConnections | configserver.zkConnections.last | -| configserver.zkMaxLatency | configserver.zkMaxLatency.last | -| configserver.zkOutstandingRequests | configserver.zkOutstandingRequests.last | -| configserver.zkZNodes | configserver.zkZNodes.last | -| content.cluster-controller.cluster-state-change.count | cluster-controller.cluster-state-change.count | -| content.proton.memoryusage.max | content.proton.documentdb.memory\_usage.allocated\_bytes.max | -| content.proton.transport.docsum.latency.average | content.proton.docsum.latency.average | -| degraded\_queries | degraded\_queries.rate | -| deletefailed | vds.idealstate.delete\_bucket.done\_failed.rate | -| deleteok | vds.idealstate.delete\_bucket.done\_ok.rate | -| deletepending | vds.idealstate.delete\_bucket.pending.average | -| diskqueuesize | vds.filestor.alldisks.queuesize.average | -| diskqueuewait | vds.filestor.alldisks.averagequeuewait.sum.average | -| diskusage | content.proton.documentdb.disk\_usage.last | -| docs | vds.datastored.alldisks.docs.average | -| document\_requests | content.proton.docsum.docs.rate | -| documents\_active | content.proton.documentdb.documents.active.last | -| documents\_inmemory | content.proton.documentdb.index.docs\_in\_memory.last | -| documents\_processed | documents\_processed.rate | -| documents\_ready | content.proton.documentdb.documents.ready.last | -| documents\_removed | content.proton.documentdb.documents.removed.last | -| documents\_total | content.proton.documentdb.documents.total.last | -| empty\_results | empty\_results.rate | -| error.backend\_communication\_error | error.backend\_communication\_error.rate | -| error.backends\_oos | error.backends\_oos.rate | -| error.empty\_document\_summaries | error.empty\_document\_summaries.rate | -| error.internal\_server\_error | error.internal\_server\_error.rate | -| error.invalid\_query\_parameter | error.invalid\_query\_parameter.rate | -| error.invalid\_query\_transformation | error.invalid\_query\_transformation.rate | -| error.misconfigured\_server | error.misconfigured\_server.rate | -| error.plugin\_failure | error.plugin\_failure.rate | -| error.result\_with\_errors | error.result\_with\_errors.rate | -| error.timeout | error.timeout.rate | -| error.unhandled\_exception | error.unhandled\_exception.rate | -| error.unspecified | error.unspecified.rate | -| failed\_queries | failed\_queries.rate | -| handled.requests | handled.requests.count | -| hits\_per\_query | hits\_per\_query.average | -| joinfailed | vds.idealstate.join\_bucket.done\_failed.rate | -| joinok | vds.idealstate.join\_bucket.done\_ok.rate | -| joinpending | vds.idealstate.join\_bucket.pending.average | -| logd.processed.lines | logd.processed.lines.count | -| max\_query\_latency | query\_latency.max | -| mean\_query\_latency | query\_latency.average | -| mergefailed | vds.idealstate.merge\_bucket.done\_failed.rate | -| mergeok | vds.idealstate.merge\_bucket.done\_ok.rate | -| mergepending | vds.idealstate.merge\_bucket.pending.average | -| peak\_qps | peak\_qps.max | -| queries | queries.rate | -| query\_latency | content.proton.transport.query.latency.average | -| query\_requests | content.proton.transport.query.count.rate | -| search\_connections | search\_connections.average | -| sentinel.uptime | sentinel.uptime.last | -| slobrok.heartbeats.failed | slobrok.heartbeats.failed.count | -| splitfailed | vds.idealstate.split\_bucket.done\_failed.rate | -| splitok | vds.idealstate.split\_bucket.done\_ok.rate | -| splitpending | vds.idealstate.split\_bucket.pending.average | -| totalhits\_per\_query | totalhits\_per\_query.average | -| visit | vds.visitor.allthreads.created.sum.rate | -| visitorlifetime | vds.visitor.allthreads.averagevisitorlifetime.sum.average | -| visitorqueuewait | vds.visitor.allthreads.averagequeuewait.sum.average | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Old NameNew Name
95p_query_latencyquery_latency.95percentile
99p_query_latencyquery_latency.99percentile
active_queriesactive_queries.average
athenz-tenant-cert.expiry.secondsathenz-tenant-cert.expiry.seconds.last
bytesvds.datastored.alldisks.bytes.average
configserver.cacheChecksumElemsconfigserver.cacheChecksumElems.last
configserver.cacheConfigElemsconfigserver.cacheConfigElems.last
configserver.delayedResponsesconfigserver.delayedResponses.count
configserver.failedRequestsconfigserver.failedRequests.count
configserver.hostsconfigserver.hosts.last
configserver.latencyconfigserver.latency.average
configserver.requestsconfigserver.requests.count
configserver.sessionChangeErrorsconfigserver.sessionChangeErrors.count
configserver.zkAvgLatencyconfigserver.zkAvgLatency.last
configserver.zkConnectionsconfigserver.zkConnections.last
configserver.zkMaxLatencyconfigserver.zkMaxLatency.last
configserver.zkOutstandingRequestsconfigserver.zkOutstandingRequests.last
configserver.zkZNodesconfigserver.zkZNodes.last
content.cluster-controller.cluster-state-change.countcluster-controller.cluster-state-change.count
content.proton.memoryusage.maxcontent.proton.documentdb.memory_usage.allocated_bytes.max
content.proton.transport.docsum.latency.averagecontent.proton.docsum.latency.average
degraded_queriesdegraded_queries.rate
deletefailedvds.idealstate.delete_bucket.done_failed.rate
deleteokvds.idealstate.delete_bucket.done_ok.rate
deletependingvds.idealstate.delete_bucket.pending.average
diskqueuesizevds.filestor.alldisks.queuesize.average
diskqueuewaitvds.filestor.alldisks.averagequeuewait.sum.average
diskusagecontent.proton.documentdb.disk_usage.last
docsvds.datastored.alldisks.docs.average
document_requestscontent.proton.docsum.docs.rate
documents_activecontent.proton.documentdb.documents.active.last
documents_inmemorycontent.proton.documentdb.index.docs_in_memory.last
documents_processeddocuments_processed.rate
documents_readycontent.proton.documentdb.documents.ready.last
documents_removedcontent.proton.documentdb.documents.removed.last
documents_totalcontent.proton.documentdb.documents.total.last
empty_resultsempty_results.rate
error.backend_communication_errorerror.backend_communication_error.rate
error.backends_ooserror.backends_oos.rate
error.empty_document_summarieserror.empty_document_summaries.rate
error.internal_server_errorerror.internal_server_error.rate
error.invalid_query_parametererror.invalid_query_parameter.rate
error.invalid_query_transformationerror.invalid_query_transformation.rate
error.misconfigured_servererror.misconfigured_server.rate
error.plugin_failureerror.plugin_failure.rate
error.result_with_errorserror.result_with_errors.rate
error.timeouterror.timeout.rate
error.unhandled_exceptionerror.unhandled_exception.rate
error.unspecifiederror.unspecified.rate
failed_queriesfailed_queries.rate
handled.requestshandled.requests.count
hits_per_queryhits_per_query.average
joinfailedvds.idealstate.join_bucket.done_failed.rate
joinokvds.idealstate.join_bucket.done_ok.rate
joinpendingvds.idealstate.join_bucket.pending.average
logd.processed.lineslogd.processed.lines.count
max_query_latencyquery_latency.max
mean_query_latencyquery_latency.average
mergefailedvds.idealstate.merge_bucket.done_failed.rate
mergeokvds.idealstate.merge_bucket.done_ok.rate
mergependingvds.idealstate.merge_bucket.pending.average
peak_qpspeak_qps.max
queriesqueries.rate
query_latencycontent.proton.transport.query.latency.average
query_requestscontent.proton.transport.query.count.rate
search_connectionssearch_connections.average
sentinel.uptimesentinel.uptime.last
slobrok.heartbeats.failedslobrok.heartbeats.failed.count
splitfailedvds.idealstate.split_bucket.done_failed.rate
splitokvds.idealstate.split_bucket.done_ok.rate
splitpendingvds.idealstate.split_bucket.pending.average
totalhits_per_querytotalhits_per_query.average
visitvds.visitor.allthreads.created.sum.rate
visitorlifetimevds.visitor.allthreads.averagevisitorlifetime.sum.average
visitorqueuewaitvds.visitor.allthreads.averagequeuewait.sum.average
### Other changes diff --git a/mintlify-docs/en/reference/release-notes/vespa8.mdx b/mintlify-docs/en/reference/release-notes/vespa8.mdx index 94a576f2ec..88b44d78bc 100644 --- a/mintlify-docs/en/reference/release-notes/vespa8.mdx +++ b/mintlify-docs/en/reference/release-notes/vespa8.mdx @@ -39,19 +39,60 @@ These changes may break clients, and impact both performance and user experience The following defaults have changed: -| Change | Configuration required to avoid change on Vespa 8 | -| --- | --- | -| The default [simple query language](/en/reference/querying/simple-query-language) (for end users) is changed from `all` to [weakAnd](/en/ranking/wand#weakand).
**Note:**

This might increase recall, and increase latency significantly if document corpus is large.
| Explicitly pass [model.type](/en/reference/api/query#model.type)\=all in queries or set this parameter in the relevant [query profiles](/en/querying/query-profiles): `all`. | -| The default grammar in [YQL userInput](/en/reference/querying/yql#userinput) is changed from `all` to [weakAnd](/en/ranking/wand#weakand).
**Note:**

This might increase recall, and increase latency significantly if document corpus is large.
| Prefix `userInput` in YQL by `{grammar: "all"}`. | -| The value of the services.xml [legacy flag v7-geo-positions](/en/reference/querying/default-result-format#geo-position-rendering) changes from true to false. See the [Vespa 8 geo migration guide](/en/reference/release-notes/vespa8-geo-migration-guide). | Add to services.xml: ` true ` | -| Fields of type `map` [changes JSON rendering](/en/reference/querying/default-result-format#inconsistent-map-rendering) in search results. | Add overrides in your query profile(s) for the `renderer.json.jsonMaps` parameter. | -| Fields of type `weightedset` [changes JSON rendering](/en/reference/querying/default-result-format#inconsistent-weightedset-renderingg) in search results. | Add overrides in your query profile(s) for the `renderer.json.jsonWsets` parameter. | -| Expressions used as summary features, are no longer rendered wrapped in `rankingExpression()`. | Specify configuration in your rank profile as shown in [this example](/en/reference/querying/default-result-format#summary-features-wrapped-in-rankingexpression). | -| Fields of type `raw` are now presented as a base64 encoded string in summary, the same way as in json feed format. Earlier, you needed to add `raw-as-base64-in-summary` in your schema file to get this behavior. | If you have fields of type "raw" and you must have the old summary behavior for them in search results, add the line `raw-as-base64-in-summary : false` in your schema definition. | -| The default tensor format in responses has changed from 'long' to 'short': Tensors in query results, document API responses, and stateless model evaluation are rendered in the short form appropriate for their type (if any), documented [here](/en/reference/schemas/document-json-format#tensor). | **Queries**: Pass [presentation.format.tensors](/en/reference/api/query#presentation.format.tensors)\=long in queries, or set it parameter in the relevant [query profiles](/en/querying/query-profiles).

**Document/v1**: Pass the parameter `format.tensors=long` in requests.

**Stateless model evaluation**: Pass the parameter `format.tensors=long` in requests. | -| The default fieldset when getting or visiting documents is now `[document]` in all cases, meaning you only get those fields that are declared in the "document" block of the schema (generated fields are not included). This was already the default for the `/document/v1` API when fetching or visiting documents of a single known document type. Now it is also the default when visiting at the root level, for the command line tools `vespa-visit` and `vespa-get`, and if you use the programmatic `documentapi` from java to fetch documents. | In most cases there is no difference between `[all]` and `[document]` fieldsets - so no action is needed. If the old behavior is needed you can:

• For the command line tools, specify the fieldset as `-l "[all]"` to include generated fields.
• For `/document/v1` specify `[all]` as the value for the `fieldSet` parameter.
• If using `documentapi` from java, add the line `params.setFieldSet("[all]");` to modify your `VisitorParameters` value , or `params = params.withFieldSet("[all]");` to modify your `DocumentOperationParameters` value.

If you run document processors to generate fields and want those returned, it may be more useful to declare a fieldset with just those fields you actually want as output instead. | -| Vespa will now limit the number of groups and hits in [grouping query results](/en/querying/grouping) when `max` is not specified explicitly in grouping expressions. The default value is determined by [grouping.defaultMaxGroups](/en/reference/api/query#grouping.defaultmaxgroups)/ [grouping.defaultMaxHits](/en/reference/api/query#grouping.defaultmaxhits). The parameter [grouping.globalMaxGroups](/en/reference/api/query#grouping.globalmaxgroups) must now be overridden in query profiles to allow grouping expressions that may return unbounded or large results. | • [grouping.defaultMaxGroups](/en/reference/api/query#grouping.defaultmaxgroups) changed from `-1` to `10`.
• [grouping.defaultMaxHits](/en/reference/api/query#grouping.defaultmaxhits) changed from `-1` to `10`.
• [grouping.globalMaxGroups](/en/reference/api/query#grouping.globalmaxgroups) changed from `-1` to `10000`.
• [grouping.defaultPrecisionFactor](/en/reference/api/query#grouping.defaultprecisionfactor) changed from `1.0` to `2.0`. | -| Vespa [access logs](/en/operations/access-logging) are compressed with [zstd](https://github.com/facebook/zstd). | Add a config override under `` in `services.xml`:

``
``
`GZIP` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ChangeConfiguration required to avoid change on Vespa 8
The default simple query language (for end users) is changed from {`all`} to weakAnd.
**Note:**

This might increase recall, and increase latency significantly if document corpus is large.
Explicitly pass model.type=all in queries or set this parameter in the relevant query profiles: {`all`}.
The default grammar in YQL userInput is changed from {`all`} to weakAnd.
**Note:**

This might increase recall, and increase latency significantly if document corpus is large.
Prefix {`userInput`} in YQL by {`{grammar: "all"}`}.
The value of the services.xml legacy flag v7-geo-positions changes from true to false. See the Vespa 8 geo migration guide.Add to services.xml: {` true `}
Fields of type {`map`} changes JSON rendering in search results.Add overrides in your query profile(s) for the {`renderer.json.jsonMaps`} parameter.
Fields of type {`weightedset`} changes JSON rendering in search results.Add overrides in your query profile(s) for the {`renderer.json.jsonWsets`} parameter.
Expressions used as summary features, are no longer rendered wrapped in {`rankingExpression()`}.Specify configuration in your rank profile as shown in this example.
Fields of type {`raw`} are now presented as a base64 encoded string in summary, the same way as in json feed format. Earlier, you needed to add {`raw-as-base64-in-summary`} in your schema file to get this behavior.If you have fields of type "raw" and you must have the old summary behavior for them in search results, add the line {`raw-as-base64-in-summary : false`} in your schema definition.
The default tensor format in responses has changed from 'long' to 'short': Tensors in query results, document API responses, and stateless model evaluation are rendered in the short form appropriate for their type (if any), documented here.**Queries**: Pass presentation.format.tensors=long in queries, or set it parameter in the relevant query profiles.

**Document/v1**: Pass the parameter {`format.tensors=long`} in requests.

**Stateless model evaluation**: Pass the parameter {`format.tensors=long`} in requests.
The default fieldset when getting or visiting documents is now {`[document]`} in all cases, meaning you only get those fields that are declared in the "document" block of the schema (generated fields are not included). This was already the default for the {`/document/v1`} API when fetching or visiting documents of a single known document type. Now it is also the default when visiting at the root level, for the command line tools {`vespa-visit`} and {`vespa-get`}, and if you use the programmatic {`documentapi`} from java to fetch documents.In most cases there is no difference between {`[all]`} and {`[document]`} fieldsets - so no action is needed. If the old behavior is needed you can:

• For the command line tools, specify the fieldset as {`-l "[all]"`} to include generated fields.
• For {`/document/v1`} specify {`[all]`} as the value for the {`fieldSet`} parameter.
• If using {`documentapi`} from java, add the line {`params.setFieldSet("[all]");`} to modify your {`VisitorParameters`} value , or {`params = params.withFieldSet("[all]");`} to modify your {`DocumentOperationParameters`} value.

If you run document processors to generate fields and want those returned, it may be more useful to declare a fieldset with just those fields you actually want as output instead.
Vespa will now limit the number of groups and hits in grouping query results when {`max`} is not specified explicitly in grouping expressions. The default value is determined by grouping.defaultMaxGroups/ grouping.defaultMaxHits. The parameter grouping.globalMaxGroups must now be overridden in query profiles to allow grouping expressions that may return unbounded or large results.grouping.defaultMaxGroups changed from {`-1`} to {`10`}.
grouping.defaultMaxHits changed from {`-1`} to {`10`}.
grouping.globalMaxGroups changed from {`-1`} to {`10000`}.
grouping.defaultPrecisionFactor changed from {`1.0`} to {`2.0`}.
Vespa access logs are compressed with zstd.Add a config override under {``} in {`services.xml`}:

{``}
{``}
{`GZIP`}
## Application package changes @@ -59,23 +100,76 @@ The following defaults have changed: The following settings are removed from [schema](/en/reference/schemas/schemas): -| Name | Replacement | -| --- | --- | -| attribute: huge | None. Setting *huge* on an attribute doesn't have any effect, the code is rewritten to support it by default. | -| [compression](/en/reference/schemas/schemas#compression) | None. Document compression is not needed, as compression is always enabled. | -| body (inside a field definition) | None. Deprecated since before Vespa 7, had no effect in Vespa 7. | -| header (inside a field definition) | None. Deprecated since before Vespa 7, had no effect in Vespa 7. | -| field type weightedset`` | Because floating-point types are inherently imprecise they are badly suited as keys in maps and sets. If you feel the need for such data consider using something like:

`struct weightedfloat {`
`field value type float {}`
`field weight type int {}`
`}`
`field myfield type array {`
`...` | -| field type map`` | Using "float" as the key in a map is no longer supported, see `weightedset` above. | -| field type weightedset`` | Using "double" as the key in a set is no longer supported, see `weightedset` above. | -| field type map`` | Using "double" as the key in a map is no longer supported, see `weightedset` above. | -| field type weightedset`` | Using complex types as the key in a set is no longer supported, see `weightedset` above. | -| field type map`` | Using complex types as the key in a map is no longer supported, see `weightedset` above. | -| Old syntax for array types like "string\[\]" | Write as `array` instead. | -| Rank functions must have different names in a rank-profile | Only the last of two functions with the same name would be used. Remove or rename the first one. | -| Conflicting sorting settings are now rejected | Only keep the last of the conflicting settings. | -| A summary-field may only be added once in a document-summary block | Remove duplicates. | -| Schema and document should have the same name | Change name of the schema, so it is equal to the contained document. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameReplacement
attribute: hugeNone. Setting *huge* on an attribute doesn't have any effect, the code is rewritten to support it by default.
compressionNone. Document compression is not needed, as compression is always enabled.
body (inside a field definition)None. Deprecated since before Vespa 7, had no effect in Vespa 7.
header (inside a field definition)None. Deprecated since before Vespa 7, had no effect in Vespa 7.
field type weightedset{``}Because floating-point types are inherently imprecise they are badly suited as keys in maps and sets. If you feel the need for such data consider using something like:

{`struct weightedfloat {`}
{`field value type float {}`}
{`field weight type int {}`}
{`}`}
{`field myfield type array {`}
{`...`}
field type map{``}Using "float" as the key in a map is no longer supported, see {`weightedset`} above.
field type weightedset{``}Using "double" as the key in a set is no longer supported, see {`weightedset`} above.
field type map{``}Using "double" as the key in a map is no longer supported, see {`weightedset`} above.
field type weightedset{``}Using complex types as the key in a set is no longer supported, see {`weightedset`} above.
field type map{``}Using complex types as the key in a map is no longer supported, see {`weightedset`} above.
Old syntax for array types like "string[]"Write as {`array`} instead.
Rank functions must have different names in a rank-profileOnly the last of two functions with the same name would be used. Remove or rename the first one.
Conflicting sorting settings are now rejectedOnly keep the last of the conflicting settings.
A summary-field may only be added once in a document-summary blockRemove duplicates.
Schema and document should have the same nameChange name of the schema, so it is equal to the contained document.
### TensorFlow import @@ -85,32 +179,116 @@ Vespa 8 removes support for direct import of [TensorFlow models](/en/ranking/ten The following elements and attributes in services.xml have new semantics: -| Name | Description | -| --- | --- | -| `` | It is now an error to configure a number of nodes (per group) that is smaller than the configured redundancy. It used to generate an application-level warning, with the redundancy implicitly reduced. Remove any `` override in the non-prod environments, as the node count is automatically adjusted. | + + + + + + + + + + + + + +
NameDescription
{``}It is now an error to configure a number of nodes (per group) that is smaller than the configured redundancy. It used to generate an application-level warning, with the redundancy implicitly reduced. Remove any {``} override in the non-prod environments, as the node count is automatically adjusted.
### Removed constructs from services.xml The following elements and attributes are removed from services.xml: -| Parent element | Removed construct | Description | -|---|---|---| -| `` | `` | Configuring up/download rates is not supported | -| | `` | Use [`configservers`](/en/reference/applications/services/admin#configservers) element instead | -| `` | *namespace* attribute | The namespace must be included in the *name* attribute. | -| | `` syntax | Previously used to append items to config arrays. Use [`item`](/en/reference/applications/config-files#configuring-arrays) instead. | -| `` | *jetty* attribute | Removed, had no effect on Vespa 7. | -| | `` jvm attributes | JVM attributes *jvmargs, allocated-memory, jvm-options, jvm-gc-options* renamed and moved to [`JVM`](/en/reference/applications/services/container#jvm) subelement | -| | `` | Previously used for setting up client providers. Use a [`request handler`](/en/applications/request-handlers) instead. | -| | `` | Client bindings are no longer supported. | -| `` | `` | Removed due to removal of *vespa-dispatch-bin*, [details.](#vespa-dispatch-bin-process-is-removed) | -| | `` | Use [`min-active-docs-coverage`](/en/reference/applications/services/content#min-active-docs-coverage) instead. | -| | `` | Ignored, the local node will automatically be preferred when appropriate. | -| | `` | Use [`maxsize`](/en/reference/applications/services/content#flushstrategy-native-transactionlog-maxsize) instead. Vespa 7 documentation: The maximum number of entries in the [`transaction log`](/en/content/proton#transaction-log) for a document type before running flush, default 1000000 (1 M). | -| | `` | Use [`maxsize`](/en/reference/applications/services/content#summary-store-logstore-chunk-maxsize) instead. Vespa 7 documentation: Maximum number of documents in a chunk. See *summary.log.chunk.maxentries*. | -| `` (root) | `` | Use [`container`](/en/reference/applications/services/container) instead. | -| | `` | Running generic services is no longer supported. | -| | `` | Client load types are deprecated and ignored. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parent elementRemoved constructDescription
{``}{``}Configuring up/download rates is not supported
{``}Use {`configservers`} element instead
{``}*namespace* attributeThe namespace must be included in the *name* attribute.
{``} syntaxPreviously used to append items to config arrays. Use {`item`} instead.
{``}*jetty* attributeRemoved, had no effect on Vespa 7.
{``} jvm attributesJVM attributes *jvmargs, allocated-memory, jvm-options, jvm-gc-options* renamed and moved to {`JVM`} subelement
{``}Previously used for setting up client providers. Use a {`request handler`} instead.
{``}Client bindings are no longer supported.
{``}{``}Removed due to removal of *vespa-dispatch-bin*, details.
{``}Use {`min-active-docs-coverage`} instead.
{``}Ignored, the local node will automatically be preferred when appropriate.
{``}Use {`maxsize`} instead. Vespa 7 documentation: The maximum number of entries in the {`transaction log`} for a document type before running flush, default 1000000 (1 M).
{``}Use {`maxsize`} instead. Vespa 7 documentation: Maximum number of documents in a chunk. See *summary.log.chunk.maxentries*.
{``} (root){``}Use {`container`} instead.
{``}Running generic services is no longer supported.
{``}Client load types are deprecated and ignored.
### *application/* folder support removed @@ -126,14 +304,40 @@ Search definition schemas should now be placed in the *schemas/* folder. The old ### Removed Java packages -| Package | Description | -| --- | --- | -| *com.yahoo.docproc.util* | Removed | -| *com.yahoo.jdisc.test* | No longer [public API](https://javadoc.io/doc/com.yahoo.vespa/annotations/latest/com/yahoo/api/annotations/PublicApi.html) | -| *com.yahoo.log.event* | No longer [public API](https://javadoc.io/doc/com.yahoo.vespa/annotations/latest/com/yahoo/api/annotations/PublicApi.html) | -| *com.yahoo.statistics* | Removed | -| *com.yahoo.vespa.curator* | No longer [public API](https://javadoc.io/doc/com.yahoo.vespa/annotations/latest/com/yahoo/api/annotations/PublicApi.html) | -| *com.yahoo.documentapi.messagebus.loadtypes* | Load types are no longer supported. Use corresponding method overloads without *LoadType* or *LoadTypeSet* parameters instead. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackageDescription
*com.yahoo.docproc.util*Removed
*com.yahoo.jdisc.test*No longer public API
*com.yahoo.log.event*No longer public API
*com.yahoo.statistics*Removed
*com.yahoo.vespa.curator*No longer public API
*com.yahoo.documentapi.messagebus.loadtypes*Load types are no longer supported. Use corresponding method overloads without *LoadType* or *LoadTypeSet* parameters instead.
### Removed Java Classes and methods @@ -141,38 +345,125 @@ Classes and methods that were marked as deprecated in Vespa 7 are removed. If de The following classes are no longer public API and have been moved to Vespa internal packages: -| Package | Class | Migration advice | -|---|---|---| -| *com.yahoo.config.subscription* | All classes, except [`ConfigGetter`](https://javadoc.io/doc/com.yahoo.vespa/config/latest/com/yahoo/config/subscription/ConfigGetter.html) | Config should be [`injected`](/en/applications/configuring-components#use-config-in-code) to your component class constructor. | -| *com.yahoo.docproc* | *DocprocExecutor* | For unit tests, follow the steps in the [`document-processing`](https://github.com/vespa-engine/sample-apps/blob/master/examples/document-processing/src/test/java/ai/vespa/example/album/ProductTypeRefinerDocProcTest.java) sample app. If you need a *DocumentTypeManager* in production code, it can be directly [`injected`](/en/applications/dependency-injection) to your component class constructor. | -| | *DocprocService* | For unit tests, follow the steps in the [`document-processing`](https://github.com/vespa-engine/sample-apps/blob/master/examples/document-processing/src/test/java/ai/vespa/example/album/ProductTypeRefinerDocProcTest.java) sample app. If you need a *DocumentTypeManager* in production code, it can be directly [`injected`](/en/applications/dependency-injection) to your component class constructor. | -| | *DocumentOperationWrapper* | No replacement - if needed, contact the Vespa team for advice. | -| | *HandledProcessingException* | | -| | *ProcessingEndpoint* | | -| | *TransientFailureException* | | -| *com.yahoo.log* | *VespaFormatter* | No replacement. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackageClassMigration advice
*com.yahoo.config.subscription*All classes, except {`ConfigGetter`}Config should be {`injected`} to your component class constructor.
*com.yahoo.docproc**DocprocExecutor*For unit tests, follow the steps in the {`document-processing`} sample app. If you need a *DocumentTypeManager* in production code, it can be directly {`injected`} to your component class constructor.
*DocprocService*For unit tests, follow the steps in the {`document-processing`} sample app. If you need a *DocumentTypeManager* in production code, it can be directly {`injected`} to your component class constructor.
*DocumentOperationWrapper*No replacement - if needed, contact the Vespa team for advice.
*HandledProcessingException*
*ProcessingEndpoint*
*TransientFailureException*
*com.yahoo.log**VespaFormatter*No replacement.
The following methods are removed: -| Method | Migration advice | -| --- | --- | -| *com.yahoo.documentapi.DocumentAccess.createDefault()* | Container components can have a *DocumentAccess* injected via their constructor. For use outside the container, e.g. in a custom command line tool, use the new method *createForNonContainer()*. | -| *com.yahoo.log.LogSetup.getLogHandler()* | No replacement. | + + + + + + + + + + + + + + + + + +
MethodMigration advice
*com.yahoo.documentapi.DocumentAccess.createDefault()*Container components can have a *DocumentAccess* injected via their constructor. For use outside the container, e.g. in a custom command line tool, use the new method *createForNonContainer()*.
*com.yahoo.log.LogSetup.getLogHandler()*No replacement.
### Breaking changes to Java APIs The Javadoc of the deprecated types/members should document the replacement API. The below list is not exhaustive - some smaller and trivial changes are not listed. -| Type(s) | Description | -| --- | --- | -| *com.yahoo.processing* | Removed use of Guava's *ListenableFuture* in type signatures. Replacement uses *CompletableFuture*. | -| *com.yahoo.search.handler.HttpSearchResponse.waitableRender()* | Removed use of Guava's *ListenableFuture* in type signature. The method is replaced with *asyncRender()*. | -| *com.yahoo.jdisc.handler* | Removed use of Guava's *ListenableFuture* in type signatures. Replacement uses *CompletableFuture* | -| *com.yahoo.searchlib.rankingexpression.rule* | Removed use of Guava collection types in type signatures. | -| *com.yahoo.search.rendering.JsonRenderer* | Removed use of Jackson types from class signature. | -| *com.yahoo.jdisc.Container* | Removed use of Guice types from class signature. | -| *com.yahoo.vdslib.VisitorStatistics* | Removed all *set/getSecondPass*\-related methods. | -| *com.yahoo.documentapi* | Removed all methods taking in a *com.yahoo.documentapi.messagebus.DocumentProtocol.Priority* argument. Explicit operation priorities are deprecated and should not be set by the client. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type(s)Description
*com.yahoo.processing*Removed use of Guava's *ListenableFuture* in type signatures. Replacement uses *CompletableFuture*.
*com.yahoo.search.handler.HttpSearchResponse.waitableRender()*Removed use of Guava's *ListenableFuture* in type signature. The method is replaced with *asyncRender()*.
*com.yahoo.jdisc.handler*Removed use of Guava's *ListenableFuture* in type signatures. Replacement uses *CompletableFuture*
*com.yahoo.searchlib.rankingexpression.rule*Removed use of Guava collection types in type signatures.
*com.yahoo.search.rendering.JsonRenderer*Removed use of Jackson types from class signature.
*com.yahoo.jdisc.Container*Removed use of Guice types from class signature.
*com.yahoo.vdslib.VisitorStatistics*Removed all *set/getSecondPass*-related methods.
*com.yahoo.documentapi*Removed all methods taking in a *com.yahoo.documentapi.messagebus.DocumentProtocol.Priority* argument. Explicit operation priorities are deprecated and should not be set by the client.
### Removed support for built-in XML factories @@ -191,10 +482,24 @@ These are now removed. Please check for more recent alternatives if you need thi A few redundant APIs have been deprecated because they have replacements that provide the same, or better, functionality. We advise you switch to the replacement to reduce future maintenance cost. -| Type(s) | Replacement | -| --- | --- | -| *com.yahoo.container.jdisc.LoggingRequestHandler* | Use *com.yahoo.container.jdisc.ThreadedHttpRequestHandler* instead. | -| *com.yahoo.log.LogLevel* | Use *java.util.logging.Level* instead. | + + + + + + + + + + + + + + + + + +
Type(s)Replacement
*com.yahoo.container.jdisc.LoggingRequestHandler*Use *com.yahoo.container.jdisc.ThreadedHttpRequestHandler* instead.
*com.yahoo.log.LogLevel*Use *java.util.logging.Level* instead.
## Container Runtime Environment @@ -208,27 +513,92 @@ Vespa 8 upgrades the JDK version from 11 to 17. To ensure full compatibility, al The following Maven artifacts are no longer provided runtime to user application plugins by the Jdisc container: -| Artifact | Notes | -|---|---| -| [`*com.fasterxml.jackson.jaxrs:jackson-jaxrs-base*`](https://search.maven.org/artifact/com.fasterxml.jackson.jaxrs/jackson-jaxrs-base) | JSON input/output handling for JAX-RS implementations, e.g. Jersey | -| [`*com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider*`](https://search.maven.org/artifact/com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider) | JSON input/output handling for JAX-RS implementations, e.g. Jersey | -| [`*com.fasterxml.jackson.module:jackson-module-jaxb-annotations*`](https://search.maven.org/artifact/com.fasterxml.jackson.module/jackson-module-jaxb-annotations) | Jackson data binding with JAXB annotations. | -| [`*com.google.code.findbugs:jsr305*`](https://search.maven.org/artifact/com.google.code.findbugs/jsr305) | Annotations in package *javax.annotation[.*]*, e.g. *Nullable* and *Nonnnull*. | -| [`*com.google.inject.extensions:guice-assistedinject*`](https://search.maven.org/artifact/com.google.inject.extensions/guice-assistedinject) | Guice extensions.
For component injection see [Depending on another component](/en/applications/dependency-injection#depending-on-another-component) | -| [`*com.google.inject.extensions:guice-multibindings*`](https://search.maven.org/artifact/com.google.inject.extensions/guice-multibindings) | Guice extensions. | -| [`*javax.annotation:javax.annotation-api*`](https://search.maven.org/artifact/javax.annotation/javax.annotation-api) | Annotations in package *javax.annotation[.*]*, e.g. *ManagedBean* and *Resource*. | -| [`*javax.validation:validation-api*`](https://search.maven.org/artifact/javax.validation/validation-api) | Javax bean validation, used by Jersey 2. | -| [`*org.eclipse.jetty:*`](https://search.maven.org/search?q=g:org.eclipse.jetty) | The Eclipse Jetty Project. | -| [`*org.apache.felix:org.apache.felix.framework*`](https://search.maven.org/artifact/org.apache.felix/org.apache.felix.framework) | Felix OSGi framework. | -| *org.apache.felix:org.apache.felix.log* | Felix OSGi framework. | -| [`*org.apache.felix:org.apache.felix.main*`](https://search.maven.org/artifact/org.apache.felix/org.apache.felix.main) | Felix OSGi framework. | -| [`*org.bouncycastle:bcpkix-jdk15on*`](https://search.maven.org/artifact/org.bouncycastle/bcpkix-jdk15on) | Bouncy Castle crypto API. | -| [`*org.bouncycastle:bcprov-jdk15on*`](https://search.maven.org/artifact/org.bouncycastle/bcprov-jdk15on) | Bouncy Castle crypto provider. | -| *org.glassfish.*:* | Jersey 2. All related artifacts are removed. | -| [`*org.json:json*`](https://search.maven.org/artifact/org.json/json) | See [vespa-engine/vespa#14762](https://github.com/vespa-engine/vespa/issues/14762) | -| [`*org.javassist:javassist*`](https://search.maven.org/artifact/org.javassist/javassist) | Bytecode manipulation, used by Jersey 2. | -| [`*org.jvnet.mimepull:mimepull*`](https://search.maven.org/artifact/org.jvnet.mimepull/mimepull) | MIME Streaming Extension, used by Jersey 2. | -| [`*org.lz4:lz4-java*`](https://search.maven.org/artifact/org.lz4/lz4-java) | Compression library. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArtifactNotes
{`*com.fasterxml.jackson.jaxrs:jackson-jaxrs-base*`}JSON input/output handling for JAX-RS implementations, e.g. Jersey
{`*com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider*`}JSON input/output handling for JAX-RS implementations, e.g. Jersey
{`*com.fasterxml.jackson.module:jackson-module-jaxb-annotations*`}Jackson data binding with JAXB annotations.
{`*com.google.code.findbugs:jsr305*`}Annotations in package *javax.annotation[.*]*, e.g. *Nullable* and *Nonnnull*.
{`*com.google.inject.extensions:guice-assistedinject*`}Guice extensions.
For component injection see Depending on another component
{`*com.google.inject.extensions:guice-multibindings*`}Guice extensions.
{`*javax.annotation:javax.annotation-api*`}Annotations in package *javax.annotation[.*]*, e.g. *ManagedBean* and *Resource*.
{`*javax.validation:validation-api*`}Javax bean validation, used by Jersey 2.
{`*org.eclipse.jetty:*`}The Eclipse Jetty Project.
{`*org.apache.felix:org.apache.felix.framework*`}Felix OSGi framework.
*org.apache.felix:org.apache.felix.log*Felix OSGi framework.
{`*org.apache.felix:org.apache.felix.main*`}Felix OSGi framework.
{`*org.bouncycastle:bcpkix-jdk15on*`}Bouncy Castle crypto API.
{`*org.bouncycastle:bcprov-jdk15on*`}Bouncy Castle crypto provider.
*org.glassfish.*:*Jersey 2. All related artifacts are removed.
{`*org.json:json*`}See vespa-engine/vespa#14762
{`*org.javassist:javassist*`}Bytecode manipulation, used by Jersey 2.
{`*org.jvnet.mimepull:mimepull*`}MIME Streaming Extension, used by Jersey 2.
{`*org.lz4:lz4-java*`}Compression library.
Make sure your application OSGi bundle embeds the required artifacts from the above list. An artifact can be embedded by adding it in scope *compile* to the *dependencies* section in pom.xml. Typically, these artifacts have until now been used in scope *provided*. Use `mvn dependency:tree` to check whether any of the listed artifacts are directly or transitively included as dependencies. @@ -253,12 +623,37 @@ An example adding *org.json:json* as a compile scoped dependency: The following HTTP API parameters are removed from the [query API](/en/reference/api/query): -| Standard API path | Parameter name | Replacement | -| --- | --- | --- | -| /search/ | *pos.ll* | add a [geoLocation](/en/reference/querying/yql#geolocation) item to the query | -| /search/ | *pos.radius* | add a [geoLocation](/en/reference/querying/yql#geolocation) item to the query | -| /search/ | *pos.attribute* | add a [geoLocation](/en/reference/querying/yql#geolocation) item to the query | -| /search/ | *pos.bb* | Support for restricting search by a bounding box, using the `pos.bb` query parameter, has been removed - add a [geoLocation](/en/reference/querying/yql#geolocation) item to the query | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Standard API pathParameter nameReplacement
/search/*pos.ll*add a geoLocation item to the query
/search/*pos.radius*add a geoLocation item to the query
/search/*pos.attribute*add a geoLocation item to the query
/search/*pos.bb*Support for restricting search by a bounding box, using the {`pos.bb`} query parameter, has been removed - add a geoLocation item to the query
## Removed command line tools @@ -272,42 +667,150 @@ The underlying rest API used by the vespa-http-client will still be available an The following metrics are renamed: -| Old Name | New name | Description | -| --- | --- | --- | -| *vds.filestor.alldisks.\** | vds.filestor.\* | *alldisks* has been removed from the metric name. | -| *vds.visitor.\*.sum.\** | vds.visitor.\*.\* | *sum* has been removed from the metric name. | -| *vds.filestor.\*.sum.\** | vds.filestor.\*.\* | *sum* has been removed from the metric name. | -| *vds.distributor.\*.sum.\** | vds.distributor.\*.\* | *sum* has been removed from the metric name. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Old NameNew nameDescription
*vds.filestor.alldisks.**vds.filestor.**alldisks* has been removed from the metric name.
*vds.visitor.*.sum.**vds.visitor.*.**sum* has been removed from the metric name.
*vds.filestor.*.sum.**vds.filestor.*.**sum* has been removed from the metric name.
*vds.distributor.*.sum.**vds.distributor.*.**sum* has been removed from the metric name.
The following metrics are removed: -| Name | Description | -| --- | --- | -| *http.status.401.rate* | Use *http.status.4xx.rate* with dimension *statusCode*\==401 | -| *http.status.403.rate* | Use *http.status.4xx.rate* with dimension *statusCode*\==403 | -| *content.proton.documentdb.matching.query\_collateral\_time.\** | Use *content.proton.documentdb.matching.query\_setup\_time.\** instead | -| *content.proton.documentdb.matching.rank\_profile.query\_collateral\_time.\** | Use *content.proton.documentdb.matching.rank\_profile.query\_setup\_time.\** instead | -| *vds.visitor.allthreads.averagevisitorlifetime~~.sum~~.average* | Use .sum/.count instead | -| *vds.visitor.allthreads.averagequeuewait~~.sum~~.average* | Use .sum/.count instead | -| *vds.visitor.allthreads.queuesize~~.sum~~.average* | Use .sum/.count instead | -| *vds.visitor.allthreads.completed~~.sum~~.average* | Use .sum/.count instead | -| *vds.visitor.allthreads.averagemessagesendtime~~.sum~~.average* | Use .sum/.count instead | -| *vds.visitor.allthreads.averageprocessingtime~~.sum~~.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.queuesize.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.averagequeuewait.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.allthreads.put~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.allthreads.remove~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.allthreads.get~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.allthreads.update~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.allthreads.createiterator~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.allthreads.visit~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.allthreads.remove\_location~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.filestor~~.alldisks~~.allthreads.deletebuckets~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.distributor.puts~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.distributor.removes~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.distributor.updates~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.distributor.gets~~.sum~~.latency.average* | Use .sum/.count instead | -| *vds.distributor.visitor~~.sum~~.latency.average* | Use .sum/.count instead | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
*http.status.401.rate*Use *http.status.4xx.rate* with dimension *statusCode*==401
*http.status.403.rate*Use *http.status.4xx.rate* with dimension *statusCode*==403
*content.proton.documentdb.matching.query_collateral_time.**Use *content.proton.documentdb.matching.query_setup_time.** instead
*content.proton.documentdb.matching.rank_profile.query_collateral_time.**Use *content.proton.documentdb.matching.rank_profile.query_setup_time.** instead
*vds.visitor.allthreads.averagevisitorlifetime~~.sum~~.average*Use .sum/.count instead
*vds.visitor.allthreads.averagequeuewait~~.sum~~.average*Use .sum/.count instead
*vds.visitor.allthreads.queuesize~~.sum~~.average*Use .sum/.count instead
*vds.visitor.allthreads.completed~~.sum~~.average*Use .sum/.count instead
*vds.visitor.allthreads.averagemessagesendtime~~.sum~~.average*Use .sum/.count instead
*vds.visitor.allthreads.averageprocessingtime~~.sum~~.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.queuesize.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.averagequeuewait.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.allthreads.put~~.sum~~.latency.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.allthreads.remove~~.sum~~.latency.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.allthreads.get~~.sum~~.latency.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.allthreads.update~~.sum~~.latency.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.allthreads.createiterator~~.sum~~.latency.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.allthreads.visit~~.sum~~.latency.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.allthreads.remove_location~~.sum~~.latency.average*Use .sum/.count instead
*vds.filestor~~.alldisks~~.allthreads.deletebuckets~~.sum~~.latency.average*Use .sum/.count instead
*vds.distributor.puts~~.sum~~.latency.average*Use .sum/.count instead
*vds.distributor.removes~~.sum~~.latency.average*Use .sum/.count instead
*vds.distributor.updates~~.sum~~.latency.average*Use .sum/.count instead
*vds.distributor.gets~~.sum~~.latency.average*Use .sum/.count instead
*vds.distributor.visitor~~.sum~~.latency.average*Use .sum/.count instead
## Exact matching of document types in selection language @@ -388,9 +891,18 @@ Replace all usages of the "storage" policy with "content", which behaves identic The dispatch functionality is moved into the Vespa Container and the *vespa-dispatch-bin* process is removed. As this is not a public interface, the default was switched to **not** using vespa-dispatch-bin in Vespa-7.109.10. The process was removed in subsequent Vespa releases: -|||||| -| --- | --- | --- | --- | --- | -| [Dispatch](/en/querying/query-api) | Content cluster | dynamically allocated in 19100 - 19899 range | `$VESPA_HOME/sbin/vespa-dispatch-bin` | Dispatcher, communicates between container and content nodes. Can be multi-level in a hierarchy | + + + + + + + + + + + +
||||
Dispatch | Content cluster | dynamically allocated in 19100 - 19899 range | {`$VESPA_HOME/sbin/vespa-dispatch-bin`} | Dispatcher, communicates between container and content nodes. Can be multi-level in a hierarchy
Rolling upgrade note: A rolling upgrade over Vespa-7.109.10 should work with no extra steps. diff --git a/mintlify-docs/en/reference/release-notes/vespa9.mdx b/mintlify-docs/en/reference/release-notes/vespa9.mdx index 38b6e52def..106607b010 100644 --- a/mintlify-docs/en/reference/release-notes/vespa9.mdx +++ b/mintlify-docs/en/reference/release-notes/vespa9.mdx @@ -40,8 +40,16 @@ These changes may break clients, and impact both performance and user experience The following defaults have changed: -| Change | Configuration required to avoid change on Vespa 9 | -| --- | --- | + + + + + + + + + +
ChangeConfiguration required to avoid change on Vespa 9
## Application package changes @@ -49,22 +57,47 @@ The following defaults have changed: The following settings are removed from [schema](/en/reference/schemas/schemas): -| Name | Replacement | -| --- | --- | + + + + + + + + + +
NameReplacement
### Changed semantics in services.xml The following elements and attributes in services.xml have new semantics: -| Name | Description | -| --- | --- | + + + + + + + + + +
NameDescription
### Removed constructs from services.xml The following elements and attributes are removed from services.xml: -| Parent element | Removed construct | Description | -| --- | --- | --- | + + + + + + + + + + +
Parent elementRemoved constructDescription
### *searchdefinitions/* folder support removed @@ -74,8 +107,16 @@ Schemas should now be placed in the *schemas/* folder. ### Removed Java packages -| Package | Description | -| --- | --- | + + + + + + + + + +
PackageDescription
### Removed Java Classes and methods @@ -83,28 +124,65 @@ Classes and methods that were marked as deprecated in Vespa 8 are removed. If de The following classes are no longer public API and have been moved to Vespa internal packages: -| Package | Class | Migration advice | -| --- | --- | --- | -| com.yahoo.search.predicate | *PredicateIndex* + related classes | The Predicate Search Java Library is removed (*com.yahoo.vespa:predicate-search*). Use [predicate fields](/en/schemas/predicate-fields.) in Vespa instead. | + + + + + + + + + + + + + + + +
PackageClassMigration advice
com.yahoo.search.predicate*PredicateIndex* + related classesThe Predicate Search Java Library is removed (*com.yahoo.vespa:predicate-search*). Use predicate fields in Vespa instead.
The following methods are removed: -| Method | Migration advice | -| --- | --- | + + + + + + + + + +
MethodMigration advice
### Breaking changes to Java APIs The Javadoc of the deprecated types/members should document the replacement API. The below list is not exhaustive - some smaller and trivial changes are not listed. -| Type(s) | Description | -| --- | --- | + + + + + + + + + +
Type(s)Description
### Deprecated Java APIs A few redundant APIs have been deprecated because they have replacements that provide the same, or better, functionality. We advise you switch to the replacement to reduce future maintenance cost. -| Type(s) | Replacement | -| --- | --- | + + + + + + + + + +
Type(s)Replacement
## Container Runtime Environment @@ -116,8 +194,16 @@ Vespa 9 upgrades the JDK version from 17 to 25. Java artifacts built against old The following Maven artifacts are no longer provided runtime to user application plugins by the Jdisc container: -| Artifact | Notes | -| --- | --- | + + + + + + + + + +
ArtifactNotes
Make sure your application OSGi bundle embeds the required artifacts from the above list. An artifact can be embedded by adding it in scope *compile* to the *dependencies* section in pom.xml. Typically, these artifacts have until now been used in scope *provided*. Use `mvn dependency:tree` to check whether any of the listed artifacts are directly or transitively included as dependencies. @@ -142,8 +228,17 @@ An example adding *org.json:json* as a compile scoped dependency: The following HTTP API parameters are removed from the [query API](/en/reference/api/query): -| Standard API path | Parameter name | Replacement | -| --- | --- | --- | + + + + + + + + + + +
Standard API pathParameter nameReplacement
## Removed command line tools diff --git a/mintlify-docs/en/reference/schemas/document-field-path.mdx b/mintlify-docs/en/reference/schemas/document-field-path.mdx index e2fdcd0757..bb3a910e60 100644 --- a/mintlify-docs/en/reference/schemas/document-field-path.mdx +++ b/mintlify-docs/en/reference/schemas/document-field-path.mdx @@ -30,30 +30,84 @@ The following syntax can be used for the different field types, and can be combi ## Maps/weighted Sets -| | | -| :--- | :--- | -| \\{\\} | Retrieve the value of a specific key | -| \\{$\\} | Retrieve all values, setting the [variable](#variables) to the key value for each | -| \.key | Retrieve all key values | -| \.value | Retrieve all values | -| \ | Retrieve all keys | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<mapfield>{<keyvalue>}Retrieve the value of a specific key
<mapfield>{$<variablename>}Retrieve all values, setting the variable to the key value for each. **Deprecated:** Deprecated, will be removed in Vespa 9.
<mapfield>.keyRetrieve all key values
<mapfield>.valueRetrieve all values
<mapfield>Retrieve all keys
In the case of weighted sets, the value referenced above is the weight of the item. ## Array -| | | -| :--- | :--- | -| \[\] | Retrieve the value in a specific index | -| \[$\] | Retrieve all values in the array, setting the [variable](#variables) to the index of each | -| \ | Retrieve all values in the array | + + + + + + + + + + + + + + + + + + + + + +
<arrayfield>[<index>]Retrieve the value in a specific index
<arrayfield>[$<variablename>]Retrieve all values in the array, setting the variable to the index of each. **Deprecated:** Deprecated, will be removed in Vespa 9.
<arrayfield>Retrieve all values in the array
## Struct -| | | -| :--- | :--- | -| \\{.\} | Return the value of the struct field | -| \ | Return the value of all subfields | + + + + + + + + + + + + + + + + + +
<structfield>{.<subfield>}Return the value of the struct field
<structfield>Return the value of all subfields
Note that when specifying values of subscripts of maps, weighted sets and arrays, only numbers and strings may be used. @@ -61,6 +115,10 @@ Note that when specifying values of subscripts of maps, weighted sets and arrays ## Variables + + **Deprecated:** Deprecated, will be removed in Vespa 9. + + It can be useful to reference several field paths using a common variable. For instance, if you have an array of structs, you may want to use document selection on fields within the same array index together. This could be done by an expression like: ```bash diff --git a/mintlify-docs/en/reference/schemas/document-json-format.mdx b/mintlify-docs/en/reference/schemas/document-json-format.mdx index cfa4df686e..212d5f6ffa 100644 --- a/mintlify-docs/en/reference/schemas/document-json-format.mdx +++ b/mintlify-docs/en/reference/schemas/document-json-format.mdx @@ -77,25 +77,84 @@ Update operations Unless otherwise noted, these formats are used both for returned values in read operations, and as input in write operations (put operations and field assign update operations). -| | | -| :--- | :--- | -| string | ```json "name": "Polly" ``` Feeding in an empty string ("") for a field will have the same effect as not feeding a value for that field, and the field will not be rendered in the document API and in document summaries. | -| int | ```json "age": 42 ``` | -| long | ```json "current_time_ms": 1742837807000 ``` | -| bool | *true* or *false*: ```json "alive": false ``` | -| byte | ```json "tinynumber": 128 ``` | -| float | ```json "weight": 123.4567 ``` | -| double | ```json "weight": 123.4567 ``` | -| position | A position is encoded as a lat/lng object: ```json "mypos": { "lat": 37.4181488, "lng": -122.0256157 } ``` See [Geo Search](/en/querying/geo-search) for details. | -| predicate | A [predicate](/en/reference/schemas/schemas#predicate) is represented with a string: ```json "predicate_field": "gender in [Female] and age in [20..30] and pos in [1..4]" ``` | -| raw | The content of a [raw](/en/reference/schemas/schemas#raw) field is represented as a base64-encoded string: ```json "raw_field": "VW5rbm93biBhcnRpc3QgZnJvbSB0aGUgbW9vbg==" ``` When used as *summary* field it will be rendered as a base64-encoded string. | -| uri | A URI is a string: ```json "url": "https://www.yahoo.com/" ``` | -| array | Arrays are represented as JSON arrays. ```json "int_array_field": [ 123, 456, 789 ] "string_array_field": [ "item 1", "item 2", "item 3" ] ``` An array of struct is represented as a JSON array of JSON objects matching the defined struct field: ```json "array_of_struct_field": [ { "first_name": "Chris", "last_name": "Martin" }, { "first_name": "James", "last_name": "Hetfield" }, { "first_name": "Diana", "last_name": "Krall" } ] ``` Feeding in an empty array (\[\]) for a field will have the same effect as not feeding a value for that field, and the field will not be rendered in the document API and in document summaries. | -| weightedset | Weighted sets are represented as maps where the value is the weight. Note, even if the key is not a string as such, it will be represented as a string in the JSON format. ```json "int_weighted_set": { "123": 2, "456": 78 } "string_weighted_set": { "item 1": 143, "item 2": 6 } ``` Feeding in an empty weightedset ({}) for a field will have the same effect as not feeding a value for that field, and the field will not be rendered in the document API and in document summaries. | -| tensor | **Indexed tensors short form:** An array where the values are ordered in the standard value order, where indexes of dimensions to the right are incremented before indexes to the left, where dimensions are ordered alphabetically (such that, e.g. with a tensor with dimensions x,y the "y" values for each value of "x" are adjacent): ```json "tensorfield": [ 2.0, 3.0, 5.0, 7.0 ] ``` The cells array can optionally be nested in an object under the key "values". This is how tensor values are returned [by default](/en/reference/api/document-v1#format.tensors), along with another key "type" containing the tensor type.

**Short form for tensors with a single mapped dimension**: A map with the dimension key as key and the value as value. ```json "tensorfield": { "a": 2.0, "b": 3.0 } ``` The cells object can optionally be nested in an object under the key "cells". This is how tensor values are returned [by default](/en/reference/api/document-v1#format.tensors), along with another key "type" containing the tensor type.
**Mixed tensors short form:** If the tensor has a single sparse dimension: A map where the key is the value of that dimension and the value is a nested array containing the values of the dense subspace within that key. If the tensor has multiple sparse dimensions: An array nested in a "blocks" element where the elements consist of a map with the keys "address" and "values", where "address" is a map with the sparse dimensions and their values (as in cells), and "values" is a nested array containing the values of the dense subspace within that address.

Example - single sparse dimension:

```json "tensorfield": { "x1":[2.0,3.0], "x2":[4.0,5.0] } ``` Example - multiple sparse dimensions: ```json "tensorfield": { "blocks": [ {"address":{"x":"x1","y":"y2"},"values":[2.0,3.0]}, {"address":{"x":"x2","y":"y2"},"values":[4.0,5.0]} ] } ``` This is how tensor values are returned [by default](/en/reference/api/document-v1#format.tensors), along with another key "type" containing the tensor type.

**Cell values as binary data** For dense and mixed tensors it's possible to fill the cell values directly from binary data sent in as a string of hexadecimal digits. The simplest possible case is if you have a vector with `int8` cell value type: ```json "tensorfield": { "values": "FF00118022FE" } ``` This can be used to represent the value `tensor(x[6]):[-1,0,17,-128,34,-2]`.

For other cell types, it's possible to take the bits of the floating-point value, interpreted directly as an unsigned integer of appropriate width (16, 32, or 64 bits) and use the hex dump (respectively 4, 8, or 16 hex digits per cell) in a string. For "float" cells (32-bit IEE754 floating-point) a simple snippet for converting a cell could look like this: ```python import struct def float_to_hex(f: float): return format(struct.unpack('=I', struct.pack('=f', f))[0], '08X') ``` As an advanced combination example, if you have a tensor with type `tensor(tag{},x[3])` this input could be used, shown with corresponding output: ```json "mixedtensor": { "foo": "3DE38E393E638E393EAAAAAB", "bar": "3EE38E393F0E38E43F2AAAAB", "baz": "3F471C723F638E393F800000" } "mixedtensor":{ "type":"tensor(tag{},x[3])", "blocks":{ "foo":[0.1111111119389534,0.2222222238779068,0.3333333432674408], "bar":[0.4444444477558136,0.5555555820465088,0.6666666865348816], "baz":[0.7777777910232544,0.8888888955116272,1.0] } } ``` **Verbose:** [Tensor](/en/ranking/tensor-user-guide) fields may be represented as an array of cells: ```json "tensorfield": [ { "address": { "x": "a", "y": "0" }, "value": 2.0 }, { "address": { "x": "a", "y": "1" }, "value": 3.0 }, { "address": { "x": "b", "y": "0" }, "value": 4.0 }, { "address": { "x": "b", "y": "1" }, "value": 5.0 } ] ``` This works for any tensor but is verbose, so shorter forms specific to various tensor types are also supported. Use the shortest form applicable to your tensor type for the best possible performance.
The cells array can optionally be nested in an object under the key "cells". This is how tensor values are returned [by default](/en/reference/api/document-v1#format.tensors), along with another key "type" containing the tensor type. | -| struct | ```"mystruct": { "intfield": 123, "stringfield": "foo" } ``` | -| map | The JSON dictionary key must be a string, even if the map key type in the schema is not a string: ```json "int_to_string_map": { "123": "foo", "456": "bar", "789": "foobar" } ``` Feeding in an empty map ({}) for a field will have the same effect as not feeding a value for that field, and the field will not be rendered in the document API and in document summaries. | -| reference | String with document ID referring to a [parent document](/en/schemas/parent-child): ```json "artist_ref": "id:mynamespace:artists::artist-1" ``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
string
{`"name": "Polly"`}
Feeding in an empty string ("") for a field will have the same effect as not feeding a value for that field, and the field will not be rendered in the document API and in document summaries.
int
{`"age": 42`}
long
{`"current_time_ms": 1742837807000`}
bool*true* or *false*:
{`"alive": false`}
byte
{`"tinynumber": 128`}
float
{`"weight": 123.4567`}
double
{`"weight": 123.4567`}
positionA position is encoded as a lat/lng object:
{`"mypos": {     "lat": 37.4181488,     "lng": -122.0256157 }`}
See Geo Search for details.
predicateA predicate is represented with a string:
{`"predicate_field": "gender in [Female] and age in [20..30] and pos in [1..4]"`}
rawThe content of a raw field is represented as a base64-encoded string:
{`"raw_field": "VW5rbm93biBhcnRpc3QgZnJvbSB0aGUgbW9vbg=="`}
When used as *summary* field it will be rendered as a base64-encoded string.
uriA URI is a string:
{`"url": "https://www.yahoo.com/"`}
arrayArrays are represented as JSON arrays.
{`"int_array_field": [     123,     456,     789 ]  "string_array_field": [     "item 1",     "item 2",     "item 3" ]`}
An array of struct is represented as a JSON array of JSON objects matching the defined struct field:
{`"array_of_struct_field": [    { "first_name": "Chris", "last_name": "Martin" },    { "first_name": "James", "last_name": "Hetfield" },    { "first_name": "Diana", "last_name": "Krall" } ]`}
Feeding in an empty array ([]) for a field will have the same effect as not feeding a value for that field, and the field will not be rendered in the document API and in document summaries.
weightedsetWeighted sets are represented as maps where the value is the weight. Note, even if the key is not a string as such, it will be represented as a string in the JSON format.
{`"int_weighted_set": {     "123": 2,     "456": 78 }  "string_weighted_set": {     "item 1": 143,     "item 2": 6 }`}
Feeding in an empty weightedset ({}) for a field will have the same effect as not feeding a value for that field, and the field will not be rendered in the document API and in document summaries.
tensor**Indexed tensors short form:** An array where the values are ordered in the standard value order, where indexes of dimensions to the right are incremented before indexes to the left, where dimensions are ordered alphabetically (such that, e.g. with a tensor with dimensions x,y the "y" values for each value of "x" are adjacent):
{`"tensorfield": [ 2.0, 3.0, 5.0, 7.0 ]`}
The cells array can optionally be nested in an object under the key "values". This is how tensor values are returned by default, along with another key "type" containing the tensor type.

**Short form for tensors with a single mapped dimension**: A map with the dimension key as key and the value as value.
{`"tensorfield": {     "a": 2.0,     "b": 3.0 }`}
The cells object can optionally be nested in an object under the key "cells". This is how tensor values are returned by default, along with another key "type" containing the tensor type.
**Mixed tensors short form:** If the tensor has a single sparse dimension: A map where the key is the value of that dimension and the value is a nested array containing the values of the dense subspace within that key. If the tensor has multiple sparse dimensions: An array nested in a "blocks" element where the elements consist of a map with the keys "address" and "values", where "address" is a map with the sparse dimensions and their values (as in cells), and "values" is a nested array containing the values of the dense subspace within that address.

Example - single sparse dimension:

{`"tensorfield": {     "x1":[2.0,3.0],     "x2":[4.0,5.0] }`}
Example - multiple sparse dimensions:
{`"tensorfield": {   "blocks": [     {"address":{"x":"x1","y":"y2"},"values":[2.0,3.0]},     {"address":{"x":"x2","y":"y2"},"values":[4.0,5.0]}   ] }`}
This is how tensor values are returned by default, along with another key "type" containing the tensor type.

**Cell values as binary data** For dense and mixed tensors it's possible to fill the cell values directly from binary data sent in as a string of hexadecimal digits. The simplest possible case is if you have a vector with {`int8`} cell value type:
{`"tensorfield": {     "values": "FF00118022FE" }`}
This can be used to represent the value {`tensor(x[6]):[-1,0,17,-128,34,-2]`}.

For other cell types, it's possible to take the bits of the floating-point value, interpreted directly as an unsigned integer of appropriate width (16, 32, or 64 bits) and use the hex dump (respectively 4, 8, or 16 hex digits per cell) in a string. For "float" cells (32-bit IEE754 floating-point) a simple snippet for converting a cell could look like this:
{`import struct def float_to_hex(f: float):     return format(struct.unpack('=I', struct.pack('=f', f))[0], '08X')`}
As an advanced combination example, if you have a tensor with type {`tensor(tag{},x[3])`} this input could be used, shown with corresponding output:
{`"mixedtensor": {     "foo": "3DE38E393E638E393EAAAAAB",     "bar": "3EE38E393F0E38E43F2AAAAB",     "baz": "3F471C723F638E393F800000" } "mixedtensor":{   "type":"tensor(tag{},x[3])",   "blocks":{     "foo":[0.1111111119389534,0.2222222238779068,0.3333333432674408],     "bar":[0.4444444477558136,0.5555555820465088,0.6666666865348816],     "baz":[0.7777777910232544,0.8888888955116272,1.0]   } }`}
**Verbose:** Tensor fields may be represented as an array of cells:
{`"tensorfield": [     { "address": { "x": "a", "y": "0" }, "value": 2.0 },     { "address": { "x": "a", "y": "1" }, "value": 3.0 },     { "address": { "x": "b", "y": "0" }, "value": 4.0 },     { "address": { "x": "b", "y": "1" }, "value": 5.0 } ]`}
This works for any tensor but is verbose, so shorter forms specific to various tensor types are also supported. Use the shortest form applicable to your tensor type for the best possible performance.
The cells array can optionally be nested in an object under the key "cells". This is how tensor values are returned by default, along with another key "type" containing the tensor type.
struct
{`"mystruct": {     "intfield": 123,     "stringfield": "foo" }`}
mapThe JSON dictionary key must be a string, even if the map key type in the schema is not a string:
{`"int_to_string_map": {     "123": "foo",     "456": "bar",     "789": "foobar" }`}
Feeding in an empty map ({}) for a field will have the same effect as not feeding a value for that field, and the field will not be rendered in the document API and in document summaries.
referenceString with document ID referring to a parent document:
{`"artist_ref": "id:mynamespace:artists::artist-1"`}
## Empty fields diff --git a/mintlify-docs/en/reference/schemas/schemas.mdx b/mintlify-docs/en/reference/schemas/schemas.mdx index ace4091eee..6e8f55ada4 100644 --- a/mintlify-docs/en/reference/schemas/schemas.mdx +++ b/mintlify-docs/en/reference/schemas/schemas.mdx @@ -155,19 +155,72 @@ The `inherits` attribute is optional. If a schema is inherited, this schema will The body is mandatory and may contain: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| [document](#document) | One | A document type defined in this schema | -| [field](#field) | Zero to many | A field not contained in the document. Use _synthetic fields_ (outside [document](#document)) to derive new field values to be placed in the indexing structure from document fields. Find examples in [reindexing](/en/operations/reindexing#use-cases). | -| [fieldset](#fieldset) | Zero to many | Group document fields together for searching | -| [rank-profile](#rank-profile) | Zero to many | A bundle of ranking functions and settings, selectable in a query. | -| [constant](#constant) | Zero to many | A constant tensor located in a file used for ranking | -| [onnx-model](#onnx-model) | Zero to many | An ONNX model located in the application package used for ranking | -| [stemming](#stemming) | Zero or one | The default stemming setting. | -| [raw-as-base64-in-summary](#raw-as-base64-in-summary) | Zero or one | Base64 encode raw fields in summary rather than using an escaped string. The default is true. | -| [documentid](#documentid) | Zero or one | Whether document IDs are stored on disk only or made an attribute. | -| [document-summary](#document-summary) | Zero to many | An explicitly defined document summary | -| [import field](#import-field) | Zero to many | Import a field value from a global document | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescription
documentOneA document type defined in this schema
fieldZero to manyA field not contained in the document. Use _synthetic fields_ (outside document) to derive new field values to be placed in the indexing structure from document fields. Find examples in reindexing.
fieldsetZero to manyGroup document fields together for searching
rank-profileZero to manyA bundle of ranking functions and settings, selectable in a query.
constantZero to manyA constant tensor located in a file used for ranking
onnx-modelZero to manyAn ONNX model located in the application package used for ranking
stemmingZero or oneThe default stemming setting.
raw-as-base64-in-summaryZero or oneBase64 encode raw fields in summary rather than using an escaped string. The default is true.
documentidZero or oneWhether document IDs are stored on disk only or made an attribute.
document-summaryZero to manyAn explicitly defined document summary
import fieldZero to manyImport a field value from a global document
## document @@ -185,11 +238,32 @@ The `inherits` attribute is optional and has as value a comma-separated list of The body of a document type is optional and may contain: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| [struct](#struct) | Zero to many | A struct type definition for this document. | -| [field](#field) | Zero to many | A field of this document. | -| [compression](#compression) | Zero to one | Specifies compression options for documents of this document type in storage. | + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescription
structZero to manyA struct type definition for this document.
fieldZero to manyA field of this document.
compressionZero to oneSpecifies compression options for documents of this document type in storage.
## struct @@ -203,9 +277,22 @@ struct [name] { The body of a struct is optional and may contain: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| [field](#field) | Zero to many | A field of this struct. | + + + + + + + + + + + + + + + +
NameOccurrenceDescription
fieldZero to manyA field of this struct.
## field @@ -240,15 +327,38 @@ Other names not to use include any words that start with a number or include spe The _type_ attribute is mandatory - supported types: -| Field type | Description | -| --- | --- | -| array\ | + + + + + + + + + + + + +
Field typeDescription
array<type>
For single-value (primitive) types, use array\ to create an array field of the element type: -| Index | Each element is indexed separately | -| Attribute | Added as an array attribute | -| Summary | Added as an array summary field | + + + + + + + + + + + + + + + +
IndexEach element is indexed separately
AttributeAdded as an array attribute
SummaryAdded as an array summary field
Also used to create an array field of the given [struct type](#struct). The struct type must be defined separately. Example: @@ -286,12 +396,31 @@ Restrictions: - All struct arrays can be fed, retrieved, and used in document summaries. - Some parts of struct arrays can be searched in [indexed search mode](/en/reference/applications/services/content#document), while all parts of struct arrays can be searched in [streaming search](/en/performance/streaming-search). See below for supported cases. -| Index | Only supported in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). Set this on the top-level struct array field to make all parts searchable. | -| Attribute | Only supported for [struct fields](#struct-field) that have primitive types (bool, string, int, long, byte, float, double). Any struct field must be defined as an attribute to be used for searching. The struct type can still contain fields of non-primitive types, as long as these are not defined as attributes. | -| Summary | Added as an array summary field | + + + + + + + + + + + + + + + +
IndexOnly supported in streaming search. Set this on the top-level struct array field to make all parts searchable.
AttributeOnly supported for struct fields that have primitive types (bool, string, int, long, byte, float, double). Any struct field must be defined as an attribute to be used for searching. The struct type can still contain fields of non-primitive types, as long as these are not defined as attributes.
SummaryAdded as an array summary field
| -| bool | + + + + + + +
bool
Use for boolean values. @@ -301,13 +430,32 @@ field alive type bool { } ``` -| Index | Not supported | -| Attribute | Added as a boolean | -| Summary | Added as a boolean value (`true` or `false`) | + + + + + + + + + + + + + + + +
IndexNot supported
AttributeAdded as a boolean
SummaryAdded as a boolean value ({`true`} or {`false`})
**Important:** Defaults to `false` if not specified. | -| byte | + + + + + + +
byte
Use for single 8-bit numbers. @@ -317,12 +465,31 @@ field smallnumber type byte { } ``` -| Index | Not supported. An attribute will automatically be used instead | -| Attribute | Added as a byte which supports range searches | -| Summary | Added as a byte | + + + + + + + + + + + + + + + +
IndexNot supported. An attribute will automatically be used instead
AttributeAdded as a byte which supports range searches
SummaryAdded as a byte
| -| double | + + + + + + +
double
Use for high precision floating point numbers (64-bit IEEE 754 double). @@ -332,12 +499,31 @@ field mydouble type double { } ``` -| Index | Not supported. An attribute will automatically be used instead | -| Attribute | Added as a 64-bit IEEE 754 double which supports range searches | -| Summary | Added as a 64-bit IEEE 754 double | + + + + + + + + + + + + + + + +
IndexNot supported. An attribute will automatically be used instead
AttributeAdded as a 64-bit IEEE 754 double which supports range searches
SummaryAdded as a 64-bit IEEE 754 double
| -| float | + + + + + + +
float
Use for floating point numbers (32-bit IEEE 754 float). @@ -347,12 +533,31 @@ field myfloat type float { } ``` -| Index | Not supported. An attribute will automatically be used instead | -| Attribute | Added as a 32-bit IEEE 754 float which supports range searches | -| Summary | Added as a 32-bit IEEE 754 float | + + + + + + + + + + + + + + + +
IndexNot supported. An attribute will automatically be used instead
AttributeAdded as a 32-bit IEEE 754 float which supports range searches
SummaryAdded as a 32-bit IEEE 754 float
| -| int | + + + + + + +
int
Use for single 32-bit integers. @@ -362,12 +567,31 @@ field release_year type int { } ``` -| Index | Not supported. An attribute will automatically be used instead | -| Attribute | Becomes integer attributes, which supports range grouping and range searches | -| Summary | Added as a 32-bit integer | + + + + + + + + + + + + + + + +
IndexNot supported. An attribute will automatically be used instead
AttributeBecomes integer attributes, which supports range grouping and range searches
SummaryAdded as a 32-bit integer
| -| long | + + + + + + +
long
Use for single 64-bit integers. @@ -377,12 +601,31 @@ field bignumber type long { } ``` -| Index | Not supported. An attribute will automatically be used instead | -| Attribute | Becomes a 64-bit integer attribute, which supports range grouping and range searches | -| Summary | Added as a 64-bit integer | + + + + + + + + + + + + + + + +
IndexNot supported. An attribute will automatically be used instead
AttributeBecomes a 64-bit integer attribute, which supports range grouping and range searches
SummaryAdded as a 64-bit integer
| -| map\ | + + + + + + +
map<key-type,value-type>
Use to create a map where each unique key is mapped to a single value. Any primitive type can be used as _key-type_ and any primitive type or Vespa struct type as _value-type_. Example of a map of primitive types, where the _key_ and _value_ fields are specified as _attributes_: @@ -437,12 +680,31 @@ Restrictions: - All map types can be fed, retrieved, and used in document summaries. - Some map types can be searched in [indexed search mode](/en/reference/applications/services/content#document), while all map types can be searched in [streaming search](/en/performance/streaming-search). See below for supported cases: -| Index | Only supported in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). Set this on the top-level map field to make all struct fields in the map field searchable. | -| Attribute | Only supported for [struct fields](#struct-field) where _value-type_ is either a primitive type (bool, string, int, long, byte, float, double) or a [struct type](#struct) with fields of primitive types. Any struct field must be defined as an attribute to be used for searching. The _value-type_ struct can still contain fields of non-primitive types, as long as these are not defined as attributes. | -| Summary | Added as a map. | + + + + + + + + + + + + + + + +
IndexOnly supported in streaming search. Set this on the top-level map field to make all struct fields in the map field searchable.
AttributeOnly supported for struct fields where _value-type_ is either a primitive type (bool, string, int, long, byte, float, double) or a struct type with fields of primitive types. Any struct field must be defined as an attribute to be used for searching. The _value-type_ struct can still contain fields of non-primitive types, as long as these are not defined as attributes.
SummaryAdded as a map.
| -| position | + + + + + + +
position
Used to filter and/or rank documents by distance to a position in the query, see [Geo search](/en/querying/geo-search). @@ -452,12 +714,31 @@ field location type position { } ``` -| Index | Not supported | -| Attribute | Added as an interleaved 64-bit integer (see [Z-order curve](https://en.wikipedia.org/wiki/Z-order_curve)) - queries are implemented by doing a set of range searches in the attribute. This attribute has [fast-search](/en/content/attributes#fast-search) set implicitly | -| Summary | Refer to the [reference](/en/reference/schemas/document-json-format#position) | + + + + + + + + + + + + + + + +
IndexNot supported
AttributeAdded as an interleaved 64-bit integer (see Z-order curve) - queries are implemented by doing a set of range searches in the attribute. This attribute has fast-search set implicitly
SummaryRefer to the reference
| -| predicate | + + + + + + +
predicate
Use to match queries to a set of boolean constraints. See [querying predicate fields.](/en/schemas/predicate-fields.#queries) Predicate fields are not supported in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). @@ -473,12 +754,31 @@ field predicate_field type predicate { } ``` -| Index | Not supported | -| Attribute | Indexed in-memory in a variable-size binary format that is optimized for application during query evaluation | -| Summary | Added as-is | + + + + + + + + + + + + + + + +
IndexNot supported
AttributeIndexed in-memory in a variable-size binary format that is optimized for application during query evaluation
SummaryAdded as-is
| -| raw | + + + + + + +
raw
Use for binary data @@ -488,12 +788,31 @@ field rawfield type raw { } ``` -| Index | Not supported | -| Attribute | Added as raw data. Not searchable. | -| Summary | Added as raw data. Outputted as a base64-encoded string. See [JSON feed format](/en/reference/schemas/document-json-format#raw) for details. | + + + + + + + + + + + + + + + +
IndexNot supported
AttributeAdded as raw data. Not searchable.
SummaryAdded as raw data. Outputted as a base64-encoded string. See JSON feed format for details.
| -| reference\ | + + + + + + +
reference<document-type>
A _reference\_ field is a reference to an instance of a document-type - i.e., a foreign key. Reference fields are not supported in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). @@ -508,12 +827,31 @@ field artist_ref type reference { A reference attribute field can be searched using the document ID of the parent document-type instance as query term. Note that this will be a linear scan as [fast-search](#attribute) is not supported. -| Index | Invalid - deployment will fail | -| Attribute | As [string](#string) - a reference must be an attribute. Can be an empty string or point to a non-existent document. Memory usage is about 33 bytes per parent document. This is composed of 24 bytes used in a reference store, with a btree structure on top of that which requires 5 bytes on average (depends on lid compaction). In addition 4 bytes on average for a reference from child document to the parent document (depends on lid compaction). In total about 33 bytes. | -| Summary | As [string](#string) | + + + + + + + + + + + + + + + +
IndexInvalid - deployment will fail
AttributeAs string - a reference must be an attribute. Can be an empty string or point to a non-existent document. Memory usage is about 33 bytes per parent document. This is composed of 24 bytes used in a reference store, with a btree structure on top of that which requires 5 bytes on average (depends on lid compaction). In addition 4 bytes on average for a reference from child document to the parent document (depends on lid compaction). In total about 33 bytes.
SummaryAs string
| -| string | + + + + + + +
string
Use for a text field of any length. String fields may only contain _text characters_, as defined by `isTextCharacter` in [com.yahoo.text.Text](https://github.com/vespa-engine/vespa/blob/master/vespajlib/src/main/java/com/yahoo/text/Text.java) @@ -523,12 +861,31 @@ field surname type string { } ``` -| Index | Refer to [linguistics](/en/linguistics/linguistics) for details on normalization, tokenization and stemming. | -| Attribute | Added as-is. [match](#match) exact or prefix is supported types of searches in string attributes. Searches are however case-insensitive. A query for `BritneY.spears` will match a document containing `BrItNeY.SpEars` | -| Summary | Added as-is | + + + + + + + + + + + + + + + +
IndexRefer to linguistics for details on normalization, tokenization and stemming.
AttributeAdded as-is. match exact or prefix is supported types of searches in string attributes. Searches are however case-insensitive. A query for {`BritneY.spears`} will match a document containing {`BrItNeY.SpEars`}
SummaryAdded as-is
| -| struct | + + + + + + +
struct
Use to define a field with a struct datatype. Create a [struct type](#struct) inside the document definition and declare the struct field in a document or struct using the struct type name as the field type: @@ -545,12 +902,31 @@ field my_person type person { - Struct fields can **not** be searched in indexed search mode (but [array of struct](#array) and [map type](#map) are searchable, with some restrictions). - Struct fields can be fed, retrieved, and used in document summaries. -| Index | Only supported in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). Set this on the top-level field to make all parts searchable. | -| Attribute | Not supported. | -| Summary | Added as a struct. | + + + + + + + + + + + + + + + +
IndexOnly supported in streaming search. Set this on the top-level field to make all parts searchable.
AttributeNot supported.
SummaryAdded as a struct.
| -| tensor(dimension-1,...,dimension-N) | + + + + + + +
tensor(dimension-1,...,dimension-N)
Use to create a tensor field with the given [tensor type spec](/en/reference/ranking/tensor#tensor-type-spec) that can be used for [ranking](/en/basics/ranking) and [nearest neighbor search](/en/querying/nearest-neighbor-search). A tensor field is otherwise not searchable. @@ -566,20 +942,49 @@ field tensorfield type tensor(x[2],y[2]) { } ``` -| Index | Supported for tensor types with: + + + + + + + +
IndexSupported for tensor types with:
- One indexed dimension - single vector per document - One or more mapped dimensions and one indexed dimension - multiple vectors per document See [approximate nearest neighbor search](/en/querying/approximate-nn-hnsw). | -| Attribute | Added as-is in an attribute to be used for ranking and nearest neighbor search. | -| Summary | Added as-is. | + + + + + + + + + + + +
AttributeAdded as-is in an attribute to be used for ranking and nearest neighbor search.
SummaryAdded as-is.
| -| uri | + + + + + + +
uri
Use for URL type matching. URI fields are not supported in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). -| Index | + + + + + + +
Index
The URL is split into its different components, which are indexed separately. Note that only URLs can be indexed this way, not other URIs. The different components are as defined by the HTTP standard: Scheme, hostname, port, path, query, and fragment. Example: @@ -587,12 +992,34 @@ The URL is split into its different components, which are indexed separately. No http://mysite.mydomain.com:8080/path/shop?d=hab&id=1804905709&cat=100#frag1 ``` -| scheme | http | -| hostname | mysite.mydomain.com (indexed as "mysite", "mydomain" and "com") | -| port | 8080 (note that port numbers 80 and 443 are not indexed, as they are the normal port numbers) | -| path | /path/shop (indexed as "path" and "shop") | -| query | d=hab&id=1804905709&cat=100 (indexed as "d", "hab", "id", "1804905709", "cat" and "100") | -| fragment | frag1 | + + + + + + + + + + + + + + + + + + + + + + + + + + + +
schemehttp
hostnamemysite.mydomain.com (indexed as "mysite", "mydomain" and "com")
port8080 (note that port numbers 80 and 443 are not indexed, as they are the normal port numbers)
path/path/shop (indexed as "path" and "shop")
queryd=hab&id=1804905709&cat=100 (indexed as "d", "hab", "id", "1804905709", "cat" and "100")
fragmentfrag1
The syntax for searching these different components is: ``` @@ -624,11 +1051,27 @@ field surl type uri { a search in "surl" and "url" will search in the entire url, while "surl.hostname" or "site" will search the hostname. | -| Attribute | Not allowed | -| Summary | Added as-is as a string | + + + + + + + + + + + +
AttributeNot allowed
SummaryAdded as-is as a string
| -| weightedset\ | + + + + + + +
weightedset<element-type>
Use to create a multivalue field of the element type, where each element is assigned a signed 32-bit integer weight. @@ -648,34 +1091,128 @@ It is possible to specify that a new key should be created if it does not exist The weightedset field does not support filtering on weight. If you need that use the [map](#map) type and [sameElement](/en/reference/querying/yql#sameelement) query operator - see [this example](/en/querying/query-language#map). -| Index | Each token present in the field is indexed separately. Information indexed includes element number, element weight, and a list of token occurrence positions for each element in which the token is present | -| Attribute | Added as a multivalue weighted attribute | -| Summary | Added as a multivalue summary field if this is an attribute | + + + + + + + + + + + + + + + +
IndexEach token present in the field is indexed separately. Information indexed includes element number, element weight, and a list of token occurrence positions for each element in which the token is present
AttributeAdded as a multivalue weighted attribute
SummaryAdded as a multivalue summary field if this is an attribute
| The body of a field is optional for [schema](#schema), [document](#document) and [struct](#struct). It may contain the following elements: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| alias | Zero to many | Make an index or attribute available in queries under an additional name. This has minimal performance impact and can safely be added to running applications. Example:
field artist type string \{ alias: artist_name } `alias` works for primitive types, i.e, types you can set `indexing` on like `string`. Composite types are not supported, the below will throw an error when deploying:
document ppl \{ struct person \{ field first_name type string {} field last_name type string {} } field p type array\ \{ struct-field first_name \{ indexing: attribute } struct-field last_name \{ indexing: attribute } alias: members } } | -| [attribute](#attribute) | Zero to many | Specify an attribute setting. | -| [bolding](#bolding) | Zero to one | Specifies whether the content of this field should be bolded. Only supported for [index](#indexing-index) fields of type string or array\. | -| [id](#id) | Zero to one | Explicitly decide the numerical id of this field. Is normally not necessary, but can be used to save some disk space. | -| [index](#index) | Zero to many | Specify a parameter of an index. | -| [indexing](#indexing) | Zero to one | The indexing statements used to create index structure additions from this field. | -| [match](#match) | Zero to one | Set the matching type to use for this field. | -| [normalizing](#normalizing) | Zero or one | Specifies the kind of text normalizing to do on a string field. | -| [query-command](#query-command) | Zero to many | Specifies a command which can be received by a plugin searcher in the Search Container. | -| [rank](#rank) | Zero or one | Specify if the field is used for ranking. | -| [rank-type](#rank-type) | Zero to one | Selects the set of low-level rank settings to be used for this field when using default `nativeRank`. | -| [sorting](#sorting) | Zero or one | The sort specification for this field. | -| [stemming](#stemming) | Zero or one | Specifies stemming options to use for this field. | -| [struct-field](#struct-field) | Zero to many | A subfield of a field of type struct. The struct must have been defined to contain this subfield in the struct definition. If you want the subfield to be handled differently from the rest of the struct, you may specify it within the body of the struct-field. | -| [summary](#summary) | Zero to many | Sets a summary setting of this field, set to `dynamic` to make a dynamic summary. | -| [summary-to](#summary-to) | Zero to one | **Deprecated:** Use [document-summary](#document-summary) instead. The list of document summary names this should be included in. | -| [weight](#weight) | Zero to one | The importance of a field when searching multiple fields and using `nativeRank`. | -| [weightedset](#weightedset-properties) | Zero to one | Properties of a weightedset [weightedset\](#weightedset) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescription
aliasZero to manyMake an index or attribute available in queries under an additional name. This has minimal performance impact and can safely be added to running applications. Example:
{`field artist type string {     alias: artist_name }`}
{`alias`} works for primitive types, i.e, types you can set {`indexing`} on like {`string`}. Composite types are not supported, the below will throw an error when deploying:
{`document ppl {     struct person {         field first_name type string {}         field last_name  type string {}     }     field p type array {         struct-field first_name {             indexing: attribute         }         struct-field last_name {             indexing: attribute         }         alias: members     } }`}
attributeZero to manySpecify an attribute setting.
boldingZero to oneSpecifies whether the content of this field should be bolded. Only supported for index fields of type string or array<string>.
idZero to oneExplicitly decide the numerical id of this field. Is normally not necessary, but can be used to save some disk space.
indexZero to manySpecify a parameter of an index.
indexingZero to oneThe indexing statements used to create index structure additions from this field.
matchZero to oneSet the matching type to use for this field.
normalizingZero or oneSpecifies the kind of text normalizing to do on a string field.
query-commandZero to manySpecifies a command which can be received by a plugin searcher in the Search Container.
rankZero or oneSpecify if the field is used for ranking.
rank-typeZero to oneSelects the set of low-level rank settings to be used for this field when using default {`nativeRank`}.
sortingZero or oneThe sort specification for this field.
stemmingZero or oneSpecifies stemming options to use for this field.
struct-fieldZero to manyA subfield of a field of type struct. The struct must have been defined to contain this subfield in the struct definition. If you want the subfield to be handled differently from the rest of the struct, you may specify it within the body of the struct-field.
summaryZero to manySets a summary setting of this field, set to {`dynamic`} to make a dynamic summary.
summary-toZero to one**Deprecated:** Use document-summary instead. The list of document summary names this should be included in.
weightZero to oneThe importance of a field when searching multiple fields and using {`nativeRank`}.
weightedsetZero to oneProperties of a weightedset weightedset<element-type>
Fields can not have default values. See the [document guide](/en/schemas/documents#fields) for how to auto-set field values. @@ -697,12 +1234,37 @@ struct-field [name] { The body of a struct field is optional and may contain the following elements: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| [indexing](#indexing) | Zero to one | The indexing statements used to create index structure additions from this field. For indexed search only `attribute` is supported, which makes the struct field a searchable in-memory attribute that can also be used for e.g. grouping and ranking. For [streaming search](/en/performance/streaming-search)`index` and `summary` are supported in addition. | -| [attribute](#attribute) | Zero to many | Specifies an attribute setting. For example `attribute:fast-search`. | -| [rank](#rank) | Zero to one | Specifies [rank](#rank) settings | -| [match](#match) | Zero to one | Specifies [match](#match) settings | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescription
indexingZero to oneThe indexing statements used to create index structure additions from this field. For indexed search only {`attribute`} is supported, which makes the struct field a searchable in-memory attribute that can also be used for e.g. grouping and ranking. For streaming search{`index`} and {`summary`} are supported in addition.
attributeZero to manySpecifies an attribute setting. For example {`attribute:fast-search`}.
rankZero to oneSpecifies rank settings
matchZero to oneSpecifies match settings
If this struct field is of type struct (i.e., a nested struct), only [indexing:summary](#indexing) may be specified. See [array\](#array) for example use. @@ -771,12 +1333,37 @@ compression { ``` The body of a compression specification is optional and may contain: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| type | Zero to one | **LZ4** is the only valid compression method.| -| level | Zero to one | Enable compression. LZ4 is linear and 9 means HC(high compression).| - -| threshold | Zero to one | A percentage (multiplied by 100) giving the maximum size that compressed data can have to keep the compressed value. If the resulting compressed data is higher than this, the document will be stored uncompressed. The default value is 95.| + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescription
typeZero to one**LZ4** is the only valid compression method.
levelZero to oneEnable compression. LZ4 is linear and 9 means HC(high compression).
+ + + + + + + + + +
thresholdZero to oneA percentage (multiplied by 100) giving the maximum size that compressed data can have to keep the compressed value. If the resulting compressed data is higher than this, the document will be stored uncompressed. The default value is 95.
## rank-profile @@ -795,40 +1382,177 @@ The `inherits` list is optional and may contain the name of other rank profiles The body of a rank-profile may contain: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| [diversity](#diversity) | Zero or one | Specification of required diversity between the different phases. | -| [strict](#strict) | Zero or one | true/false: Whether to use strict or loose type checking. | -| [match-phase](#match-phase) | Zero or one | Ranking configuration to be used for hit limitation during matching. | -| [first-phase](#firstphase-rank) | Zero or one | The ranking config to be used for first-phase ranking. | -| [second-phase](#secondphase-rank) | Zero or one | The ranking config to be used for second-phase ranking. | -| [global-phase](#globalphase-rank) | Zero or one | The ranking config to be used for global-phase ranking. | -| [function \[name\]](#function-rank) | Zero or more | Defines a named function that can be referenced during ranking phase(s) and (if without arguments) as part of match-and summary-features. | -| [inputs](#inputs) | Zero or many | List of query features used in ranking expressions. | -| [constants](#constants) | Zero or many | List of constant features available in ranking expressions. | -| [mutate](#mutate) | Zero or many | Specification of mutations you can apply after different phases of a query. | -| [onnx-model](#onnx-model) | Zero or many | An onnx model to make available in this profile. | -| [significance](#significance) | Zero or one | To enable the use of significance models defined in the service.xml config. | -| [rank-properties](#rank-properties) | Zero or one | List of any rank property key-values to be used by rank features. | -| [match-features](#match-features) | Zero or more | The [rank features](/en/reference/ranking/rank-features) to be returned with each hit, computed in the *match* phase. | -| [summary-features](#summary-features) | Zero or more | The [rank features](/en/reference/ranking/rank-features) to be returned with each hit, computed in the *fill* phase. | -| [rank-features](#rank-features) | Zero or more | The [rank features](/en/reference/ranking/rank-features) to be dumped when using the query-argument [rankfeatures](/en/reference/api/query#ranking.listfeatures). | -| ignore-default-rank-features | Zero or one | Do not dump the default set of rank features, only those explicitly specified with the [rank-features](#rank-features) command. | -| num-threads-per-search | Zero or one | Overrides the global [persearch](/en/reference/applications/services/content#requestthreads-persearch) threads to a **lower** value. | -| min-hits-per-thread | Zero or one | After estimating the number of hits for a query prior to query evaluation, this number is used to decide how many threads to use for the query.
`num_treads = min([num-threads-per-search](#num-threads-per-search), estimated_hits / min-hits-per-thread)`
The current default is 1. If you suspect the fixed cost per thread is too high, increasing this number might be a good idea. Especially if most of your queries are cheap, but you have increased the [num-threads-per-search](#num-threads-per-search) in order to reduce latency for your costly queries covering a lot of documents. The default might change, or the optimal value might be adaptive rendering overrides ignored or counterproductive. | -| num-search-partitions | Zero or one | The number of logical partitions in which the corpus is divided on a search node. By default, this is the same as [num-threads-per-search](#num-threads-per-search). A partition is the smallest unit a search thread will handle. If you have a locality in time when searching and feeding documents, you might want to split it into more, smaller partitions. That way, you avoid that one costly partition leaves some threads idle while others are working hard.
If you have 8 threads per search, you might have 10x as many partitions at 80 reducing max skew with a similar factor. Note that a value of zero turns on adaptive partitioning which tries to solve this optimally. **Note:** If `num-search-partitions` is set to 0 (work sharing is enabled), make sure `termwise-limit` is set to 1.0 (termwise evaluation is disabled). This is to avoid redoing termwise evaluation when work is passed from one thread to another. | -| termwise-limit | Zero or one | If estimated number of hits > corpus \* termwise-limit, it will prune candidates with a CPU cache-friendly [TAAT](/en/performance/feature-tuning#hybrid-taat-daat) with the terms not needed for ranking, prior to doing [DAAT](/en/performance/feature-tuning#hybrid-taat-daat). Current default is 1.0 which turns it off. A value between 0.05 and 0.20 can be a good starting point. This is particularly useful if you have many weak filters. Note that this is a manual override. The default might change, or the optimal value might be adaptive rendering overrides ignored or counterproductive. | -| post-filter-threshold | Zero or one | Threshold value (in the range \[0.0, 1.0\]) deciding if a query with an approximate [nearestNeighbor](/en/reference/querying/yql#nearestneighbor) operator combined with filters is evaluated using post-filtering instead of the default filtering. Post-filtering is chosen when the estimated filter hit ratio of the query is *larger* than this threshold. The default value is 1.0, which disables post-filtering. See [Controlling the filtering behavior with approximate nearest neighbor search](https://blog.vespa.ai/constrained-approximate-nearest-neighbor-search/#controlling-the-filtering-behavior-with-approximate-nearest-neighbor-search) for more details.

With post-filtering the [totalTargetHits](/en/reference/querying/yql#totaltargethits) value used when searching the HNSW index is auto-adjusted in an effort to expose the node's share of *totalTargetHits* hits to first-phase ranking after post-filtering has been applied. The following formula is used: adjustedTargetHits = min(targetHits / estimatedFilterHitRatio, targetHits \* targetHitsMaxAdjustmentFactor). Use [target-hits-max-adjustment-factor](#target-hits-max-adjustment-factor) to control the upper bound of the adjusted *targetHits*. This parameter has no effect in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). | -| approximate-threshold | Zero or one | Threshold value (in the range \[0.0, 1.0\]) deciding if a query with an approximate [nearestNeighbor](/en/reference/querying/yql#nearestneighbor) operator combined with filters is evaluated by searching the [HNSW](#index-hnsw) graph for approximate neighbors with filtering, or performing an [exact nearest neighbor search](/en/querying/nearest-neighbor-search) with pre-filtering. The fallback to exact search is chosen when the estimated filter hit ratio of the query is *less* than this threshold. The default value is 0.02. See [Controlling the filtering behavior with approximate nearest neighbor search](https://blog.vespa.ai/constrained-approximate-nearest-neighbor-search/#controlling-the-filtering-behavior-with-approximate-nearest-neighbor-search) for more details. This parameter has no effect in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). | -| filter-first-threshold | Zero or one | Threshold value (in the range \[0.0, 1.0\]) deciding if the filter is checked before computing a distance (*filter-first heuristic*) while searching the [HNSW](#index-hnsw) graph for approximate neighbors with filtering. This improves the response time at low hit ratios but causes a dip in recall. The heuristic is used when the estimated filter hit ratio of the query is *less* than this threshold. The default value is 0.2. This parameter has no effect in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). | -| filter-first-exploration | Zero or one | Value (in the range \[0.0, 1.0\]) specifying how aggressively the filter-first heuristic explores the graph when searching the [HNSW](#index-hnsw) graph for approximate neighbors with filtering. A higher value means that the graph is explored more aggressively and improves the recall at the cost of the response time. The default value is 0.01. This parameter has no effect in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). | -| exploration-slack | Zero or one | Value (in the range \[0.0, 1.0\]) specifying slack to delay the termination of the search of the [HNSW](#index-hnsw) graph for approximate neighbors with or without filtering. A higher value means that more of the graph is explored and improves the recall at the cost of the response time. The default value is 0.0. This parameter has no effect in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). | -| target-hits-max-adjustment-factor | Zero or one | Value (in the range \[1.0, inf\]) used to control the auto-adjustment of [totalTargetHits](/en/reference/querying/yql#totaltargethits) used when evaluating an approximate [nearestNeighbor](/en/reference/querying/yql#nearestneighbor) operator with post-filtering. The default value is 20.0. Setting this value to 1.0 disables auto-adjustment of *targetHits*. See [post-filter-threshold](#post-filter-threshold) for more details. This parameter has no effect in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). | -| filter-threshold | Zero or one | The threshold value (in the range \[0.0, 1.0\]) deciding when matching in *index* fields should be treated as filters. This happens for query terms with [estimated hit ratios](/en/learn/glossary#estimated-hit-ratio) (in the range \[0.0, 1.0\]) that are above the *filter-threshold*. Use this to optimize query performance when searching large text [index](/en/basics/schemas#document-fields) fields, by allowing a per query combination of [rank: filter](#filter) and [rank: normal](#normal) behavior. This parameter can be overridden per *index* field, see [field-level filter-threshold](#rank-filter-threshold) for a more detailed description with tradeoffs.

In testing with various text datasets (e.g., Wikipedia), a *filter-threshold* setting of 0.05 has been shown to be a good starting point. See [Tuning query performance for lexical search](/en/performance/feature-tuning#tuning-query-performance-for-lexical-search) for more details. This parameter has no effect in [streaming search](/en/performance/streaming-search#differences-in-streaming-search). Use the [ranking.matching.filterThreshold](/en/reference/api/query#ranking.matching.filterThreshold) query parameter to override this value. | -| [rank](#rank) | Zero or more | Specify rank settings of a field in this profile. | -| [rank-type](#rank-type) | Zero or more | The rank-type of a field in this profile. | -| [weakand](#weakand) | Zero or one | Tunes the [weakAnd](/en/ranking/wand#weakand) algorithm to automatically exclude terms and documents with expected low query significance based on [document frequency](/en/learn/glossary#document-frequency-normalized) statistics present in the document corpus. This makes matching faster at the cost of potentially reduced recall. | -| [rank-profile (inner)](#rank-profile) | Zero or more | An inner rank profile, useful for grouping related profiles, especially when defined in separate .profile files. This behaves just like a top level rank profile, except that:
- The full name of the profile to use in queries will be `containing-profile-name.inner-profile-name`.
- The profile must explicitly inherit the containing profile. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescription
diversityZero or oneSpecification of required diversity between the different phases.
strictZero or onetrue/false: Whether to use strict or loose type checking.
match-phaseZero or oneRanking configuration to be used for hit limitation during matching.
first-phaseZero or oneThe ranking config to be used for first-phase ranking.
second-phaseZero or oneThe ranking config to be used for second-phase ranking.
global-phaseZero or oneThe ranking config to be used for global-phase ranking.
function [name]Zero or moreDefines a named function that can be referenced during ranking phase(s) and (if without arguments) as part of match-and summary-features.
inputsZero or manyList of query features used in ranking expressions.
constantsZero or manyList of constant features available in ranking expressions.
mutateZero or manySpecification of mutations you can apply after different phases of a query.
onnx-modelZero or manyAn onnx model to make available in this profile.
significanceZero or oneTo enable the use of significance models defined in the service.xml config.
rank-propertiesZero or oneList of any rank property key-values to be used by rank features.
match-featuresZero or moreThe rank features to be returned with each hit, computed in the *match* phase.
summary-featuresZero or moreThe rank features to be returned with each hit, computed in the *fill* phase.
rank-featuresZero or moreThe rank features to be dumped when using the query-argument rankfeatures.
ignore-default-rank-featuresZero or oneDo not dump the default set of rank features, only those explicitly specified with the rank-features command.
num-threads-per-searchZero or oneOverrides the global persearch threads to a **lower** value.
min-hits-per-threadZero or oneAfter estimating the number of hits for a query prior to query evaluation, this number is used to decide how many threads to use for the query.
{`num_treads = min([num-threads-per-search](#num-threads-per-search), estimated_hits / min-hits-per-thread)`}
The current default is 1. If you suspect the fixed cost per thread is too high, increasing this number might be a good idea. Especially if most of your queries are cheap, but you have increased the num-threads-per-search in order to reduce latency for your costly queries covering a lot of documents. The default might change, or the optimal value might be adaptive rendering overrides ignored or counterproductive.
num-search-partitionsZero or oneThe number of logical partitions in which the corpus is divided on a search node. By default, this is the same as num-threads-per-search. A partition is the smallest unit a search thread will handle. If you have a locality in time when searching and feeding documents, you might want to split it into more, smaller partitions. That way, you avoid that one costly partition leaves some threads idle while others are working hard.
If you have 8 threads per search, you might have 10x as many partitions at 80 reducing max skew with a similar factor. Note that a value of zero turns on adaptive partitioning which tries to solve this optimally. **Note:** If {`num-search-partitions`} is set to 0 (work sharing is enabled), make sure {`termwise-limit`} is set to 1.0 (termwise evaluation is disabled). This is to avoid redoing termwise evaluation when work is passed from one thread to another.
termwise-limitZero or oneIf estimated number of hits > corpus * termwise-limit, it will prune candidates with a CPU cache-friendly TAAT with the terms not needed for ranking, prior to doing DAAT. Current default is 1.0 which turns it off. A value between 0.05 and 0.20 can be a good starting point. This is particularly useful if you have many weak filters. Note that this is a manual override. The default might change, or the optimal value might be adaptive rendering overrides ignored or counterproductive.
post-filter-thresholdZero or oneThreshold value (in the range [0.0, 1.0]) deciding if a query with an approximate nearestNeighbor operator combined with filters is evaluated using post-filtering instead of the default filtering. Post-filtering is chosen when the estimated filter hit ratio of the query is *larger* than this threshold. The default value is 1.0, which disables post-filtering. See Controlling the filtering behavior with approximate nearest neighbor search for more details.

With post-filtering the totalTargetHits value used when searching the HNSW index is auto-adjusted in an effort to expose the node's share of *totalTargetHits* hits to first-phase ranking after post-filtering has been applied. The following formula is used:
{`adjustedTargetHits = min(targetHits / estimatedFilterHitRatio, targetHits * targetHitsMaxAdjustmentFactor)`}
. Use target-hits-max-adjustment-factor to control the upper bound of the adjusted *targetHits*. This parameter has no effect in streaming search.
approximate-thresholdZero or oneThreshold value (in the range [0.0, 1.0]) deciding if a query with an approximate nearestNeighbor operator combined with filters is evaluated by searching the HNSW graph for approximate neighbors with filtering, or performing an exact nearest neighbor search with pre-filtering. The fallback to exact search is chosen when the estimated filter hit ratio of the query is *less* than this threshold. The default value is 0.02. See Controlling the filtering behavior with approximate nearest neighbor search for more details. This parameter has no effect in streaming search.
filter-first-thresholdZero or oneThreshold value (in the range [0.0, 1.0]) deciding if the filter is checked before computing a distance (*filter-first heuristic*) while searching the HNSW graph for approximate neighbors with filtering. This improves the response time at low hit ratios but causes a dip in recall. The heuristic is used when the estimated filter hit ratio of the query is *less* than this threshold. The default value is 0.2. This parameter has no effect in streaming search.
filter-first-explorationZero or oneValue (in the range [0.0, 1.0]) specifying how aggressively the filter-first heuristic explores the graph when searching the HNSW graph for approximate neighbors with filtering. A higher value means that the graph is explored more aggressively and improves the recall at the cost of the response time. The default value is 0.01. This parameter has no effect in streaming search.
exploration-slackZero or oneValue (in the range [0.0, 1.0]) specifying slack to delay the termination of the search of the HNSW graph for approximate neighbors with or without filtering. A higher value means that more of the graph is explored and improves the recall at the cost of the response time. The default value is 0.0. This parameter has no effect in streaming search.
target-hits-max-adjustment-factorZero or oneValue (in the range [1.0, inf]) used to control the auto-adjustment of totalTargetHits used when evaluating an approximate nearestNeighbor operator with post-filtering. The default value is 20.0. Setting this value to 1.0 disables auto-adjustment of *targetHits*. See post-filter-threshold for more details. This parameter has no effect in streaming search.
filter-thresholdZero or oneThe threshold value (in the range [0.0, 1.0]) deciding when matching in *index* fields should be treated as filters. This happens for query terms with estimated hit ratios (in the range [0.0, 1.0]) that are above the *filter-threshold*. Use this to optimize query performance when searching large text index fields, by allowing a per query combination of rank: filter and rank: normal behavior. This parameter can be overridden per *index* field, see field-level filter-threshold for a more detailed description with tradeoffs.

In testing with various text datasets (e.g., Wikipedia), a *filter-threshold* setting of 0.05 has been shown to be a good starting point. See Tuning query performance for lexical search for more details. This parameter has no effect in streaming search. Use the ranking.matching.filterThreshold query parameter to override this value.
rankZero or moreSpecify rank settings of a field in this profile.
rank-typeZero or moreThe rank-type of a field in this profile.
weakandZero or oneTunes the weakAnd algorithm to automatically exclude terms and documents with expected low query significance based on document frequency statistics present in the document corpus. This makes matching faster at the cost of potentially reduced recall.
rank-profile (inner)Zero or moreAn inner rank profile, useful for grouping related profiles, especially when defined in separate .profile files. This behaves just like a top level rank profile, except that:
- The full name of the profile to use in queries will be {`containing-profile-name.inner-profile-name`}.
- The profile must explicitly inherit the containing profile.
## match-phase @@ -846,12 +1570,32 @@ match-phase { } ``` -| Name | Description | -| :--- | :--- | -| attribute | The quality attribute that decides which documents are a match if the match phase estimates that there will be more than the node's share if [total-max-hits](#match-phase-total-max-hits) hits. The attribute must be single-value numeric with [fast-search](#attribute) enabled. It should correlate with the order which would be produced by a full query evaluation. No default. | -| order | Whether the attribute should be used in `descending` order (prefer documents with a high value) or `ascending` order (prefer documents with a low value). Usually, it is not necessary to specify this, as the default value `descending` is by far the most common. | -| total-max-hits | The total max hits that should be produced in the match phase across all nodes in the group evaluating the query. This number should be large, and larger the worse the correlation between the match-phase attribute and the first-phase function. | -| max-hits | The max hits each content node should attempt to produce in the match phase. Prefer using [total-max-hits](#match-phase-total-max-hits) over this. | + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
attributeThe quality attribute that decides which documents are a match if the match phase estimates that there will be more than the node's share if total-max-hits hits. The attribute must be single-value numeric with fast-search enabled. It should correlate with the order which would be produced by a full query evaluation. No default.
orderWhether the attribute should be used in {`descending`} order (prefer documents with a high value) or {`ascending`} order (prefer documents with a low value). Usually, it is not necessary to specify this, as the default value {`descending`} is by far the most common.
total-max-hitsThe total max hits that should be produced in the match phase across all nodes in the group evaluating the query. This number should be large, and larger the worse the correlation between the match-phase attribute and the first-phase function.
max-hitsThe max hits each content node should attempt to produce in the match phase. Prefer using total-max-hits over this.
## strict @@ -879,10 +1623,24 @@ diversity { } ``` -| Name | Description | -| :--- | :--- | -| attribute | Which attribute to use when deciding diversity. The attribute must be a single-valued numeric, string or [reference](#reference) type.| -| min-groups | Specifies the minimum number of groups returned from the phase. Using this with [match-phase](#match-phase) often means one can reduce [total-max-hits](#match-phase-total-max-hits). In [second-phase](#secondphase-rank) you might reduce [total-rerank-count](#secondphase-total-rerank-count) and still get good and diverse results.| + + + + + + + + + + + + + + + + + +
NameDescription
attributeWhich attribute to use when deciding diversity. The attribute must be a single-valued numeric, string or reference type.
min-groupsSpecifies the minimum number of groups returned from the phase. Using this with match-phase often means one can reduce total-max-hits. In second-phase you might reduce total-rerank-count and still get good and diverse results.
## first-phase @@ -895,12 +1653,32 @@ first-phase { ``` The body of a first-phase ranking statement consists of: -| Name | Description | -| --- | --- | -| [expression](#expression) | Specify the ranking expression to be used for the first phase of ranking - see [ranking expressions](/en/reference/ranking/ranking-expressions).| -| total-keep-rank-count | How many documents to keep the first phase top rank values for in total over the nodes evaluating the query. The default value is 10000 per node.| -| keep-rank-count | How many documents to keep the first phase top rank values for per node. Prefer [total-keep-rank-count](#total-keep-rank-count) over this.| -| rank-score-drop-limit | Drop all hits with a first-phase rank score less than or equal to this floating-point number. Use this to implement a rank cutoff. Default is `-Double.MAX_VALUE`.| + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
expressionSpecify the ranking expression to be used for the first phase of ranking - see ranking expressions.
total-keep-rank-countHow many documents to keep the first phase top rank values for in total over the nodes evaluating the query. The default value is 10000 per node.
keep-rank-countHow many documents to keep the first phase top rank values for per node. Prefer total-keep-rank-count over this.
rank-score-drop-limitDrop all hits with a first-phase rank score less than or equal to this floating-point number. Use this to implement a rank cutoff. Default is {`-Double.MAX_VALUE`}.
## expression @@ -965,11 +1743,28 @@ inputs { } ``` -| Name | Description | -| :--- | :--- | -| name | The name of the inputs, written either the full feature name `query(myName)`, or just as `name`. | -| type | The type of the constant, either `double` or a [tensor type](/en/reference/ranking/tensor#tensor-type-spec). If omitted, the type is double. | -| value | An optional default module, used if this input is not set in the query. A number, or a [tensor on literal form](/en/reference/ranking/tensor#tensor-literal-form). | + + + + + + + + + + + + + + + + + + + + + +
NameDescription
nameThe name of the inputs, written either the full feature name {`query(myName)`}, or just as {`name`}.
typeThe type of the constant, either {`double`} or a tensor type. If omitted, the type is double.
valueAn optional default module, used if this input is not set in the query. A number, or a tensor on literal form.
Input examples: @@ -994,11 +1789,28 @@ constants { } ``` -| Name | Description | -| :--- | :--- | -| name | The name of the constant, written either the full feature name `constant(myName)`, or just as `name`. | -| type | The type of the constant, either `double` or a [tensor type](/en/reference/ranking/tensor#tensor-type-spec). If omitted, the type is double. | -| value | A number, a [tensor on literal form](/en/reference/ranking/tensor#tensor-literal-form), or `file:` followed by a path from the application package root to a file containing the constant. The file must be stored in a valid [tensor JSON Format](/en/reference/ranking/constant-tensor-json-format) and end with `.json`. The file may be lz4 compressed, in which case the ending must be `.json.lz4`. | + + + + + + + + + + + + + + + + + + + + + +
NameDescription
nameThe name of the constant, written either the full feature name {`constant(myName)`}, or just as {`name`}.
typeThe type of the constant, either {`double`} or a tensor type. If omitted, the type is double.
valueA number, a tensor on literal form, or {`file:`} followed by a path from the application package root to a file containing the constant. The file must be stored in a valid tensor JSON Format and end with {`.json`}. The file may be lz4 compressed, in which case the ending must be {`.json.lz4`}.
Constant examples: @@ -1022,10 +1834,24 @@ rank-properties { } ``` -| Name | Description | -| :--- | :--- | -| key | Name of the property. | -| value | A number or any string. Must be quoted if it contains spacing. | + + + + + + + + + + + + + + + + + +
NameDescription
keyName of the property.
valueA number or any string. Must be quoted if it contains spacing.
## function (inline)? [name] @@ -1080,12 +1906,32 @@ second-phase { ``` The body of a secondphase-ranking statement consists of: -| Name | Description | -| --- | --- | -| [expression](#expression) | Specify the ranking expression to be used for the second phase of ranking. (for a description, see the [ranking expression](/en/reference/ranking/ranking-expressions) documentation. Hits not reranked might be re-scored using a linear function to avoid a greater rank score than the worst reranked hit. This linear function will normally attempt to map the first phase rank score range of reranked hits to the reranked rank score range | -| rank-score-drop-limit | When set, drop all hits with a second phase rank score (possibly a [re-scored](#secondphase-rescoring) rank score) less than or equal to this floating point number. Use this to implement a second-phase rank cutoff. By default, this value is not set. This can also be [set in the query](/en/reference/api/query#ranking.secondphase.rankscoredroplimit). | -| total-rerank-count | Optional argument. Specifies the number of hits to be re-ranked in the second phase in total over the content nodes that participate in evaluating a query (a *group*). The default value is 100 per node. This can also be [set in the query](/en/reference/api/query#ranking.secondphase.totalrerankcount). Hits not reranked might be [re-scored](#secondphase-rescoring). | -| rerank-count | Optional argument. Specifies the number of hits to be re-ranked in the second phase on each content node. This can also be [set in the query](/en/reference/api/query#ranking.secondphase.rerankcount). Prefer using [total-rerank-count](#secondphase-total-rerank-count) over this. | + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
expressionSpecify the ranking expression to be used for the second phase of ranking. (for a description, see the ranking expression documentation. Hits not reranked might be re-scored using a linear function to avoid a greater rank score than the worst reranked hit. This linear function will normally attempt to map the first phase rank score range of reranked hits to the reranked rank score range
rank-score-drop-limitWhen set, drop all hits with a second phase rank score (possibly a re-scored rank score) less than or equal to this floating point number. Use this to implement a second-phase rank cutoff. By default, this value is not set. This can also be set in the query.
total-rerank-countOptional argument. Specifies the number of hits to be re-ranked in the second phase in total over the content nodes that participate in evaluating a query (a *group*). The default value is 100 per node. This can also be set in the query. Hits not reranked might be re-scored.
rerank-countOptional argument. Specifies the number of hits to be re-ranked in the second phase on each content node. This can also be set in the query. Prefer using total-rerank-count over this.
## global-phase @@ -1098,11 +1944,28 @@ global-phase { ``` The body of a global-phase ranking statement consists of: -| Name | Description | -| :--- | :--- | -| [expression](#expression) | Specify the ranking expression to be used for the global phase of ranking. (for a description, see the [ranking expression](/en/reference/ranking/ranking-expressions) documentation. | -| rerank-count | Optional argument. Specifies the number of hits to be re-ranked in the global phase. The default value is 100. Note for complex setups: Applied to hits from one schema at a time, so if a query searches in multiple schemas simultaneously, global-phase may run for 100 hits per schema as default. | -| rank-score-drop-limit | When set, drop all hits with a global phase rank score (possibly a [re-scored](#globalphase-rank) rank score) less than or equal to this floating point number. Use this to implement a global phase rank cutoff. By default, this value is not set. This can also be [set in the query](/en/reference/api/query#ranking.globalphase.rankscoredroplimit). | + + + + + + + + + + + + + + + + + + + + + +
NameDescription
expressionSpecify the ranking expression to be used for the global phase of ranking. (for a description, see the ranking expression documentation.
rerank-countOptional argument. Specifies the number of hits to be re-ranked in the global phase. The default value is 100. Note for complex setups: Applied to hits from one schema at a time, so if a query searches in multiple schemas simultaneously, global-phase may run for 100 hits per schema as default.
rank-score-drop-limitWhen set, drop all hits with a global phase rank score (possibly a re-scored rank score) less than or equal to this floating point number. Use this to implement a global phase rank cutoff. By default, this value is not set. This can also be set in the query.
## summary-features @@ -1175,20 +2038,57 @@ mutate { ``` The phases are: -| Name | Description | -| :--- | :--- | -| on-match | All documents that satisfy the query. | -| on-first-phase | All documents from [on-match](#on-match), and is not dropped due the optional [rank-score-drop-limit](#rank-score-drop-limit) | -| on-second-phase | All documents from [on-first-phase](#on-first-phase) that makes it onto the [second-phase](#secondphase-rank) heap. | -| on-summary | All documents where are a summary is requested. | + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
on-matchAll documents that satisfy the query.
on-first-phaseAll documents from on-match, and is not dropped due the optional rank-score-drop-limit
on-second-phaseAll documents from on-first-phase that makes it onto the second-phase heap.
on-summaryAll documents where are a summary is requested.
The attribute must be a single value numeric attribute, enabled as [mutable](#mutable). It must also be defined outside the [document](#document) clause. -| Operation | Description | -| :--- | :--- | -| \= | Set the value of the attribute to the given value. | -| += | Add the given value to the attribute | -| \-= | Subtract the given value from the attribute | + + + + + + + + + + + + + + + + + + + + + +
OperationDescription
=Set the value of the attribute to the given value.
+=Add the given value to the attribute
-=Subtract the given value from the attribute
Find examples and use cases in [rank phase statistics](/en/ranking/phased-ranking#rank-phase-statistics). @@ -1206,10 +2106,27 @@ constant [name] { ``` The body of a constant must contain: -| Name | Description | Occurrence | -| :--- | :--- | :--- | -| file | Path to the file containing this constant, relative to the application package root. The file must be stored in a valid [tensor JSON Format](/en/reference/ranking/constant-tensor-json-format) and end with `.json`. The file may be lz4 compressed, in which case the ending must be `.json.lz4`. | One | -| type | The type of the constant tensor, refer to [tensor-type-spec](/en/reference/ranking/tensor#tensor-type-spec) for reference. | One | + + + + + + + + + + + + + + + + + + + + +
NameDescriptionOccurrence
filePath to the file containing this constant, relative to the application package root. The file must be stored in a valid tensor JSON Format and end with {`.json`}. The file may be lz4 compressed, in which case the ending must be {`.json.lz4`}.One
typeThe type of the constant tensor, refer to tensor-type-spec for reference.One
Constant tensor example: @@ -1249,15 +2166,52 @@ onnx-model [name] { The body of an ONNX model must contain: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| file | One | Path to the location of the file containing the ONNX model. The path is relative to the root of the application package containing this schema. | -| input | Zero to many | An input to the ONNX model. The ONNX name, as given in the model, as well as the source for the input, is specified. | -| output | Zero to many | An output of the ONNX model. The ONNX name, as given in the model, as well as the name for use in Vespa, is specified. If no output is defined and is not referred to from the rank feature, the first output defined in the model is used. | -| gpu-device | Zero or one | Set the GPU device number to use for computation, starting at 0, i.e. if your GPU is `/dev/nvidia0` set this to 0. This must be an Nvidia CUDA-enabled GPU. Currently only models used in [global-phase](#globalphase-rank) can make use of GPU-acceleration. | -| intraop-threads | Zero or one | The number of threads available for running operations with multithreaded implementations. | -| interop-threads | Zero or one | The number of threads available for running multiple operations in parallel. This is only applicable for `parallel` execution mode. | -| execution-mode | Zero or one | Controls how the operators of a graph are executed, either `sequential` or `parallel`. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescription
fileOnePath to the location of the file containing the ONNX model. The path is relative to the root of the application package containing this schema.
inputZero to manyAn input to the ONNX model. The ONNX name, as given in the model, as well as the source for the input, is specified.
outputZero to manyAn output of the ONNX model. The ONNX name, as given in the model, as well as the name for use in Vespa, is specified. If no output is defined and is not referred to from the rank feature, the first output defined in the model is used.
gpu-deviceZero or oneSet the GPU device number to use for computation, starting at 0, i.e. if your GPU is {`/dev/nvidia0`} set this to 0. This must be an Nvidia CUDA-enabled GPU. Currently only models used in global-phase can make use of GPU-acceleration.
intraop-threadsZero or oneThe number of threads available for running operations with multithreaded implementations.
interop-threadsZero or oneThe number of threads available for running multiple operations in parallel. This is only applicable for {`parallel`} execution mode.
execution-modeZero or oneControls how the operators of a graph are executed, either {`sequential`} or {`parallel`}.
For more details including examples, see [ranking with ONNX models.](/en/ranking/onnx) @@ -1273,9 +2227,22 @@ significance { The body must contain: -| name | occurrence | description | -| :--- | :--- | :--- | -| use-model | One | Enable or disable the use of significance models specified in [service.xml](/en/reference/applications/services/search#significance). | + + + + + + + + + + + + + + + +
nameoccurrencedescription
use-modelOneEnable or disable the use of significance models specified in service.xml.
For more details see [Significance Model.](/en/ranking/significance) @@ -1293,11 +2260,32 @@ The `inherits` attribute is optional. If defined, it contains the name of other The body of a document summary consists of: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| from-disk | Zero or one | Mark this summary as accessing fields on disk. This will silence the warnings that this summary reads from disk; in the console for prod deployments, on the command line for manual deployments. Read more in [Document Summaries](/en/querying/document-summaries#performance) on how to avoid disk access to speed up queries. | -| [summary](#summary) | Zero to many | A summary field in this document summary. | -| omit-summary-features | Zero or one | Specifies that [summary-features](#summary-features) should be omitted from this document summary. Use this to reduce CPU cost in [multiphase searching](/en/applications/searchers#multiphase-searching) when using multiple document summaries to fill hits, and only some of them need the summary features that are specified in the [rank-profile](#rank-profile). | + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescription
from-diskZero or oneMark this summary as accessing fields on disk. This will silence the warnings that this summary reads from disk; in the console for prod deployments, on the command line for manual deployments. Read more in Document Summaries on how to avoid disk access to speed up queries.
summaryZero to manyA summary field in this document summary.
omit-summary-featuresZero or oneSpecifies that summary-features should be omitted from this document summary. Use this to reduce CPU cost in multiphase searching when using multiple document summaries to fill hits, and only some of them need the summary features that are specified in the rank-profile.
Use the [summary](/en/reference/api/query#presentation.summary) query parameter to choose a document summary in searches or in [grouping](/en/reference/querying/grouping-language#summary). See also [document summaries](/en/querying/document-summaries). @@ -1314,10 +2302,24 @@ documentid: [setting] ``` The settings are: -| Setting | Description | -| :--- | :--- | -| from-disk | Store document IDs on disk only. This is the default setting. | -| attribute | Make the document IDs an attribute by also storing them in memory. | + + + + + + + + + + + + + + + + + +
SettingDescription
from-diskStore document IDs on disk only. This is the default setting.
attributeMake the document IDs an attribute by also storing them in memory.
## stemming @@ -1328,12 +2330,32 @@ stemming: [stemming-type] ``` The stemming types are: -| Type | Description | -| --- | --- | -| none | No stemming: Keep words unchanged | -| best | Use the 'best' stem of each word according to some heuristic scoring. This is the default setting | -| shortest | Use the shortest stem of each word | -| multiple | Use multiple stems. Retains all stems returned from the linguistics library | + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
noneNo stemming: Keep words unchanged
bestUse the 'best' stem of each word according to some heuristic scoring. This is the default setting
shortestUse the shortest stem of each word
multipleUse multiple stems. Retains all stems returned from the linguistics library
**Note:** When combining multiple fields in a [fieldset](#fieldset), all fields should use the same stemming type. @@ -1347,9 +2369,20 @@ Contained in [field](#field). Sets [normalizing](/en/linguistics/linguistics-ope normalizing: [normalizing-type] ``` -| Type | Description | -| :--- | :--- | -| none | No normalizing. | + + + + + + + + + + + + + +
TypeDescription
noneNo normalizing.
## dictionary @@ -1420,15 +2453,44 @@ Read the [introduction to attributes](/en/content/attributes). If the attribute Actions required when [adding or modifying attributes](#modifying-schemas). Properties: -| Property | Description | -| :--- | :--- | -| fast-search | Create a dictionary/index structure to speed up search in the attribute. [Read more](/en/content/attributes#index-structures). | -| fast-access | If [searchable-copies](/en/reference/applications/services/content#searchable-copies) \< [redundancy](/en/reference/applications/services/content#redundancy), use _fast-access_ to load the attribute in memory on all nodes with a document replica. Use this for fast access when doing [partial updates](/en/writing/reads-and-writes) and when used in a [selection expression](/en/reference/applications/services/content#documents) for garbage collection. If [searchable-copies](/en/reference/applications/services/content#searchable-copies) == [redundancy](/en/reference/applications/services/content#redundancy) (default), this property is a no-op. [Read more](/en/performance/sizing-feeding#redundancy-settings). | -| fast-rank | Only supported for [tensor](/en/ranking/tensor-user-guide) field types with at least one mapped dimension. Ensures that the per-document tensors are stored in-memory using a format that is more optimal for [ranking expression](/en/reference/ranking/ranking-expressions) evaluation. This comes at the cost of using more memory. Without this setting, these tensors are serialized in-memory, which requires deserialization as part of ranking expression evaluation. See [tensor performance](/en/performance/feature-tuning#tensor-ranking). | -| paged | This can reduce the memory footprint by allowing paging the attribute data out of memory to disk. Not supported for [tensor](#tensor) with fast-rank and [predicate](#predicate) types. See [paged attributes](/en/content/attributes#paged-attributes) for details. Do not enable _paged_ before fully understanding the consequences. | -| [sorting](#sorting) | The sort specification for this attribute. | -| [distance-metric](#distance-metric) | Specifies the distance metric to use with the [nearestNeighbor](/en/reference/querying/yql#nearestneighbor) query operator. Only relevant for tensor attribute fields. | -| mutable | Marks the attribute as a special mutable attribute that can be updated by a [mutate](#mutate) operation during query evaluation.| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyDescription
fast-searchCreate a dictionary/index structure to speed up search in the attribute. Read more.
fast-accessIf searchable-copies < redundancy, use _fast-access_ to load the attribute in memory on all nodes with a document replica. Use this for fast access when doing partial updates and when used in a selection expression for garbage collection. If searchable-copies == redundancy (default), this property is a no-op. Read more.
fast-rankOnly supported for tensor field types with at least one mapped dimension. Ensures that the per-document tensors are stored in-memory using a format that is more optimal for ranking expression evaluation. This comes at the cost of using more memory. Without this setting, these tensors are serialized in-memory, which requires deserialization as part of ranking expression evaluation. See tensor performance.
pagedThis can reduce the memory footprint by allowing paging the attribute data out of memory to disk. Not supported for tensor with fast-rank and predicate types. See paged attributes for details. Do not enable _paged_ before fully understanding the consequences.
sortingThe sort specification for this attribute.
distance-metricSpecifies the distance metric to use with the nearestNeighbor query operator. Only relevant for tensor attribute fields.
mutableMarks the attribute as a special mutable attribute that can be updated by a mutate operation during query evaluation.
An attribute is [multivalued](/en/querying/searching-multivalue-fields) if assigning it multiple values during indexing, by using a multivalued field type like array or map, or by using e.g. [split](/en/reference/writing/indexing-language#split) / [for\_each](/en/reference/writing/indexing-language#for_each) or by letting multiple fields write their value to the attribute field. @@ -1451,12 +2513,32 @@ sorting { } ``` -| Property | Description | -| :--- | :--- | -| order | `ascending` (default) or `descending`. Used unless overridden using [order by](/en/reference/querying/yql#function) in query. | -| function | [Sort function](/en/reference/querying/yql#function): `uca` (default), `lowercase` or `raw`. Note that if no language or locale is specified in the query, the field, or generally for the query, `lowercase` will be used instead of `uca`. See [order by](/en/reference/querying/yql#order-by) for details. | -| strength | [UCA sort strength](/en/reference/querying/yql#strength), default `primary` - see [strength](/en/reference/querying/yql#strength) for values. Values set in the query override the schema definition. | -| locale | [UCA locale](/en/reference/querying/yql#locale), default none, indicating that it is inferred from the query. It should only be set here if the attribute is filled with data in one language only. See [locale](/en/reference/querying/yql#locale) for details. Values set in the query override the schema definition. | + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyDescription
order{`ascending`} (default) or {`descending`}. Used unless overridden using order by in query.
functionSort function: {`uca`} (default), {`lowercase`} or {`raw`}. Note that if no language or locale is specified in the query, the field, or generally for the query, {`lowercase`} will be used instead of {`uca`}. See order by for details.
strengthUCA sort strength, default {`primary`} - see strength for values. Values set in the query override the schema definition.
localeUCA locale, default none, indicating that it is inferred from the query. It should only be set here if the attribute is filled with data in one language only. See locale for details. Values set in the query override the schema definition.
## distance-metric @@ -1475,14 +2557,54 @@ distance-metric: [metric] ``` These are the available metrics; the expressions given for _distance_ and _closeness_ assume a query vector _qv = [x0, x1, ...]_ and an attribute vector _av = [y0, y1, ...]_ with same dimension of size _n_ for all vectors. -| METRIC | DESCRIPTION | DISTANCE | CLOSENESS | -| :--- | :--- | :--- | :--- | -| euclidean | The normal [euclidean](#euclidean) (aka L2) distance. | $d = \sqrt{(x_1 - y_1)^2 + (x_2 - y_2)^2 + etc + (x_n - y_n)^2}$
range: $[0, \infty)$ | $\frac{1}{1 + d}$ | -| angular | The [angle](#angular) between $q_v$ and $a_v$ vectors. | $d = \cos^{-1}((qa)/(q a))$
range: $[0, \pi]$ | $\frac{1}{1 + d}$ | -| dotproduct | Used for [maximal inner product search](#dotproduct). | $d = -(\vec{q} \cdot \vec{a})$
range: $[-\infty, +\infty]$ | $-d = \vec{q} \cdot \vec{a}$ | -| prenormalized-angular | Assumes normalized vectors, see [note](#prenormalized-angular) below. | $d = 1.0 - ((qa)/(q a))$
range: $[0,2]$ | $\frac{1}{1 + d}$ | -| geodegrees | Assumes geographical coordinates, see [note](#geodegrees) below. | $d =$ great-circle (km)
range: $[0, 20015]$ | $\frac{1}{1 + d}$ | -| hamming | Only useful for binary tensors using int8 precision, see [note](#hamming) below. | $d = \sum_{i=1}^{n} \mathrm{popcount}(x_i \oplus y_i)$
range: $[0, 8n]$ | $\frac{1}{1 + d}$ | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
METRICDESCRIPTIONDISTANCECLOSENESS
euclideanThe normal euclidean (aka L2) distance.$d = \sqrt{(x_1 - y_1)^2 + (x_2 - y_2)^2 + etc + (x_n - y_n)^2}$
range: $[0, \infty)$
$\frac{1}{1 + d}$
angularThe angle between $q_v$ and $a_v$ vectors.$d = \cos^{-1}((qa)/(q a))$
range: $[0, \pi]$
$\frac{1}{1 + d}$
dotproductUsed for maximal inner product search.$d = -(\vec{q} \cdot \vec{a})$
range: $[-\infty, +\infty]$
$-d = \vec{q} \cdot \vec{a}$
prenormalized-angularAssumes normalized vectors, see note below.$d = 1.0 - ((qa)/(q a))$
range: $[0,2]$
$\frac{1}{1 + d}$
geodegreesAssumes geographical coordinates, see note below.$d =$ great-circle (km)
range: $[0, 20015]$
$\frac{1}{1 + d}$
hammingOnly useful for binary tensors using int8 precision, see note below.$d = \sum_{i=1}^{n} \mathrm{popcount}(x_i \oplus y_i)$
range: $[0, 8n]$
$\frac{1}{1 + d}$
### euclidean @@ -1640,15 +2762,52 @@ index [index-name] { Parameters: -| Property | Occurrence | Description | -| :--- | :--- | :--- | -| [stemming](#stemming) | Zero to one | Set the stemming of this index. Indexes without a stemming setting get their stemming setting from the fields added to the index. Setting this explicitly is useful if fields with conflicting stemming settings are added to this index. | -| arity | One (mandatory for predicate fields), else zero. | Set the [arity value for a predicate field](/en/schemas/predicate-fields#index-size). The data type for the containing field must be `predicate`. | -| lower-bound | Zero to one | Set the [lower bound value for a predicate field](/en/schemas/predicate-fields#upper-and-lower-bounds). The data type for the containing field must be `predicate`. | -| upper-bound | Zero to one | Set the [upper bound value for predicate fields](/en/schemas/predicate-fields#upper-and-lower-bounds). The data type for the containing field must be `predicate`. | -| dense-posting-list-threshold | Zero to one | Set the [dense posting list threshold value for predicate fields](/en/schemas/predicate-fields#dense-posting-list-threshold). The data type for the containing field must be `predicate`. | -| enable-bm25 | Zero to one | Enable this index field to be used with the [bm25 rank feature](/en/reference/ranking/rank-features#bm25). This creates posting lists for the [indexes](/en/content/proton#index) for this field that has interleaved features in the document ID streams. This makes it fast to compute the _bm25_ score. See the [BM25 reference](/en/ranking/bm25) for details and example use. | -| [hnsw](#index-hnsw) | Zero to one | Specifies optional parameters for an HNSW index to enable faster, approximate nearest neighbor search. Only supported for tensor attribute fields with tensor types with: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyOccurrenceDescription
stemmingZero to oneSet the stemming of this index. Indexes without a stemming setting get their stemming setting from the fields added to the index. Setting this explicitly is useful if fields with conflicting stemming settings are added to this index.
arityOne (mandatory for predicate fields), else zero.Set the arity value for a predicate field. The data type for the containing field must be {`predicate`}.
lower-boundZero to oneSet the lower bound value for a predicate field. The data type for the containing field must be {`predicate`}.
upper-boundZero to oneSet the upper bound value for predicate fields. The data type for the containing field must be {`predicate`}.
dense-posting-list-thresholdZero to oneSet the dense posting list threshold value for predicate fields. The data type for the containing field must be {`predicate`}.
enable-bm25Zero to oneEnable this index field to be used with the bm25 rank feature. This creates posting lists for the indexes for this field that has interleaved features in the document ID streams. This makes it fast to compute the _bm25_ score. See the BM25 reference for details and example use.
hnswZero to oneSpecifies optional parameters for an HNSW index to enable faster, approximate nearest neighbor search. Only supported for tensor attribute fields with tensor types with:
- One indexed dimension - single vector per document - One or more mapped dimensions and one indexed dimension - multiple vectors per document @@ -1680,10 +2839,24 @@ hnsw { The following parameters are used when building the index graph: -| Parameter | Description | -| :--- | :--- | -| max-links-per-node | Specifies how many links per HNSW node to select when building the graph. The default value is 16. In [HNSWlib](https://github.com/nmslib/hnswlib/blob/master/ALGO_PARAMS.md) (implementation based on the paper) this parameter is known as _M_. | -| neighbors-to-explore-at-insert | Specifies how many neighbors to explore when inserting a document in the HNSW graph. The default value is 200. In HNSWlib, this parameter is known as _ef\_construction_. | + + + + + + + + + + + + + + + + + +
ParameterDescription
max-links-per-nodeSpecifies how many links per HNSW node to select when building the graph. The default value is 16. In HNSWlib (implementation based on the paper) this parameter is known as _M_.
neighbors-to-explore-at-insertSpecifies how many neighbors to explore when inserting a document in the HNSW graph. The default value is 200. In HNSWlib, this parameter is known as _ef_construction_.
The [distance metric](#distance-metric) specified on the _attribute_ is used when building and searching the graph. Example: @@ -1724,12 +2897,32 @@ If the field containing this is defined outside the document, it must start with Specify the operations separated by the pipe (`|`) character. For advanced processing needs, use the [indexing language](/en/reference/writing/indexing-language), or write a [document processor](/en/applications/document-processors). Supported expressions for fields are: -| expression | description | -| :--- | :--- | -| attribute | [Attribute](/en/content/attributes) is used to make a field available for sorting, grouping, ranking and searching using [match](#match) mode `word`. | -| index | Creates a searchable [index](/en/content/proton#index) for the values of this field using [match](#match) mode `text`. By default, the index name will be the same as the name of the schema field. Use a [fieldset](#fieldset) to combine fields in the same set for searching. | -| set\_language | Sets document language - [details](/en/reference/writing/indexing-language#set_language). | -| summary | Includes the value of this field in a [summary](/en/reference/writing/indexing-language#summary) field. Modify summary output by using [summary:](#summary) (e.g., to generate dynamic teasers). | + + + + + + + + + + + + + + + + + + + + + + + + + +
expressiondescription
attributeAttribute is used to make a field available for sorting, grouping, ranking and searching using match mode {`word`}.
indexCreates a searchable index for the values of this field using match mode {`text`}. By default, the index name will be the same as the name of the schema field. Use a fieldset to combine fields in the same set for searching.
set_languageSets document language - details.
summaryIncludes the value of this field in a summary field. Modify summary output by using summary: (e.g., to generate dynamic teasers).
When combining both `index` and `attribute` in the indexing statement for a field, e.g `indexing: summary | attribute | index`, the [match](#match) mode becomes `text` for the field. So searches in this field will not search the contents in the [attribute](#attribute) but the index. @@ -1774,22 +2967,87 @@ Whether the match type is `text`, `word` or `exact`, all term matching will be d Find examples and more details in the [Text Matching](/en/querying/text-matching) guide. Also see search using [regular expressions](/en/reference/querying/yql#matches). -| Property | Valid with | Description | -| :--- | :--- | :--- | -| text | index | The default for string fields with `index`. Can not be combined with exact matching. The field is matched per [token](/en/linguistics/linguistics-opennlp#tokenization). | -| exact | index, attribute | Can not be combined with *text* matching. The field is matched *exactly*: Strings containing any characters whatsoever will be indexed and matched as-is. Lowercasing is still performed unless `match: cased` is also used. In queries, the exact match string ends at the exact match terminator (below).

A field with `match: exact` is considered to be a [filter field](#filter), just as if `rank: filter` was specified. This is because there is only one word per field (or per item in the case of multivalued types such as `array`), so there is little ranking information. Turn off the implicit `rank: filter` by adding `rank: normal`. | -| exact-terminator | index, attribute | Only valid for `match: exact`. Default is `@@`. Specify terminator in [query strings](/en/reference/api/query#model.querystring). If the query strings can contain `@@`, set a different terminator, or use `match: word`, see below. Example - use: ```match { exact exact-terminator: "@%" }``` on a field called `tag` to make query `tag:a b c!@%` match documents with the string *a b c!*

Example using the default terminator: If `tag` is an exact match field, the query: someword AND (tag:!\*!@@ OR tag:(kanoo)@@) matches documents with `someword` and either `!*!` or `(kanoo)` as a tag. Note that without the `@@` terminating the second tag string, the second tag value would be `(kanoo))`. | -| word | index, attribute | This is the default matching mode for [string attributes](/en/content/attributes). It cannot be combined with *text* matching. Match word means that the entire content of the field is indexed as a single word. Word matching is like exact matching, but with more advanced query parsing. The query terms are heuristically parsed, taking into account some usual query syntax characters. One can also use double quotes to include spaces, stars, or exclamation marks. Example: If `artist` is a string attribute, the query: foo AND (artist:"'N Sync" OR artist:"\*NSYNC" OR artist:A\*teens OR artist:"Wham!") matches documents with `foo` and at least one of `'N Sync` or `*NSYNC` or `A*teens` or `Wham!` in the artist field Note that without the quotes, the space in `'N Sync` would end that word and would result in a search for just `'N`, similarly the `!` would mean to increase the weight of a `Wham` term if not quoted. | -| prefix | attribute | Has no effect, as [attributes](/en/content/attributes) always support prefix searches. Prefix matching must be [specified in the query](/en/reference/querying/yql#prefix). See also [regular expressions](/en/reference/querying/yql#matches). | -| substring | [Streaming mode](/en/performance/streaming-search#differences-in-streaming-search) only | Set default match mode to *substring* for the field. Only available in streaming search. As the data structures in streaming search support substring searches, one can always set substring matching in the query, without setting the field to the substring default. Also see [regular expressions](/en/reference/querying/yql#matches). | -| suffix | [Streaming mode](/en/performance/streaming-search) only | Like substring above. | -| uncased | index, attribute | Use case-insensitive matching (the default). | -| cased | index, attribute | Use case-sensitive matching. Usually only used together with `match: exact` or `match: word` modes. When using `match: text`, note that if you are using a custom [linguistics implementation](/en/linguistics/linguistics-custom), this will only have effect for string index fields if that implementation produces cased tokens. | -| max-length | index | Limit the length of the field that will be used for matching. By default, only the first 1M characters are indexed. When adjusting this limit, it might also be needed to adjust [max-occurrences](#max-occurrences). | -| max-occurrences | index | Configure the maximum number of occurrences that will be indexed for each unique token/term in the field for a given document. If this limit is reached, consecutive occurrences of the same token/term are ignored for that document. The default value is 10000.

Adjusting this limit might be needed when using the [phrase](/en/reference/querying/yql#phrase), [near](/en/reference/querying/yql#near), or [onear](/en/reference/querying/yql#onear) query operators to query documents with large field values (see [max-length](#max-length)) that contain more than 10000 occurrences of common tokens/terms. When using these operators, it is only possible to match among the first *max-occurrences* of a token/term in a document. | -| max-token-length | index | Configure the max length of tokens that will be indexed for the field. Longer tokens are silently ignored. The unit is characters (cf. java.lang.String.length()). The default value is 1000. | -| gram | index | This field is matched using n-grams. For example, with the default gram size 2, the string "hi blue" is tokenized to "hi bl lu ue" both in the index and in queries to the index.

N-gram matching is useful mainly as an alternative to [segmentation](/en/linguistics/linguistics-opennlp#tokenization) in CJK languages. Typically, it results in increased recall and lower precision. However, as Vespa usually uses proximity in ranking, the precision offset may not be of much importance. Grams consume more resources than other matching methods because both indexes and queries will have more terms, and the terms contain repetition of the same letters. On the other hand, CPU-intensive CJK segmentation is avoided. It may also be used for substring matching in general. | -| gram-size | index | A positive, nonzero number, default 2. Sets the gram size when gram matching is used. Example: ```match { gram gram-size: 3 }``` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyValid withDescription
textindexThe default for string fields with {`index`}. Can not be combined with exact matching. The field is matched per token.
exactindex, attributeCan not be combined with *text* matching. The field is matched *exactly*: Strings containing any characters whatsoever will be indexed and matched as-is. Lowercasing is still performed unless {`match: cased`} is also used. In queries, the exact match string ends at the exact match terminator (below).

A field with {`match: exact`} is considered to be a filter field, just as if {`rank: filter`} was specified. This is because there is only one word per field (or per item in the case of multivalued types such as {`array`}), so there is little ranking information. Turn off the implicit {`rank: filter`} by adding {`rank: normal`}.
exact-terminatorindex, attributeOnly valid for {`match: exact`}. Default is {`@@`}. Specify terminator in query strings. If the query strings can contain {`@@`}, set a different terminator, or use {`match: word`}, see below. Example - use:
{`{     exact     exact-terminator: "@%" }`}
on a field called {`tag`} to make query {`tag:a b c!@%`} match documents with the string *a b c!*

Example using the default terminator: If {`tag`} is an exact match field, the query:
{`someword AND (tag:!*!@@ OR tag:(kanoo)@@)`}
matches documents with {`someword`} and either {`!*!`} or {`(kanoo)`} as a tag. Note that without the {`@@`} terminating the second tag string, the second tag value would be {`(kanoo))`}.
wordindex, attributeThis is the default matching mode for string attributes. It cannot be combined with *text* matching. Match word means that the entire content of the field is indexed as a single word. Word matching is like exact matching, but with more advanced query parsing. The query terms are heuristically parsed, taking into account some usual query syntax characters. One can also use double quotes to include spaces, stars, or exclamation marks. Example: If {`artist`} is a string attribute, the query: foo AND (artist:"'N Sync" OR artist:"*NSYNC" OR artist:A*teens OR artist:"Wham!") matches documents with {`foo`} and at least one of {`'N Sync`} or {`*NSYNC`} or {`A*teens`} or {`Wham!`} in the artist field Note that without the quotes, the space in {`'N Sync`} would end that word and would result in a search for just {`'N`}, similarly the {`!`} would mean to increase the weight of a {`Wham`} term if not quoted.
prefixattributeHas no effect, as attributes always support prefix searches. Prefix matching must be specified in the query. See also regular expressions.
substringStreaming mode onlySet default match mode to *substring* for the field. Only available in streaming search. As the data structures in streaming search support substring searches, one can always set substring matching in the query, without setting the field to the substring default. Also see regular expressions.
suffixStreaming mode onlyLike substring above.
uncasedindex, attributeUse case-insensitive matching (the default).
casedindex, attributeUse case-sensitive matching. Usually only used together with {`match: exact`} or {`match: word`} modes. When using {`match: text`}, note that if you are using a custom linguistics implementation, this will only have effect for string index fields if that implementation produces cased tokens.
max-lengthindexLimit the length of the field that will be used for matching. By default, only the first 1M characters are indexed. When adjusting this limit, it might also be needed to adjust max-occurrences.
max-occurrencesindexConfigure the maximum number of occurrences that will be indexed for each unique token/term in the field for a given document. If this limit is reached, consecutive occurrences of the same token/term are ignored for that document. The default value is 10000.

Adjusting this limit might be needed when using the phrase, near, or onear query operators to query documents with large field values (see max-length) that contain more than 10000 occurrences of common tokens/terms. When using these operators, it is only possible to match among the first *max-occurrences* of a token/term in a document.
max-token-lengthindexConfigure the max length of tokens that will be indexed for the field. Longer tokens are silently ignored. The unit is characters (cf. java.lang.String.length()). The default value is 1000.
gramindexThis field is matched using n-grams. For example, with the default gram size 2, the string "hi blue" is tokenized to "hi bl lu ue" both in the index and in queries to the index.

N-gram matching is useful mainly as an alternative to segmentation in CJK languages. Typically, it results in increased recall and lower precision. However, as Vespa usually uses proximity in ranking, the precision offset may not be of much importance. Grams consume more resources than other matching methods because both indexes and queries will have more terms, and the terms contain repetition of the same letters. On the other hand, CPU-intensive CJK segmentation is avoided. It may also be used for substring matching in general.
gram-sizeindexA positive, nonzero number, default 2. Sets the gram size when gram matching is used. Example:
{`{     gram     gram-size: 3 }`}
## rank @@ -1806,10 +3064,24 @@ rank { ``` The field name should only be specified when used inside a rank-profile. The following ranking settings are supported in addition to the default: -| Ranking setting | Description | -| :--- | :--- | -| filter | Indicates that matching in this field should use fast bit vector data structures only. This saves CPU during matching, but only a few simple ranking features will be available for the field. This setting is appropriate for fields typically used for filtering or simple boosting purposes, like filtering or boosting on the language of the document.

- For *index* fields, this setting does not change index formats but helps choose the most compact representation when matching against the field.

- For *attribute* fields with *fast-search* this setting builds additional posting list representations (bit vectors) can significantly speed up query evaluation. See [feature tuning](/en/performance/feature-tuning#when-to-use-fast-search-for-attribute-fields) and [the practical search performance guide](/en/performance/practical-search-performance-guide). | -| normal | The reverse of `filter`. Matching in this field will use normal data structures and give normal match information for ranking. Used to turn off implicit `rank: filter` when using [match: exact](#exact). If both `filter` and `normal` are set somehow, the effect is as if only `normal` was specified. | + + + + + + + + + + + + + + + + + +
Ranking settingDescription
filterIndicates that matching in this field should use fast bit vector data structures only. This saves CPU during matching, but only a few simple ranking features will be available for the field. This setting is appropriate for fields typically used for filtering or simple boosting purposes, like filtering or boosting on the language of the document.

- For *index* fields, this setting does not change index formats but helps choose the most compact representation when matching against the field.

- For *attribute* fields with *fast-search* this setting builds additional posting list representations (bit vectors) can significantly speed up query evaluation. See feature tuning and the practical search performance guide.
normalThe reverse of {`filter`}. Matching in this field will use normal data structures and give normal match information for ranking. Used to turn off implicit {`rank: filter`} when using match: exact. If both {`filter`} and {`normal`} are set somehow, the effect is as if only {`normal`} was specified.
Related: See the [filter](/en/reference/querying/yql#filter) query annotation for how to annotate query terms as filters. @@ -1823,9 +3095,20 @@ rank [field-name] { } ``` -| Setting | Description | -| --- | --- | -| filter-threshold | Threshold value (in the range [0.0, 1.0]) deciding when matching in this _index_ field should be treated as a filter. This happens for query terms with [estimated hit ratios](/en/learn/glossary#estimated-hit-ratio) (in the range [0.0, 1.0]) that are above the _filter-threshold_. Then, fast bitvector data structures are used, similar to when the field is set to [rank: filter](#filter). This saves CPU and Disk I/O during matching and typically results in faster query evaluation, with the downside being that only a boolean signal is available for ranking (the document being a match or not). [BM25](/en/ranking/bm25) handles this by assuming one occurrence of the query term in the document, and the field length being equal to the average field length.

Use this to optimize query performance when searching large text _index_ fields with e.g. the [weakAnd](/en/ranking/wand#weakand) query operator and [BM25](/en/ranking/bm25) ranking. Query terms that are common in the corpus (e.g., stopwords) are treated as filters with faster matching and simplified ranking, while other query terms are handled as usual with full ranking.

In testing with various text datasets (e.g., Wikipedia), a _filter-threshold_ setting of 0.05 has been shown to be a good starting point. [Read more](/en/performance/feature-tuning#posting-lists).

This setting is only relevant for [index](/en/basics/schemas#document-fields) fields, and cannot be used in combination with [rank: filter](#filter). Has no effect in [streaming search](/en/performance/streaming-search#differences-in-streaming-search).| + + + + + + + + + + + + + +
SettingDescription
filter-thresholdThreshold value (in the range [0.0, 1.0]) deciding when matching in this _index_ field should be treated as a filter. This happens for query terms with estimated hit ratios (in the range [0.0, 1.0]) that are above the _filter-threshold_. Then, fast bitvector data structures are used, similar to when the field is set to rank: filter. This saves CPU and Disk I/O during matching and typically results in faster query evaluation, with the downside being that only a boolean signal is available for ranking (the document being a match or not). BM25 handles this by assuming one occurrence of the query term in the document, and the field length being equal to the average field length.

Use this to optimize query performance when searching large text _index_ fields with e.g. the weakAnd query operator and BM25 ranking. Query terms that are common in the corpus (e.g., stopwords) are treated as filters with faster matching and simplified ranking, while other query terms are handled as usual with full ranking.

In testing with various text datasets (e.g., Wikipedia), a _filter-threshold_ setting of 0.05 has been shown to be a good starting point. Read more.

This setting is only relevant for index fields, and cannot be used in combination with rank: filter. Has no effect in streaming search.
### element-gap @@ -1864,12 +3147,32 @@ rank-type [field-name]: [rank-type-name] ``` The field name can be skipped inside fields. Defined rank types are: -| Type | Description | -| :--- | :--- | -| identity | Used for fields that contains only what this document _is_, e.g., "Title". Complete identity hits will get a high rank. | -| about | Some text which is (only) about this document, e.g. "Description". About hits get high rank on partial matches and higher for matches early in the text and repetitive matches. This is the default rank type. | -| tags | Used for simple tag fields of type tag. The tags rank type uses a logarithmic table to give more relative boost in the low range: As tags are added, they should have a significant impact on the rank score, but as more and more tags are added, each new tag should contribute less. | -| empty | Gives no relevancy effect on matches. Used for fields you just want to treat as filters. | + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
identityUsed for fields that contains only what this document _is_, e.g., "Title". Complete identity hits will get a high rank.
aboutSome text which is (only) about this document, e.g. "Description". About hits get high rank on partial matches and higher for matches early in the text and repetitive matches. This is the default rank type.
tagsUsed for simple tag fields of type tag. The tags rank type uses a logarithmic table to give more relative boost in the low range: As tags are added, they should have a significant impact on the rank score, but as more and more tags are added, each new tag should contribute less.
emptyGives no relevancy effect on matches. Used for fields you just want to treat as filters.
For `nativeRank`, one can specify a rank type per field. If the supported rank types do not meet requirements, one can explicitly configure the native rank features using rank-properties. See the [native rank reference](/en/reference/ranking/nativerank) for more information. @@ -1889,11 +3192,32 @@ Note that all document frequency calculations are done using _content node-local The body of a `weakand` statement consists of: -| Property | Occurrence | Description | -| :--- | :--- | :--- | -| stopword-limit | Zero to one | A number in the range \[0, 1\]. Represents the maximum [normalized document frequency](/en/learn/glossary#document-frequency-normalized) a query term can have in the corpus (i.e. the ratio of all documents where the term occurs at least once) before it's considered a stopword and dropped entirely from being a part of the `weakAnd` evaluation. This makes matching faster at the cost of potentially producing more hits. Dropped terms are not exposed as part of ranking.
Example:
stopword-limit: 0.60 This will drop all query terms that occur in at least 60% of the documents.
Using `stopword-limit` is similar to explicitly removing stopwords from the query up front, but has the benefit of dynamically adapting to the actual document corpus and not having to know—or specify—a set of stopwords. [Read more](/en/performance/feature-tuning#posting-lists). | -| adjust-target | Zero to one | A number in the range \[0, 1\] representing [normalized document frequency](/en/learn/glossary#document-frequency-normalized). Used to derive a per-query document score threshold, where documents scoring lower than the threshold will not be considered as potential hits from the `weakAnd` operator. The score threshold is selected to be equal to that of the query term whose document frequency is *closest* to the configured `adjust-target` value.
This can be used to efficiently *exclude* documents that only match terms that occur very frequently in the document corpus. Such terms are likely to be stopwords that have low semantic value for the query, and excluding documents only containing them is likely to have only a minor impact on recall.
This makes overall matching faster by reducing the number of hits produced by the `weakAnd` operator.
Example: adjust-target: 0.01 This excludes documents that only have terms that occur in more than approximately 1% of the document corpus. The actual threshold is query-specific and based on the query term score whose document frequency is closest to 1%.
`adjust-target` can be used together with [stopword-limit](#weakand-stopword-limit) to efficiently prune both terms and documents with low significance when processing queries. [Read more](/en/performance/feature-tuning#posting-lists). | -| allow-drop-all | Zero to one | A boolean value. The default behavior of `weakAnd` is to always keep at least one term (the least common one) even though it is considered a stopword. This is to avoid dropping all query terms in order to make sure that some hits are produced.
If set to `true`, the `weakAnd` operator will allow removal of all query terms if they are all considered stopwords (i.e., if `stopword-limit` is set and all query terms are above the limit).
This may be desired (and significantly improve query performance) if `weakAnd` is used together with another query operator, e.g. the [nearestNeighbor](/en/querying/nearest-neighbor-search#querying-using-nearestneighbor-query-operator) operator.
Be aware that if this is set to `true` and all query terms are considered stopwords, the `weakAnd` operator will not produce *any* hits. And by extension, if `weakAnd` is used by itself, the query may return no hits.
Example:
allow-drop-all: true This overrides the default behavior of `weakAnd` and allows all query terms to be dropped if they are all considered stopwords. **Important:** Defaults to `false` if not specified. | + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyOccurrenceDescription
stopword-limitZero to oneA number in the range [0, 1]. Represents the maximum normalized document frequency a query term can have in the corpus (i.e. the ratio of all documents where the term occurs at least once) before it's considered a stopword and dropped entirely from being a part of the {`weakAnd`} evaluation. This makes matching faster at the cost of potentially producing more hits. Dropped terms are not exposed as part of ranking.
Example:
stopword-limit: 0.60 This will drop all query terms that occur in at least 60% of the documents.
Using {`stopword-limit`} is similar to explicitly removing stopwords from the query up front, but has the benefit of dynamically adapting to the actual document corpus and not having to know—or specify—a set of stopwords. Read more.
adjust-targetZero to oneA number in the range [0, 1] representing normalized document frequency. Used to derive a per-query document score threshold, where documents scoring lower than the threshold will not be considered as potential hits from the {`weakAnd`} operator. The score threshold is selected to be equal to that of the query term whose document frequency is *closest* to the configured {`adjust-target`} value.
This can be used to efficiently *exclude* documents that only match terms that occur very frequently in the document corpus. Such terms are likely to be stopwords that have low semantic value for the query, and excluding documents only containing them is likely to have only a minor impact on recall.
This makes overall matching faster by reducing the number of hits produced by the {`weakAnd`} operator.
Example:
{`adjust-target: 0.01`}
This excludes documents that only have terms that occur in more than approximately 1% of the document corpus. The actual threshold is query-specific and based on the query term score whose document frequency is closest to 1%.
{`adjust-target`} can be used together with stopword-limit to efficiently prune both terms and documents with low significance when processing queries. Read more.
allow-drop-allZero to oneA boolean value. The default behavior of {`weakAnd`} is to always keep at least one term (the least common one) even though it is considered a stopword. This is to avoid dropping all query terms in order to make sure that some hits are produced.
If set to {`true`}, the {`weakAnd`} operator will allow removal of all query terms if they are all considered stopwords (i.e., if {`stopword-limit`} is set and all query terms are above the limit).
This may be desired (and significantly improve query performance) if {`weakAnd`} is used together with another query operator, e.g. the nearestNeighbor operator.
Be aware that if this is set to {`true`} and all query terms are considered stopwords, the {`weakAnd`} operator will not produce *any* hits. And by extension, if {`weakAnd`} is used by itself, the query may return no hits.
Example:
{`allow-drop-all: true`}
This overrides the default behavior of {`weakAnd`} and allows all query terms to be dropped if they are all considered stopwords. **Important:** Defaults to {`false`} if not specified.
## summary-to @@ -1923,16 +3247,57 @@ summary [name] { ``` The summary _name_ can be skipped if this is set inside a field. The name will then be the same as the name of the source field. _full_ summary is the default. Long field values (like document content fields) should be made _dynamic_. The body of a summary may contain: -| Name | Occurrence | Description | -| :--- | :--- | :--- | -| full | Zero to one | Returns the full field value in the summary (the default). | -| bolding: on | Zero to one | Specifies whether the content of this field should be [bolded](#bolding). Only supported for [index](#indexing-index) fields of type string or array\. | -| dynamic | Zero to one | Make the value returned in results from this summary field a *dynamic abstract* of the source field by extracting fragments of text around matching query terms. Matching query terms will also be highlighted, in similarity with the bolding feature. This highlighting is not affected by the query-argument bolding. The default XML element used to highlight query terms is `` - refer to [bolding](#bolding) for how to configure. *dynamic* is only supported for [index](#indexing-index) fields of type string or array\. For array\ fields, a dynamic abstract is created per string item in the array. | -| source | Zero to one | Specifies the name of the field or fields from which the value of this summary field should be fetched. If multiple fields are specified, the value will be taken from the first field if that has a value, from the second if the first one is empty, and so on. ```source: [field-name], [field-name], …``` When this is not specified, the source field is assumed to be the field with the same name as the summary field.

Refer to [attribute](#add-or-remove-an-existing-document-field-from-document-summary) and [non-attribute](#add-or-remove-a-new-non-attribute-document-field-from-document-summary) fields for modifying a schema. | -| to | Zero to one | Specifies the name of the document summaries that this should be included in.

```to: [document-summary-name], [document-summary-name], …``` This can only be specified in fields, not in the explicit document summaries. When this is not specified, the field will go to the `default` document summary. | -| matched-elements-only | Zero to one | Specifies that only the matched elements in a searchable [array of primitive](#array), [weightedset](#weightedset), [array of struct](#array) or [map type](#map) field are returned as part of document summary. For array of struct or map type fields, this is typically used in accordance with the [sameElement](/en/reference/querying/yql#sameelement) operator, but it can also be used when searching directly on a sub-struct field. It is also supported when the field is [imported](#import-field).

See [example use](#map) and example schemas:

- [matched elements only](https://github.com/vespa-engine/system-test/blob/master/tests/search/matched_elements_only/indexed/test.sd)

- [array of struct and map type](https://github.com/vespa-engine/system-test/blob/master/tests/search/struct_and_map_types/attribute_fields/test.sd) | -| select-elements-by | Zero to one | Use a summary feature to control which elements in an [array of primitive](#array) or [array of struct](#array) field are returned as part of document summary. ``` select-elements-by: ``` The summary feature used must be a tensor with a single mapped dimension. An element will be returned if its id is a label along the mapped dimension of this tensor.

- [schema example](https://github.com/vespa-engine/system-test/blob/master/tests/search/chunk_selection/test.sd) | -| tokens | Zero to one | Make the value returned in results from this summary field be an array of the tokens indexed in the source field. Multiple tokens at the same location are put into a nested array. The source field must be specified, and it must be an [index](#indexing-index) or [attribute](#indexing-attribute) field of type string, array\ or weightedset\. If the source field is of type weightedset\ then the summary field is rendered as if the source field was of type array\, weights are not shown. This is mainly useful for [linguistics transformations debugging](/en/querying/text-matching#tokens-example), to correlate query trace with the tokens indexed. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameOccurrenceDescription
fullZero to oneReturns the full field value in the summary (the default).
bolding: onZero to oneSpecifies whether the content of this field should be bolded. Only supported for index fields of type string or array<string>.
dynamicZero to oneMake the value returned in results from this summary field a *dynamic abstract* of the source field by extracting fragments of text around matching query terms. Matching query terms will also be highlighted, in similarity with the bolding feature. This highlighting is not affected by the query-argument bolding. The default XML element used to highlight query terms is {``} - refer to bolding for how to configure. *dynamic* is only supported for index fields of type string or array<string>. For array<string> fields, a dynamic abstract is created per string item in the array.
sourceZero to oneSpecifies the name of the field or fields from which the value of this summary field should be fetched. If multiple fields are specified, the value will be taken from the first field if that has a value, from the second if the first one is empty, and so on.
{`: [field-name], [field-name], …`}
When this is not specified, the source field is assumed to be the field with the same name as the summary field.

Refer to attribute and non-attribute fields for modifying a schema.
toZero to oneSpecifies the name of the document summaries that this should be included in.

{`: [document-summary-name], [document-summary-name], …`}
This can only be specified in fields, not in the explicit document summaries. When this is not specified, the field will go to the {`default`} document summary.
matched-elements-onlyZero to oneSpecifies that only the matched elements in a searchable array of primitive, weightedset, array of struct or map type field are returned as part of document summary. For array of struct or map type fields, this is typically used in accordance with the sameElement operator, but it can also be used when searching directly on a sub-struct field. It is also supported when the field is imported.

See example use and example schemas:

- matched elements only

- array of struct and map type
select-elements-byZero to oneUse a summary feature to control which elements in an array of primitive or array of struct field are returned as part of document summary.
{`select-elements-by: `}
The summary feature used must be a tensor with a single mapped dimension. An element will be returned if its id is a label along the mapped dimension of this tensor.

- schema example
tokensZero to oneMake the value returned in results from this summary field be an array of the tokens indexed in the source field. Multiple tokens at the same location are put into a nested array. The source field must be specified, and it must be an index or attribute field of type string, array<string> or weightedset<string>. If the source field is of type weightedset<string> then the summary field is rendered as if the source field was of type array<string>, weights are not shown. This is mainly useful for linguistics transformations debugging, to correlate query trace with the tokens indexed.
Read more about [document summaries](/en/querying/document-summaries). @@ -1952,7 +3317,6 @@ Contained in [field](#field) of type weightedset. Properties of a weighted set. weightedset: [property] ``` or -``` ```js weightedset { [property] @@ -1961,10 +3325,27 @@ weightedset { } ``` -| Property | Occurrence | Description | -| :--- | :--- | :--- | -| create-if-nonexistent | Zero to one | If the weight of a key is adjusted in a document using a partial update increment or decrement command, but the key is currently not present, the command will be ignored by default. Set this to make keys to be created in this case instead. This is useful when the weight is used to represent the count of the key.

``` field tag type weightedset { indexing: attribute \| summary weightedset { create-if-nonexistent remove-if-zero } } ``` | -| remove-if-zero | Zero to one | This is the companion of `create-if-nonexistent` for the converse case: By default, keys may have zero as weight. With this turned on, keys whose weight is adjusted (or set) to zero will be removed. | + + + + + + + + + + + + + + + + + + + + +
PropertyOccurrenceDescription
create-if-nonexistentZero to oneIf the weight of a key is adjusted in a document using a partial update increment or decrement command, but the key is currently not present, the command will be ignored by default. Set this to make keys to be created in this case instead. This is useful when the weight is used to represent the count of the key.

{`field tag type weightedset {     indexing: attribute | summary     weightedset {         create-if-nonexistent         remove-if-zero     } }`}
remove-if-zeroZero to oneThis is the companion of {`create-if-nonexistent`} for the converse case: By default, keys may have zero as weight. With this turned on, keys whose weight is adjusted (or set) to zero will be removed.
## import field @@ -1990,13 +3371,36 @@ schema myschema { Extra restrictions apply for some of the field types: -| Field type | Restriction | -| :--- | :--- | -| array of struct | Can be imported if at least one of the struct fields has an attribute. All struct fields with attributes must have primitive types. Only the struct fields with attributes will be visible. | -| map of struct | Can be imported if the key field has an attribute, and at least one of the struct fields has an attribute. All struct fields with attributes must have primitive types. Only the key field and the struct fields with attributes will be visible. | -| map | Can be imported if both key and value fields have primitive types and have attributes. | -| position | Can be imported if it has an attribute. | -| array of position | Can be imported if it has an attribute. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field typeRestriction
array of structCan be imported if at least one of the struct fields has an attribute. All struct fields with attributes must have primitive types. Only the struct fields with attributes will be visible.
map of structCan be imported if the key field has an attribute, and at least one of the struct fields has an attribute. All struct fields with attributes must have primitive types. Only the key field and the struct fields with attributes will be visible.
mapCan be imported if both key and value fields have primitive types and have attributes.
positionCan be imported if it has an attribute.
array of positionCan be imported if it has an attribute.
To use an imported field in summary, create an explicit [document summary](#document-summary) containing the field. @@ -2043,19 +3447,60 @@ Procedure: Changes: -| Change | Description | -| :--- | :--- | -| Add a new document field | Add a new document field as index, attribute, summary or any combination of these. Existing documents will implicitly get the new field with no content. Documents fed after the change can specify the new field. If the field has existed with the same type earlier, then old content *may or may not* reappear | -| Remove a document field | Existing documents will no longer see the removed field, but the field data is not completely removed from the search node | -| Add or remove an existing document field from document summary | Add an existing field to summary or any number of summary classes, and remove an existing field from summary or any number of summary classes. Example:

``` document-summary short-summary { summary artist {} } ```

A change adding an [attribute](/en/content/attributes) field with a new name to a summary class using [source](#source) does not require restart or re-feed:

``` field artist type string { indexing: summary \| attribute } document-summary rename-summary { summary artist_name { source: artist } } ```

Also see [non-attribute](#add-or-remove-a-new-non-attribute-document-field-from-document-summary) fields. | -| Remove the attribute aspect from a field that is also an index field | This is the only scenario of changing the attribute aspect of a document field that is allowed without restart | -| Add, change or remove field sets | Change [fieldsets](#fieldset) used to group fields together for searching | -| Change the alias or sorting attribute settings for an attribute field | | -| Add, change or remove rank profiles | | -| Change document field weights | | -| Add, change or remove field aliases | | -| Add, change or remove rank settings for a field | Exception: Changing `rank: filter` on an attribute field in mode *index* requires restart. See details in [next section](#changes-that-require-restart-but-not-re-feed) | -| Add or remove a schema | Removing a schema definition file will make [proton](/en/content/proton) drop all documents of that type, subsequently releasing memory and disk. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ChangeDescription
Add a new document fieldAdd a new document field as index, attribute, summary or any combination of these. Existing documents will implicitly get the new field with no content. Documents fed after the change can specify the new field. If the field has existed with the same type earlier, then old content *may or may not* reappear
Remove a document fieldExisting documents will no longer see the removed field, but the field data is not completely removed from the search node
Add or remove an existing document field from document summaryAdd an existing field to summary or any number of summary classes, and remove an existing field from summary or any number of summary classes. Example:

{`document-summary short-summary {         summary artist {}     }`}


A change adding an attribute field with a new name to a summary class using source does not require restart or re-feed:

{`field artist type string {             indexing: summary | attribute     }      document-summary rename-summary {         summary artist_name {             source: artist         }     }`}


Also see non-attribute fields.
Remove the attribute aspect from a field that is also an index fieldThis is the only scenario of changing the attribute aspect of a document field that is allowed without restart
Add, change or remove field setsChange fieldsets used to group fields together for searching
Change the alias or sorting attribute settings for an attribute field
Add, change or remove rank profiles
Change document field weights
Add, change or remove field aliases
Add, change or remove rank settings for a fieldException: Changing {`rank: filter`} on an attribute field in mode *index* requires restart. See details in next section
Add or remove a schemaRemoving a schema definition file will make proton drop all documents of that type, subsequently releasing memory and disk.
### Changes that require restart but not re-feed @@ -2068,13 +3513,36 @@ Procedure: Changes: -| Change | Description | -| :--- | :--- | -| Change the attribute aspect of a document field | Add or remove a field as attribute. When adding, the attribute is populated based on the field value in stored documents during restart. When removing, the field value in stored documents is updated based on the content in the attribute during restart. | -| Change the attribute settings for an attribute field | Change the following attribute settings: `fast-search`, `fast-access`, `fast-rank`, `paged`. | -| Change the rank filter setting for an attribute field | Add or remove `rank: filter` on an attribute field. | -| Change the hnsw index settings for a tensor attribute field | Adding or removing the [hnsw index](#index-hnsw) on a tensor attribute field, or changing the `distance-metric` or `max-links-per-node` requires a restart to rebuild the index. Changing `neighbors-to-explore-at-insert` requires a restart, but does not rebuild the index. | -| Change the distance metric for a tensor attribute field | Change, add, or remove the [distance metric](#distance-metric) on a tensor attribute field. If no distance metric is specified, _euclidean_ is used as the default. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ChangeDescription
Change the attribute aspect of a document fieldAdd or remove a field as attribute. When adding, the attribute is populated based on the field value in stored documents during restart. When removing, the field value in stored documents is updated based on the content in the attribute during restart.
Change the attribute settings for an attribute fieldChange the following attribute settings: {`fast-search`}, {`fast-access`}, {`fast-rank`}, {`paged`}.
Change the rank filter setting for an attribute fieldAdd or remove {`rank: filter`} on an attribute field.
Change the hnsw index settings for a tensor attribute fieldAdding or removing the hnsw index on a tensor attribute field, or changing the {`distance-metric`} or {`max-links-per-node`} requires a restart to rebuild the index. Changing {`neighbors-to-explore-at-insert`} requires a restart, but does not rebuild the index.
Change the distance metric for a tensor attribute fieldChange, add, or remove the distance metric on a tensor attribute field. If no distance metric is specified, _euclidean_ is used as the default.
Example: Given a content cluster _mycluster_ with mode _index_: @@ -2112,12 +3580,32 @@ All the changes listed below require [reindexing](/en/operations/reindexing) of Changes: -| Change | Description | -| :--- | :--- | -| Change index aspect of a document field | This changes the document processing pipeline before documents arrive in the backend. Only documents fed after index aspect was added will have annotations and be present in the reverse index. Only documents fed after index aspect was removed will avoid disk bloat due to unneeded annotations. | -| Switch stemming/normalizing on or off | This changes the document processing pipeline before documents arrive in the backend, and what annotations are made for an indexed field. **Important:** If not re-feeding after such a change, serving works, but recall is undefined as the index has been produced using a different setting than the one used when doing stemming/normalizing of the query terms. | -| Add, change, or remove match settings for a field | Example: Adding `match: word` to a field. This changes the document processing pipeline before documents arrive in the backend, and what annotations are made for an indexed field. **Important:** If not reindexing after such a change, serving works, but recall is undefined as the index has been produced using one match mode while run-time is using a different match mode. | -| Add or remove a new non-attribute document field from document summary | A change adding an [index or summary](#document-fields) field (without [attribute](/en/content/attributes)) with a new name to a summary class using [source](#source) requires re-index: ```field artist type string { indexing: summary \| index } document-summary rename-summary { summary artist_name { source: artist } } ``` Also see [attribute](#add-or-remove-an-existing-document-field-from-document-summary) fields. | + + + + + + + + + + + + + + + + + + + + + + + + + +
ChangeDescription
Change index aspect of a document fieldThis changes the document processing pipeline before documents arrive in the backend. Only documents fed after index aspect was added will have annotations and be present in the reverse index. Only documents fed after index aspect was removed will avoid disk bloat due to unneeded annotations.
Switch stemming/normalizing on or offThis changes the document processing pipeline before documents arrive in the backend, and what annotations are made for an indexed field. **Important:** If not re-feeding after such a change, serving works, but recall is undefined as the index has been produced using a different setting than the one used when doing stemming/normalizing of the query terms.
Add, change, or remove match settings for a fieldExample: Adding {`match: word`} to a field. This changes the document processing pipeline before documents arrive in the backend, and what annotations are made for an indexed field. **Important:** If not reindexing after such a change, serving works, but recall is undefined as the index has been produced using one match mode while run-time is using a different match mode.
Add or remove a new non-attribute document field from document summaryA change adding an index or summary field (without attribute) with a new name to a summary class using source requires re-index:
{`artist type string {             indexing: summary | index     }      document-summary rename-summary {         summary artist_name {             source: artist         }     }`}
Also see attribute fields.
Example: Given a content cluster *mycluster* with mode @@ -2158,10 +3646,24 @@ All the changes listed below require re-feeding of all documents. Unless a chang Changes: -| Change | Description | -| --- | --- | -| **Change a document field's data type or collection type** | Existing documents will no longer have any content for this field. To populate the field, re-feed the existing documents using the new type for this field. There will be no automatic conversion from old to new field type. **Important:** If not re-feeding after such a change, serving works, but searching this field will not give any results. | -| Change a tensor attribute's tensor type | | + + + + + + + + + + + + + + + + + +
ChangeDescription
**Change a document field's data type or collection type**Existing documents will no longer have any content for this field. To populate the field, re-feed the existing documents using the new type for this field. There will be no automatic conversion from old to new field type. **Important:** If not re-feeding after such a change, serving works, but searching this field will not give any results.
Change a tensor attribute's tensor type
Example: Given a content cluster *mycluster* with mode *index*: diff --git a/mintlify-docs/en/reference/security/mtls.mdx b/mintlify-docs/en/reference/security/mtls.mdx index 55536997d1..c0c36f2326 100644 --- a/mintlify-docs/en/reference/security/mtls.mdx +++ b/mintlify-docs/en/reference/security/mtls.mdx @@ -15,10 +15,24 @@ See [Securing a self-hosted Vespa application with mutually authenticated TLS (m ## Environment variables -| Name | Description | -| :--- | :--- | -| VESPA_TLS_CONFIG_FILE | Absolute path JSON configuration file with TLS configuration. | -| VESPA_TLS_INSECURE_MIXED_MODE |Enables TLS mixed mode. See [TLS Mixed mode](#tls-mixed-mode) for possible values.| + + + + + + + + + + + + + + + + + +
NameDescription
VESPA_TLS_CONFIG_FILEAbsolute path JSON configuration file with TLS configuration.
VESPA_TLS_INSECURE_MIXED_MODEEnables TLS mixed mode. See TLS Mixed mode for possible values.
### TLS mixed mode @@ -26,11 +40,28 @@ See [Securing a self-hosted Vespa application with mutually authenticated TLS (m Possible TLS mixed mode settings for `VESPA_TLS_INSECURE_MIXED_MODE`: -| Name | Description | -| :--- | :--- | -| plaintext_client_mixed_server | Clients do not use TLS, servers accept both TLS and plaintext clients. | -| tls_client_mixed_server | Clients use TLS, servers accept both TLS and plaintext clients. | -| tls_client_tls_server | All clients and servers use TLS only. | + + + + + + + + + + + + + + + + + + + + + +
NameDescription
plaintext_client_mixed_serverClients do not use TLS, servers accept both TLS and plaintext clients.
tls_client_mixed_serverClients use TLS, servers accept both TLS and plaintext clients.
tls_client_tls_serverAll clients and servers use TLS only.
### Configuration file @@ -39,40 +70,128 @@ The TLS configuration file contains a single top-level JSON object. #### Top-level elements -| Name | Required | Description | -| :--- | :--- | :--- | -| [files](#the-files-element)| Yes | JSON object containing file system paths crypto material. | -| authorized-peers | No | JSON array of [authorized-peer](#the-authorized-peer-element) objects. Authorization engine is disabled if not specified. See dedicated [section](#peer-authorization-rules) on how to create peer authorization rules. | -| accepted-ciphers | No | JSON array of accepted TLS cipher suites. See [here](#cipher-suites) for cipher suites enabled by default. You can only specify a *subset* of the default cipher suites. *This is an expert option*—use the default unless you have good reasons not to. | -| accepted-protocols | No | JSON array of accepted TLS protocol versions. See [here](#protocol-versions) for TLS versions enabled by default. You can only specify a *subset* of the default protocol versions. *This is an expert option*—use the default unless you have good reasons not to. | -| disable-hostname-validation | No |Disables TLS/HTTPS hostname validation. Enabled by default (default value false).| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameRequiredDescription
filesYesJSON object containing file system paths crypto material.
authorized-peersNoJSON array of authorized-peer objects. Authorization engine is disabled if not specified. See dedicated section on how to create peer authorization rules.
accepted-ciphersNoJSON array of accepted TLS cipher suites. See here for cipher suites enabled by default. You can only specify a *subset* of the default cipher suites. *This is an expert option*—use the default unless you have good reasons not to.
accepted-protocolsNoJSON array of accepted TLS protocol versions. See here for TLS versions enabled by default. You can only specify a *subset* of the default protocol versions. *This is an expert option*—use the default unless you have good reasons not to.
disable-hostname-validationNoDisables TLS/HTTPS hostname validation. Enabled by default (default value false).
#### The *files* element -| Name | Required | Description | -| :--- | :--- | :--- | -| private-key | Yes | Absolute path to file containing the private key in PKCS#8 PEM format. | -| certificate | Yes | Absolute path to file containing X.509 certificate chain (including any intermediate certificates). Certificates must be encoded in PEM format separated by newlines. | -| ca-certificates | Yes | Absolute path to file containing all trusted X.509 Certificate Authorities. Certificates must be encoded in PEM format separated by newlines. | + + + + + + + + + + + + + + + + + + + + + + + + + +
NameRequiredDescription
private-keyYesAbsolute path to file containing the private key in PKCS#8 PEM format.
certificateYesAbsolute path to file containing X.509 certificate chain (including any intermediate certificates). Certificates must be encoded in PEM format separated by newlines.
ca-certificatesYesAbsolute path to file containing all trusted X.509 Certificate Authorities. Certificates must be encoded in PEM format separated by newlines.
#### The *authorized-peer* element -| Name | Required | Description | -| :--- | :--- | :--- | -| required-credentials | Yes | A JSON array specifying each [credential requirement](#the-required-credential-element) for this particular rule. | -| name | Yes | Name of the rule. | -| description | No | Description of the rule. | + + + + + + + + + + + + + + + + + + + + + + + + + +
NameRequiredDescription
required-credentialsYesA JSON array specifying each credential requirement for this particular rule.
nameYesName of the rule.
descriptionNoDescription of the rule.
#### The *required-credential* element -| Name | Required | Description | -| :--- | :--- | :--- | -| field | Yes | Certificate field. Possible values: *CN*, *SAN\_DNS*, *SAN\_URI*. | -| must-match | Yes | String containing a "glob"-style pattern. | + + + + + + + + + + + + + + + + + + + + +
NameRequiredDescription
fieldYesCertificate field. Possible values: *CN*, *SAN_DNS*, *SAN_URI*.
must-matchYesString containing a "glob"-style pattern.
diff --git a/mintlify-docs/en/reference/writing/document-selector-language.mdx b/mintlify-docs/en/reference/writing/document-selector-language.mdx index 3c23a0b2e0..6b41a1eecb 100644 --- a/mintlify-docs/en/reference/writing/document-selector-language.mdx +++ b/mintlify-docs/en/reference/writing/document-selector-language.mdx @@ -43,11 +43,28 @@ The identifiers used in this language (`and or not true false null id scheme nam The branch operators are used to combine other nodes in the parse tree generated from the text format. The different branch nodes existing is listed in the table below in order of precedence. Operators listed in order of precedence: -| Operator | Description | -| :--- | :--- | -| NOT | Unary prefix operator inverting the selection of the child node | -| AND | Binary infix operator, which is true if all its children are | -| OR | Binary infix operator, which is true if any of its children are | + + + + + + + + + + + + + + + + + + + + + +
OperatorDescription
NOTUnary prefix operator inverting the selection of the child node
ANDBinary infix operator, which is true if all its children are
ORBinary infix operator, which is true if any of its children are
Use parentheses to define own precedence. `a and b or c and d` is equivalent to `(a and b) or (c and d)` since and has higher precedence than or. The expression `a and (b or c) and d` is not equivalent to the previous two, since parentheses have been used to force the or-expression to be evaluated first. @@ -55,28 +72,83 @@ Parentheses can also be used in value calculations. Where modulo `%` has the hig ## Primitives -| Primitive | Description | -| :--- | :--- | -| Boolean constant | The boolean constants `true` and `false` can be used to match all/nothing | -| Null constant | Referencing a field that is not present in a document returns a special `null` value. The expression `music.title` is shorthand for `music.title != null`. There are potentially subtle interactions with null values when used with comparisons, see [comparisons with missing fields (null values)](#comparisons-with-missing-fields-null-values). | -| Document type | A document type can be used as a primitive to select a given type of documents - [example](/en/writing/visiting#analyzing-field-values). | -| Document field specification | A document field specification (`doctype.field`) can be used as a primitive to select all documents that have field set - a shorter form of `doctype.field != null` | -| Comparison | The comparison is a primitive used to compare two values | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PrimitiveDescription
Boolean constantThe boolean constants {`true`} and {`false`} can be used to match all/nothing
Null constantReferencing a field that is not present in a document returns a special {`null`} value. The expression {`music.title`} is shorthand for {`music.title != null`}. There are potentially subtle interactions with null values when used with comparisons, see comparisons with missing fields (null values).
Document typeA document type can be used as a primitive to select a given type of documents - example.
Document field specificationA document field specification ({`doctype.field`}) can be used as a primitive to select all documents that have field set - a shorter form of {`doctype.field != null`}
ComparisonThe comparison is a primitive used to compare two values
## Comparison Comparisons operators compares two values using an operator. All the operators are infix and take two arguments. -| Operator | Description | -| --- | --- | -| \> | This is true if the left argument is greater than the right one. Operators using greater than or less than notations only makes sense where both arguments are either numbers or strings. In case of strings, they are ordered by their binary (byte-wise) representation, with the first character being the most significant and the last character the least significant. If the argument is of mixed type or one of the arguments are not a number or a string, the comparison will be invalid and not match. | -| \< | Matches if left argument is less than the right one | -| \<= | Matches if the left argument is less than or equal to the right one | -| \>= | Matches if the left argument is greater than or equal to the right one | -| == | Matches if both arguments are exactly the same. Both arguments must be of the same type for a match | -| != | Matches if both arguments are not the same | -| = | String matching using a glob pattern. Matches only if the pattern given as the right argument matches the whole string given by the left argument. Asterisk `*` can be used to match zero or more of any character. Question mark `?` can be used to match any one character. The pattern matching operators, regex `=~` and glob `=`, only makes sense if both arguments are strings. The regex operator will never match anything else. The glob operator will revert to the behaviour of `==` if both arguments are not strings. | -| =~ | String matching using a regular expression. Matches if the regular expression given as the right argument matches the string given as the left argument. Regex notation is like perl. Use '^' to indicate start of value, '$' to indicate end of value | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OperatorDescription
>This is true if the left argument is greater than the right one. Operators using greater than or less than notations only makes sense where both arguments are either numbers or strings. In case of strings, they are ordered by their binary (byte-wise) representation, with the first character being the most significant and the last character the least significant. If the argument is of mixed type or one of the arguments are not a number or a string, the comparison will be invalid and not match.
<Matches if left argument is less than the right one
<=Matches if the left argument is less than or equal to the right one
>=Matches if the left argument is greater than or equal to the right one
==Matches if both arguments are exactly the same. Both arguments must be of the same type for a match
!=Matches if both arguments are not the same
=String matching using a glob pattern. Matches only if the pattern given as the right argument matches the whole string given by the left argument. Asterisk {`*`} can be used to match zero or more of any character. Question mark {`?`} can be used to match any one character. The pattern matching operators, regex {`=~`} and glob {`=`}, only makes sense if both arguments are strings. The regex operator will never match anything else. The glob operator will revert to the behaviour of {`==`} if both arguments are not strings.
=~String matching using a regular expression. Matches if the regular expression given as the right argument matches the string given as the left argument. Regex notation is like perl. Use '^' to indicate start of value, '$' to indicate end of value
### Comparisons with missing fields (null values) @@ -134,13 +206,36 @@ The language currently does not support character sets other than ASCII. Glob an The comparison operator compares two values. A value can be any of the following: -| | | -| :--- | :--- | -|Document field specification | Syntax: `.`
Documents have a set of fields defined, depending on the document type. The field name is the identifier used for the field. This expression returns the value of the field, which can be an integer, a floating point number, a string, an array, or a map of these types.
For multivalues, we support only the *equals* operator for comparison. The semantics is that the array returned by the fieldvalue must *contain* at least one element that matches the other side of the comparison. For maps, there must exist a key matching the comparison.
The simplest use of the fieldpath is to specify a field, but for complex types please refer to [the field path syntax documentation](/en/reference/schemas/document-field-path). | -| Id | Syntax: ` id.[scheme\|namespace\|type\|specific\|user\|group] `
Each document has a document ID, uniquely identifying that document within a Vespa installation. The id operator returns the string identifier, or if an optional argument is given, a part of the id.
- scheme (id)
- namespace (to separate different users' data)
- type (specified in the id scheme)
- specific (User specified part to distinguish documents within a namespace)
- user (The number specified in document IDs using the n= modifier)
- group (The string group specified in document IDs using the g= modifier) | -| null | The value null can be given to specify nothingness. For instance, a field specification for a document not containing the field will evaluate to null, so the comparison 'music.artist == null' will select all documents that don't have the artist field set. 'id.user == null' will match all documents that don't use the `n=` [document ID scheme](/en/schemas/documents#id-scheme). Tensor fields can *only* be compared against null. It's not possible to write a document selection that uses the *contents* of tensor fields—only their presence can be checked. | -| Number | A value can be a number, either an integer or a floating point number. Type of number is insignificant. You don't have to use the same type of number on both sides of a comparison. For instance '3.0 < 4' will match, and '3.0 == 3' will probably match (operator == is generally not advised for floating point numbers due to rounding issues). Numbers can be written in multiple ways - examples: 1234 -234 +53 +534.34 543.34e4 -534E-3 0.2343e-8 | -| Strings| A string value is given quoted with double quotes (i.e. "mystring"). The string is interpreted as an ASCII string. Only ASCII values 32 to 126 can be used unescaped, except for the characters `\` and `"` which must be escaped.
  • Newline: `\n`
  • Carriage return: `\r`
  • Tab: `\t`
  • Form feed: `\f`
  • Quotation mark (`"`): `\"`
  • Any other character: `\x##` (where `##` is a two-digit hexadecimal number specifying the ASCII value)
| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Document field specificationSyntax: {`.`}
Documents have a set of fields defined, depending on the document type. The field name is the identifier used for the field. This expression returns the value of the field, which can be an integer, a floating point number, a string, an array, or a map of these types.
For multivalues, we support only the *equals* operator for comparison. The semantics is that the array returned by the fieldvalue must *contain* at least one element that matches the other side of the comparison. For maps, there must exist a key matching the comparison.
The simplest use of the fieldpath is to specify a field, but for complex types please refer to the field path syntax documentation.
IdSyntax: {` id.[scheme|namespace|type|specific|user|group] `}
Each document has a document ID, uniquely identifying that document within a Vespa installation. The id operator returns the string identifier, or if an optional argument is given, a part of the id.
- scheme (id)
- namespace (to separate different users' data)
- type (specified in the id scheme)
- specific (User specified part to distinguish documents within a namespace)
- user (The number specified in document IDs using the n= modifier)
- group (The string group specified in document IDs using the g= modifier)
nullThe value null can be given to specify nothingness. For instance, a field specification for a document not containing the field will evaluate to null, so the comparison 'music.artist == null' will select all documents that don't have the artist field set. 'id.user == null' will match all documents that don't use the {`n=`} document ID scheme. Tensor fields can *only* be compared against null. It's not possible to write a document selection that uses the *contents* of tensor fields—only their presence can be checked.
NumberA value can be a number, either an integer or a floating point number. Type of number is insignificant. You don't have to use the same type of number on both sides of a comparison. For instance '3.0 < 4' will match, and '3.0 == 3' will probably match (operator == is generally not advised for floating point numbers due to rounding issues). Numbers can be written in multiple ways - examples:
{`1234 -234 +53 +534.34 543.34e4 -534E-3 0.2343e-8`}
StringsA string value is given quoted with double quotes (i.e. "mystring"). The string is interpreted as an ASCII string. Only ASCII values 32 to 126 can be used unescaped, except for the characters {`\\`} and {`"`} which must be escaped. <ul><li>Newline: {`\\n`}</li><li>Carriage return: {`\\r`}</li><li>Tab: {`\\t`}</li><li>Form feed: {`\\f`}</li><li>Quotation mark ({`"`}): {`\\"`}</li><li>Any other character: {`\\x##`} (where {`##`} is a two-digit hexadecimal number specifying the ASCII value)</li></ul>
### Value arithmetics @@ -150,10 +245,24 @@ You can do arithmetics on values. The common arithmetics operators addition `+`, Functions are called on something and returns a value that can be used in comparison expressions: -| | | -| :---| :--- | -| Value functions | A value function takes a value, does something with it and returns a value which can be of any type.
- *abs()* Called on a numeric type, returns the absolute value of that numeric type. That is -3 returns 3 and -4.3 returns 4.3.
- *hash()* Calculates an MD5 hash of whatever value it is called on. The result is a signed 64-bit integer. (Use abs() after if you want to only get positive hash values).
- *lowercase()* Called on a string value to turn upper case characters into lower case ones. **NOTE:** This only works for the characters 'a' through 'z', no locale support. | -| Document type functions | Some functions can take a document type instead of a value, and return a value based on the type.
- *version()* The `version()` function returns the version number of a document type. | + + + + + + + + + + + + + + + + + +
Value functionsA value function takes a value, does something with it and returns a value which can be of any type.
- *abs()* Called on a numeric type, returns the absolute value of that numeric type. That is -3 returns 3 and -4.3 returns 4.3.
- *hash()* Calculates an MD5 hash of whatever value it is called on. The result is a signed 64-bit integer. (Use abs() after if you want to only get positive hash values).
- *lowercase()* Called on a string value to turn upper case characters into lower case ones. **NOTE:** This only works for the characters 'a' through 'z', no locale support.
Document type functionsSome functions can take a document type instead of a value, and return a value based on the type.
- *version()* The {`version()`} function returns the version number of a document type.
#### Now function diff --git a/mintlify-docs/en/reference/writing/indexing-language.mdx b/mintlify-docs/en/reference/writing/indexing-language.mdx index e625f324c5..fc12fe3b7c 100644 --- a/mintlify-docs/en/reference/writing/indexing-language.mdx +++ b/mintlify-docs/en/reference/writing/indexing-language.mdx @@ -48,24 +48,67 @@ A string, numeric literal and true/false can be used as an expression to explici An output expression is an expression that writes the current execution value to a document field. These expressions also double as the indicator for the type of field to construct (i.e. attribute, index or summary). It is important to note that you can not assign different values to the same field in a single document (e.g. `attribute | lowercase | index` is **illegal** and will not deploy). -| Expression | Description | -| :--- | :--- | -| `attribute` | Writes the execution value to the current field. During deployment, this indicates that the field should be stored as an attribute. | -| `index` | Writes the execution value to the current field. During deployment, this indicates that the field should be stored as an index field. | -| `summary` | Writes the execution value to the current field. During deployment, this indicates that the field should be included in the document summary. | + + + + + + + + + + + + + + + + + + + + + +
ExpressionDescription
{`attribute`}Writes the execution value to the current field. During deployment, this indicates that the field should be stored as an attribute.
{`index`}Writes the execution value to the current field. During deployment, this indicates that the field should be stored as an index field.
{`summary`}Writes the execution value to the current field. During deployment, this indicates that the field should be included in the document summary.
### Arithmetics Indexing statements can contain any combination of arithmetic operations, as long as the operands are numeric values. In case you need to convert from string to numeric, or convert from one numeric type to another, use the applicable [converter](#converters) expression. The supported arithmetic operators are: -| Operator | Description | -| :--- | :--- | -| ` + ` | Sets the execution value to the result of adding of the execution value of the `lhs` expression with that of the `rhs` expression. | -| ` - ` | Sets the execution value to the result of subtracting of the execution value of the `lhs` expression with that of the `rhs` expression. | -| ` * ` | Sets the execution value to the result of multiplying of the execution value of the `lhs` expression with that of the `rhs` expression. | -| ` / ` | Sets the execution value to the result of dividing of the execution value of the `lhs` expression with that of the `rhs` expression. | -| ` % ` | Sets the execution value to the remainder of dividing the execution value of the `lhs` expression with that of the `rhs` expression. | -| ` . ` | Sets the execution value to the concatenation of the execution value of the `lhs` expression with that of the `rhs` expression. If _both_ `lhs` and `rhs` are collection types, this operator will append `rhs` to `lhs` (if any operand is null, it is treated as an empty collection). If not, this operator concatenates the string representations of `lhs` and `rhs` (if any operand is null, the result is null). | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OperatorDescription
{` + `}Sets the execution value to the result of adding of the execution value of the {`lhs`} expression with that of the {`rhs`} expression.
{` - `}Sets the execution value to the result of subtracting of the execution value of the {`lhs`} expression with that of the {`rhs`} expression.
{` * `}Sets the execution value to the result of multiplying of the execution value of the {`lhs`} expression with that of the {`rhs`} expression.
{` / `}Sets the execution value to the result of dividing of the execution value of the {`lhs`} expression with that of the {`rhs`} expression.
{` % `}Sets the execution value to the remainder of dividing the execution value of the {`lhs`} expression with that of the {`rhs`} expression.
{` . `}Sets the execution value to the concatenation of the execution value of the {`lhs`} expression with that of the {`rhs`} expression. If _both_ {`lhs`} and {`rhs`} are collection types, this operator will append {`rhs`} to {`lhs`} (if any operand is null, it is treated as an empty collection). If not, this operator concatenates the string representations of {`lhs`} and {`rhs`} (if any operand is null, the result is null).
You may use parenthesis to declare precedence of execution (e.g. `(1 + 2) * 3`). This also works for more advanced array concatenation statements such as `(input str_a | split ',') . (input str_b | split @@ -75,64 +118,272 @@ You may use parenthesis to declare precedence of execution (e.g. `(1 These expressions let you convert from one data type to another. -| Converter | Input | Output | Description | -| :--- | :--- | :--- | :--- | -| `binarize [threshold]` | Any tensor | Any tensor | Replaces all values in a tensor by 0 or 1. This takes an optional argument specifying the threshold a value needs to be larger than to be replaced by 1 instead of 0. The default threshold is 0. This is useful to create a suitable input to [pack\_bits](#pack_bits). | -| `embed [id] [args]` | String | A tensor | Invokes an [embedder](/en/reference/rag/embedding) to convert a text to one or more vector embeddings. The type of the output tensor is what is required by the following expression (as supported by the specific embedder). Arguments are given space separated, as in `embed colbert chunk`. The first argument and can be omitted when only a single embedder is configured. Any additional arguments are passed to the embedder implementation. If the same chunk expression with the same input occurs multiple times in a schema, its value will only be computed once. | -| `chunk id [args]` | String | A tensor | Invokes a which convert a string into an array of strings. Arguments are given space separated, as in `chunk fixed-length 512`. The id of the chunker to use is required and can be a chunker bundled with Vespa, or any chunker component added in the services.xml, see the [chunking reference](/en/reference/rag/chunking). Any additional arguments are passed to the chunker implementation. If the same chunk expression with the same input occurs multiple times in a schema, its value will only be computed once. | -| `hash` | String | int or long | Converts the input to a hash value (using SipHash). The hash will be int or long depending on the target field. | -| `pack_bits` | A tensor | A tensor | Packs the values of a binary tensor into bytes with 1 bit per value in big-endian order. The input tensor must have a single dense dimension. It can have any value type and any number of sparse dimensions. Values that are not 0 or 1 will be binarized with 0 as the threshold.
The output tensor will have:
- `int8` as the value type.
- The dense dimension size divided by 8 (rounded upwards to integer).
- The same sparse dimensions as before.
The resulting tensor can be unpacked during ranking using [unpack\_bits](/en/reference/ranking/ranking-expressions#unpack-bits). A tensor can be converted to binary form suitable as input to this by the [binarize function](#binarize). | -| `to_array` | Any | Array\ | Converts the execution value to a single-element array. | -| `to_byte` | Any | Byte | Converts the execution value to a byte. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number. | -| `to_double` | Any | Double | Converts the execution value to a double. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number. | -| `to_float` | Any | Float | Converts the execution value to a float. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number. | -| `to_int` | Any | Integer | Converts the execution value to an int. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number. | -| `to_long` | Any | Long | Converts the execution value to a long. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number. | -| `to_bool` | Any | Bool | Converts the execution value to a boolean type. If the input is a string it will become true if it is not empty. If the input is a number it will become true if it is != 0. | -| `to_pos` | String | Position | Converts the execution value to a position struct. The input format must be either a) `[N\|S];[E\|W]`, or b) `x;y`. | -| `to_string` | Any | String | Converts the execution value to a string. | -| `to_uri` | String | Uri | Converts the execution value to a URI struct | -| `to_wset` | Any | WeightedSet\ | Converts the execution value to a single-element weighted set with default weight. | -| `to_epoch_second` | String | Long | Converts an ISO-8601 instant formatted String to Unix epoch (or Unix time or POSIX time or Unix timestamp) which is the number of seconds elapsed since January 1, 1970, UTC. The converter uses [java.time.Instant.parse](https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/time/Instant.html#parse\(java.lang.CharSequence\)) to parse the input string value. This will throw a DateTimeParseException if the input cannot be parsed. Examples:
- `2023-12-24T17:00:43.000Z` is converted to `1703437243L`
- `2023-12-24T17:00:43Z` is converted to `1703437243L`
- `2023-12-24T17:00:43.431Z` is converted to `1703437243L`
- `2023-12-24T17:00:43.431+00:00` is converted to `1703437243L` | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConverterInputOutputDescription
{`binarize [threshold]`}Any tensorAny tensorReplaces all values in a tensor by 0 or 1. This takes an optional argument specifying the threshold a value needs to be larger than to be replaced by 1 instead of 0. The default threshold is 0. This is useful to create a suitable input to pack_bits.
{`embed [id] [args]`}StringA tensorInvokes an embedder to convert a text to one or more vector embeddings. The type of the output tensor is what is required by the following expression (as supported by the specific embedder). Arguments are given space separated, as in {`embed colbert chunk`}. The first argument and can be omitted when only a single embedder is configured. Any additional arguments are passed to the embedder implementation. If the same chunk expression with the same input occurs multiple times in a schema, its value will only be computed once.
{`chunk id [args]`}StringA tensorInvokes a which convert a string into an array of strings. Arguments are given space separated, as in {`chunk fixed-length 512`}. The id of the chunker to use is required and can be a chunker bundled with Vespa, or any chunker component added in the services.xml, see the chunking reference. Any additional arguments are passed to the chunker implementation. If the same chunk expression with the same input occurs multiple times in a schema, its value will only be computed once.
{`hash`}Stringint or longConverts the input to a hash value (using SipHash). The hash will be int or long depending on the target field.
{`pack_bits`}A tensorA tensorPacks the values of a binary tensor into bytes with 1 bit per value in big-endian order. The input tensor must have a single dense dimension. It can have any value type and any number of sparse dimensions. Values that are not 0 or 1 will be binarized with 0 as the threshold.
The output tensor will have:
- {`int8`} as the value type.
- The dense dimension size divided by 8 (rounded upwards to integer).
- The same sparse dimensions as before.
The resulting tensor can be unpacked during ranking using unpack_bits. A tensor can be converted to binary form suitable as input to this by the binarize function.
{`to_array`}AnyArray<inputType>Converts the execution value to a single-element array.
{`to_byte`}AnyByteConverts the execution value to a byte. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number.
{`to_double`}AnyDoubleConverts the execution value to a double. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number.
{`to_float`}AnyFloatConverts the execution value to a float. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number.
{`to_int`}AnyIntegerConverts the execution value to an int. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number.
{`to_long`}AnyLongConverts the execution value to a long. This will throw a NumberFormatException if the string representation of the execution value does not contain a parseable number.
{`to_bool`}AnyBoolConverts the execution value to a boolean type. If the input is a string it will become true if it is not empty. If the input is a number it will become true if it is != 0.
{`to_pos`}StringPositionConverts the execution value to a position struct. The input format must be either a) {`[N|S];[E|W]`}, or b) {`x;y`}.
{`to_string`}AnyStringConverts the execution value to a string.
{`to_uri`}StringUriConverts the execution value to a URI struct
{`to_wset`}AnyWeightedSet<inputType>Converts the execution value to a single-element weighted set with default weight.
{`to_epoch_second`}StringLongConverts an ISO-8601 instant formatted String to Unix epoch (or Unix time or POSIX time or Unix timestamp) which is the number of seconds elapsed since January 1, 1970, UTC. The converter uses java.time.Instant.parse to parse the input string value. This will throw a DateTimeParseException if the input cannot be parsed. Examples:
- {`2023-12-24T17:00:43.000Z`} is converted to {`1703437243L`}
- {`2023-12-24T17:00:43Z`} is converted to {`1703437243L`}
- {`2023-12-24T17:00:43.431Z`} is converted to {`1703437243L`}
- {`2023-12-24T17:00:43.431+00:00`} is converted to {`1703437243L`}
### Other expressions The following are the unclassified expressions available: -| Expression | Description | -| --- | --- | -| `_` | Returns the current execution value. This is useful, e.g., to prepend some other value to the current execution value, see [this example](/en/writing/indexing#execution-value-example). | -| `attribute ` | Writes the execution value to the named attribute field. | -| `base64decode` | If the execution value is a string, it is base-64 decoded to a long integer. If it is not a string, the execution value is set to `Long.MIN_VALUE`. | -| `base64encode` | If the execution value is a long integer, it is base-64 encoded to a string. If it is not a long integer, the execution value is set to `null`. | -| `echo` | Prints the execution value to standard output, for debug purposes. | -| `flatten` | **Deprecated:** Use [tokens](/en/reference/schemas/schemas#tokens) in the schema instead. | -| `for_each {