Skip to content

Commit 2e4abd7

Browse files
committed
Add created_on to the mapping
1 parent bb333ea commit 2e4abd7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: indexer.go

+3
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,9 @@ const indexSettings = `
564564
"modified_on": {
565565
"type": "date"
566566
},
567+
"created_on": {
568+
"type": "date"
569+
},
567570
"modified_on_mu": {
568571
"type": "long"
569572
},

Diff for: indexer_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ func TestIndexing(t *testing.T) {
9595

9696
assertQuery(t, client, physicalName, elastic.NewMatchQuery("org_id", "1"), []int64{1, 3, 4, 5})
9797

98+
// created_on range query
99+
assertQuery(t, client, physicalName, elastic.NewRangeQuery("created_on").Gt("2017-01-01"), []int64{1, 7, 9})
100+
98101
// urn query
99102
query := elastic.NewNestedQuery("urns", elastic.NewBoolQuery().Must(
100103
elastic.NewMatchQuery("urns.scheme", "facebook"),

0 commit comments

Comments
 (0)