Avatria recommends using AWS CloudSearch's dynamic fields capabilities as the mechanism for implementing the query specific product rankings (i.e. sorting) provided by Avatria Convert.
First, create a new dynamic field type on the product records which will contain a product’s ranking for a particular page.
For example, create a dynamic field with the following properties:
- Field Type: int
- Field Name/Pattern: *_rank_i
- Field Options: SortEnabled=true. All other options can be disabled.
Then, when indexing, you can use a convention-based approach to construct the dynamic field name to be used for storing the product level ranking information for each page. For example, you could use the Convert ID which has been assigned to the page (i.e. the Query ID column in the export), or you could use any other stable ID if you already have something that works better for you.
Example Dynamic Field Name: <Your Category Name>: qid_2139955_purchase_rank_i
Lastly, we will still need a way to enable the ranking of the product list results using the indexes information via the a query parameter. For example, you can trigger an ascending sort of the results with something like the following:
- <your query parameter>=f[qid_2139955_purchase_rank_i]