revert settings
This commit is contained in:
parent
3d74edfe3c
commit
ed0306bde3
1 changed files with 10 additions and 11 deletions
|
|
@ -89,8 +89,8 @@ INDEX_BODY = {
|
||||||
"type": "knn_vector",
|
"type": "knn_vector",
|
||||||
"dimension": VECTOR_DIM,
|
"dimension": VECTOR_DIM,
|
||||||
"method": {
|
"method": {
|
||||||
"name": "hnsw",
|
"name": "disk_ann",
|
||||||
"engine": "lucene",
|
"engine": "jvector",
|
||||||
"space_type": "l2",
|
"space_type": "l2",
|
||||||
"parameters": {"ef_construction": 100, "m": 16},
|
"parameters": {"ef_construction": 100, "m": 16},
|
||||||
},
|
},
|
||||||
|
|
@ -255,8 +255,8 @@ class AppClients:
|
||||||
self.opensearch = AsyncOpenSearch(
|
self.opensearch = AsyncOpenSearch(
|
||||||
hosts=[{"host": OPENSEARCH_HOST, "port": OPENSEARCH_PORT}],
|
hosts=[{"host": OPENSEARCH_HOST, "port": OPENSEARCH_PORT}],
|
||||||
connection_class=AIOHttpConnection,
|
connection_class=AIOHttpConnection,
|
||||||
scheme="http",
|
scheme="https",
|
||||||
use_ssl=False,
|
use_ssl=True,
|
||||||
verify_certs=False,
|
verify_certs=False,
|
||||||
ssl_assert_fingerprint=None,
|
ssl_assert_fingerprint=None,
|
||||||
http_auth=(OPENSEARCH_USERNAME, OPENSEARCH_PASSWORD),
|
http_auth=(OPENSEARCH_USERNAME, OPENSEARCH_PASSWORD),
|
||||||
|
|
@ -381,21 +381,20 @@ class AppClients:
|
||||||
)
|
)
|
||||||
|
|
||||||
def create_user_opensearch_client(self, jwt_token: str):
|
def create_user_opensearch_client(self, jwt_token: str):
|
||||||
"""Create OpenSearch client with basic auth (JWT not used in current setup)"""
|
"""Create OpenSearch client with user's JWT token for OIDC auth"""
|
||||||
# Note: jwt_token parameter kept for compatibility but not used
|
headers = {"Authorization": f"Bearer {jwt_token}"}
|
||||||
# Using basic auth instead of JWT Bearer tokens
|
|
||||||
|
|
||||||
return AsyncOpenSearch(
|
return AsyncOpenSearch(
|
||||||
hosts=[{"host": OPENSEARCH_HOST, "port": OPENSEARCH_PORT}],
|
hosts=[{"host": OPENSEARCH_HOST, "port": OPENSEARCH_PORT}],
|
||||||
connection_class=AIOHttpConnection,
|
connection_class=AIOHttpConnection,
|
||||||
scheme="http",
|
scheme="https",
|
||||||
use_ssl=False,
|
use_ssl=True,
|
||||||
verify_certs=False,
|
verify_certs=False,
|
||||||
ssl_assert_fingerprint=None,
|
ssl_assert_fingerprint=None,
|
||||||
http_auth=(OPENSEARCH_USERNAME, OPENSEARCH_PASSWORD), # Use basic auth
|
headers=headers,
|
||||||
http_compress=True,
|
http_compress=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Global clients instance
|
# Global clients instance
|
||||||
clients = AppClients()
|
clients = AppClients()
|
||||||
Loading…
Add table
Reference in a new issue