2021-10-17 - Search Result flow

From Izara Wiki
Revision as of 05:16, 17 October 2021 by Sven the Barbarian (talk | contribs)
Jump to navigation Jump to search

Service - Search Results has some tasks which must be performed by Service - Search Result (handlers), for example DigData.

RequestSearchResult

  • handler: Api, Inv
  • can split into 2 functions if wanted, RequestSearchResult and RequestSearchResultSorted, splitting out code that has sort or not, if do this need to pull out shared code into library functions
  • receives request JSON, includes below params:
  1. searchType (product / sellOffer / variantProduct / ..)
  2. requestProperties (object containing browseQuantity / language/s / locationNode/s / ..)
  3. requiredData
  4. filter
  5. sort (optional)
  • returns to the client sortResultId, or searchResultId and searchDetailId (depending on request)
  • sortResultId: if request also includes sort field then need to return sortResultId, final data will be at SortResult service (client polls SortResult to see if finished)
  • searchResultId and searchDetailId: no sort field specified, final results will be pulled from SearchResultData (client polls SearchResults to see if finished)
  • also return status, in case data is ready for client immediately, or has error
  • if has error, return the error detail too