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.

A little unclear filter documentation

See original GitHub issue

The regular documentation and the API-documentation is a little different on how query filtering works. Which is the correct version?

Regular documentation

query: {
  AND: {
    'description': ['swiss', 'watch']
    'price': [{
       gte: '1000',
       lte: '8'
    }]
  }
}

API

  si.buckets({
    query: [
      {
        AND: {'*': ['*']}
      }
    ],
    buckets: [
      {
        field: 'price',
        gte:   '2',
        lte:   '3',
        set:   false
      }
      {
        field: 'price',
        gte:   '4',
        lte:   '7',
        set:   false
      }
    ]
  }).on('data', function (data) {
    // do something with the data
  }).on('end', function () {
    // finshed
  })
  si.categorize({
    query: [
      {
        AND: {'*': ['swiss', 'watch']}
      }
    ],
    category: {
      field: 'manufacturer'
    }
  }).on('data', function (data) {
    // do something with the data
  }).on('end', function () {
    // finshed
  })

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
fergiemcdowallcommented, Nov 11, 2016

Its just that filtering each or query allows you to do both (filter the whole result set, or define different filters per OR clause). So if somebody did have a usecase for per OR clause they could implement it.

0reactions
eklemcommented, Nov 11, 2016

Not sure if I agree fully, but maybe not the big issue for me in a while. What do you think would be a usecase for filtering differently on each OR-query?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clear or remove a filter - Microsoft Support
If you don't want someone to filter a particular column, you can consider hiding it. Clear all the filters in a worksheet. Click...
Read more >
#6752 (Documentation slightly unclear about "safe" strings in filters ...
My objective here is to prevent somebody else from falling into the same trap as I. This is with regard to auto-escaping, the...
Read more >
documentation for bt_le_filter_accept_list_add unclear
My current solution is to check the settings in this scan filter callback, if the device is bonded, and then connect. Was just...
Read more >
IIR Filter design Signature and algorithm unclear #14 - GitHub
This issue is based on discussion in the Mathnet forum. I tried to figure out the actual usage of the IirCoefficients Methods and...
Read more >
FFmpeg Filters Documentation
This filter is bit crusher with enhanced functionality. A bit crusher is used to audibly reduce number of bits an audio signal is...
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