This topic contains 6 replies, has 0 voices, and was last updated by TheUsualSuspect 6 years, 11 months ago.

  • Author
    Posts
  • #18123

    TheUsualSuspect

    Recently I found that the search module is returning inconsistent results for a custom record I’m searching on. This isn’t even from my code it all originates from a pagedSearch Object.

    The paged result will show you the total number of results before being run. One would expect the count to line up with the page range array but in this case the values differ. A search with page size of 1000 has 11 pages for a total count of 9824? Whats worse is that the script runs and gets back a page with 0 results, one page with 2 results and the rest with 1000 results meaning I get back 9002 results in actuality which isn’t consistent with either previous count.

    I have a picture attached showing values in the debugger. I have documented this behavior in a screen capture as well.

    Is there a behavior with async searches that could explain the issue here or is this a genuine defect?
    This is a cached copy. Click here to see the original post.

  • #18124

    teddycaguioa

    We encountered this issue. Workaround is to provide sorted columns. Make sure you sort using the field with the most unique values, or sort using multiple fields. Sorting with a single field that has multiple identical values can cause the result rows to be in a different order each time the search is run.

    Or use ResultSet,getRange() where sorted columns are optional.

  • #18125

    TheUsualSuspect

    Currently sorting using an internalid from the child record which will always be a unique identifier for each result.

    I also ran into the sorting issue earlier this week and opened a separate case for that.

  • #18126

    teddycaguioa

    Since the sorting has an issue then the paging will also have an issue since runPaged() is dependent on the sorting. As mentioned above, another option is to use ResultSet,getRange() where sorted columns are optional.

  • #18127

    TheUsualSuspect

    Is there any disclaimer or warning in the API docs that alludes to this issue? We have extensive pricing logic customized in a large client that is dependent on these API calls.

  • #18128

    teddycaguioa

    It is documented in

    https://system.netsuite.com/app/help…n_n651604.html and

    https://system.netsuite.com/app/help…345171487.html

    The warning was added last September 2017.

  • #18129

    TheUsualSuspect

    So I have opened two defects for both of these issues for the 2.0 search module this month

    476234

    474626

    Fret not as one was slated as a U6 which indicates it doesn’t even have a timeline to be fixed.

You must be logged in to reply to this topic.