# I really need ypur help to my thesis. More\_like\_this and fields

**URL:** <https://discuss.elastic.co/t/i-really-need-ypur-help-to-my-thesis-more-like-this-and-fields/197726>\
**Category:** Elasticsearch\
**Created:** [September 2, 2019, 5:26pm UTC](https://discuss.elastic.co/t/i-really-need-ypur-help-to-my-thesis-more-like-this-and-fields/197726 "2019-09-02T17:26:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eisklat](https://avatars.discourse-cdn.com/v4/letter/e/c37758/32.png) [@eisklat](https://discuss.elastic.co/u/eisklat)\
**Post date:** [September 2, 2019, 5:26pm UTC](https://discuss.elastic.co/t/i-really-need-ypur-help-to-my-thesis-more-like-this-and-fields/197726/1 "2019-09-02T17:26:44Z")

</div>

I am using the More\_like\_this query for getting the similarity between medical reports and then put them in a matrix for a university work. The problem is that somehow it is only giving me 10 results instead of all of them. I guess it is giving me the 10 more similar? but why?

we have tried putting a size field and nothing is working. Also is there a way to show the results divided by the fields? because i have read the query mixes all the fields results to give a final score, but i would also like to get the individual scores to make an exhaustive analysis. I hope you can help me. I can't find a lot of information and we haven't studied the technology, we are doing it on our own. Thank you very very much. this is my code:

```auto
def search_similar (self, id_caso):
return self._es_buscar({ "size": 100, "query": { "more_like_this": {
    "like": [{ "_id": id_caso}],
    "fields": self.conf.get('campos'),
    "max_query_terms": 100,
    "min_term_freq": 0,
    "minimum_should_match": 0
} } })

def _es_buscar (self, query):
res = self._es.search(index="historiales",
                      doc_type="historial",
                      body=query)
return [{ 'id': r['_id'], 'doc': r['_source'], 'score' : r['_score']}
        for r in res['hits']['hits']]

```

---

<div class="post-metadata">

**Author:** ![jmorph99](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmorph99/32/53466_2.png) [@jmorph99](https://discuss.elastic.co/u/jmorph99)\
**Post date:** [September 2, 2019, 11:32pm UTC](https://discuss.elastic.co/t/i-really-need-ypur-help-to-my-thesis-more-like-this-and-fields/197726/2 "2019-09-02T23:32:59Z")

</div>

Your query seems to be fine. Try to run it manually against the cluster.

curl -XPOST localhost:9200/historiales/\_search -H 'Content-Type: application/json' -d '  
{  
"size": 100,  
"query": {  
"more\_like\_this": {  
"like": [  
{  
"\_id": "I-UKDWsBYyzZb1nReo3f"  
}  
],  
"fields": ["pname"],  
"max\_query\_terms": 100,  
"min\_term\_freq": 0,  
"minimum\_should\_match": 0  
}  
}  
}'

---

<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:** [September 30, 2019, 11:33pm UTC](https://discuss.elastic.co/t/i-really-need-ypur-help-to-my-thesis-more-like-this-and-fields/197726/3 "2019-09-30T23:33:00Z")

</div>

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