Last active
August 29, 2015 14:14
-
-
Save robhudson/2b49597977f0f9576b77 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
{ | |
"highlight": { | |
"fields": { | |
"content": {}, | |
"summary": {} | |
}, | |
"order": "score" | |
}, | |
"facets": { | |
"marketplace": { | |
"filter": { | |
"term": { | |
"tags": "Marketplace" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"code": { | |
"filter": { | |
"term": { | |
"tags": "Example" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"firefox": { | |
"filter": { | |
"term": { | |
"tags": "Firefox" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"beginner": { | |
"filter": { | |
"term": { | |
"tags": "Beginner" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"api": { | |
"filter": { | |
"term": { | |
"tags": "API" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"webdev": { | |
"filter": { | |
"term": { | |
"tags": "Web Development" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"tools": { | |
"filter": { | |
"term": { | |
"tags": "Tools" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"canvas": { | |
"filter": { | |
"term": { | |
"tags": "Canvas" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"webgl": { | |
"filter": { | |
"term": { | |
"tags": "WebGL" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"apps": { | |
"filter": { | |
"term": { | |
"tags": "Apps" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"html": { | |
"filter": { | |
"term": { | |
"tags": "HTML" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"css": { | |
"filter": { | |
"term": { | |
"tags": "CSS" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"docs": { | |
"filter": { | |
"or": { | |
"_cache": true, | |
"filters": [ | |
{ | |
"term": { | |
"tags": "MDC_Project" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "MDC Project" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "Documentation" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "MDN" | |
} | |
} | |
] | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"howto": { | |
"filter": { | |
"term": { | |
"tags": "Guide" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"js": { | |
"filter": { | |
"term": { | |
"tags": "JavaScript" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"intermediate": { | |
"filter": { | |
"term": { | |
"tags": "Intermediate" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"firefox-mobile": { | |
"filter": { | |
"term": { | |
"tags": "Firefox Mobile" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"advanced": { | |
"filter": { | |
"term": { | |
"tags": "Advanced" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"mathml": { | |
"filter": { | |
"term": { | |
"tags": "MathML" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"addons": { | |
"filter": { | |
"or": { | |
"_cache": true, | |
"filters": [ | |
{ | |
"term": { | |
"tags": "Add-ons" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "Extensions" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "Plugins" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "Themes" | |
} | |
} | |
] | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"mobile": { | |
"filter": { | |
"term": { | |
"tags": "Mobile" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"svg": { | |
"filter": { | |
"term": { | |
"tags": "SVG" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"firefox-os": { | |
"filter": { | |
"term": { | |
"tags": "Firefox OS" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"games": { | |
"filter": { | |
"term": { | |
"tags": "Games" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"xul": { | |
"filter": { | |
"term": { | |
"tags": "XUL" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"firefox-desktop": { | |
"filter": { | |
"term": { | |
"tags": "Firefox Desktop" | |
} | |
}, | |
"facet_filter": [] | |
} | |
}, | |
"size": 0, | |
"query": { | |
"boosting": { | |
"positive": { | |
"filtered": { | |
"filter": { | |
"terms": { | |
"locale": [ | |
"en-US" | |
] | |
} | |
}, | |
"query": { | |
"bool": { | |
"should": [ | |
{ | |
"match": { | |
"content": { | |
"query": "websocket", | |
"boost": 1.0 | |
} | |
} | |
}, | |
{ | |
"match": { | |
"summary": { | |
"query": "websocket", | |
"boost": 2.0 | |
} | |
} | |
}, | |
{ | |
"match": { | |
"title": { | |
"query": "websocket", | |
"boost": 6.0 | |
} | |
} | |
}, | |
{ | |
"match_phrase": { | |
"content": { | |
"query": "websocket", | |
"boost": 8.0 | |
} | |
} | |
}, | |
{ | |
"match_phrase": { | |
"title": { | |
"query": "websocket", | |
"boost": 10.0 | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"negative": { | |
"bool": { | |
"must_not": { | |
"term": { | |
"locale": "en-US" | |
} | |
} | |
} | |
}, | |
"negative_boost": 0.5 | |
} | |
} | |
} | |
{ | |
"from": 0, | |
"explain": true, | |
"highlight": { | |
"fields": { | |
"content": {}, | |
"summary": {} | |
}, | |
"order": "score" | |
}, | |
"query": { | |
"boosting": { | |
"positive": { | |
"filtered": { | |
"filter": { | |
"terms": { | |
"locale": [ | |
"en-US" | |
] | |
} | |
}, | |
"query": { | |
"function_score": { | |
"query": { | |
"bool": { | |
"should": [ | |
{ | |
"match": { | |
"title": { | |
"query": "html", | |
"boost": 6.0 | |
} | |
} | |
}, | |
{ | |
"match": { | |
"summary": { | |
"query": "html", | |
"boost": 2.0 | |
} | |
} | |
}, | |
{ | |
"match": { | |
"content": { | |
"query": "html", | |
"boost": 1.0 | |
} | |
} | |
}, | |
{ | |
"match_phrase": { | |
"title": { | |
"query": "html", | |
"boost": 10.0 | |
} | |
} | |
}, | |
{ | |
"match_phrase": { | |
"content": { | |
"query": "html", | |
"boost": 8.0 | |
} | |
} | |
} | |
] | |
} | |
}, | |
"functions": [ | |
{ | |
"field_value_factor": { | |
"field": "boost" | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"negative": { | |
"bool": { | |
"must_not": [ | |
{ | |
"term": { | |
"locale": "en-US" | |
} | |
} | |
] | |
} | |
}, | |
"negative_boost": 0.5 | |
} | |
}, | |
"facets": { | |
"marketplace": { | |
"filter": { | |
"term": { | |
"tags": "Marketplace" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"code": { | |
"filter": { | |
"term": { | |
"tags": "Example" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"firefox": { | |
"filter": { | |
"term": { | |
"tags": "Firefox" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"beginner": { | |
"filter": { | |
"term": { | |
"tags": "Beginner" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"api": { | |
"filter": { | |
"term": { | |
"tags": "API" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"webdev": { | |
"filter": { | |
"term": { | |
"tags": "Web Development" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"tools": { | |
"filter": { | |
"term": { | |
"tags": "Tools" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"canvas": { | |
"filter": { | |
"term": { | |
"tags": "Canvas" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"webgl": { | |
"filter": { | |
"term": { | |
"tags": "WebGL" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"apps": { | |
"filter": { | |
"term": { | |
"tags": "Apps" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"intermediate": { | |
"filter": { | |
"term": { | |
"tags": "Intermediate" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"css": { | |
"filter": { | |
"term": { | |
"tags": "CSS" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"docs": { | |
"filter": { | |
"or": { | |
"_cache": true, | |
"filters": [ | |
{ | |
"term": { | |
"tags": "MDC_Project" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "MDC Project" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "Documentation" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "MDN" | |
} | |
} | |
] | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"howto": { | |
"filter": { | |
"term": { | |
"tags": "Guide" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"js": { | |
"filter": { | |
"term": { | |
"tags": "JavaScript" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"firefox-mobile": { | |
"filter": { | |
"term": { | |
"tags": "Firefox Mobile" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"advanced": { | |
"filter": { | |
"term": { | |
"tags": "Advanced" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"mathml": { | |
"filter": { | |
"term": { | |
"tags": "MathML" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"addons": { | |
"filter": { | |
"or": { | |
"_cache": true, | |
"filters": [ | |
{ | |
"term": { | |
"tags": "Add-ons" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "Extensions" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "Plugins" | |
} | |
}, | |
{ | |
"term": { | |
"tags": "Themes" | |
} | |
} | |
] | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"mobile": { | |
"filter": { | |
"term": { | |
"tags": "Mobile" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"svg": { | |
"filter": { | |
"term": { | |
"tags": "SVG" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"html": { | |
"filter": { | |
"term": { | |
"tags": "HTML" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"firefox-os": { | |
"filter": { | |
"term": { | |
"tags": "Firefox OS" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"games": { | |
"filter": { | |
"term": { | |
"tags": "Games" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"xul": { | |
"filter": { | |
"term": { | |
"tags": "XUL" | |
} | |
}, | |
"facet_filter": [] | |
}, | |
"firefox-desktop": { | |
"filter": { | |
"term": { | |
"tags": "Firefox Desktop" | |
} | |
}, | |
"facet_filter": [] | |
} | |
}, | |
"size": 10 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment