This topic contains 2 replies, has 0 voices, and was last updated by rsaunders 7 years, 2 months ago.

  • Author
    Posts
  • #18210

    rsaunders

    I am trying to write a Map/Reduce script to process ~5 million (custom) records. Right now I have a scheduled script that can knock out 1.6k records per deployment that is chipping away at that number, but not as fast as I’d like.

    My attempts at processing the records via Map/Reduce cannot get past the input stage unless I hard code a list of internal ID’s into the script. The script just runs for 5-8 hours (doing something with the search I pass it) and spits out the following error:

    Code:
    {“type”:”error.SuiteScriptError”,”name”:”PERSISTED_DATA_LIMIT_FOR_MAPREDUCE_SCRIPT_EXCEEDED”,”message”:”Stored data limit of 50MB for Map/Reduce script exceeded.”}
    Does anyone know of any tricks to limit the number of results returned by my search?
    This is a cached copy. Click here to see the original post.

  • #18211

    johnsongilpp

    rsaunders, there is a configuration option on the results subtab of a saved search. check the “RUN UNRESTRICTED” check box and input the max number of search results in the adjacent field.

  • #18212

    rsaunders

    Thanks for the reply.

    That wasn’t working for me when running the saved search through the UI. If I put 20 records there, it would still return millions of records. I assumed it had something to do with using the Administrator role or just wasn’t working properly. If I run the saved search via SuiteScript, it should enforce the limit there?


    johnsongilpp replied on 09/19/2017, 07:41 AM: Yes, I assisted a colleague with a similar problem you’re having. He was able to limit the search to 1 result. If you want to test it. my suggestion would be to filter the search to under 100 results and then put 20 as the limit. Call the search via script and log the results.length to see if it is restricting it. You should get 20 back.

You must be logged in to reply to this topic.