File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ module.exports = {
60
60
"no-else-return" : 0 ,
61
61
"func-names" : 0 ,
62
62
"no-lonely-if" : 0 ,
63
+ "prefer-template" : 0 ,
63
64
"prefer-rest-params" : 0 ,
64
65
"new-cap" : [ "error" , { properties : false , capIsNew : false } ] ,
65
66
"arrow-body-style" : 0 ,
Original file line number Diff line number Diff line change @@ -720,6 +720,22 @@ export class Neo4jVectorStore extends VectorStore {
720
720
const results = await this . query ( readQuery , parameters ) ;
721
721
722
722
if ( results ) {
723
+ if ( results . some ( ( result ) => result . text == null ) ) {
724
+ if ( ! this . retrievalQuery ) {
725
+ throw new Error (
726
+ "Make sure that none of the '" +
727
+ this . textNodeProperty +
728
+ "' properties on nodes with label '" +
729
+ this . nodeLabel +
730
+ "' are missing or empty"
731
+ ) ;
732
+ } else {
733
+ throw new Error (
734
+ "Inspect the 'retrievalQuery' and ensure it doesn't return null for the 'text' column"
735
+ ) ;
736
+ }
737
+ }
738
+
723
739
const docs : [ Document , number ] [ ] = results . map ( ( result : Any ) => [
724
740
new Document ( {
725
741
pageContent : result . text ,
@@ -1026,7 +1042,7 @@ function handleFieldFilter(
1026
1042
return [ querySnippet , queryParam ] ;
1027
1043
} else if ( [ "$in" , "$nin" , "$like" , "$ilike" ] . includes ( operator ) ) {
1028
1044
if ( [ "$in" , "$nin" ] . includes ( operator ) ) {
1029
- filterValue . forEach ( ( val : any ) => {
1045
+ filterValue . forEach ( ( val : Any ) => {
1030
1046
if (
1031
1047
typeof val !== "string" &&
1032
1048
typeof val !== "number" &&
You can’t perform that action at this time.
0 commit comments