File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ require './lib/es_client'
2
+
3
+ esclient = ESClient . new ( "localhost:9200" )
4
+
5
+ # create database
6
+ begin
7
+ esclient . delete_indices ( 'exceptionist' )
8
+ rescue Elasticsearch ::Transport ::Transport ::Errors ::NotFound
9
+ end
10
+
11
+ esclient . create_indices ( 'exceptionist' ,
12
+ { mappings : {
13
+ occurrences : { properties : {
14
+ action_name : { type : 'string' , index : 'not_analyzed' } ,
15
+ controller_name : { type : 'string' , index : 'not_analyzed' } ,
16
+ project_name : { type : 'string' , index : 'not_analyzed' } ,
17
+ uber_key : { type : 'string' , index : 'not_analyzed' } ,
18
+ exception_class : { type : 'string' , index : 'not_analyzed' } ,
19
+ } } ,
20
+ exceptions :{ properties : {
21
+ project_name : { type : 'string' , index : 'not_analyzed' } ,
22
+ } }
23
+ } } )
24
+ esclient . refresh
25
+
26
+ 5 . times { `curl -X POST -d @test/fixtures/full_exception.xml http://localhost:9292/notifier_api/v2/notices/?` }
27
+
28
+ esclient . refresh
29
+
You can’t perform that action at this time.
0 commit comments