Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "size": 0,
- "query": {
- "bool": {
- "minimum_should_match": 0,
- "must": [
- {
- "exists": {
- "field": "productPriceDiscount"
- }
- },
- {
- "bool": {
- "should": [
- {
- "match": {
- "network": {
- "query": "connexity",
- "boost": 0.5
- }
- }
- },
- {
- "match": {
- "network": {
- "query": "billiger",
- "boost": 0.5
- }
- }
- }
- ]
- }
- },
- {
- "bool": {
- "should": [
- {
- "common": {
- "productName.lang": {
- "query": "iphone",
- "cutoff_frequency": 0.001,
- "boost": 0.3
- }
- }
- },
- {
- "match_phrase": {
- "productName.lang": {
- "query": "iphone",
- "boost": 1.5
- }
- }
- },
- {
- "match_phrase_prefix": {
- "productName.lang": {
- "query": "iphone",
- "boost": 0.01
- }
- }
- },
- {
- "match": {
- "productName.lang": {
- "query": "iphone",
- "operator": "and",
- "boost": 0.5,
- "fuzziness": 1
- }
- }
- },
- {
- "match": {
- "manufacturer": {
- "query": "iphone",
- "boost": 0.5
- }
- }
- }
- ]
- }
- }
- ]
- }
- },
- "aggs": {
- "categories": {
- "terms": {
- "size": 100,
- "field": "category.category_id"
- },
- "aggs": {
- "category": {
- "top_hits": {
- "size": 1,
- "_source": {
- "includes": [
- "category.category_id",
- "category.name"
- ]
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement