Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from nik9000/master
Browse files Browse the repository at this point in the history
Add more kb entries
[kb] Add filter_path as global url parameter
[kb] Add flat_settings to _settings
[kb] Add terminate_after to search and count
  • Loading branch information
bleskes committed Sep 21, 2015
2 parents 3e0171d + 9f7675e commit 8a52aee
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 14 deletions.
5 changes: 3 additions & 2 deletions public/webpackShims/autocomplete/url_params.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ define([
if (_.isUndefined(defaults)) {
defaults = {
"pretty": "__flag__",
"format": ["json", "yaml"]
"format": ["json", "yaml"],
"filter_path": "",
};
}
description = _.clone(description || {});
Expand All @@ -78,4 +79,4 @@ define([
})(UrlParams.prototype);

exports.UrlParams = UrlParams;
});
});
5 changes: 3 additions & 2 deletions public/webpackShims/kb/api_1_0/count.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ define(function () {
url_params: {
preference: ["_primary", "_primary_first", "_local", "_only_node:xyz", "_prefer_node:xyz", "_shards:2,3"],
routing: "",
min_score: 1.0
min_score: 1.0,
terminate_after: 10,
},
data_autocomplete_rules: {
query: {
Expand All @@ -41,4 +42,4 @@ define(function () {
}
})
}
});
});
13 changes: 11 additions & 2 deletions public/webpackShims/kb/api_1_0/indices.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ define(function () {
force: [true, false]
}
});

api.addEndpointDescription('_flush_synced', {
methods: ['POST'],
patterns: [
Expand Down Expand Up @@ -170,6 +170,16 @@ define(function () {
]
});

api.addEndpointDescription('_get_index_settings', {
methods: ['GET', ],
patterns: [
"{indices}/_settings",
],
url_params: {
flat_settings: "__flag__"
}
});

api.addEndpointDescription('_get_index', {
methods: ['GET', ],
patterns: [
Expand All @@ -178,7 +188,6 @@ define(function () {
],
url_components: {
"feature": [
"_settings",
"_mappings",
"_warmers",
"_aliases"
Expand Down
1 change: 1 addition & 0 deletions public/webpackShims/kb/api_1_0/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ define(function () {
from: 0,
size: 10,
search_type: ["dfs_query_then_fetch", "dfs_query_and_fetch", "query_then_fetch", "query_and_fetch", "count", "scan"],
terminate_after: 10,
lowercase_expanded_terms: ["true", "false"],
analyze_wildcard: "__flag__",
preference: ["_primary", "_primary_first", "_local", "_only_node:xyz", "_prefer_node:xyz", "_shards:2,3"],
Expand Down
7 changes: 5 additions & 2 deletions public/webpackShims/kb/api_1_0/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ define(function () {
patterns: [
"{indices}/_settings",
"_settings"
]
],
url_params: {
flat_settings: "__flag__"
}
});
api.addEndpointDescription('_put_settings', {
methods: ['PUT'],
Expand Down Expand Up @@ -102,4 +105,4 @@ define(function () {
});
};

});
});
5 changes: 3 additions & 2 deletions public/webpackShims/kb/api_2_0/count.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ define(function () {
url_params: {
preference: ["_primary", "_primary_first", "_local", "_only_node:xyz", "_prefer_node:xyz", "_shards:2,3"],
routing: "",
min_score: 1.0
min_score: 1.0,
terminate_after: 10,
},
data_autocomplete_rules: {
query: {
Expand All @@ -41,4 +42,4 @@ define(function () {
}
})
}
});
});
13 changes: 11 additions & 2 deletions public/webpackShims/kb/api_2_0/indices.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ define(function () {
force: [true, false]
}
});

api.addEndpointDescription('_flush_synced', {
methods: ['POST'],
patterns: [
Expand Down Expand Up @@ -181,6 +181,16 @@ define(function () {
]
});

api.addEndpointDescription('_get_index_settings', {
methods: ['GET', ],
patterns: [
"{indices}/_settings",
],
url_params: {
flat_settings: "__flag__"
}
});

api.addEndpointDescription('_get_index', {
methods: ['GET', ],
patterns: [
Expand All @@ -189,7 +199,6 @@ define(function () {
],
url_components: {
"feature": [
"_settings",
"_mappings",
"_warmers",
"_aliases"
Expand Down
1 change: 1 addition & 0 deletions public/webpackShims/kb/api_2_0/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ define(function () {
from: 0,
size: 10,
search_type: ["dfs_query_then_fetch", "dfs_query_and_fetch", "query_then_fetch", "query_and_fetch", "count", "scan"],
terminate_after: 10,
lowercase_expanded_terms: ["true", "false"],
analyze_wildcard: "__flag__",
preference: ["_primary", "_primary_first", "_local", "_only_node:xyz", "_prefer_node:xyz", "_shards:2,3"],
Expand Down
7 changes: 5 additions & 2 deletions public/webpackShims/kb/api_2_0/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ define(function () {
patterns: [
"{indices}/_settings",
"_settings"
]
],
url_params: {
flat_settings: "__flag__"
}
});
api.addEndpointDescription('_put_settings', {
methods: ['PUT'],
Expand Down Expand Up @@ -102,4 +105,4 @@ define(function () {
});
};

});
});

0 comments on commit 8a52aee

Please sign in to comment.