Skip to content

Commit

Permalink
fixed small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunihiko Kido committed Mar 26, 2015
1 parent e16147f commit e78b9b7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Default.sublime-commands
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
{"command": "apache_bench", "caption": "Elasticsearch: Apache Bench"},
{"command": "open_file", "caption": "Elasticsearch: User File Settings", "args": {"file": "${packages}/User/Elasticsearch.sublime-settings"}},
{"command": "open_url", "caption": "Elasticsearch: Open Elasticsearch Reference", "args": {"url": "http://www.elastic.co/guide/en/elasticsearch/reference/current/index.html"}},
{"command": "search_docs", "caption": "Elasticsearch: Search in Docs"},
{"command": "search_docs", "caption": "Elasticsearch: Search in Docs"}
]
2 changes: 1 addition & 1 deletion Elasticsearch.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
{"trigger": "indices_boost", "contents": "\"indices_boost\": {$1}" },
{"trigger": "min_score", "contents": "\"min_score\": ${1:0.5}" },
{"trigger": "_name", "contents": "\"_name\": \"${1:test}\"" },
{"trigger": "stats", "contents": "\"stats\" : [${1:\"group1\", \"group2\"}]" },
{"trigger": "stats", "contents": "\"stats\" : [${1:\"group1\", \"group2\"}]" }
]
}
6 changes: 3 additions & 3 deletions Elasticsearch.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"benchmarks": {
"default": {
"requests": 100,
"concurrency": 10,
"concurrency": 10
}
},
// Path to the curl command. If curl is on you path, you should not need to
Expand All @@ -28,10 +28,10 @@
// Path to the Apache Bench (ab) command. If ab is on you path, you should not need to
// change this. Windows users will need to use forward slashes in the path.
"ab_command": "ab",

"enabled_pretty": true,
"pretty_command": "pretty_json",
"pretty_syntax": "Elasticsearch",

"ask_to_search_types": false,
"ask_to_search_types": false
}
5 changes: 4 additions & 1 deletion elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def active_server(self):

@property
def server_settings(self):
return self.servers[self.active_server]
active_server = self.active_server
if self.active_server is None:
active_server = list(self.servers.keys())[0]
return self.servers[active_server]

@property
def curl_command(self):
Expand Down

0 comments on commit e78b9b7

Please sign in to comment.