How to map a WooCommerce search index to a application?

Table of Contents

— First, lets explore some important Vespa concepts —

Full documentation:

1. A Vespa “application” is a set of files deployed on “nodes”, on docker/Kubernetes/Vespa cloud, with a cli or the REST API

2. An application index (aka “schema”) is a .sd file, deployed in the folder /schemas/

3. A “schema” is managed by a stateful “content” (file services.xml)

4. A “content” is accessed by a stateless “container” (file services.xml)

5. A “container” manages “components” like embedding models or linguistic libraries (file services.xml)

6. “Containers” and “contents” are distributed on “nodes” (file services.xml)

7. Many “containers” and many “contents” can be deployed and redeployed at will without downtime (file services.xml)

— But then, how can WPSOLR keep both simplicity and flexibility ?? 😭 —

The answer is in the screenshot 😁

When creating a new index from the WPSOLR’s dashboard:
– Set the config and container urls of the Vespa docker/Kubernetes/Vespa cloud service
– Set the content id which will manage your index/schema storage
– Set the container id which will manage your index/schema queries and embeddings

When saving your index settings, WPSOLR will use the config url to:
1. Download the current application services.xml (or create a default one)
2. Add the schema reference to the container’s documents list in services.xml
3. Deploy the updated services.xml and the new file

Notice that the new file is empty: fields (like product attributes or categories) will be dynamically added to the schema during the indexing of products or other custom post types.

More details and screenshots

WooCommerce + +

Read more related content