Skip to content

Commit

Permalink
Deprecate retrieval strategies for 0.2.0 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxjakob authored May 10, 2024
1 parent ac57d5d commit e60bde8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libs/elasticsearch/langchain_elasticsearch/vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
logger = logging.getLogger(__name__)


@deprecated("0.1.4", alternative="RetrievalStrategy", pending=True)
@deprecated("0.2.0", alternative="RetrievalStrategy", pending=True)
class BaseRetrievalStrategy(ABC):
"""Base class for `Elasticsearch` retrieval strategies."""

Expand Down Expand Up @@ -126,7 +126,7 @@ def require_inference(self) -> bool:
return True


@deprecated("0.1.4", alternative="DenseVectorStrategy", pending=True)
@deprecated("0.2.0", alternative="DenseVectorStrategy", pending=True)
class ApproxRetrievalStrategy(BaseRetrievalStrategy):
"""Approximate retrieval strategy using the `HNSW` algorithm."""

Expand Down Expand Up @@ -254,7 +254,7 @@ def index(
}


@deprecated("0.1.4", alternative="DenseVectorScriptScoreStrategy", pending=True)
@deprecated("0.2.0", alternative="DenseVectorScriptScoreStrategy", pending=True)
class ExactRetrievalStrategy(BaseRetrievalStrategy):
"""Exact retrieval strategy using the `script_score` query."""

Expand Down Expand Up @@ -323,7 +323,7 @@ def index(
}


@deprecated("0.1.4", alternative="SparseVectorStrategy", pending=True)
@deprecated("0.2.0", alternative="SparseVectorStrategy", pending=True)
class SparseRetrievalStrategy(BaseRetrievalStrategy):
"""Sparse retrieval strategy using the `text_expansion` processor."""

Expand Down Expand Up @@ -408,7 +408,7 @@ def require_inference(self) -> bool:
return False


@deprecated("0.1.4", alternative="BM25Strategy", pending=True)
@deprecated("0.2.0", alternative="BM25Strategy", pending=True)
class BM25RetrievalStrategy(BaseRetrievalStrategy):
"""Retrieval strategy using the native BM25 algorithm of Elasticsearch."""

Expand Down

0 comments on commit e60bde8

Please sign in to comment.