I have a list of terms about 1000 words and I want to have logstash in a Filter tag the document if there is a match in any of the words in a text field.
Example:
text : "The big brown dog"
My List of 1000 terms has Dog as a word.
So Logstash Tags that Document with "Animal"
Notice I would like the match to be caseinsensitive as well.
The reason I would like to do this is that I have tried to use Filters like the below filter and they just don't perform well when you have 1000+ words it is searching through millions of documents. So if I could create a better performing Tag system I could just filter for the Documents that have that TAG.
Anyone out there doing Keyword extractions like this to tag documents coming through Logstash?
{
"query": {
"bool": {
"minimum_should_match": 1,
"should": [
{
"match_phrase": {
"text": "Dog"
}
},
{
"match_phrase": {
"text": "Cat"
}
},
{
"match_phrase": {
"text": "1000+ Animal Types"
}
}
]
}
}
}