Keep-words-tokenfilter example

Can some one provide me a full working example of keep-words-token filter(with a file having some keywords, only which are to be indexed). I have followed the documentation but I didn't get through it.

thank you.

Hey,

there is an example in our documentation https://www.elastic.co/guide/en/elasticsearch/reference/5.6/analysis-keep-words-tokenfilter.html

If that one is not working, can you be more exact, what is failing and include steps for reproduction?

Thank you!

--Alex

thank you for your reply

I am new to elasticsearch. I will tell you my use case and please direct me how to make use of this filter.

I have a directory with set of files. If i index those files the whole content get indexes into elasticsearch. But i don't want the whole content to be indexed but I will provide some key words in a file and when i index a file then the only key words to be indexed and when run a search query with particular key word it show that the document which is having that keyword, instead of showing whole content of the document.

please provide me working example.

thank you

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