-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Neo4j similaritySearchWithScore crashes on undefined #4752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for providing detailed information about the issue you're experiencing with the The Given that the error occurs when calling Your workaround of creating the vector yourself and calling Unfortunately, without access to the source code of the In the meantime, you might want to check if the issue persists when using different queries or when adjusting the I hope this information is helpful, and I look forward to your response. If you have any further questions or concerns, please don't hesitate to ask. Sources
|
Thanks for the heads up - @tomasonjo if you're around could you have a quick look? Otherwise I can try later. |
The lucene query is there for hybrid search. It seems we need to allow null values if it is called directly or just add a single if clause for removing lucene characters if not null. I'm travelling, but maybe @easwee can add a PR |
Checked other resources
Description
Trying to get similarity results with score like this:
Produces the following error in the
removeLuceneChars
function:The problem is that is trying to process the query, that is not passed from the base class. To my understanding it is not needed. Calling
similaritySearchWithScore
just preprocesses the query into vector and passing it tosimilaritySearchVectorWithScore
.The workaround I implemented currently is creating the vector myself, calling
similaritySearchVectorWithScore
directly and passing empty query:langchainjs/libs/langchain-community/src/vectorstores/neo4j_vector.ts
Line 618 in 37d68a5
System Info
pnpm 8.6.2
node 20.10.0
"@langchain/community": "^0.0.37",
"@langchain/core": "^0.1.45",
"@langchain/openai": "^0.0.19",
"langchain": "^0.1.27",
The text was updated successfully, but these errors were encountered: