Closed ayende closed 5 months ago
A query such as:
async function getDuplicates(question: Question): Promise<Question[]> { const session = ravenStore.openSession(); const query = session .query<Question>({ indexName: "Questions/Search" }) .whereEquals("isArchived", false) .whereNotEquals("id", question.id) .whereEquals("level", question.level) .moreLikeThis(q => q.usingDocument( JSON.stringify({ question: question.question, }) ) ) .take(5); if(question.language) query.whereEquals("level", question.level) const similarQuestions = await query.all(); return similarQuestions; }
This fails:
if(question.language) query.whereEquals("level", question.level)
Because the previous operation in not a where, which is what this expects
A query such as:
This fails:
Because the previous operation in not a where, which is what this expects