Search internal notes only?

I’m trying to come up with a search query that searches internal notes only. This is what I’ve got so far:

article.body:test article.type:note

Both predicates work on their own - article.body:test will find tickets that have an article that contains test, and article.type:note will find tickets that contain internal notes.

But the combination does not work as one would expect: instead of finding only tickets that have an article that is both of type “note” and contains “test”, it’ll instead find tickets that have one article of type “note”, and another article that contains “test”. Ie. the predicates match different articles, where I only want them to match the same article.

Does anyone have a hint how to tell ElasticSearch that? :slight_smile:

Did you try adding the ‘AND’ operator?
like; “article.type:note and article.body:test”
this seems to work for me.

cond1 AND cond2 should be identical to cond1 cond2. I’ve tried it to make sure, but as far as I can tell, it is identical and suffers from the same issue - there are tickets in the result list that have internal notes and have “test” in any article, but do not have an internal note that contains “test”. So this definitely isn’t specific enough.

(Sidenote: cond1 and cond2 on the other hand is NOT identical to cond1 AND cond2/cond1 cond2. and is not recognized by ES as an operator, but as the plain word and instead.)

Apart from changes in between Zammad 3.6 and Zammad 4.0, I believe .keyword especially for the article.body.type may be useful. Currently missing the time and ressources for testing it. Sorry. :frowning:

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