Is there a way to programatically full text search?
I am using the RTC SDK to programatically query for work items. I have working code where I can refine my search based on attributes like type, status, and associated project area.
Is there a way to add a full text search attribute into my query? A boiled down version of my code is as follows: private static IQueryResult<IResolvedResult<IWorkItem>> performQuery(ITeamRepository repo, String projectAreaName) throws TeamRepositoryException { final IProcessClientService processClient = (IProcessClientService) repo.getClientLibrary(IProcessClientService.class); final IQueryClient queryClient = (IQueryClient) repo.getClientLibrary(IQueryClient.class); final IAuditableClient auditableClient = (IAuditableClient) repo.getClientLibrary(IAuditableClient.class); // Connecting to Project Area final URI uri = URI.create(projectAreaName.replaceAll(" ", "%20")); final IProjectArea projectArea = (IProjectArea) processClient.findProcessArea(uri, null, monitor); // Current Project Area final IQueryableAttribute projectAreaAttribute = findAttribute(projectArea, IWorkItem.PROJECT_AREA_PROPERTY, auditableClient, monitor); final AttributeExpression projectAreaExpression = new AttributeExpression(projectAreaAttribute, AttributeOperation.EQUALS, projectArea); // Escalation Type final IQueryableAttribute typeAttribute = findAttribute(projectArea, IWorkItem.TYPE_PROPERTY, auditableClient, monitor); final AttributeExpression typeExpression = new AttributeExpression(typeAttribute, AttributeOperation.MATCHES, "escalation"); final Term term = new Term(Operator.AND); term.add(projectAreaExpression); term.add(typeExpression); final IQueryResult<IResolvedResult<IWorkItem>> result = queryClient.getResolvedExpressionResults(projectArea, term, IWorkItem.FULL_PROFILE); return result; } |
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Apr 25 '13, 2:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Tory Jaskoviak selected this answer as the correct answer
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.