algoliasearch-helper
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -19,4 +19,4 @@ "use strict"; | ||
*/ | ||
helper.version = "2.0.3"; | ||
helper.version = "2.0.4"; | ||
module.exports = helper; |
{ | ||
"name": "algoliasearch-helper", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Helper for implementing advanced search features with algolia", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,3 +12,3 @@ *Coming from V1 (or js client v2)?* Read the [migration guide](https://github.com/algolia/algoliasearch-helper-js/wiki/Migration-guide-:-V1-to-V2) to the new version of the Helper. | ||
## Features | ||
a | ||
- Search parameters tracking | ||
@@ -41,3 +41,3 @@ - Facets exclusions | ||
helper.addNumericRefine( "year", "=", 2003 ); | ||
helper.addNumericRefinement( "year", "=", 2003 ); | ||
@@ -44,0 +44,0 @@ // Search for any movie filmed in 2003 and directed by either C. Eastwood or S. Coppola |
@@ -368,3 +368,3 @@ "use strict"; | ||
addFacetRefinement : function addFacetRefinement( facet, value ) { | ||
if( this.isRefined( facet, value ) ) { | ||
if( this.isFacetRefined( facet, value ) ) { | ||
return this; | ||
@@ -371,0 +371,0 @@ } |
@@ -28,8 +28,2 @@ "use strict"; | ||
function assignFacetTimeout( dest, timeoutCounts, getRankingInfo ) { | ||
if ( getRankingInfo ) { | ||
dest.timeout = !!( timeoutCounts ); | ||
} | ||
} | ||
/** | ||
@@ -111,9 +105,6 @@ * Constructor for SearchResults | ||
name : facetKey, | ||
data : facetValueObject | ||
data : facetValueObject, | ||
exhaustive : mainSubResponse.exhaustiveFacetsCount | ||
}; | ||
assignFacetStats( this.disjunctiveFacets[ position ], mainSubResponse.facets_stats, facetKey ); | ||
assignFacetTimeout( this.disjunctiveFacets[ position ], | ||
state.getRankingInfo, | ||
mainSubResponse.timeoutCounts, | ||
facetKey ); | ||
} | ||
@@ -123,6 +114,6 @@ else { | ||
name : facetKey, | ||
data : facetValueObject | ||
data : facetValueObject, | ||
exhaustive : mainSubResponse.exhaustiveFacetsCount | ||
}; | ||
assignFacetStats( this.facets[ position ], mainSubResponse.facets_stats, facetKey ); | ||
assignFacetTimeout( this.facets[ position ], state.getRankingInfo, mainSubResponse.timeoutCounts, facetKey ); | ||
} | ||
@@ -142,6 +133,6 @@ }, this ); | ||
name : dfacet, | ||
data : extend( {}, facetResults, dataFromMainRequest ) | ||
data : extend( {}, dataFromMainRequest, facetResults ), | ||
exhaustive : result.exhaustiveFacetsCount | ||
}; | ||
assignFacetStats( this.disjunctiveFacets[ position ], result.facets_stats, dfacet ); | ||
assignFacetTimeout( this.disjunctiveFacets[ position ], state.getRankingInfo, result.timeoutCounts, dfacet ); | ||
@@ -165,3 +156,4 @@ if ( state.disjunctiveFacetsRefinements[dfacet] ) { | ||
name : facetName, | ||
data : mainSubResponse.facets[ facetName ] | ||
data : mainSubResponse.facets[ facetName ], | ||
exhaustive : mainSubResponse.exhaustiveFacetsCount | ||
}; | ||
@@ -168,0 +160,0 @@ forEach( excludes, function( facetValue ) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54872
1320