Skip to content

How can I filter terms in a term vector request? #1868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
crjackso opened this issue Feb 26, 2016 · 1 comment
Closed

How can I filter terms in a term vector request? #1868

crjackso opened this issue Feb 26, 2016 · 1 comment

Comments

@crjackso
Copy link

Given the code listed below, how can I filter the terms returned from a term vector request as a means of ensuring no words with a frequency greater than x are returned? The ElasticSearch (ES) feature I'm trying to play around with is documented on the ES website.
Here's the code snippet:

 var termVectorResponse = ElasticClient.MultiTermVectors(new MultiTermVectorsRequest(IndexName, Type)
        {                          
            Documents = documentIds.Select(id => new MultiTermVectorOperation<Document>(id)
            {
                FieldStatistics = true,
                Payloads = true,
                TermStatistics = true,
                Positions = true,
                Offsets = true,
                Type = Type,
                Index = IndexName           
            })      
        });

How can I alter this code to specify term filters like max_num_terms and min_term_freq? I'm using ES version 2.02. Thanks for the help!

@gmarz gmarz added Bug labels Mar 3, 2016
@gmarz
Copy link
Contributor

gmarz commented Mar 3, 2016

Looks like we're missing the filter option. We'll add this for the next release. Thanks for reporting!

Mpdreamz added a commit that referenced this issue Mar 14, 2016
Fix #1868 add filter option to _termvectors and _mtermvectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants