YousefED/ElasticUI

Help with elastic.js syntax

Closed this issue · 3 comments

Yousef,

Can you help me translate what this should be in ejs?

GET /_search
{
  "query": {
    "bool": {
      "should": [
        { "match": { "title":  "War and Peace" }},
        { "match": { "author": "Leo Tolstoy"   }}
      ]
    }
  }
}

Here is my guess, but its not working.

eui-query="ejs.BoolQuery().should(ejs.MatchQuery('title', 'War and Peace'),ejs.MatchQuery('author', 'Leo Tolstoy'))" 

Try ejs.BoolQuery().should([ejs.MatchQuery("title", "War and Peacy"),
ejs.MatchQuery("author", "Leo Tolstoy")])

On Thu, May 12, 2016 at 2:00 PM, Mediathread notifications@github.com
wrote:

Here is my guess, but its not working.

eui-query="ejs.BoolQuery().should(ejs.MatchQuery('title', 'War and Peace'),ejs.MatchQuery('author', 'Leo Tolstoy'))"


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#86 (comment)

Thank you!