I am looking to get all documents in a collection having a particular term present in the document. So, I am making use of the following code construct:
StringQueryDefinition sqd = queryManager.newStringDefinition();
sqd.setCollections(collectionName);
sqd.setCriteria(searchTerm);
but I am always getting the result count as 0, though if I remove the criteria, then I am getting all the documents in the collection.
What is wrong with this approach, please let me know.