-
Notifications
You must be signed in to change notification settings - Fork 27
unbxdSearch.js(fix): exclude upper bound in range facets #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1063,9 +1063,9 @@ var unbxdSearchInit = function(jQuery, Handlebars){ | |
&& this.defaultParams.ranges.hasOwnProperty(x) | ||
&& this.defaultParams.ranges[x].hasOwnProperty(y) | ||
&& this.params.ranges[x].hasOwnProperty(y)){ | ||
b.push(x + ':[' + this.params.ranges[x][y].lb + " TO " + this.params.ranges[x][y].ub + ']'); | ||
b.push(x + ':[' + this.params.ranges[x][y].lb + " TO " + this.params.ranges[x][y].ub + '}'); | ||
}else if(this.params.ranges[x].hasOwnProperty(y)){ | ||
a.push(x + ':[' + this.params.ranges[x][y].lb + " TO " + this.params.ranges[x][y].ub + ']'); | ||
a.push(x + ':[' + this.params.ranges[x][y].lb + " TO " + this.params.ranges[x][y].ub + '}'); | ||
} | ||
} | ||
|
||
|
@@ -1265,7 +1265,7 @@ var unbxdSearchInit = function(jQuery, Handlebars){ | |
for(var x = 0; x < filterStrArr.length; x++){ | ||
var arr = filterStrArr[x].split(":"); | ||
if(arr.length == 2){ | ||
arr[1] = arr[1].replace(/(^")|("$)/g, '').replace(/\"{2,}/g, '"').replace(/\\\"/g, '"').replace(/(^\[)|(\]$)/g, ''); | ||
arr[1] = arr[1].replace(/(^")|("$)/g, '').replace(/\"{2,}/g, '"').replace(/\\\"/g, '"').replace(/(^\[)|(\]$)|(\}$)/g, ''); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this change required? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Range facet in search metadata will now be in format |
||
|
||
var vals = arr[1].split(" TO "); | ||
if(vals.length > 1){ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's starts with square bracket & end with flower bracket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we are apply filter including both upper and lower Interval. But in facets response, it returns count of products under
Start >= product < End