Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://localhost:9200/mytestindex/testmapping/_search
- {
- "from": 0,
- "size": 50,
- "highlight": {
- "fields": {
- "content": {
- }
- }
- },
- "fields": [
- "collectionNameOriginal",
- "projectNameOriginal",
- "repoNameOriginal",
- "branchNameOriginal",
- "filePathOriginal",
- "fileExtension",
- "changeId",
- "contentId",
- "vcType"
- ],
- "aggs": {
- "project_aggs": {
- "terms": {
- "field": "projectNameOriginal",
- "size": 0
- }
- }
- },
- "query": {
- "filtered": {
- "query": {
- "bool": {
- "must": [
- {
- "bool": {
- "should": [
- {
- "codesearch_score_query": {
- "query_id": "db80ac7a-ece3-4494-89c0-2548e2873805",
- "query": {
- "term": {
- "content": "int"
- }
- }
- }
- },
- {
- "function_score": {
- "boost": 10000000,
- "query": {
- "filtered": {
- "filter": {
- "term": {
- "fileName": "int",
- "_name": "fileName_int"
- }
- }
- }
- }
- }
- }
- ]
- }
- },
- {
- "bool": {
- "should": [
- {
- "codesearch_score_query": {
- "query_id": "db80ac7a-ece3-4494-89c0-2548e2873805",
- "query": {
- "term": {
- "content": "string"
- }
- }
- }
- },
- {
- "function_score": {
- "boost": 10000000,
- "query": {
- "filtered": {
- "filter": {
- "term": {
- "fileName": "string",
- "_name": "fileName_string"
- }
- }
- }
- }
- }
- }
- ]
- }
- },
- {
- "filtered": {
- "filter": {
- "term": {
- "fileExtension": "cs",
- "_name": "fileExtension_cs"
- }
- }
- }
- }
- ]
- }
- },
- "filter": {
- "bool": {
- "must": [
- {
- "bool": {
- "must": [
- {
- "bool": {
- "should": [
- {
- "bool": {
- "should": [
- {
- "bool": {
- "should": [
- {
- "terms": {
- "vcType": [
- "git"
- ]
- }
- },
- {
- "missing": {
- "field": "vcType"
- }
- }
- ]
- }
- },
- {
- "terms": {
- "vcType": [
- "tfvc"
- ]
- }
- }
- ]
- }
- },
- {
- "terms": {
- "vcType": [
- "custom"
- ]
- }
- }
- ]
- }
- },
- {
- "term": {
- "isDefaultBranch": "true"
- }
- }
- ]
- }
- },
- {
- "term": {
- "collectionId": "abcd"
- }
- }
- ]
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment