Skip to content

Field names with a ' ' (space) character in them don't seem to work in the WHERE clause #736

@zeigernz

Description

@zeigernz

Plugin version: 6.3.2.0
Elasticsearch version: 6.3.2

It looks like when there is a ' ' (space) character in the field name in the where clause, it doesn't match any document.

Test:
Step 1. Index a document (this will automatically create an index as well)

curl -X PUT \
  http://localhost:9200/foobarbaz/quux/12345 \
  -H 'Content-Type: application/json' \
  -d '{
	"name": "foo",
	"last name": "bar"
}'

Step 2. Query documents with the query:

select * from foobarbaz where `last name` = 'bar'

curl -X GET \
  'http://localhost:9200/_sql?sql=select%20%2A%20from%20foobarbaz%20where%20`last%20name`%20=%20%27bar%27'

Step 2 should return 1 hit (the document that we indexed in step 1). But it doesn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions