Skip to content

Commit

Permalink
change to .keyword for uuid matches on getevents
Browse files Browse the repository at this point in the history
  • Loading branch information
notque committed Jul 19, 2018
1 parent 56f09e7 commit 28bb8e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/storage/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ func (es ElasticSearch) GetEvent(eventID string, tenantID string) (*EventDetail,
index := indexName(tenantID)
util.LogDebug("Looking for event %s in index %s", eventID, index)

// we use .raw on ID fields because Elasticsearch tokenizes fields with - in them. .raw is not tokenized.
query := elastic.NewTermQuery("id.raw", eventID)
// we use .keyword as we are searching an exact match
query := elastic.NewTermQuery("id.keyword", eventID)
esSearch := es.client().Search().
Index(index).
Query(query)
Expand Down

0 comments on commit 28bb8e4

Please sign in to comment.