[metrics-team] onionoo search semantics: AND vs. OR?
karsten at torproject.org
Sun Apr 23 15:05:31 UTC 2017
On 23.04.17 01:01, nusenu wrote:
> (trying to find a stop-gap solution for
We should probably discuss this on the ticket, not here. Quick response
> from onionoo.tpo:
>> Return only (1) relays with the parameter value matching (part of a)
>> nickname, (possibly $-prefixed) [...]
>> If multiple search terms are given, separated by spaces, the
>> **intersection** of all relays and bridges matching all search terms
>> will be returned.
> Karsten wrote
>> You could approximate the second example by using
>> search=contact:Neel%20contact:Chauhan, but that will also return all
>> relays that have those **two** strings somewhere in the contact line,
>> rather than just Neel Chauhan.
> So I would assume that
> should only return relays where the contact field contains "Neel"
> **and** "Chauhan" but it also returns relays that have only "Neel" (and
> no "Chauhan"), so I would deduce that search terms are OR connected.
> example contact result:
> "<neel AT rdkr DOT uk> 0xBBC1514B34CFB0F10231280F2FC36F0EF7887127"
Hmm, looks like my suggestion was misleading. The two qualified search
terms are not OR-connected, but the second search term is simply
discarded. Try swapping the two and see how that changes the result.
The spec says: "If the same parameter is specified more than once, only
the first parameter value is considered."
Now, the search term is only given once, but the qualified search terms
are treated as if the user passed values to keys matching search
qualifiers. And the second contact parameter is simply dropped.
This is expected behavior that we might be able to document better.
All the best,
> If search terms are OR connected (not the "intersection")
> then I would simply list all the fingerprints to get a list of all
> relevant relays, but that does not work either (no results)
> example (2 fingerprints separated by a single space):
> Also tried:
> In this search, the search terms are AND connected:
> So I'm not sure
> - if the current behavior works as documented and intended
> - How to get a stop-gap solution without false-positives/false-negative
> search results
> Is this a bug or am I misunderstanding something?
> (or does the AND/OR mode depend on whether search qualifiers are used?)
> metrics-team mailing list
> metrics-team at lists.torproject.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 495 bytes
Desc: OpenPGP digital signature
More information about the metrics-team