#1015 Inconsistence in filter grammar and naming of available tags/markers

Alexey Matveev Fri 23 Sep 2022

I found inconsistence in filter grammar and naming of available tags/markers. If we have a look at the grammar (https://project-haystack.org/doc/docHaystack/Filters) here is how the path is defined:

<path> := <name> ("->" <name>)

the <name> keyword is a tag or a marker. If we have a look at the definition of name :

<name> := same as Zinc <id>

You see it says that name has the same format as Zinc <id> Let's have a look at Zinc <id> definition (https://project-haystack.org/doc/docHaystack/Zinc#grammar):

' <id> := <alphaLo> (<alphaLo> | <alphaHi> | <digit> | '_')* '

And here is the description of all parts of id

' <alphaLo> := ('a' - 'z') <alphaHi> := ('A' - 'Z') <digit> := ('0' - '9') '

As you can see the ‘-’ sign is not there but if we look at default markers and tags in project haystack, we can find many tags/markers with this sign:

ac-freq air-temp

Can somebody comment on it? I can add of course the - to the grammar, but I am thinking maybe I am missing somethings.

Thank you!

Brian Frank Fri 23 Sep 2022

The grammar is correct, you are not allowed to use a dash in names. What you see are called conjuncts. A conjunct such as steam-boiler models a concept which uses two or more marker tags. But instance data always uses the individual tags:

// instance
{dis: "Some Boiler", steam, boiler, equip}

// filter
steam and boiler and equip

Alexey Matveev Sat 24 Sep 2022

Thank you for your reply! Does it mean that I can not query conjuncts using filters? You also said that I can not add conjuncts to instance data, then to which object do I add it?

Steve Eynon Thu 6 Oct 2022

Hi Alexey, as Brian pointed out, conjuncts are a logical concept formed by combining marker tags - hence conjuncts can not be used in filter expressions, but (as per Brian's example), their constituent parts can; e.g. air and temp

Here's a snippet from the start of Topic 3.5 - Conjuncts - our Haystack Essentials eLearning course.

Topic 3.5 - Conjuncts

Login or Signup to reply.