question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Init with searchParameters & Numeric filter

See original GitHub issue

Hi,

Could you give an example of numeric filter’s usage in searchParameters? I tried several things according to the documentation but I always got: Invalid syntax for numeric condition

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bobylitocommented, Sep 8, 2016

@ctjhoa Ok this makes much more sense

The internal datastructures of the numeric refinements are not documented on purpose because they might evolve whereas the API / methods are less likely to change. That’s why we suggest you create a small configuration widget for this purpose:

var search = instantsearch({
  appId: 'APP_ID',
  apiKey: 'API_KEY',
  indexName: 'INDEX_NAME'
});

search.addWidget({
  init: function(params) {
    var helper = params.helper;
    helper.addNumericRefinement('price', '>', 5);
  }
});

Be careful, if you use the currentRefinedValues widget, the filter will be displayed and a user will be able to discard it.

0reactions
bobylitocommented, Sep 8, 2016

Glad we could help @ctjhoa Feel free to ask us anything 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

numericFilters API parameter - Algolia
Filter on numeric attributes. In most cases, use the filters parameter instead of numericFilters since filters has a more straightforward, SQL- ...
Read more >
Azure Cognitive Search - Query types - Microsoft Learn
Learn about the types of queries supported in Cognitive Search, including free text, filter, autocomplete and suggestions, geospatial search ...
Read more >
HubL filters - HubSpot Developers
Adds a numeric value to another numeric value. This filter functions the same as the + operator. The parameter in parentheses is the...
Read more >
How to Use Twitter's Advanced Search Parameters to Uncover ...
You could filter to see everything a particular account (maybe your competitor) Tweeted in October. You could find a Tweet by remembering a ......
Read more >
7.4 - Request Format - Google
By using search parameters, special query terms and filters in your search ... dynamic navigation queries containing a large number of metadata filters....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found