Appendix A. Fluidinfo Query Language Reference

Tag Presence: The has Operator

The has operator matches objects that are tagged with the named tag. For instance,

has alice/rating

matches all objects to which Alice has attached her rating tag—all four objects in Figure A-1. Similarly,

has γλαύκων/rating

would match only Led Zeppelin IV since that’s the only object to which Γλαύκων has attached a rating.

Four Fluidinfo objects used to illustrate queries.
Figure A-1. Four Fluidinfo objects used to illustrate queries.

Note

The value of the tag does not matter; even a tag with no value will be matched by the has operator.

Equality: The = Operator

The values of any tag having a simple native type can be tested with an explicit query of the form

tag = value

where tag is the name of a tag and value is a specification of a matching value.

In the case of numbers, the operator tests exact numeric equality, so that both

alice/rating = 5

and

alice/rating = 5.0

match any objects that Alice has tagged with a rating of 5 (or 5.0). String values will not match these queries (for example, tags with textual values "5", "5.0"). In Figure A-1 only the Led Zeppelin album, IV, will match.

In the case of booleans (true/false values), the words true and false will match, regardless of capitalization:

alice/likes = true
alice/likes = false

In the Figure A-1, only Emma will match the first query, and only Animal Farm will match the second query.

No numeric or textual values will ...

Get Getting Started with Fluidinfo now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.