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

Unable to create a nested filtered alias on a dataless master #4112

Closed
irieksts opened this issue Nov 6, 2013 · 0 comments
Closed

Unable to create a nested filtered alias on a dataless master #4112

irieksts opened this issue Nov 6, 2013 · 0 comments

Comments

@irieksts
Copy link

irieksts commented Nov 6, 2013

We set-up a two node cluster the first node is a master and contains no data. The second node has data but is not master eligible. Both a running 0.90.0. Also, retested on 0.90.6.

First I create an index with an nested document:

curl -X POST http://masternode:9200/index_a -d '{
"mappings" : {
"type_a" : {
"properties" : {
"table_a" : { "type" : "nested", "properties" : {
"field_a" : { "type" : "string" },"field_b" : { "type" : "string" }
}}
}
}
}
}
'

Returns: {"ok":true,"acknowledged":true}

Then I try to create the filter alias:

curl -X POST http://datanode:9200/_aliases -d '
{
"actions" : [
{ "add" : { "index" : "index_a", "alias" : "alias_a" , "filter": {
"bool": {
"must": [
{
"nested": {
"path": "table_a",
"query": {
"bool": {
"must": [
{
"term": {
"table_a.field_a": "y"
}
}
]
}
}
}
}
]
}
}} }
]
}'

Returns: {"error":"RemoteTransportException[[dlesmaster01][inet[/10.13.10.38:9300]][indices/aliases]]; nested: ElasticSearchIllegalArgumentException[failed to parse filter for [alias_a]]; nested: QueryParsingException[[index_a] [nested] failed to find nested object under path [table_a]]; ","status":400}

If I submit it to the master node like this:

curl -X POST http://masternode:9200/_aliases -d '
{
"actions" : [
{ "add" : { "index" : "index_a", "alias" : "alias_a" , "filter": {
"bool": {
"must": [
{
"nested": {
"path": "table_a",
"query": {
"bool": {
"must": [
{
"term": {
"table_a.field_a": "y"
}
}
]
}
}
}
}
]
}
}} }
]
}'

Returns: {"error":"ElasticSearchIllegalArgumentException[failed to parse filter for [alias_a]]; nested: QueryParsingException[[index_a] [nested] failed to find nested object under path [table_a]]; ","status":400}

These all work when the elected master also contains the data.

@ghost ghost assigned kimchy Nov 8, 2013
@kimchy kimchy closed this as completed in 6f286c3 Nov 8, 2013
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
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