Vespa grouping is a powerful feature that allows you to group search results based on field values. This is useful when you want to present search results in a structured way, such as grouping search results by category or price range. Grouping can be used to create faceted search results and to aggregate data.
Read more in the Grouping guide.
Requirements:
- Docker Desktop installed and running. 4GB available memory for Docker is recommended. Refer to Docker memory for details and troubleshooting
- Operating system: Linux, macOS or Windows 10 Pro (Docker requirement)
- Architecture: x86_64 or arm64
- Homebrew to install Vespa CLI, or download a vespa cli release from GitHub releases.
Validate environment, should be minimum 4G:
$ docker info | grep "Total Memory" or $ podman info | grep "memTotal"
Refer to Docker memory for details and troubleshooting:
Check-out, start Docker container:
$ git clone --depth 1 https://github.com/vespa-engine/sample-apps.git $ cd sample-apps/examples/part-purchases-demo $ docker run --detach --name vespa --hostname vespa-container \ --publish 127.0.0.1:8080:8080 --publish 127.0.0.1:19071:19071 \ vespaengine/vespa
Install the Vespa CLI, configure:
$ brew install vespa-cli
$ vespa config set target local
Wait for the configserver to start:
$ vespa status deploy --wait 300
Deploy the application:
$ vespa deploy --wait 300
Feed to Vespa
$ vespa feed ext/feed.jsonl
Shutdown and remove the container:
$ docker rm -f vespa
Feed the data with Logstash from the CSV file
You can also feed the data with Logstash from the CSV file directly (no need to run parts.py
). It may be useful if you want to feed your own data.
You'll need to install Logstash, then:
- Install the Logstash Output Plugin for Vespa via:
bin/logstash-plugin install logstash-output-vespa_feed
-
Adapt this logstash.conf to point to the absolute path of purchase.csv.
-
Run Logstash with the modified
logstash.conf
:
bin/logstash -f $PATH_TO_LOGSTASH_CONF/logstash.conf
For more examples of using Logstash with Vespa, check out this tutorial blog post.