I created the collection like this
wv_client.collections.create(
name=class_name,
description="collection_1",
replication_config=Configure.replication(
factor=1
),
vectorizer_config=[
Configure.Vectorizer.none()
],
vector_index_config=Configure.VectorIndex.hnsw(
distance_metric=VectorDistances.COSINE
),
properties=[
Property(name="product_no", data_type=DataType.NUMBER),
Property(name="original_review", data_type=DataType.TEXT,
tokenization=Tokenization.WORD),
Property(name="title", data_type=DataType.TEXT, skipVectorisation=True),
Property(name="review", data_type=DataType.TEXT, skipVectorisation=True),
Property(name="detail", data_type=DataType.TEXT, skipVectorisation=True),
]
)
The title, review, and detail are multi-named vector fields, but I used the Configure.Vectorizer.none() option because I’m creating and putting in vector data directly
Example search
col = client.collections.get(class_name)
results = col.query.near_vector(near_vector=query_vector, limit=limit,
return_properties=[“product_no”, “original_review”],
include_vector=“True”,
return_metadata=MetadataQuery(distance=True,
creation_time=True),
target_vector=“detail”)
If you proceed like this, you will get this error
“Query call with protocol GRPC search failed with message extract target vectors: class class_name does not have named vector detail configured. Available named vectors map.”
How do I fix it?