Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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;
    }

0 votes


Accepted answer

Permanent link
Please see https://jazz.net/wiki/bin/view/Main/QueryDevGuide Example 2.
Tory Jaskoviak selected this answer as the correct answer

1 vote

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,023

Question asked: Apr 24 '13, 6:26 p.m.

Question was seen: 5,080 times

Last updated: Apr 25 '13, 2:45 a.m.

Confirmation Cancel Confirm