Passing HNSW parameters in metadata

Hi.
I have a working framework, but the search over a large database does not find the closest embeddings.
After looking at the HNSW algorithm, I think changing the parameters M and construction_ef should help in both database construction and search.
I tried to pass those parameters with the from_documents() method:

db = Chroma.from_documents(
batch_texts,
embeddings,
persist_directory=PERSIST_DIRECTORY,
client_settings=CHROMA_SETTINGS,
collection_metadata= {“hnsw:M”: 100, “hnsw:construction_ef”: 200},
)
print(db.get(include=[‘metadatas’, ‘embeddings’]))

The problem is that, independently on what values I select for M and construction_ef, the generate embeddings are always the same.
Worst, even if I set M to 0 or a negative number, or if I misspell the key name, the function from_document() works just fine and outputs the same embeddings.

Can someone please help me to udnerstand HOW we can change the HNSW parameters in an effective way?

I also tried to do this from the collection in the following way:

EMBEDDINGS = HuggingFaceInstructEmbeddings(model_name=EMBEDDING_MODEL_NAME, model_kwargs={“device”: device_type})
cliente = chromadb.Client(CHROMA_SETTINGS)
DB = Chroma(persist_directory=PERSIST_DIRECTORY, embedding_function=EMBEDDINGS, client_settings=CHROMA_SETTINGS, client=cliente)
metadatas = {“hnsw:M”: 0, “hnsw:construction_ef”: 0}
collection = cliente.create_collection(name=“Test”,embedding_function=EMBEDDINGS,metadata=metadatas)
db = DB.from_documents(
batch_texts,
embeddings,
persist_directory=PERSIST_DIRECTORY,
client_settings=CHROMA_SETTINGS,
collection_name=“Test”,
)
print(db.get(include=[‘metadatas’, ‘embeddings’]))

But with the same results.

Any help or suggestion would be very appreciated. Thanks!