text: Test `knn_search` method with model_id and query_textquery = "Hello"knn_result = knn_search.knn_search(query=query, model_id=model_id, k=2, fields=["text"])assert "text" in knn_result["hits"]["hits"][0]["fields"].keys()# Test `hybrid_search` methodquery = "Hello"hybrid_result = knn_search.knn_hybrid_search(    query=query, model_id=model_id, k=2, fields=["text"])assert "text" in hybrid_result["hits"]["hits"][0]["fields"].keys()Test with es client connection rather than cloud_idâ€‹# Create Elasticsearch connectiones_connection = Elasticsearch(    hosts=["https://es_cluster_url:port"], basic_auth=("user", "password"))# Instantiate ElasticsearchEmbeddings using es_connectionembeddings = ElasticsearchEmbeddings.from_es_connection(    model_id,    es_connection,)# Initialize ElasticKnnSearchknn_search = ElasticKnnSearch(    es_connection=es_connection, index_name=test_index, embedding=embeddings)# Test `knn_search` method with model_id and query_textquery = "Hello"knn_result = knn_search.knn_search(query=query, model_id=model_id, k=2)print(f"kNN search results for query '{query}': {knn_result}")print(    f"The 'text' field value from the top hit is: '{knn_result['hits']['hits'][0]['_source']['text']}'")PreviousDocArrayInMemorySearchNextFAISSInstallationExampleTest adding vectorsTest knn search using query vector builderTest knn search using pre generated vectorTest source optionTest fields optionTest with es client connection rather than cloud_idCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.