Complexity level of search possible using SDK(Error while executing string queries with contains() )

Hi All,

We have an web application which uses HPRM 8.3 as its backend (connection done via. SDK). The web app helps user create custom searches which are executed in HPRM and output is shown to the user.

All the features likes sorting, searching (we use string-based searches) work quiet well. But on certian scenarios we receive the following error from HPRM:

"HPE record manager Workgroup Server on <server> reported an error.

Your search is too complicated and cannot be processed by the SQL engine.

Please simplify your query before trying again"

When we run the same query (or create and execute same query) in the HPRM 8.3 Desktop application we are able to get the results. We generally get this in queries which have 'contains()' method (but not always).

Is there any specific flag we have to set to get this working or extend the complexity level using the SDK.

Also, does this depend on length of the string-query we are sending through SDK ? 

  • Any chance of an example of one of the searches that throws the error?

  • Hi,

    The query is as bellow (I have added the tabbling and new line charecters to improve redabilit).

    An interesting finding we got is that when the long 139 charecter title is decreased (added in bold) to 120 charecters the query seem to be working. Just to give you more context RECORDTYPE2 is always a child of RECORDTYPE1. Also the titles refered in the query are the titles of a custom record type which is always a parent of RECORDTYPE1

     

    (
    	(
    		idol:searchText 
    		and 
    		container:
    		[
    			title:<small 20 char. text> 
    			or 
    			title:<long 139 char. text> 
    		] 
    		and 
    		type:[default:"RECORDTYPE1"] 
    	) 
    	or 
    	contains:[
    		idol:searchText 
    		and 
    		container:
    		[
    			title:<small 20 char. text> 
    			or 
    			title:<long 139 char. text> 
    		] 
    		and 
    		type:[default:"RECORDTYPE2"] 
    		] 
    ) 
    and type:[default:"RECORDTYPE1"] 

     

  • I do not recognise your string search syntax.  Neither of the following will be parsed by the CM search parser.

    <small 20 char. text>

     

    title:<long 139 char. text>

     

  • Verified Answer

    David: I think he's just formatted the query for easier readability, I believe the <> content is just placeholders for user input

    Rohan: Searching containers the way you are can be slow due to the way the security model is queried -

    What SQL is being generated in the workgroup server logs?

    Rather than doing an all in one "OR", have you considered doing the two queries seperately and then combining them in your application? (we had to do this in TRIM7 due to the way container and altContainer interacted)

    To be honest I don't see that query ever returning in a reasonable amount of time on an average SQL box with a large dataset...

  • Hi All, 

    Thanks for the replies.

    : Indeed thoes are just placeholders :)

    : Thats a good idea, the only downside will be my overall duration of a search call (web call HPRM call) will increase because I doubt C# would be very efficient in merging and then getting the distinct records out. But i'll give it a try.

    Thanks again for the inputs :)

    regards,

    Rohan