Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple query text field with spaces and * issues after upgrade #31150

Closed
rondelward opened this issue Jun 6, 2018 · 4 comments
Closed

Simple query text field with spaces and * issues after upgrade #31150

rondelward opened this issue Jun 6, 2018 · 4 comments
Labels
:Search Relevance/Analysis How text is split into tokens Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch

Comments

@rondelward
Copy link

rondelward commented Jun 6, 2018

Elasticsearch version (bin/elasticsearch --version): 6.2.4

Plugins installed: []

JVM version (java -version): 1.8.0_171

OS version (uname -a if on a Unix-like system): Windows sever 2012 R2

Description of the problem including expected versus actual behavior:

The simple query string command does not return expected results when the query contains a space and a wildcard e.g ( "Test *"). The same query format works in version 5.6.8 and was noticed after an upgrade.

Steps to reproduce:

Here are the steps (using Kibana) to set up an index to reproduce the issue

PUT test_query
{
  "mappings": {
    "test_type": {
      "_source": {
        "enabled": true
      },
      "properties": {
          "my_field": {
            "type": "text",
            "analyzer": "standard"
          }
        }
    }
  }
}
POST /test_query/test_type
{
  "my_field": "Test Value Here"
}
POST /test_query/test_type
{
  "my_field": "Testing different"
}
POST test_query/_refresh
GET test_query/_search
{
  "query": {
    "simple_query_string": {
      "fields": [
        "my_field"
      ],
      "query": "Test*",
      "default_operator": "and"
    }
  }
}
GET test_query/_search
{
  "query": {
    "simple_query_string": {
      "fields": [
        "my_field"
      ],
      "query": "Test *",
      "default_operator": "and"
    }
  }
}

The query "Test*" returns the document as expected. However "Test *" does not work in version 6.2.4. In version 5.6.8, both queries return results as expected using the same standard analyzer for the field.

Expected 1 hit, actually received 0 hits.

Was there an intentional change made that would impact this query in version 6.X?

@rondelward rondelward changed the title Simple query text field with spaces regression issue after upgrade Simple query text field with spaces and * issues after upgrade Jun 6, 2018
@jasontedor jasontedor added the :Search Relevance/Analysis How text is split into tokens label Jun 7, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@jimczi
Copy link
Contributor

jimczi commented Jun 7, 2018

This issue is already fixed for the next minor release 6.3.0: #28871
Thanks for reporting @rondelward .

@jimczi jimczi closed this as completed Jun 7, 2018
@rondelward
Copy link
Author

Thanks for the quick reply @jimczi. Is there a planned release date for the 6.3.0 build?

@jpountz
Copy link
Contributor

jpountz commented Jun 7, 2018

We don't communicate around release dates, but we would like to release 6.3.0 "soon".

@javanna javanna added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search Relevance/Analysis How text is split into tokens Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

6 participants