Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Add support for case-changing functions #128

Closed
galkk opened this issue Jul 23, 2019 · 1 comment
Closed

Add support for case-changing functions #128

galkk opened this issue Jul 23, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@galkk
Copy link
Contributor

galkk commented Jul 23, 2019

Implement support for case-changing functions

As per #123, there is no support for case change functions in SQL.

Implement custom script functions that will do that (SQLFunctions.java)

Reference

@galkk
Copy link
Contributor Author

galkk commented Jul 23, 2019

This is a sketch of how the potential solution might look like

POST /kibana_sample_data_logs/_search
{
  "from": 0,
  "size": 200,
  "query": {
    "bool": {
      "filter": [
        {
          "bool": {
            "must": [
              {
                "script": {
                  
                  "script": {
                    "source": "doc['host.keyword'].value == params.v0.toLowerCase()",
                    "lang": "painless",
                    "params" : {
                      "v0": "WWW.ELASTIC.CO"
                    }
                  },
                  "boost": 1
                }
              }
            ],
            "adjust_pure_negative": true,
            "boost": 1
          }
        }
      ],
      "adjust_pure_negative": true,
      "boost": 1
    }
  },
  "_source": {
    "includes": [
      "host"
    ],
    "excludes": []
  }
}

@dai-chen dai-chen added the enhancement New feature or request label Jul 24, 2019
galkk added a commit that referenced this issue Sep 5, 2019
Issue #128

Description of changes:

Added 2 new functions LOWER and UPPER that receive field name as a first parameter and, potentially, locale

Changed identifier generation strategy to id per function name instead of global id
@galkk galkk closed this as completed Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants