Variable Text Box - Boolean operators

The value of $message in the following query corresponds to the value of text box variable:

  • host.name: $hosts AND process.name: $processes AND message: $message

So if the text box variable is given the string ‘TCP’, the value of message of all the documents that satisfy the query must contain the string ‘TCP’.
Is there a way to apply Boolean operators within the value of a text box variable? For instance, is there a way to exclude documents, that contain the string ‘TCP’ in the vale of message (something like applying NOT TCP)?

It is not clear which query language is that I guess it’s Lucene, so your question should be: can I write NOT query in the Lucene - quick google for the answer: indexing - not query in lucene - Stack Overflow

1 Like