Created
November 18, 2016 23:47
-
-
Save tsibley/0d44ac51e2f4eee933b7c1e47a43d9f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_source" : "module", | |
"aggregations" : { | |
"count" : { | |
"terms" : { | |
"field" : "distribution", | |
"size" : 999 | |
} | |
} | |
}, | |
"fields" : [ | |
"distribution", | |
"documentation", | |
"author", | |
"abstract.analyzed", | |
"release", | |
"path", | |
"status", | |
"indexed", | |
"authorized", | |
"distribution", | |
"date", | |
"id", | |
"pod_lines" | |
], | |
"from" : 0, | |
"query" : { | |
"filtered" : { | |
"filter" : { | |
"and" : [ | |
{ | |
"not" : { | |
"filter" : { | |
"or" : [ | |
{ | |
"term" : { | |
"distribution" : "kurila" | |
} | |
}, | |
{ | |
"term" : { | |
"distribution" : "perl_debug" | |
} | |
}, | |
{ | |
"term" : { | |
"distribution" : "perl_mlb" | |
} | |
}, | |
{ | |
"term" : { | |
"distribution" : "perl-5.005_02+apache1.3.3+modperl" | |
} | |
}, | |
{ | |
"term" : { | |
"distribution" : "pod2texi" | |
} | |
}, | |
{ | |
"term" : { | |
"distribution" : "perlbench" | |
} | |
}, | |
{ | |
"term" : { | |
"distribution" : "spodcxx" | |
} | |
}, | |
{ | |
"term" : { | |
"distribution" : "Bundle-Everything" | |
} | |
} | |
] | |
} | |
} | |
}, | |
{ | |
"term" : { | |
"status" : "latest" | |
} | |
}, | |
{ | |
"term" : { | |
"authorized" : 1 | |
} | |
}, | |
{ | |
"term" : { | |
"indexed" : 1 | |
} | |
}, | |
{ | |
"or" : [ | |
{ | |
"and" : [ | |
{ | |
"exists" : { | |
"field" : "module.name" | |
} | |
}, | |
{ | |
"term" : { | |
"module.indexed" : 1 | |
} | |
} | |
] | |
}, | |
{ | |
"exists" : { | |
"field" : "documentation" | |
} | |
} | |
] | |
} | |
] | |
}, | |
"query" : { | |
"function_score" : { | |
"metacpan_script" : "prefer_shorter_module_names_400", | |
"query" : { | |
"boosting" : { | |
"negative" : { | |
"term" : { | |
"mime" : { | |
"value" : "text/x-script.perl" | |
} | |
} | |
}, | |
"negative_boost" : 0.5, | |
"positive" : { | |
"bool" : { | |
"should" : [ | |
{ | |
"term" : { | |
"documentation" : { | |
"boost" : 100, | |
"value" : "Catalyst::Log" | |
} | |
} | |
}, | |
{ | |
"term" : { | |
"module.name" : { | |
"boost" : 100, | |
"value" : "Catalyst::Log" | |
} | |
} | |
}, | |
{ | |
"dis_max" : { | |
"queries" : [ | |
{ | |
"query_string" : { | |
"allow_leading_wildcard" : 0, | |
"boost" : 3, | |
"default_operator" : "AND", | |
"fields" : [ | |
"documentation.analyzed^2", | |
"module.name.analyzed^2", | |
"distribution.analyzed", | |
"documentation.camelcase", | |
"module.name.camelcase", | |
"distribution.camelcase" | |
], | |
"query" : "Catalyst Log", | |
"use_dis_max" : 1 | |
} | |
}, | |
{ | |
"query_string" : { | |
"allow_leading_wildcard" : 0, | |
"default_operator" : "AND", | |
"fields" : [ | |
"abstract.analyzed", | |
"pod.analyzed" | |
], | |
"query" : "Catalyst Log", | |
"use_dis_max" : 1 | |
} | |
} | |
] | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"size" : 200 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment