This is my creating index code.
await client.db('admin').command({ ping: 1 });
console.log('Connected successfully to server');
const database = client.db("parse")
const collection = database.collection("TblColllection")
const res = await collection.createIndex({ tokenURIData: "text" })
So after this code, I listed the indexes and result is like below.
[
{ v: 2, key: { _id: 1 }, name: '_id_' },
{
v: 2,
key: { _fts: 'text', _ftsx: 1 },
name: 'tokenURIData_text',
weights: { tokenURIData: 1 },
default_language: 'english',
language_override: 'language',
textIndexVersion: 3
}
]
And I used query.fullText method on cloud function as below.
query.fullText('tokenURIData', request.params.keyword);