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

[FTS+N1QL] Supporting FTS Facetted queries from within N1QL Search(..)

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • feature-backlog
    • Cheshire-Cat
    • fts
    • None
    • 1

    Description

      Here is an example of a Facetted query for FTS ...

      {
        "query": {
          "query": "football"
        },
        "facets": {
          "type": {
            "size": 2,
            "field": "text"
          }
        }
      }

      An output for this query ..

      {
        "status": {
          "total": 1,
          "failed": 0,
          "successful": 1
        },
        "request": {
          "query": {
            "query": "football"
          },
          "size": 10,
          "from": 0,
          "highlight": null,
          "fields": null,
          "facets": {
            "type": {
              "size": 2,
              "field": "text"
            }
          },
          "explain": false,
          "sort": [
            "-_score"
          ],
          "includeLocations": false,
          "search_after": null,
          "search_before": null
        },
        "hits": [
          {
            "index": "default_2008aa87a01d93e2_4c1c5584",
            "id": "two",
            "score": 0.22941572964191437,
            "sort": [
              "_score"
            ]
          },
          {
            "index": "default_2008aa87a01d93e2_4c1c5584",
            "id": "one",
            "score": 0.16903084516525269,
            "sort": [
              "_score"
            ]
          }
        ],
        "total_hits": 2,
        "max_score": 0.22941572964191437,
        "took": 175236,
        "facets": {
          "type": {
            "field": "text",
            "total": 6,
            "missing": 0,
            "other": 2,
            "terms": [
              {
                "term": "football",
                "count": 2
              },
              {
                "term": "play",
                "count": 2
              }
            ]
          }
        }
      }

      N1QL as of today just processes the "hits" portion of the search response above. The "facets" details is a separate section within the search response which will need to be interpreted to support facetted FTS queries from within N1QL.

      Attachments

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

        Activity

          People

            abhinav Abhi Dangeti
            abhinav Abhi Dangeti
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty