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

Boolean field type does not handle number/string properly when searching #59

Closed
clintongormley opened this issue Mar 12, 2010 · 2 comments

Comments

@clintongormley
Copy link

Hiya

Here is another place where eg '1' is not being accepted as 'true':

curl -XPUT 'http://127.0.0.1:9200/foo/bar/_mapping?ignoreConflicts=true'  -d '
{
   "properties" : {
      "bool_val" : {
         "type" : "boolean"
      }
   }
}
'
# {
#    "ok" : true,
#    "acknowledged" : true
# }


curl -XPUT 'http://127.0.0.1:9200/foo/bar/1'  -d '
{
   "bool_val" : 0
}
'
# {
#    "ok" : true,
#    "_index" : "foo",
#    "_id" : "1",
#    "_type" : "bar"
# }



curl -XGET 'http://127.0.0.1:9200/foo/bar/_search'  -d '
{
   "query" : {
      "filteredQuery" : {
         "filter" : {
            "term" : {
               "bool_val" : 1
            }
         },
         "query" : {
            "matchAll" : {}
         }
      }
   }
}
'
# {
#    "hits" : {
#       "hits" : [
#          {
#             "_source" : {
#                "bool_val" : 0
#             },
#             "_index" : "foo",
#             "_id" : "1",
#             "_type" : "bar"
#          }
#       ],
#       "total" : 1
#    },
#    "_shards" : {
#       "failed" : 0,
#       "successful" : 5,
#       "total" : 5
#    }
# }



curl -XGET 'http://127.0.0.1:9200/foo/bar/_search'  -d '
{
   "query" : {
      "filteredQuery" : {
         "filter" : {
            "term" : {
               "bool_val" : true
            }
         },
         "query" : {
            "matchAll" : {}
         }
      }
   }
}
'
# {
#    "hits" : {
#       "hits" : [],
#       "total" : 0
#    },
#    "_shards" : {
#       "failed" : 0,
#       "successful" : 5,
#       "total" : 5
#    }
# }
@kimchy
Copy link
Member

kimchy commented Mar 12, 2010

Boolean field type does not handle number/string properly when searching, closed by 47c11aa.

@clintongormley
Copy link
Author

fix confirmed++

dadoonet added a commit that referenced this issue Jun 5, 2015
With #2784, we can now add plugin version in `es-plugin.properties` file.

It will only be used with elasticsearch 1.0.0 and upper. No need to push it in 1.x branch.

Closes #59.
rmuir added a commit that referenced this issue Jun 5, 2015
johtani added a commit that referenced this issue Jun 5, 2015
rmuir pushed a commit to rmuir/elasticsearch that referenced this issue Nov 8, 2015
StefanGor pushed a commit to StefanGor/elasticsearch that referenced this issue Mar 17, 2017
Update issues 16641 and 23268
ywelsch pushed a commit to ywelsch/elasticsearch that referenced this issue May 28, 2018
Cluster state updates may wish to wait to be applied on all, or fewer, of the
nodes in the cluster, and this is done via the AckListener interface. This
commit adds support for this functionality to the Legislator.
henningandersen pushed a commit to henningandersen/elasticsearch that referenced this issue Jun 4, 2020
With this commit we expose the track parameter `verbose` which emits
issued Kibana queries and their responses (excluding specific hits).
lockewritesdocs pushed a commit that referenced this issue Jul 17, 2020
#59… (#59804)

* [DOCS] Updating snapshot/restore pages to align with API changes (#59730)

* Updating snapshot/restore pages to align with API changes.

* Fixing texts in delete snapshot page.

* Removing duplicate code sample and making editorial changes.

* Change "deleted" to "delete"

* Incorporating review feedback and making minor editorial changes.

* Remove titleabbrev

* Add paragraph break

* Remove titleabbrev from restore page

* Remove titleabbrev from create page

* Change "Create" to lowercase

* Change API names to lowercase

* Remove extraneous delimiters

* Change "Delete" to lowercase

* Single-sourcing warning and clarifying warning text.

* Fixing tests and removing erroneous example.
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Oct 2, 2023
With this commit we add two new command line parameter to night_rally:

* `--telemetry`
* `--telemetry-params`

Both are passed verbatim to Rally's command line.

Relate elastic#59
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants