How to change the number of records returned from a work object search/how to configure ElastiSearch?
I'm working in 7.1.8
I’m trying to specify the behavior of the new-style search for work objects from the Find Work Gadget
My immediate need is to change the number of results returned from the default limit of 1,000.
I don’t see a system setting for this
I don’t see where I could pass a parameter
And I’m running into a wall of Final rules and opaque system behavior
- I enter search criteria that match 1,200 records into the Find Work Gadget (the rule name is FindWorkGadget) and press Enter
- the FindWorkGadget initially returns 20 results
- from that initial resultset, I click "See All Results" to see more
- Pega pops up a new window with 1,000 results
- For searches matching more than 1,000 records, I get the message "Showing first 1000 of 8667 work object matches. Try a more specific search."
I’m sure that’s a reasonable limitation in many cases. However, it’s not a useful limit in my application.
Question: where can I modify the 1,000 record limit?
Here’s what I have looked at:
The OOTB MgrTopPanel includes the gadget FindWorkGadget. I can specify the style of search behavior for FindWorkGadget by supplying a parameter. OOTB, the search style is "V6Search", which is what I want. So far, so good. But then this path ends.
Neither of the parameters for FindWorkGadget concern the limit of results returned
FindWorkGadget is Final and is the beginning of a series of Final rules and opaque function calls like pega.ui.gadget.FindWork.SearchforWork
System Settings and Dynamic System Settings
I used the very scientific method of looking at all settings with a value of 20 or 1,000. None of them appear to control the numbers of results I mentioned above.
The FindWorkGadget initially executes ListView Pega-Search-Work-Results.pySearchResultsWork.
- pySearchResultsWork has a maximum results value of 500, so clearly it's being ignored/overridden
- I tried specifying paging. That was the behavior in the earlier version of my application, running on 6.1. Paging also appears to be ignored.
- the get content activity is pzSearchResultsWork
- The limit on initial results from the FindWorkGadget appears to be hard-coded to 20 by step 3 of pzSearchResultsWork, which sets .pyMaxWork = 20
- I don't see a parameter that specifies the 1,000 record limit
- I do see this, also in step 3: .pyAllResults set to param.allResults
- pyAllResults is a flag. In the tracer, param.allResults is TRUE everywhere I've found it.
- I gather that the meaning of “All” results means “All results up to the 1000-record limit specified somewhere”
- Step 16 does the search by calling Pega-Search-Work-Param.pzSearchWork
I'm not quite sure which step does the search. in the Tracer, I have seen a SOAP call. In step 4 of this activity, I see a Connect-HTTP to call pySearchHTTPConnectWork
When I click “See All Results” and watch the Tracer, I eventually see the ListView pySearchResultsWorkFull is run. It calls the same get content activity "pySearchResultsWork", which I have already looked at.
I haven’t found a way to dig further into the details.
- I don't see anywhere that I can change the 1,000-record limit on work object search results
- Paging appears to be ignored
- I get the sense that the records limit is buried somewhere in the workings of Elastisearch
Does anyone know how I can configure the limit?
As I said above, the max records limit is my immediate concern. If there are additional parameters/settings I can supply, I would be eager to learn of any reference material on the subject.
Thank you, Kirill. I also used the Live UI feature in my investigation. It's a great feature - I use it constantly.
However, I couldn't seem to use Live UI on the pop-up window that displays the complete list of records. Are you able to analyze that window with Live UI? It would be very helpful to me to know how to use Live UI on pop-up windows!
I tried your suggestion. I'm afraid it didn't change the behavior of the system. It appears that those rules are not involved in displaying these results. I say this based on the following:
- none of the changes I make to them have any visible effect. To test this, I tried modifying pyShowResultsInWindowWrapper by deleting the included section pyShowResultsInNewWindow. The results displayed the same.
- when I run the tracer with ruleset Pega-EndUserUI checked, the rules you mentioned don't appear in the Tracer
What version of Pega did you use to test the solution you suggested?
We have a contradiction, so I hope you can help me resolve it
- Rajiv observes that the 1,000-record limit is hard-coded and can't be changed
- your solution says otherwise
Did you test your solution as described, with a limit over 1,000 results? If so, would you please post a screen shot so that I can see whether you are on the same results window that I am? The wording in the rules you suggested to change is actually different from the window I see.
Is your MgrTopPanel passing the V6Search parameter to the FindWorkGadget?
Article recommends to replace it with pyFindWorkGadget section. In my Pega 7.1.9 I see that even another section FindWorkCase is used which is defined in UI-Kit-7: 04-01-01. So these new sections all are using the same mechanism which may be tuned the way I described earlier. I did some customizations but not related to the number of results returned.
With regards to hardcode of 1000 I double checked this and really found that number of results returned may only be decreased.
Thanks for your reply. I tried the same argument with the end users before I wrote the post. I argued that surely 1,000 records are enough. They insisted that they want to see all results.
I think that some of the issue is that they are extremely resistant to change. This system is upgraded from 6.1. In 6.1, they could page through the results, 100 at a time.
I tried to give them what they are accustomed to by activating Paging in pySearchResultsWorkFull, but that doesn't work; it appears that something overrides the paging functionality so that it does not display.
I will relate your answer to the users and ask for their user cases.