Skip to content

Commit

Permalink
Save message timestamps as doc values in ES
Browse files Browse the repository at this point in the history
This *should* prevent the firing of the field data cache circuit breaker
in setups with lots of indexed messages.
  • Loading branch information
Jochen Schalanda committed May 5, 2015
1 parent 99c8516 commit b36a1d5
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -23,6 +23,7 @@
import org.graylog2.indexer.messages.Messages; import org.graylog2.indexer.messages.Messages;
import org.graylog2.plugin.Tools; import org.graylog2.plugin.Tools;


import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
Expand Down Expand Up @@ -109,10 +110,11 @@ private static Map<String, String> analyzedString(String analyzer) {
return type; return type;
} }


private static Map<String, String> typeTimeWithMillis() { private static Map<String, Serializable> typeTimeWithMillis() {
final Map<String, String> type = Maps.newHashMap(); final Map<String, Serializable> type = Maps.newHashMap();
type.put("type", "date"); type.put("type", "date");
type.put("format", Tools.ES_DATE_FORMAT); type.put("format", Tools.ES_DATE_FORMAT);
type.put("doc_values", true);


return type; return type;
} }
Expand Down

0 comments on commit b36a1d5

Please sign in to comment.