Skip to content

Commit f85106f

Browse files
committed
Update the query cache
1 parent 4b9f158 commit f85106f

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

deploy_ai_search/ai_search.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def __init__(
4848
"""
4949

5050
if not hasattr(self, "indexer_type"):
51-
self.indexer_type = None # Needed to help mypy understand that indexer_type is defined in the child class
51+
# Needed to help mypy understand that indexer_type is defined in the child class
52+
self.indexer_type = None
5253
raise ValueError("indexer_type is not defined in the child class.")
5354

5455
if rebuild is not None:
@@ -126,13 +127,14 @@ def get_index_fields(self) -> list[SearchableField]:
126127
Returns:
127128
list[SearchableField]: The index fields"""
128129

129-
@abstractmethod
130130
def get_semantic_search(self) -> SemanticSearch:
131131
"""Get the semantic search configuration for the indexer.
132132
133133
Returns:
134134
SemanticSearch: The semantic search configuration"""
135135

136+
return None
137+
136138
def get_skills(self) -> list:
137139
"""Get the skillset for the indexer.
138140

deploy_ai_search/text_2_sql_query_cache.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
SearchFieldDataType,
66
SearchField,
77
SearchableField,
8-
SemanticField,
9-
SemanticPrioritizedFields,
10-
SemanticConfiguration,
11-
SemanticSearch,
128
SimpleField,
139
ComplexField,
1410
)
@@ -111,23 +107,3 @@ def get_index_fields(self) -> list[SearchableField]:
111107
]
112108

113109
return fields
114-
115-
def get_semantic_search(self) -> SemanticSearch:
116-
"""This function returns the semantic search configuration for sql index
117-
118-
Returns:
119-
SemanticSearch: The semantic search configuration"""
120-
121-
semantic_config = SemanticConfiguration(
122-
name=self.semantic_config_name,
123-
prioritized_fields=SemanticPrioritizedFields(
124-
title_field=SemanticField(field_name="Question"),
125-
keywords_fields=[
126-
SemanticField(field_name="Query"),
127-
],
128-
),
129-
)
130-
131-
semantic_search = SemanticSearch(configurations=[semantic_config])
132-
133-
return semantic_search

0 commit comments

Comments
 (0)