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

Alias filter not applied when using 'multi-index' syntax with wild card in URL #3677

Closed
jbrook opened this Issue Sep 12, 2013 · 0 comments

Comments

Projects
None yet
2 participants
@jbrook
Copy link
Contributor

commented Sep 12, 2013

If I try to use a multi-index search with a wildcard on filter aliases the filter does not get applied. However it does work with a multi-index comma separated list. See example below - "someone_else" is included in the results. Only tested with version 0.90.2.

curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{
    "user" : "kimchy"
}'

curl -XPUT 'http://localhost:9200/twitter/tweet/2' -d '{
    "user" : "jbrook"
}'

curl -XPUT 'http://localhost:9200/twitter/tweet/3' -d '{
    "user" : "someone_else"
}'

curl -XPOST 'http://localhost:9200/_aliases' -d '
{
    "actions" : [
        {
            "add" : {
                 "index" : "twitter",
                 "alias" : "tweets_by_kimchy",
                 "filter" : { "term" : { "user" : "kimchy" } }
            }
        },
        {
            "add" : {
                 "index" : "twitter",
                 "alias" : "tweets_by_jbrook",
                 "filter" : { "term" : { "user" : "jbrook" } }
            }
        }
    ]
}'

curl -XPOST 'http://localhost:9200/tweets_by_kimchy,tweets_by_jbrook/_search?pretty=1'

{
  "took" : 1,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  },
  "hits" : {
    "total" : 2,
    "max_score" : 1.0,
    "hits" : [ {
      "_index" : "twitter",
      "_type" : "tweet",
      "_id" : "1",
      "_score" : 1.0, "_source" : {
    "user" : "kimchy"
}
    }, {
      "_index" : "twitter",
      "_type" : "tweet",
      "_id" : "2",
      "_score" : 1.0, "_source" : {
    "user" : "jbrook"
}
    } ]
  }


curl -XPOST 'http://localhost:9200/tweets_by_*/_search?pretty=1'

{
  "took" : 2,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  },
  "hits" : {
    "total" : 3,
    "max_score" : 1.0,
    "hits" : [ {
      "_index" : "twitter",
      "_type" : "tweet",
      "_id" : "1",
      "_score" : 1.0, "_source" : {
    "user" : "kimchy"
}
    }, {
      "_index" : "twitter",
      "_type" : "tweet",
      "_id" : "2",
      "_score" : 1.0, "_source" : {
    "user" : "jbrook"
}
    }, {
      "_index" : "twitter",
      "_type" : "tweet",
      "_id" : "3",
      "_score" : 1.0, "_source" : {
   ** "user" : "someone_else" **
}
    } ]
  }

@ghost ghost assigned drewr Sep 12, 2013

drewr added a commit to drewr/elasticsearch that referenced this issue Sep 16, 2013

@kimchy kimchy closed this in cf30cb1 Sep 17, 2013

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

talevy added a commit to talevy/elasticsearch that referenced this issue Apr 25, 2018

fix guice and plugin initialization after split (elastic#3677)
the x-pack-split required updating the IndexLifecycle plugin to
be a proper plugin with the Plugin API methods instead of the XPackPlugin API
methods.

talevy added a commit to talevy/elasticsearch that referenced this issue May 14, 2018

fix guice and plugin initialization after split (elastic#3677)
the x-pack-split required updating the IndexLifecycle plugin to
be a proper plugin with the Plugin API methods instead of the XPackPlugin API
methods.

jasontedor added a commit that referenced this issue Aug 17, 2018

fix guice and plugin initialization after split (#3677)
the x-pack-split required updating the IndexLifecycle plugin to
be a proper plugin with the Plugin API methods instead of the XPackPlugin API
methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.