ACORN feedback mega thread

hi @SomebodySysop !!

This is a collection level configuration.

You can create a collection with this configuration, or you can change it at any time, as it is a mutable configuration.

This is how you would change it using curl:

First, let’s get a collection definition;

curl --request GET \
  -H "Content-Type: application/json" \
  --url http://localhost:8080/v1/schema/Test

In my case, I got this:

{“class”:“Test”,“invertedIndexConfig”:{“bm25”:{“b”:0.75,“k1”:1.2},“cleanupIntervalSeconds”:60,“stopwords”:{“additions”:null,“preset”:“en”,“removals”:null}},“moduleConfig”:{“text2vec-openai”:{“baseURL”:“https://api.openai.com”,“model”:“text-embedding-3-large”,“vectorizeClassName”:true}},“multiTenancyConfig”:{“autoTenantActivation”:false,“autoTenantCreation”:false,“enabled”:false},“properties”:[{“dataType”:[“text”],“indexFilterable”:true,“indexRangeFilters”:false,“indexSearchable”:true,“moduleConfig”:{“text2vec-openai”:{“skip”:false,“vectorizePropertyName”:true}},“name”:“text”,“tokenization”:“word”}],“replicationConfig”:{“asyncEnabled”:false,“deletionStrategy”:“DeleteOnConflict”,“factor”:1},“shardingConfig”:{“actualCount”:1,“actualVirtualCount”:128,“desiredCount”:1,“desiredVirtualCount”:128,“function”:“murmur3”,“key”:“_id”,“strategy”:“hash”,“virtualPerPhysical”:128},“vectorIndexConfig”:{“bq”:{“enabled”:false},“cleanupIntervalSeconds”:300,“distance”:“cosine”,“dynamicEfFactor”:8,“dynamicEfMax”:500,“dynamicEfMin”:100,“ef”:-1,“efConstruction”:128,“filterStrategy”:“sweeping”,“flatSearchCutoff”:40000,“maxConnections”:32,“pq”:{“bitCompression”:false,“centroids”:256,“enabled”:false,“encoder”:{“distribution”:“log-normal”,“type”:“kmeans”},“segments”:0,“trainingLimit”:100000},“skip”:false,“sq”:{“enabled”:false,“rescoreLimit”:20,“trainingLimit”:100000},“vectorCacheMaxObjects”:1000000000000},“vectorIndexType”:“hnsw”,“vectorizer”:“text2vec-openai”}

Now, we want to change the filter strategy, from:

“filterStrategy”:“sweeping”

to

“filterStrategy”:“acorn”

so our curl will be:

curl \
  --request PUT \
  -H "Content-Type: application/json" \
  --url http://localhost:8080/v1/schema/Test \
  --data '{
  "class":"Test",
  "invertedIndexConfig":{
    "bm25":{
      "b":0.75,
      "k1":1.2
    },
    "cleanupIntervalSeconds":60,
    "stopwords":{
      "additions":null,
      "preset":"en",
      "removals":null
    }
  },
  "moduleConfig":{
    "text2vec-openai":{
      "baseURL":"https://api.openai.com",
      "model":"text-embedding-3-large",
      "vectorizeClassName":true
    }
  },
  "multiTenancyConfig":{
    "autoTenantActivation":false,
    "autoTenantCreation":false,
    "enabled":false
  },
  "properties":[
    {
      "dataType":["text"],
      "indexFilterable":true,
      "indexRangeFilters":false,
      "indexSearchable":true,
      "moduleConfig":{
        "text2vec-openai":{
          "skip":false,
          "vectorizePropertyName":true
        }
      },
      "name":"text",
      "tokenization":"word"
    }
  ],
  "replicationConfig":{
    "asyncEnabled":false,
    "deletionStrategy":"DeleteOnConflict",
    "factor":1
  },
  "shardingConfig":{
    "actualCount":1,
    "actualVirtualCount":128,
    "desiredCount":1,
    "desiredVirtualCount":128,
    "function":"murmur3",
    "key":"_id",
    "strategy":"hash",
    "virtualPerPhysical":128
  },
  "vectorIndexConfig":{
    "bq":{
      "enabled":false
    },
    "cleanupIntervalSeconds":300,
    "distance":"cosine",
    "dynamicEfFactor":8,
    "dynamicEfMax":500,
    "dynamicEfMin":100,
    "ef":-1,
    "efConstruction":128,
    "filterStrategy":"acorn",
    "flatSearchCutoff":40000,
    "maxConnections":32,
    "pq":{
      "bitCompression":false,
      "centroids":256,
      "enabled":false,
      "encoder":{
        "distribution":"log-normal",
        "type":"kmeans"
      },
      "segments":0,
      "trainingLimit":100000
    },
    "sq":{
      "enabled":false,
      "rescoreLimit":20,
      "trainingLimit":100000
    },
    "vectorCacheMaxObjects":1000000000000,
    "skip":false
  },
  "vectorIndexType":"hnsw",
  "vectorizer":"text2vec-openai"
}'

Let me know if this helps!

Thanks!

1 Like