diff --git a/Assignment2_part1/queries/query2a.http b/Assignment2_part1/queries/query2a.http index 3b9c8ea..285ab2d 100644 --- a/Assignment2_part1/queries/query2a.http +++ b/Assignment2_part1/queries/query2a.http @@ -3,14 +3,30 @@ GET /restaurants/_search "query": { "bool": { "must": [ - { "match": { "name": "pizza" } } + { + "match": { + "name": "pizza" + } + } ], "should": [ - { "match": { "ratingText": "Very Good" } }, - { "match": { "ratingText": "Excellent" } } + { + "match": { + "ratingText": "Very Good" + } + }, + { + "match": { + "ratingText": "Excellent" + } + } ], "must_not": [ - { "match": { "name": "pasta" } } + { + "match": { + "name": "pasta" + } + } ] } } diff --git a/Assignment2_part1/queries/query2c.http b/Assignment2_part1/queries/query2c.http new file mode 100644 index 0000000..531e746 --- /dev/null +++ b/Assignment2_part1/queries/query2c.http @@ -0,0 +1,38 @@ +GET /restaurants/_search +{ + "query": { + "bool": { + "must": [ + { + "regexp": { + "name": { + "value": ".*pizz.*", + "flags": "ALL", + "case_insensitive": true + } + } + } + ], + "must_not": [ + { + "regexp": { + "name": { + "value": ".*pizza.*", + "flags": "ALL", + "case_insensitive": true + } + } + }, + { + "regexp": { + "name": { + "value": ".*pizzeria.*", + "flags": "ALL", + "case_insensitive": true + } + } + } + ] + } + } +}