# TermVector of artifical doc + filtering

**URL:** <https://discuss.elastic.co/t/termvector-of-artifical-doc-filtering/205065>\
**Category:** Elasticsearch\
**Created:** [October 24, 2019, 12:32pm UTC](https://discuss.elastic.co/t/termvector-of-artifical-doc-filtering/205065 "2019-10-24T12:32:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vptu](https://avatars.discourse-cdn.com/v4/letter/v/278dde/32.png) [@vptu](https://discuss.elastic.co/u/vptu)\
**Post date:** [October 24, 2019, 12:32pm UTC](https://discuss.elastic.co/t/termvector-of-artifical-doc-filtering/205065/1 "2019-10-24T12:32:02Z")

</div>

Hi,

first of all I'm fairly new to elasticsearch so sorry if the question is too obvious to answer.

I've created an index with multiple documents stored.  
I want to use the term vector api to create term vectors based on artifical documents.  
This works so far, but my issue occurs when i add filter parameters. Elasticsearch returns a an error message that the doc\_freq must be positive.

When i check the response of a request without filter parameters, some of the returned terms fulfill all 3 filter parameters.

"filter" : {  
"max\_num\_terms": 3, --\> number of returned terms  
"min\_term\_freq" : 2, --\> minimum number of occurrences of terms in the artificial document to be considered  
"min\_doc\_freq" : 1 --\> minimum number of occurrences of terms in all documents of the index  
}

Did i misunderstood something?

Thanks a lot for your support!

---

<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 21, 2019, 12:32pm UTC](https://discuss.elastic.co/t/termvector-of-artifical-doc-filtering/205065/2 "2019-11-21T12:32:17Z")

</div>

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