Skip to content

Releases: AddSearch/js-client-library

v0.3.0

13 Mar 08:19
9d8dc11
Compare
Choose a tag to compare

New functions to control Search Analytics:

  • sendStatsEvent to send search queries and clicks to analytics
  • setStatsSessionId and getStatsSessionId to manually control the search session ID or to share the ID between multiple client instances. Only the last keyword of a single session is shown on the Analytics Dashboard.

Deprecated searchResultClicked function and it should be replaced with sendStatsEvent:

// documentId is the 32-character long id that is part of each hit in search results.
// position is the position of the document that was clicked, the first result being 1
client.sendStatsEvent('click', keyword, {documentId: id, position: n});

v0.2.4

11 Feb 14:16
Compare
Choose a tag to compare

New functions to query custom field autocompletion and define the number of results to fetch.

client.setAutocompleteSize(20);
client.autocomplete('custom_fields.brand', 'a', callback); // "adidas, apple, azure"

New function to use a filtering object with complex setup.

var filter = {
  'and':[
     {'custom_fields.brand': 'apple'},
     {'not': {'custom_fields.color': 'white'}},
     {'range': {'custom_fields.price': {'gt': 200, 'lt':500}}}
   ]
};

client.setFilterObject(filter);

v0.2.3

23 Jan 12:06
Compare
Choose a tag to compare

New function to post search result clicks to analytics. Clicks are shown on your Analytics Dashboard and they can be used for the self-learning search algorithm.

  • searchResultClicked

v0.2.2

07 Jan 12:10
Compare
Choose a tag to compare

New function to disable analytics collection from API calls

  • setCollectAnalytics

v0.2.1

25 Nov 12:38
Compare
Choose a tag to compare

Deprecated function

  • useFuzzyMatch

Added function

  • setFuzzyMatch with possible attribute values true, false, or "auto" (default is "auto" for automatic typo tolerance)

Added possibility to sort search results by custom_field. For example:

  • client.setPaging(1, 10, 'custom_fields.price', 'asc'); // Lowest price first

v0.1.19

03 Oct 08:53
Compare
Choose a tag to compare

Added a function to shuffle result set and return n results

  • setShuffleAndLimitTo

v0.1.18

24 Sep 12:30
Compare
Choose a tag to compare

Made following functions idempotent

  • addFacetField
  • addCustomFieldFilter

v0.1.17

20 Sep 07:01
Compare
Choose a tag to compare

Maximum page size increased from 50 to 300. E.g.:

  • client.setPaging(1, 300, 'date', 'asc');

v0.1.16

19 Sep 08:51
Compare
Choose a tag to compare

New function to define the number of facets to fetch

  • client.setNumberOfFacets

v0.1.15

12 Sep 11:35
Compare
Choose a tag to compare

New function to define result types, i.e. to leave out Pinned results and Promotions:

  • setResultType

New function to pass personalization events with the search query, instead of sending user actions beforehand.

  • setPersonalizationEvents