0 Replies Latest reply: Jul 21, 2009 12:44 PM by 392777 RSS

    Search Expression Limits

    392777
      My understanding of the SearchManager api is that it can only accept 1 search expression object. As such, in order to search for multiple values, you have to create a search expression for each value and another expression to AND them together, such as:

      SearchManager searchManager = session.getSearchManager();
      SearchExpression se1 = new SearchExpression();
                     se1.setOperator(FdkConstants.OPERATOR_EQUAL);
                     se1.setLeftOperand(SEARCH_CATEGORY_CLASS_ID + FdkConstants.SEPARATOR + IDENTIFIER_ATTRIBUTE_ID);
                     se1.setRightOperand(uuid);

      SearchExpression se2 = new SearchExpression();
                     se2.setOperator(FdkConstants.OPERATOR_EQUAL);
                     se2.setLeftOperand(SEARCH_CATEGORY_CLASS_ID + FdkConstants.SEPARATOR + HAS_VERSION_ATTRIBUTE_ID);
                     se2.setRightOperand(revision);

      SearchExpression se3 = new SearchExpression();
                     se3.setOperator(FdkConstants.OPERATOR_AND);
                     se3.setLeftOperand(se1);
                     se3.setRightOperand(se2);

      searchManager.search(se3, options, requestedAttributes)

      The problem I have is that I need to search by potentially as many as several hundred values, which, by the above example leads, to an awful lot of search expressions. I don't see any other way to accomplish it, or even if content db can handle that many, or what the response time would be like even if it can.

      If anyone has a similar experience, I'd really appreciate any info. I searched the forum for something like this, but didn't find anything.

      Thanks.