# Speeding up "more\_like\_this" query

**URL:** <https://discuss.elastic.co/t/speeding-up-more-like-this-query/204841>\
**Category:** Elasticsearch\
**Created:** [October 23, 2019, 10:51am UTC](https://discuss.elastic.co/t/speeding-up-more-like-this-query/204841 "2019-10-23T10:51:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arshad\_javeed](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@arshad\_javeed](https://discuss.elastic.co/u/arshad_javeed)\
**Post date:** [October 23, 2019, 10:51am UTC](https://discuss.elastic.co/t/speeding-up-more-like-this-query/204841/1 "2019-10-23T10:51:56Z")

</div>

Hi,

I was interested in fetching similar documents for a given input document (similar to KNN). Since I'm dealing with only text fields, I went ahead with using _more\_like\_this_ query, which does the job for text fields.  
But I was concerned about the performance when I have millions of documents indexed in ES. The documentation says that using _term\_vector_ to store the term vectors at the index time can speed up the analysis.  
But what I don't understand is which type of term vector the documentation refers to in this context. As there are three different types of term vectors: term information, term statistics, and field statistics.  
And term statistics and field statistics compute the frequency of the terms with respect to other documents in the index, wouldn't these vectors be outdated when I introduce new documents in the index.  
Hence I presume that the _more\_like\_this_ documentation refers to the term information (which is the information of the terms in one particular document irrespective of the others).

Can anyone let me know if computing only the _term information vector_ at the index time is sufficient to speed up _more\_like\_this_?  
Also, it would be helpful if there's a performance evaluation report/stats for "more\_like\_this".

Thanks.

---

<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:** [November 20, 2019, 10:52am UTC](https://discuss.elastic.co/t/speeding-up-more-like-this-query/204841/2 "2019-11-20T10:52:05Z")

</div>

Closed on November 20, 2019, 10:52am UTC

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