Repository: incubator-senssoft-distill Updated Branches: refs/heads/master 2707c50f5 -> a9207bb94
fixed bug. forgot to check if path is defined Project: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-distill/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-distill/commit/1330b0d5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-distill/tree/1330b0d5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-distill/diff/1330b0d5 Branch: refs/heads/master Commit: 1330b0d58571f7c17a93f537329fa2056ae4ebda Parents: 114f337 Author: msbeard <msbe...@apache.org> Authored: Tue Sep 19 13:28:16 2017 -0400 Committer: msbeard <msbe...@apache.org> Committed: Tue Sep 19 13:28:16 2017 -0400 ---------------------------------------------------------------------- distill/algorithms/graphs/graph.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-senssoft-distill/blob/1330b0d5/distill/algorithms/graphs/graph.py ---------------------------------------------------------------------- diff --git a/distill/algorithms/graphs/graph.py b/distill/algorithms/graphs/graph.py index 4b282ea..a9dc858 100755 --- a/distill/algorithms/graphs/graph.py +++ b/distill/algorithms/graphs/graph.py @@ -97,7 +97,7 @@ class GraphAnalytics (object): # Get all unique sessions session_query = { "terms": { - "field": "sessionID.keyword", + "field": "sessionID", "min_doc_count": 1 } } @@ -107,14 +107,14 @@ class GraphAnalytics (object): # Generating all top targets and breakdowns by type, including path_length target_query = { "terms": { - "field": "target.keyword", + "field": "target", "min_doc_count": 1, "size": size }, "aggs": { "events": { "terms": { - "field": "type.keyword", + "field": "type", "min_doc_count": 1, "size": size } @@ -125,7 +125,7 @@ class GraphAnalytics (object): "path_length": { "script": { "lang": "painless", - "inline": "doc['path.keyword'].length;" + "inline": "doc['path'].length;" } } }, @@ -155,7 +155,7 @@ class GraphAnalytics (object): "path_length": { "script": { "lang": "painless", - "inline": "doc['path.keyword'].length;" + "inline": "doc['path'].length;" } } }, @@ -295,7 +295,7 @@ class GraphAnalytics (object): 'targetName': nodename2, 'type': node1['type'], 'duration': node1['duration'], - 'pathLength': len(node1['path']), + 'pathLength': len(node1['path']) if node1['path'] is not None else 0, 'targetChange': node1['targetChange'], 'typeChange': node1['typeChange'] }