Highlighted
Rohan001 Respected Contributor.
Respected Contributor.
716 views

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

Jump to solution

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 ? 

0 Likes
1 Solution

Accepted Solutions
JanMartin Outstanding Contributor.
Outstanding Contributor.

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

Jump to solution

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...

6 Replies
Micro Focus Expert
Micro Focus Expert

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

Jump to solution

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


Blog | Samples | HPE CM 9.3 SDK Docs
**Any opinions expressed in this forum are my own personal opinion and should not be interpreted as an official statement on behalf of MicroFocus**
0 Likes
Rohan001 Respected Contributor.
Respected Contributor.

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

Jump to solution

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"] 

 

0 Likes
Micro Focus Expert
Micro Focus Expert

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

Jump to solution

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>

 


Blog | Samples | HPE CM 9.3 SDK Docs
**Any opinions expressed in this forum are my own personal opinion and should not be interpreted as an official statement on behalf of MicroFocus**
0 Likes
JanMartin Outstanding Contributor.
Outstanding Contributor.

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

Jump to solution

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...

Micro Focus Expert
Micro Focus Expert

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

Jump to solution

Sorry, must be half asleep.


Blog | Samples | HPE CM 9.3 SDK Docs
**Any opinions expressed in this forum are my own personal opinion and should not be interpreted as an official statement on behalf of MicroFocus**
0 Likes
Rohan001 Respected Contributor.
Respected Contributor.

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

Jump to solution

Hi All, 

Thanks for the replies.

@David Churchland: Indeed thoes are just placeholders 🙂

@JanMartin: 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

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.