OKMSearch using OR operator in openkm6.2.5
PostPosted:Thu Dec 12, 2013 9:34 am
As requested I am opening a separate post for this problem.
I am having the below code (earllier written in xpath)
This doesnt work as the queryparams always take in AND operator.
I am having the below code (earllier written in xpath)
Code: Select all
I would want to implement this in openkm6.2.5, for which I have written the code as : I am using OKMSearch.find(String token, QueryParams params)searchQuery.append("(jcr:like(@"+candidateObjectType+",'"+ candidateNumberString +"') and ");
searchQuery.append("jcr:like(@"+componentObjectType+",'%"+ componentNumberString +"%')) or ");Code: Select all
But in this, the queries will always return results in AND condition. Is there a way that I can use OR condition by setting queryParams.setOperator("or"); entryObj = new QueryParams.Properties.Entry();
entryObj.setKey(candidateObjectType);
entryObj.setValue(candidateNumberString);
propertyObj.getEntry().add(entryObj);
entryObj = new QueryParams.Properties.Entry();
entryObj.setKey(componentObjectType);
entryObj.setValue(componentNumberString);
propertyObj.getEntry().add(entryObj);This doesnt work as the queryparams always take in AND operator.