CopyPastor

Detecting plagiarism made easy.

Score: 0.8080783288339839; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2023-04-11
by Val

Original Post

Original - Posted on 2015-01-27
by bittusarkar



            
Present in both answers; Present only in the new answer; Present only in the old answer;

You can do it like this:
{ "query": { "bool": { "filter": { "term": { "type": "A" } }, "minimum_should_match": 1, "should": [ { "bool": { "must_not": { "exists": { "field": "title" } } } }, { "bool": { "must_not": { "exists": { "field": "description" } } } } ] } } }

You can use a [Filtered Query][1] for this. Filters are not scored. See the query below for searching the term `"xyz"`:
POST <index name>/<type>/_search { "filtered": { "query": { "match_all": {} }, "filter": { "bool": { "should": [ { "term": { "name": "xyz" } }, { "term": { "description": "xyz" } } ] } } } }


[1]: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-filtered-query.html

        
Present in both answers; Present only in the new answer; Present only in the old answer;