# Own embedding value not vector search

**URL:** <https://forum.weaviate.io/t/own-embedding-value-not-vector-search/3201>\
**Category:** Support\
**Tags:** python\
**Created:** [July 29, 2024, 1:09am UTC](https://forum.weaviate.io/t/own-embedding-value-not-vector-search/3201 "2024-07-29T01:09:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HYK97](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hyk97/32/2047_2.png) [@HYK97](https://forum.weaviate.io/u/HYK97)\
**Post date:** [July 29, 2024, 1:09am UTC](https://forum.weaviate.io/t/own-embedding-value-not-vector-search/3201/1 "2024-07-29T01:09:57Z")

</div>

I’m currently doing the following for my index  
I want to be able to embed and use it externally, so I’m using the  
`Configure.Vectorizer.none()`

# indexing

```auto
    wv_client.collections.create(
        name=class_name,
        description="건강 식품 컬렉션",
        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", description="상품 번호", data_type=DataType.NUMBER),
            Property(name="original_review", description="원본 리뷰", data_type=DataType.TEXT,
                     tokenization=Tokenization.WORD),
            Property(name="original_title", description="원본 상품명", data_type=DataType.TEXT,
                     tokenization=Tokenization.WORD),
            Property(name="original_detail", description="원본 OCR", data_type=DataType.TEXT,
                     tokenization=Tokenization.WORD),
            Property(name="title", description="상품명", data_type=DataType.TEXT),
            Property(name="review", description="리뷰", data_type=DataType.TEXT),
            Property(name="detail", description="OCR", data_type=DataType.TEXT)
        ]
    )

......

    with coll.batch.dynamic() as batch:
        for i, item in enumerate(dumps):
            product_no = item['product_no']
            product_name = item['prd_nm']
            review_text = item['review_text']
            ocr_text = item['ocr_text']

            title_embedding, review_embedding, detail_embedding = embeddings[i * 3:i * 3 + 3]
            title_embeddings.append(title_embedding)
            review_embeddings.append(review_embedding)
            detail_embeddings.append(detail_embedding)

            uuid = generate_uuid5(product_no)
            batch.add_object(
                properties={
                    "product_no": product_no,
                    "original_title": product_name,
                    "original_review": review_text,
                    "original_detail": ocr_text
                },
                vector={
                    "title": title_embedding,
                    "review": review_embedding,
                    "detail": detail_embedding
                },
                uuid=uuid
            )

```

The problem is that I get this error when searching, how do I fix it?

# search

```auto
def search_weaviate(client, query_vector, class_name, feature, limit):
    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")

    ....

    client.close()

```

`Query call with protocol GRPC search failed with message extract target vectors: class Health_food does not have named vector detail configured. Available named vectors map[].`

---

<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:** [July 29, 2024, 3:43pm UTC](https://forum.weaviate.io/t/own-embedding-value-not-vector-search/3201/2 "2024-07-29T15:43:37Z")

</div>

hi @HYK97

You never defined a named vector called `detail` in your collection.

So all vectors you add to this collection, will be added to the default named vector, called `default`

To fix this issue, you can either remove the `target_vectors` parameter, or set it to “default”

Let me know if this helps.

Thanks!

---

<div class="post-metadata">

**Author:** ![HYK97](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hyk97/32/2047_2.png) [@HYK97](https://forum.weaviate.io/u/HYK97)\
**Post date:** [July 30, 2024, 5:16am UTC](https://forum.weaviate.io/t/own-embedding-value-not-vector-search/3201/3 "2024-07-30T05:16:36Z")

</div>

> [@HYK97](#):
>
> ```auto
> vector={
> "title": title_embedding,
> "review": review_embedding,
> "detail": detail_embedding
> },
> 
> ```

Doesn’t this create a named vector?

I thought I was creating 3 vectors like above and searching them using target\_vector.

Because it saved the data properly, as shown in the photo below!

![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/5/5479d81c956b5138d9a9a30fa9b73d75019e4fa3.png)

**If you clear the target\_vector parameter, it will not respond with any value when debugging, as shown in the photo below**

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/1/197f57366e821a3ff85301b59cdb98cf6a3d3de3.png)

---

<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:** [July 30, 2024, 8:21pm UTC](https://forum.weaviate.io/t/own-embedding-value-not-vector-search/3201/4 "2024-07-30T20:21:28Z")

</div>

Hi!

That would be a cool feature, hahaha.

I am not sure it creates, to be honest. AFAIK, the Auto Schema should only kick in for property.

I have written some code here to do what you want:

> [@\[Question\] YOUR TOPIC](https://forum.weaviate.io/t/question-your-topic/3194/2):
>
> hi! You never defined the named vectors to begin with thinking Check here some nice academy we have about this: this is how your collection should look like: import weaviate from weaviate import classes as wvc client = weaviate.connect\_to\_local() from weaviate import classes as wvc client.collections.delete("MyCollection") client.collections.create( name="MyCollection", description="collection\_1", replication\_config=wvc.config.Configure.replication( …

Let me know if this helps.

Thanks!
