Swarm Search is made powerful by the use of metadata to help you organize your data. But how do you write metadata into your objects? Let's look at an example using curl.
Here is a named write operation directly to a Swarm node (not hitting a proxy). The domain is c-csn2.example.com and was already created in the Swarm Admin Console. The bucket is called "bucket1" and does not yet exist so first we need to create the bucket. The node IP address is 192.168.202.84.
Now, assume that we wrote another object with the header x-band-meta-llica but a different value, we can show that our search still matches. This way we can make distinct values in a particular header but still match on any objects given that header.
Let us change the metadata of the first header so that it doesn't match (and change the filename to uuids2.txt), just as an example:
#curl -i --location-trusted -XPOST --data-binary @uuids.txt -H "CAStor-application: curl" -H "x-band-meta-llica: sad but true" "http://192.168.202.84/bucket1/uuids2.txt"