2022-01-25 - Example Temp Sort Data
Jump to navigation
Jump to search
examples
- do not include all data or proper structure, just an outline of expected results
example 1
SortFields
[
{
dataName: qty_available
dataType: numeric
},
{
dataName: max_price
dataType: numeric
},
{
dataName: title
dataType: string
}
]
Search Result Data
record 1 {
qty_available 10
max_price 9.99
title aa
product_id: 1
}
record 2 {
qty_available 10
max_price 19.99
title aa
product_id: 2
}
record 3 {
qty_available 5
max_price 9.99
title aa
product_id: 3
}
record 4 {
qty_available 5
max_price 9.99
title bb
product_id: 4
}
record 5 {
qty_available 5
max_price 9.99
title bb
product_id: 5
}
Data in TempStringSort table
{
sortResultIdLevelOrd: "xx_3_1_1", // 5 > 9.99 > aa
value: "aa"
}
{
sortResultIdLevelOrd: "xx_3_1_1", // 5 > 9.99 > bb
value: "bb"
}
{
sortResultIdLevelOrd: "xx_3_2_1", // 10 > 9.99 > aa
value: "aa"
}
{
sortResultIdLevelOrd: "xx_3_2_2", // 10 > 19.99 > aa
value: "aa",
}
Data in TempNumericSort table
{
sortResultIdLevelOrd: "xx_1",
value: "5"
}
{
sortResultIdLevelOrd: "xx_1",
value: "10"
}
{
sortResultIdLevelOrd: "xx_2_1", // 5
value: "9.99"
}
{
sortResultIdLevelOrd: "xx_2_2", // 10
value: "9.99"
}
{
sortResultIdLevelOrd: "xx_2_2", // 10
value: "19.99"
}
Data in TempSortDataId table
{
sortResultIdLevelOrdValue: "xx_1_5",
dataId: "3"
}
{
sortResultIdLevelOrdValue: "xx_1_5",
dataId: "4"
}
{
sortResultIdLevelOrdValue: "xx_1_5",
dataId: "5"
}
{
sortResultIdLevelOrdValue: "xx_1_10",
dataId: "1"
}
{
sortResultIdLevelOrdValue: "xx_1_10",
dataId: "2"
}
{
sortResultIdLevelOrdValue: "xx_2_1_9.99",
dataId: "3"
}
{
sortResultIdLevelOrdValue: "xx_2_1_9.99",
dataId: "4"
}
{
sortResultIdLevelOrdValue: "xx_2_1_9.99",
dataId: "5"
}
{
sortResultIdLevelOrdValue: "xx_2_2_9.99",
dataId: "1"
}
{
sortResultIdLevelOrdValue: "xx_2_2_19.99",
dataId: "2"
}
{
sortResultIdLevelOrdValue: "xx_3_1_1", // 5 > 9.99 > aa
dataId: "3"
}
{
sortResultIdLevelOrdValue: "xx_3_1_1", // 5 > 9.99 > bb
dataId: "4"
}
{
sortResultIdLevelOrdValue: "xx_3_1_1", // 5 > 9.99 > bb
dataId: "5"
}
{
sortResultIdLevelOrdValue: "xx_3_2_1", // 10 > 9.99 > aa
dataId: "1"
}
{
sortResultIdLevelOrdValue: "xx_3_2_2", // 10 > 19.99 > aa
dataId: "2"
}