langchain/vectorstores/redis.py/RedisVectorStoreRetriever/validate_search_type
class RedisVectorStoreRetriever:    def validate_search_type(cls, values: Dict) -> Dict:
        """Validate search type."""
        if "search_type" in values:
            search_type = values["search_type"]
            if search_type not in ("similarity", "similarity_limit"):
                raise ValueError(f"search_type of {search_type} not allowed.")
        return values