Use aliases / shortnames for modular snippets of user defined Boolean

If I'm doing research on similar aspects of the same subject or even just planning on re-using bits of earlier Boolean, it would be nice to be able to use an alias for those sets.

For instance, let's say I'm doing research on snacks. I may be interested in sets of flavors, so i would write

   (Vanilla OR Chocolate OR Strawberry OR Banana) 

It would then be nice to define that set with an alias, like $Flavors, which can stand in for that set when writing future Boolean.

So, if I were researching posts about preferred types of dessert, as well as the flavors that they come in, I could write something like

   (cake OR pie OR ice cream) AND ($Flavors)

For larger research projects, this would mean being able to write complex Boolean in a much more simplified and modular manner. For example, in here:

   ($SweetDesserts AND $Flavors) AND NOT ($SweetSnacks)

$SweetDesserts can be defined as: (cake OR pie OR ice cream)


$SweetSnacks as (cookies OR muffins OR candybars)

So in three terms, we've actually written all this:

((Vanilla OR Chocolate OR Strawberry OR Banana) AND (cake OR pie OR ice cream)) AND NOT (cookies OR muffins OR candybars)

Just a thought. Thanks!

  • Guest
  • Oct 28 2022
  • Attach files