Skip to content

Commit f35c4b3

Browse files
committed
Removes id warning from get_search_query
1 parent ef272ad commit f35c4b3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/neo4j_graphrag/neo4j_queries.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# limitations under the License.
1515
from __future__ import annotations
1616

17-
import warnings
1817
from typing import Any, Optional
1918

2019
from neo4j_graphrag.filters import get_metadata_filter
@@ -190,11 +189,6 @@ def get_search_query(
190189
tuple[str, dict[str, Any]]: query and parameters
191190
192191
"""
193-
warnings.warn(
194-
"The default returned 'id' field in the search results will be removed. Please switch to using 'elementId' instead.",
195-
DeprecationWarning,
196-
stacklevel=2,
197-
)
198192
if search_type == SearchType.HYBRID:
199193
if filters:
200194
raise Exception("Filters are not supported with Hybrid Search")
@@ -221,7 +215,7 @@ def get_search_query(
221215
query_tail = get_query_tail(
222216
retrieval_query,
223217
return_properties,
224-
fallback_return=f"RETURN node {{ .*, `{embedding_node_property}`: null }} AS node, labels(node) AS nodeLabels, elementId(node) AS elementId, elementId(node) AS id, score",
218+
fallback_return=f"RETURN node {{ .*, `{embedding_node_property}`: null }} AS node, labels(node) AS nodeLabels, elementId(node) AS elementId, score",
225219
)
226220
return f"{query} {query_tail}", params
227221

0 commit comments

Comments
 (0)