This topic contains 6 replies, has 0 voices, and was last updated by TheUsualSuspect 6 years, 11 months ago.
-
AuthorPosts
-
December 6, 2017 at 11:58 am #18123
TheUsualSuspectRecently 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. -
December 6, 2017 at 3:32 pm #18124
teddycaguioaWe 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.
-
December 6, 2017 at 3:45 pm #18125
TheUsualSuspectCurrently 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.
-
December 6, 2017 at 4:16 pm #18126
teddycaguioaSince 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.
-
December 7, 2017 at 11:04 am #18127
TheUsualSuspectIs 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.
-
December 10, 2017 at 4:47 am #18128
teddycaguioaIt 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.
-
December 20, 2017 at 10:09 am #18129
TheUsualSuspectSo 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.
-
AuthorPosts
You must be logged in to reply to this topic.