Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

fix: Fix QueryOptions not applied to similarity search bug#185

Merged
averikitsch merged 2 commits intomainfrom
fix
Aug 22, 2024
Merged

fix: Fix QueryOptions not applied to similarity search bug#185
averikitsch merged 2 commits intomainfrom
fix

Conversation

@duwenxin99
Copy link
Contributor

The index QueryOptions are set by executing SET LOCAL, whose effect only last within the same transaction. However, currently the similarity search is in a different transaction, which means the query options are never applied. I fixed this by creating a new _afetch_with_query_options(query, query_options) method that executes the query options statement before fetching similarity search result, and modify the search APIs to call this method instead of _afetch()

@duwenxin99 duwenxin99 requested review from a team August 21, 2024 17:14
@product-auto-label product-auto-label bot added the api: cloudsql-postgres Issues related to the googleapis/langchain-google-cloud-sql-pg-python API. label Aug 21, 2024
@averikitsch averikitsch merged commit e5dca97 into main Aug 22, 2024
@averikitsch averikitsch deleted the fix branch August 22, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: cloudsql-postgres Issues related to the googleapis/langchain-google-cloud-sql-pg-python API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants