Search & querying

Aikey's search library is a great way of implementing fast personalised category views and search views.


[Not Required]
This is a free text search that accept any type of string. It can be used to implement a free text search function on your site. But without it you get a regular category type result.
[Not Required] [Default: Title]
Order of the products returned. Can be set to:
[Not Required] [Default: DESC]
Can be set to DESC for descending order or ASC for ascending.
[Not Required] [Default: 6]
How many products should be returned.
[Not Required] [Default: 0]
Offset where to start taking products from.
[Not Required] [Default: first found]
What currency and price that should be returned. While this is not required it should always be provided when you use multiple currencies.
[Not Required]
The Price Range can be used to filter down products in a certain price range. It is an object with from and to {from: 0, to: 200}.
[Not Required]
Facets use the dynamic properties set to a product to filter down the results. This is sent in as a an object with property name as key and an array of property values as the objects value. {Category: [ "Sneakers", "Boots"]}{
    searchTerm: "",
    orderBy: "title",
    orderByDirection: "DESC",
    limit: 6,
    offset: 0,
    currency: "EUR",
    priceRange: {from: 0, to: 200},
    properties: {
      Category: [ "Sneakers", "Boots" ],
      Color: ["White", "Blue"]
  }, function(response){
     //Callback with response

  products: [
      sku: "abc-123"
      title: "Example Product",
      price: {
        currency: "EUR", 
        value: 80
      properties: [
          name: "Color", 
          value: "White"
          name: "Gender", 
          value: "Men"
      link: "",
      imageLink: "",
      description: "Lorem ipsum dolor sit amet."
  itemCount: 5
  facets: {
    Color: [
        label: "White", 
        count: 2, 
        selected: false
  maxPrice: 85