Skip to content

Commit 9f3693a

Browse files
committed
Add initial cache entry
1 parent a8e9a88 commit 9f3693a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

deploy_ai_search/src/deploy_ai_search/text_2_sql_query_cache.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ def get_index_fields(self) -> list[SearchableField]:
7878
name="SqlQueryDecomposition",
7979
collection=True,
8080
fields=[
81-
SearchableField(
82-
name="SubQuestion",
83-
type=SearchFieldDataType.String,
84-
filterable=True,
85-
),
8681
SearchableField(
8782
name="SqlQuery",
8883
type=SearchFieldDataType.String,
@@ -200,7 +195,7 @@ def get_indexer(self) -> SearchIndexer:
200195
fail_on_unprocessable_document=False,
201196
fail_on_unsupported_content_type=False,
202197
index_storage_metadata_only_for_oversized_documents=True,
203-
indexed_file_name_extensions=".json",
198+
indexed_file_name_extensions=".jsonl",
204199
parsing_mode=self.parsing_mode,
205200
),
206201
max_failed_items=5,

text_2_sql/query_cache/cache.jsonl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"Question": "What are the total sales in 2008?", "SqlQueryDecomposition": [{"SqlQuery": "SELECT COUNT(*) as total_sales FROM SalesLT.SalesOrderHeader WHERE YEAR(OrderDate) = 2008;"}]}

0 commit comments

Comments
 (0)