Open
Description
- Package Name: azure.search.documents
- Package Version: 11.5.2
- Operating System: Windows 11
- Python Version: 3.12.9
Describe the bug
I am creating an index with a vector field, if
- I am instantiating the field using SearchField and passing retrievable=True, its giving me _retrievable is not a known attribute of class <class 'azure.search.documents.indexes.models.index.SearchField'> and will be ignored .
- I am instantiating the field using SearchableField and passing retrievable=True, its able to create an index, but when I am uploading the same docs as above, its raising an error saying The request is invalid. Details: An unexpected 'StartArray' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected.
Code:
Message: The request is invalid. Details: An unexpected 'StartArray' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected. - Only thats working currently is that I create the field using SearchField and then manully go to the azure portal, and edit the json to make it retrievable.
To Reproduce
Steps to reproduce the behavior:
- Set fields and create index like
`fields =[
SimpleField(
name='id',
type=SearchFieldDataType.String,
key=True,
filterable=True,
),
SimpleField(
name='asset_id',
type=SearchFieldDataType.String,
filterable=True,
facetable=True,
),
SimpleField(
name='version_id',
type=SearchFieldDataType.String,
filterable=True,
facetable=True,
),
SimpleField(
name='cdn_download_url',
type=SearchFieldDataType.String,
),
SimpleField(
name='fund_id',
type=SearchFieldDataType.Collection(SearchFieldDataType.String),
filterable=True,
facetable=True,
),
SearchableField(
name='document_type',
type=SearchFieldDataType.String,
searchable=True,
filterable=True
),
SearchableField(
name='content',
type=SearchFieldDataType.String,
searchable=True,
),
SearchField(
name='content_vector',
type=SearchFieldDataType.Collection(SearchFieldDataType.Single),
searchable=True,
vector_search_dimensions= len(embedding("Text")),
vector_search_profile_name="myHnswProfile",
retrievable = True
),
]
index_name = "langchain_v3_ff_docs_test2"
semantic_configuration_name = index_name+'_semantics'
semantic_configuration = SemanticConfiguration(
name=semantic_configuration_name,
prioritized_fields=SemanticPrioritizedFields(
content_fields=[SemanticField(field_name="content"),],
title_field=SemanticField(field_name="document_type"),
),
)`
Expected behavior
I want to have the vector field retrievable.
Metadata
Metadata
Assignees
Labels
This issue points to a problem in the data-plane of the library.This issue requires a change to an existing behavior in the product in order to be resolved.Issues that are reported by GitHub users external to the Azure organization.Workflow: More information is needed from author to address the issue.