Exact Text Search with Find Webservice
PostPosted:Mon Mar 17, 2014 6:19 am
Hi,
We are using OpenKM 6.2.5 and are implementing full text search with Find webservice. I am trying to implement a exact text search with multiple words. OpenKM's default search behavior seems to be to split the text into separate tokens and search for each token with the 'AND' criteria to join the final result.
For example, if I have the following code to search from a list of countries using Find webservice,
We are using OpenKM 6.2.5 and are implementing full text search with Find webservice. I am trying to implement a exact text search with multiple words. OpenKM's default search behavior seems to be to split the text into separate tokens and search for each token with the 'AND' criteria to join the final result.
For example, if I have the following code to search from a list of countries using Find webservice,
Code: Select all
My requirement is the search should return only documents which have 'France' and 'Greece' as consecutive texts(Exact Match). But the Find webservice returns all documents which have both 'France' and 'Greece' texts, irrespective of where they appear in the document. I tried escaping the text with \" also, but then it didn't return any result. In this scenario, how can I make OpenKM Find webservice to understand the search has to be made on the entire search text as a single token, rather than it's default behavior?QueryParams queryParams = new QueryParams();
queryParams.setDomain(1L);
queryParams.setPath("/okm:root/Test/");
String searchText = "France Greece";
queryParams.setContent(searchText);
List<QueryResult> resultList = okmSearch.find(token, queryParams);