# Query Recall Vs Precision

**URL:** https://discuss.elastic.co/t/query-recall-vs-precision/298235
**Category:** Elasticsearch
**Created:** [February 25, 2022, 3:34am UTC](https://discuss.elastic.co/t/query-recall-vs-precision/298235 "2022-02-25T03:34:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [February 25, 2022, 3:34am UTC](https://discuss.elastic.co/t/query-recall-vs-precision/298235/1 "2022-02-25T03:34:17Z")

</div>

Hello everybody.

I would like some help to maintain the accuracy of my query and still have a minimal recall of results.

Today I have some documents that have generic terms, and these terms retrieve products that  
outside the search context.

For example:

Query:

```auto
"should": [
            {
              "match_phrase": {
                "title.raw": {
                  "query": "#$query##",
                  "slop": 2,
                  "boost": 100
                }
              }
            },
            {
              "match": {
                "title": {
                  "query": "#$query##",
                  "operator": "AND",
                  "boost": 100
                }
              }
            },
            {
              "multi_match": {
                "query": "#$query##",
                "fields": [
                  "description.pt-br^1.0",
                  "title.pt-br^1.0"
                ],
                "type": "best_fields"
              }
            }
          ],

```

Documents:

Course Python  
Course Java  
Course Photoshop  
Course Advanced Java  
java for beginners  
Java Ninja  
Course ....  
.  
.  
More docs name with Course

When I run my query to search for docs related to the term "course java" I have these  
results:  
Course Java  
Course Advanced Java  
java for beginners  
Java Ninja  
Course Python  
Course Photoshop  
.... more doc with "Course"

Note that it retrieves Python Course and Photoshop Course due to the query construction itself that uses multimatch.

Is it possible to limit the recall of documents with the term "course"?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 25, 2022, 3:34am UTC](https://discuss.elastic.co/t/query-recall-vs-precision/298235/2 "2022-03-25T03:34:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
