FYI the reason var = "text1" | "text2" doesn't work is because it is evaluated as (var = "text1") | "text2", since equality has higher precedence than 'or'. "text2" is then interpreted as a "true" value, equivalent to (var = "text1") | true. Anything or true is true, so the entire expression is equivalent to true. (Construct doesn't actually have a 'true' keyword, so this will evaluate to 1.)
As noted you need to use var = "text1" | var = "text2", which is evaluated as (var = "text1") | (var = "text2") which does what you want.