Reputation: 17
I am using below.
QueryManager queryMgr = dbClient.newQueryManager();
StringQueryDefinition query = queryMgr.newStringDefinition();
// Some text eg. "test"
query.setCriteria(criteria);
SearchHandle resultsHandle = new SearchHandle();
queryMgr.search(query, resultsHandle);
this does the search in all the docs.
How I can reuse this to make the search in a particular file?
Upvotes: 0
Views: 39
Reputation: 2475
I'm not sure why you'd search a particular file. But if you want to, try StructuredQueryBuilder.document. Here's docs on using StructuredQueryBuilder: 1, 2.
Upvotes: 1