is there a way to query for all types but one?
@talgiat the main problem I’d see with doing something like that is that the query may become a performance problem
It would be heavily hit since it’s working memory will change any time any fact in working memory is inserted/retracted (including from truth maintenance)
You could probably do what you ask though:
(r/defquery []
[?o <- Object]
[:test (not (isa? (type ?o) ExcludedType))])
If you have a custom :fact-type-fn
you could still accomplish similar
I do have a :fact-type-fn
@talgiat you’d have to define an hierarchy then more than likely
See http://www.clara-rules.org/docs/fact_type_customization/
Potentially you could derive
all your types to a common ancestor type.
You could leave out the excluded type from that grouping too, and then your query would just be r/defquery my-q [] [?x <- :parent-type]
yeah, thought about that
prob. better with records implementing a common protocol that will be the parent
@talgiat it can go either way really