Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented data process search feature #1706

Merged
merged 6 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 62 additions & 80 deletions docker/elasticsearch/dataprocess-index-config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"settings": {
"index": {
"max_ngram_diff": "50",
"analysis": {
"filter": {
"autocomplete_filter": {
Expand Down Expand Up @@ -140,90 +139,73 @@
}
},
"mappings": {
"properties": {
"browsePaths": {
"type": "text",
"fields": {
"length": {
"type": "token_count",
"analyzer": "slash_pattern"
}
"doc": {
"properties": {
"browsePaths": {
"type": "text",
"fields": {
"length": {
"type": "token_count",
"analyzer": "slash_pattern"
}
},
"analyzer": "custom_browse_slash",
"fielddata": true
},
"analyzer": "custom_browse_slash",
"fielddata": true
},
"origin": {
"type": "keyword",
"fields": {
"ngram": {
"type": "text",
"analyzer": "custom_ngram"
}
"origin": {
"type": "keyword",
"fields": {
"ngram": {
"type": "text",
"analyzer": "custom_ngram"
}
},
"normalizer": "my_normalizer"
},
"normalizer": "my_normalizer"
},
"hasOwners": {
"type": "boolean"
},
"name": {
"type": "keyword",
"fields": {
"data_process_pattern_ngram": {
"type": "text",
"analyzer": "data_process_pattern_ngram"
},
"delimited": {
"type": "text",
"analyzer": "delimit"
},
"ngram": {
"type": "text",
"analyzer": "custom_ngram"
},
"pattern": {
"type": "text",
"analyzer": "data_process_pattern"
}
"hasOwners": {
"type": "boolean"
},
"normalizer": "my_normalizer"
},
"num_inputs": {
"type": "long"
},
"num_outputs": {
"type": "long"
},
"owners": {
"type": "text",
"fields": {
"ngram": {
"type": "text",
"analyzer": "comma_pattern_ngram"
}
"name": {
"type": "keyword"
},
"analyzer": "comma_pattern"
},
"orchestrator": {
"type": "keyword",
"fields": {
"ngram": {
"type": "text",
"analyzer": "custom_ngram"
}
"num_inputs": {
"type": "long"
},
"num_outputs": {
"type": "long"
},
"owners": {
"type": "text",
"fields": {
"ngram": {
"type": "text",
"analyzer": "comma_pattern_ngram"
}
},
"analyzer": "comma_pattern"
},
"orchestrator": {
"type": "keyword",
"fields": {
"ngram": {
"type": "text",
"analyzer": "custom_ngram"
}
},
"normalizer": "my_normalizer"
},
"normalizer": "my_normalizer"
},
"urn": {
"type": "keyword",
"normalizer": "my_normalizer"
},
"inputs": {
"type": "keyword",
"normalizer": "my_normalizer"
},
"outputs": {
"type": "keyword",
"normalizer": "my_normalizer"
"urn": {
"type": "keyword",
"normalizer": "my_normalizer"
},
"inputs": {
"type": "keyword",
"normalizer": "my_normalizer"
},
"outputs": {
"type": "keyword",
"normalizer": "my_normalizer"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type" : "com.linkedin.dataprocess.DataProcessKey",
"params" : "com.linkedin.restli.common.EmptyRecord"
},
"supports" : [ "batch_get", "get" ],
"supports" : [ "batch_get", "get", "get_all" ],
"methods" : [ {
"method" : "get",
"parameters" : [ {
Expand All @@ -25,6 +25,22 @@
"type" : "{ \"type\" : \"array\", \"items\" : \"string\" }",
"default" : "[]"
} ]
}, {
"method" : "get_all",
"parameters" : [ {
"name" : "aspects",
"type" : "{ \"type\" : \"array\", \"items\" : \"string\" }",
"default" : "[]"
}, {
"name" : "filter",
"type" : "com.linkedin.metadata.query.Filter",
"optional" : true
}, {
"name" : "sort",
"type" : "com.linkedin.metadata.query.SortCriterion",
"optional" : true
} ],
"pagingSupported" : true
} ],
"finders" : [ {
"name" : "search",
Expand All @@ -50,6 +66,22 @@
"pagingSupported" : true
} ],
"actions" : [ {
"name" : "autocomplete",
"parameters" : [ {
"name" : "query",
"type" : "string"
}, {
"name" : "field",
"type" : "string"
}, {
"name" : "filter",
"type" : "com.linkedin.metadata.query.Filter"
}, {
"name" : "limit",
"type" : "int"
} ],
"returns" : "com.linkedin.metadata.query.AutoCompleteResult"
}, {
"name" : "backfill",
"parameters" : [ {
"name" : "urn",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
"fields" : [ {
"name" : "orchestrator",
"type" : "string",
"doc" : "Standardized orchestration platform urn where process is running. It can be Azure Data Factory or Sqoop script",
"doc" : "Standardized orchestration platform where process is running. It can be Azure Data Factory or Sqoop script",
"validate" : {
"strlen" : {
"max" : 500,
Expand Down Expand Up @@ -276,6 +276,23 @@
},
"doc" : "List of aggregations showing the number of documents falling into each bucket. e.g, for platform aggregation, the bucket can be hive, kafka, etc"
} ]
}, {
"type" : "record",
"name" : "AutoCompleteResult",
"namespace" : "com.linkedin.metadata.query",
"doc" : "The model for the auto complete result",
"fields" : [ {
"name" : "query",
"type" : "string",
"doc" : "The original chars typed by user"
}, {
"name" : "suggestions",
"type" : {
"type" : "array",
"items" : "string"
},
"doc" : "A list of typeahead suggestions"
} ]
}, {
"type" : "enum",
"name" : "Condition",
Expand Down Expand Up @@ -406,7 +423,7 @@
"type" : "com.linkedin.dataprocess.DataProcessKey",
"params" : "com.linkedin.restli.common.EmptyRecord"
},
"supports" : [ "batch_get", "get" ],
"supports" : [ "batch_get", "get", "get_all" ],
"methods" : [ {
"method" : "get",
"parameters" : [ {
Expand All @@ -421,6 +438,22 @@
"type" : "{ \"type\" : \"array\", \"items\" : \"string\" }",
"default" : "[]"
} ]
}, {
"method" : "get_all",
"parameters" : [ {
"name" : "aspects",
"type" : "{ \"type\" : \"array\", \"items\" : \"string\" }",
"default" : "[]"
}, {
"name" : "filter",
"type" : "com.linkedin.metadata.query.Filter",
"optional" : true
}, {
"name" : "sort",
"type" : "com.linkedin.metadata.query.SortCriterion",
"optional" : true
} ],
"pagingSupported" : true
} ],
"finders" : [ {
"name" : "search",
Expand All @@ -446,6 +479,22 @@
"pagingSupported" : true
} ],
"actions" : [ {
"name" : "autocomplete",
"parameters" : [ {
"name" : "query",
"type" : "string"
}, {
"name" : "field",
"type" : "string"
}, {
"name" : "filter",
"type" : "com.linkedin.metadata.query.Filter"
}, {
"name" : "limit",
"type" : "int"
} ],
"returns" : "com.linkedin.metadata.query.AutoCompleteResult"
}, {
"name" : "backfill",
"parameters" : [ {
"name" : "urn",
Expand Down
Loading