Skip to content

Commit

Permalink
all stores tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
gbuisson committed Mar 10, 2016
1 parent f089a28 commit b7b9d59
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
36 changes: 14 additions & 22 deletions src/cia/stores/es/mapping.clj
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
(def related-identities
{:type "nested"
:properties (assoc related
:identity string)})
:identity_id string)})

(def related-actors
{:type "nested"
:properties (assoc related
:actor string)})
:actor_id string)})

(def tg-identity
{:type "nested"
Expand Down Expand Up @@ -95,39 +95,39 @@
{:type "nested"
:properties
(assoc related
:indicator string)})
:indicator_id string)})

(def related-judgements
{:type "nested"
:properties
(assoc related
:judgement string)})
:judgement_id string)})

(def related-coas
{:type "nested"
:properties
(assoc related
:COA string)})
:COA_id string)})

(def related-campaigns
{:type "nested"
:properties
(assoc related
:campaign string)})
:campaign_id string)})

(def related-exploit-targets
{:type "nested"
:properties (assoc related
:exploit_target string)})
:exploit_target_id string)})
(def related-ttps
{:type "nested"
:properties (assoc related
:ttp string)})
:ttp_id string)})

(def related-incidents
{:type "nested"
:properties (assoc related
:incident string)})
:incident_id string)})

(def indicator-sightings
{:type "nested"
Expand Down Expand Up @@ -302,9 +302,7 @@
:reason string
:source_uri string
:reason_uri string
;;:indicators related-indicators
;;TBD enable again when proper schema is integrated
:indicators {:type "nested" :enabled false}
:indicators related-indicators
:owner string
:created ts
:modified ts}}})
Expand All @@ -331,7 +329,6 @@
:type string
:observable observable
:judgements related-judgements
;;:judgements {:type "nested"}
:composite_indicator_expression {:type "nested"
:properties
{:operator string
Expand Down Expand Up @@ -384,13 +381,9 @@
:sophistication string
:intended_effect string
:planning_and_operational_support string
;;:observed_TTPs
;; related-ttps TBD enable again when schema is stricter
:observed_TTPs {:type "nested" :enabled false}
;;:associated_campaigns related-campaigns
:associated_campaigns {:type "nested" :enabled false}
;;:associated_actors related-actors
:associated_actors {:type "nested" :enabled false}
:observed-ttps related-ttps
:associated_campaigns related-campaigns
:associated_actors related-actors
:confidence string
:owner string
:created ts
Expand Down Expand Up @@ -461,8 +454,7 @@
:related_observables observable
:leveraged_TTPs related-ttps
:attributed_actors related-actors
;; :related_incidents related-incidents
:related_incidents {:type "nested" :enabled false}
:related_incidents related-incidents
:intended_effect string
:owner string
:created ts
Expand Down
2 changes: 1 addition & 1 deletion src/cia/stores/es/query.clj
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
:path "judgements"
:query
(q/bool {:must
(q/terms :judgements.judgement
(q/terms :judgements.judgement_id
judgement-ids)}))]

(q/filtered :filter f)))
Expand Down

0 comments on commit b7b9d59

Please sign in to comment.