Hello, I have the following part of a cloud function where Im trying to do full-text-search.
Im trying to look for the word โwordโ in either columnOne of tableOne or columnTwo of tableTwo
const queryOne = new Moralis.Query("tableOne");
const queryTwo = new Moralis.Query("tableTwo");
queryOne.fullText("columnOne", request.params.searchVal);
queryTwo.fullText("columnTwo", request.params.searchVal);
const oneResults = await queryOne.find({ useMasterKey: true });
const twoResults = await queryTwo.find({ useMasterKey: true });
``` Error: MongoError: text index required for $text query
at /moralis-server/lib/Controllers/DatabaseController.js:1205:21
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Input: {"searchVal":"word"}
Error: {"message":{"ok":0,"code":27,"codeName":"IndexNotFound","name":"MongoError"},"code":1}
This full-text query doesnt match anything partial or complete matches. Why is this not working?