katip-elasticsearch 0.4.2.0 → 0.5.0.0
raw patch · 3 files changed
+28/−9 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Katip.Scribes.ElasticSearch.Internal: analyzedStringType :: ESVersion v => proxy v -> Text
- Katip.Scribes.ElasticSearch.Internal: unanalyzedStringType :: ESVersion v => proxy v -> Text
+ Katip.Scribes.ElasticSearch.Internal: analyzedStringSpec :: ESVersion v => proxy v -> Value
+ Katip.Scribes.ElasticSearch.Internal: unanalyzedStringSpec :: ESVersion v => proxy v -> Value
Files
changelog.md view
@@ -1,3 +1,12 @@+0.5.0.0+=======+* Update template for ESv1 to not analyze certain fields like host and+ namespace. These are not fields that benefit from tokenization. If+ you're on ESv1, after running `mkEsScribe`, the logs template will+ be updated to stop analyzing those fields. That means the next+ index that is cut (e.g. tomorrow's logs if you're using daily index+ sharding) will no longer analyze some fields.+ 0.4.2.0 ======= * Allow newer bloodhound, aeson, async.
katip-elasticsearch.cabal view
@@ -1,7 +1,7 @@ name: katip-elasticsearch synopsis: ElasticSearch scribe for the Katip logging framework. description: See README.md for more details.-version: 0.4.2.0+version: 0.5.0.0 license: BSD3 license-file: LICENSE author: Ozgun Ataman, Michael Xavier
src/Katip/Scribes/ElasticSearch/Internal.hs view
@@ -345,8 +345,8 @@ , "at" .= dateType , unanalyzedString "app" ]- unanalyzedString k = k .= object ["type" .= String (unanalyzedStringType prx)]- analyzedString k = k .= object ["type" .= String (analyzedStringType prx)]+ unanalyzedString k = k .= unanalyzedStringSpec prx+ analyzedString k = k .= analyzedStringSpec prx locType = object ["properties" .= object locPairs] locPairs = [ unanalyzedString "loc_pkg" , unanalyzedString "loc_mod"@@ -480,8 +480,8 @@ -- In ES 5 and beyond, "string" was deprecated in favor of text for -- fulltext and keyword for unanalyzed tokens- unanalyzedStringType :: proxy v -> Text- analyzedStringType :: proxy v -> Text+ unanalyzedStringSpec :: proxy v -> Value+ analyzedStringSpec :: proxy v -> Value @@ -517,8 +517,14 @@ updateIndexSettings _ = V1.updateIndexSettings putTemplate _ = V1.putTemplate putMapping _ = V1.putMapping- unanalyzedStringType _ = "string"- analyzedStringType _ = "string"+ unanalyzedStringSpec _ = object+ [ "type" .= String "string"+ , "index" .= String "not_analyzed"+ ]+ analyzedStringSpec _ = object+ [ "type" .= String "string"+ , "index" .= String "analyzed"+ ] data ESV5 = ESV5@@ -553,5 +559,9 @@ updateIndexSettings _ = V5.updateIndexSettings putTemplate _ = V5.putTemplate putMapping _ = V5.putMapping- unanalyzedStringType _ = "keyword"- analyzedStringType _ = "text"+ unanalyzedStringSpec _ = object+ [ "type" .= String "keyword"+ ]+ analyzedStringSpec _ = object+ [ "type" .= String "text"+ ]