diff --git a/memoryscope/storage/llama_index_es_memory_store.py b/memoryscope/storage/llama_index_es_memory_store.py index 63fb0cd3..22d43dd7 100644 --- a/memoryscope/storage/llama_index_es_memory_store.py +++ b/memoryscope/storage/llama_index_es_memory_store.py @@ -27,8 +27,7 @@ class LlamaIndexEsMemoryStore(BaseMemoryStore): retrieval_strategy = ESCombinedRetrieveStrategy(retrieve_mode=retrieve_mode, hybrid_alpha=hybrid_alpha) self.es_store = SyncElasticsearchStore(index_name=index_name, es_url=es_url, - retrieval_strategy=ESCombinedRetrieveStrategy(retrieve_mode=retrieve_mode, - hybrid_alpha=hybrid_alpha), + retrieval_strategy=retrieval_strategy, **kwargs) # TODO The llamaIndex utilizes some deprecated functions, hence langchain logs warning messages. By diff --git a/memoryscope/storage/llama_index_sync_elasticsearch.py b/memoryscope/storage/llama_index_sync_elasticsearch.py index 4786dad9..50eeef3d 100644 --- a/memoryscope/storage/llama_index_sync_elasticsearch.py +++ b/memoryscope/storage/llama_index_sync_elasticsearch.py @@ -267,7 +267,7 @@ def _to_elasticsearch_filter(standard_filters: Dict[str, List[str]]) -> Dict[str } } ) - result['bool'].update({"should": operands}) # тнР Add 'should' clause for OR logic + result['bool'].update({"should": operands}) # Add 'should' clause for OR logic result['bool'].update({"minimum_should_match": 1}) # Ensure at least one 'should' match else: key_str = f"metadata.{key}.keyword" if isinstance(value, str) else f"metadata.{key}"