Skip to content

Commit

Permalink
Support for multiple index patterns, closes elastic#22
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashid Khan committed Feb 3, 2014
1 parent acb0714 commit 496585c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/partials/dasheditor.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ <h5>Index Settings</h5>
default logstash index pattern you might use
<code>[logstash-]YYYY.MM.DD</code>. The [] in "[logstash-]" are
important as they instruct Kibana not to treat those letters as a
pattern.
pattern. You may also specify multiple indices by seperating them with a comma(,).
For example <code>[web-]YYYY.MM.DD,[mail-]YYYY.MM.DD</code>
Please also note that indices should rollover at midnight <strong>UTC</strong>.
</p>
<p class="small">
Expand Down
7 changes: 6 additions & 1 deletion src/app/services/kbnIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ function (angular, _, config, moment) {

return resolve_indices(possible).then(function(p) {
// an extra intersection
var indices = _.intersection(possible,p);
var indices = _.uniq(_.flatten(_.map(possible,function(possibleIndex) {
return _.intersection(possibleIndex.split(','),p);
})));

indices.reverse();
console.log(indices);

return indices;
});
};
Expand Down

0 comments on commit 496585c

Please sign in to comment.