# ACORN feedback mega thread

**URL:** <https://forum.weaviate.io/t/acorn-feedback-mega-thread/7240>\
**Category:** General\
**Created:** [October 29, 2024, 10:08am UTC](https://forum.weaviate.io/t/acorn-feedback-mega-thread/7240 "2024-10-29T10:08:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [October 29, 2024, 10:08am UTC](https://forum.weaviate.io/t/acorn-feedback-mega-thread/7240/1 "2024-10-29T10:08:24Z")

</div>

Weaviate `1.27` introduced the new filtering strategy based on the [`ACORN` paper](https://arxiv.org/html/2403.04871v1).

According to our internal tests, the ACORN algorithm generally improves the filtered vector search performances, with the most significant improvements in negatively correlated filtered searches.

We are excited for you to try it out! If you have the Python client, you can activate it like so:

```python
from weaviate.classes.config import Configure, Property, DataType, VectorDistances, VectorFilterStrategy

client.collections.create(
    "Article",
    # Additional configuration not shown
    vector_index_config=Configure.VectorIndex.hnsw(
        quantizer=Configure.VectorIndex.Quantizer.bq(),
        ef_construction=300,
        distance_metric=VectorDistances.COSINE,
        filter_strategy=VectorFilterStrategy.ACORN # (Available from Weaviate v1.27.0)
    ),
)

```

Read more in our `1.27` release blog ([Blog | Weaviate](https://weaviate.io/blog)) that will be posted later today 😉

Try it out and let us know what you think!

---

<div class="post-metadata">

**Author:** ![SomebodySysop](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/somebodysysop/32/70_2.png) [@SomebodySysop](https://forum.weaviate.io/u/SomebodySysop)\
**Post date:** [November 21, 2024, 10:43am UTC](https://forum.weaviate.io/t/acorn-feedback-mega-thread/7240/2 "2024-11-21T10:43:25Z")

</div>

So, I just read through this documentation: [Filtering | Weaviate](https://weaviate.io/developers/weaviate/concepts/filtering#acorn)

I’m trying to figure out how to use acorn filtering. Is it an embed option or query option. I don’t use python or java, so how can I utilize it using curl?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [November 21, 2024, 12:29pm UTC](https://forum.weaviate.io/t/acorn-feedback-mega-thread/7240/3 "2024-11-21T12:29:16Z")

</div>

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](https://weaviate.io/developers/weaviate/config-refs/schema#mutability).

This is how you would change it using curl:

First, let’s get a collection definition;

```bash
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](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:

```bash
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!

---

<div class="post-metadata">

**Author:** ![SomebodySysop](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/somebodysysop/32/70_2.png) [@SomebodySysop](https://forum.weaviate.io/u/SomebodySysop)\
**Post date:** [November 21, 2024, 7:45pm UTC](https://forum.weaviate.io/t/acorn-feedback-mega-thread/7240/4 "2024-11-21T19:45:33Z")

</div>

Yes, thank you! Exactly what I needed to know. I was hoping that I could just send “filterStrategy” by itself, but this will work!
