+ representing the criteria for filtering.
+ example : filter = { 'hostname' : '*.edu' , site_id : [34,54] }
+
+
+ Special features:
+
+ * a field starting with the ~ character means negation.
+ example : filter = { '~peer_id' : None }
+
+ * a field starting with < [ ] or > means lower than or greater than
+ < > uses strict comparison
+ [ ] is for using <= or >= instead
+ example : filter = { ']event_id' : 2305 }
+ example : filter = { '>time' : 1178531418 }
+ in this example the integer value denotes a unix timestamp
+
+ * if a value is a sequence type, then it should represent
+ a list of possible values for that field
+ example : filter = { 'node_id' : [12,34,56] }
+
+ * a (string) value containing either a * or a % character is
+ treated as a (sql) pattern; * are replaced with % that is the
+ SQL wildcard character.
+ example : filter = { 'hostname' : '*.jp' }
+
+ * a field starting with '&' or '|' should refer to a sequence type
+ the semantics is then that the object value (expected to be a list)
+ should contain all (&) or any (|) value specified in the corresponding
+ filter value. See other examples below.
+ example : filter = { '|role_ids' : [ 20, 40 ] }
+ example : filter = { '|roles' : ['tech', 'pi'] }
+ example : filter = { '&roles' : ['admin', 'tech'] }
+ example : filter = { '&roles' : 'tech' }
+
+ * the filter's keys starting with '-' are special and relate to sorting and clipping
+ * '-SORT' : a field name, or an ordered list of field names that are used for sorting
+ these fields may start with + (default) or - for denoting increasing or decreasing order
+ example : filter = { '-SORT' : [ '+node_id', '-hostname' ] }
+ * '-OFFSET' : the number of first rows to be ommitted
+ * '-LIMIT' : the amount of rows to be returned
+ example : filter = { '-OFFSET' : 100, '-LIMIT':25}
+
+ * similarly the two special keys below allow to change the semantics of multi-keys filters
+ * '-AND' : select rows that match ALL the criteria (default)
+ * '-OR' : select rows that match ANY criteria
+ The value attached to these keys is ignored.
+ Please note however that because a Filter is a dict, you cannot provide two criteria on a given key.
+
+
+ Here are a few realistic examples
+
+ GetNodes ( { 'node_type' : 'regular' , 'hostname' : '*.edu' ,
+ '-SORT' : 'hostname' , '-OFFSET' : 30 , '-LIMIT' : 25 } )
+ would return regular (usual) nodes matching '*.edu' in alphabetical order from 31th to 55th
+
+ GetNodes ( { '~peer_id' : None } )
+ returns the foreign nodes - that have an integer peer_id
+
+ GetPersons ( { '|role_ids' : [ 20 , 40] } )
+ would return all persons that have either pi (20) or tech (40) roles
+
+ GetPersons ( { '&role_ids' : 10 } )
+ GetPersons ( { '&role_ids' : 10 } )
+ GetPersons ( { '|role_ids' : [ 10 ] } )
+ GetPersons ( { '|role_ids' : [ 10 ] } )
+ all 4 forms are equivalent and would return all admin users in the system