Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-19315

Not providing a facet range name induces confusing behavior

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.5.0
    • 4.5.0
    • fts
    • None
    • Untriaged
    • Unknown

    Description

      When querying FTS with facets - either date or numeric - and providing ranges, it is not considered an error to omit the name of the range. That leads to confusing results, especially when one declares multiple ranges without a name.

      "strength": {
                  "field": "abv",
                  "size": 3,
                  "numeric_ranges" : [
                      {"name": "light", "min": 0.0, "max": 3.0},
                      {"name": "strong", "min": 3.0, "max": 5.0},
                      {"name": "extra-strong", "min": 5.0}
                  ]
              }
      

      yields:

      "strength": {
            "field": "abv",
            "total": 166,
            "missing": 30,
            "other": 0,
            "numeric_ranges": [
              {
                "name": "light",
                "min": 0,
                "max": 3,
                "count": 99
              },
              {
                "name": "extra-strong",
                "min": 5,
                "count": 49
              },
              {
                "name": "strong",
                "min": 3,
                "max": 5,
                "count": 18
              }
            ]
          }
      

      Whereas

      "strength": {
                  "field": "abv",
                  "size": 3,
                  "numeric_ranges" : [
                      {"min": 0.0, "max": 3.0},
                      {"min": 3.0, "max": 5.0},
                      {"min": 5.0}
                  ]
              }
      

      yields

      "strength": {
            "field": "abv",
            "total": 49,
            "missing": 30,
            "other": 0,
            "numeric_ranges": [
              {
                "name": "",
                "min": 5,
                "count": 49
              }
            ]
          }
      

      Looks like it considers all ranges have the same name ("empty"?) and only considers one of the declared ranges.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            simonbasle Simon Baslé (Inactive)
            simonbasle Simon Baslé (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty