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

Stop-words not removed in simple_query_string when more then one field #33009

Closed
pluk opened this issue Aug 21, 2018 · 5 comments · Fixed by #33017
Closed

Stop-words not removed in simple_query_string when more then one field #33009

pluk opened this issue Aug 21, 2018 · 5 comments · Fixed by #33017
Assignees
Labels
>bug :Search/Search Search-related issues that do not fall into other categories

Comments

@pluk
Copy link

pluk commented Aug 21, 2018

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

Plugins installed: []

JVM version (java -version): java version "1.8.0_102"

OS version : ArchLinux

Description of the problem including expected versus actual behavior:
Like in #28855 stop-words not removed in simple_query_string but when we use more than one field

Steps to reproduce:
1.
PUT /simp_idx

{
  "mappings": {
    "my_type": {
      "properties": {
  		"field_1": {
    			"type": "text"
    		},
                "field_2": {
    			"type": "text"
    		}
      }
    }
  },
  	"settings": {
		"number_of_shards": 1,
		"number_of_replicas": 0,
		"analysis": {

			"filter": {
				"english_stop": {
					"type": "stop",
					"stopwords": "_english_"
				}
			},
			"analyzer": {
				"default": {
					"tokenizer": "standard",
					"filter": [
						"english_stop"
					]
				}
			}
		}
	}
}
PUT /simp_idx/my_type/1
{
  "field_1": "normal",
  "field_2": "place of beauty"
}
PUT /simp_idx/my_type/2
{
  "field_1": "place",
  "field_2": "of beauty"
}
PUT /simp_idx/my_type/3
{
  "field_1": "place of beauty",
  "field_2": "place and beauty"
}

POST simp_idx/_search

{
  "query": {
    "simple_query_string" : {
        "query": "place of beauty",
        "default_operator": "and",
        "fields": [ "field_1", "field_2"]
    }
  }
}

Finds no results.

  1. Without "of" returns all 3 documents
    POST simp_idx/_search
{
  "query": {
    "simple_query_string" : {
        "query": "place beauty",
        "default_operator": "and",
        "fields": [ "field_1", "field_2"]
    }
  }
}
@jimczi jimczi added >bug :Search/Search Search-related issues that do not fall into other categories labels Aug 21, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@jimczi jimczi self-assigned this Aug 21, 2018
jimczi added a commit to jimczi/elasticsearch that referenced this issue Aug 21, 2018
This change fixes empty query removal when all fields remove the search term in
`simple_query_string`, `multi_match` and `query_string`.

Closes elastic#33009
jimczi added a commit that referenced this issue Aug 21, 2018
This change fixes empty query removal when all fields remove the search term in
`simple_query_string`, `multi_match` and `query_string`.

Closes #33009
jimczi added a commit that referenced this issue Aug 21, 2018
This change fixes empty query removal when all fields remove the search term in
`simple_query_string`, `multi_match` and `query_string`.

Closes #33009
jimczi added a commit that referenced this issue Aug 21, 2018
This change fixes empty query removal when all fields remove the search term in
`simple_query_string`, `multi_match` and `query_string`.

Closes #33009
@metalmumu
Copy link

metalmumu commented Aug 27, 2018

I still have this issue with 6.3.2
I've tested with 6.4.0 and still here

@jimczi
Copy link
Contributor

jimczi commented Aug 27, 2018

@metalmumu the fix is not released yet, the pr is marked with 6.4.1 and 6.5.0.

@metalmumu
Copy link

Do you know when 6.4.1 will be released?
Or could you tell me if there is a version 6.x without this bug?

@metalmumu
Copy link

metalmumu commented Aug 29, 2018

I've tested all 6.x version, the bug is since 6.0 ....
Have you an idea when the 6.4.1 will be released? I would like to know if I have to found a manual fix.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants