Q:

Elastic Search Document Update taking too long when retrieved by alias

Here is the situation. 
1) There is an existing document (let's say the index is baseball-a
2) baseball-a, baseball-b, and baseball-c are aliased to baseball
3) Update a document in baseball-a
POST /baseball-a/1/_update?pretty'
{
    "doc": { "my_name": "Casey at the bat2"}
}'

4) now if I do a GET baseball-a/1/ everything is updated
5) but if I do a search 
 POST /baseball/_search?pretty
    {
      "query": { "match": { "id":  "1" } }
    }

then the document that is returned has the old my_name of "Casey at the bat" (missing the '2') but 15 minutes later it shows up... how do I fix this or speed it up?

A:

I think I figured it out. Basically you need to look at the refresh_interval for the alias by doing
GET /baseball/_settings
Mine was set to -1 and it should be set to either 1s or 5s
Additionally after I manually ran this command
POST /baseball/_refresh 
it also worked but that is just a hassle... let elastic do it for you automatically. Now if I could only figure out why I can't set the refresh inteval correctly Updating ElasticSearch interval_refresh when aliased

