[metrics-bugs] #23829 [Metrics/Onionoo]: Add support for search term negation

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Oct 20 01:15:22 UTC 2017


#23829: Add support for search term negation
-----------------------------+------------------------------
 Reporter:  cypherpunks      |          Owner:  metrics-team
     Type:  enhancement      |         Status:  needs_review
 Priority:  Medium           |      Milestone:
Component:  Metrics/Onionoo  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+------------------------------

Comment (by nusenu):

 Replying to [comment:3 karsten]:
 > Mind opening one if you think that would be a useful feature?

 #23914

 > Regarding the other parameters that you suggest that should support
 negation, that list sounds reasonable. What it does not mention is the
 "search" parameter itself, which means unqualified search terms for which
 you give use cases further down below.

 Since I realized that nickname and IP are mutually exclusive (nickname can
 not contain dots, IPs can not contain chars) it makes sense to add them as
 well even without specific IP: nickname: parameters.

 > Before I go write more code, can you answer the following usability
 questions (numbered for easier reference, not to indicate priority)?
 >  1. Is `!` the best character we can find to indicate negation? Or
 should we instead pick `-`? Or something else?

 `!` is IMHO the most intuitive and most common character for this use-
 case. This would be my first try before reading any documentation.

 >  2. We'll have to extend the various parameters to support `!` as part
 of the parameter value as in `search=flag:!exit`, and we'll have to allow
 unqualified search terms starting with `!` as in `search=!default`. But
 should we also allow qualified search terms starting with `!` as in
 `search=!flag:exit` which would be equivalent to `search=flag:!exit`? Note
 that if we do, `search=!flag:!exit` would be a valid parameter, as would
 `search=!flag:exit,guard` or `search=!flag:!exit,guard` if we extend the
 "flag" parameter as mentioned in my first paragraph. It would be up to the
 user to interpret what that might possibly mean. But maybe they're to
 blame if they write such a complex query rather than us for accepting it.
 ;)

 All use-cases can be formed with the `!` sign being used in the value part
 only, right?

 `!flag:!guard,exit == flag:guard,!exit` ?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23829#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the metrics-bugs mailing list