Looks like pg_trgm is contained in postgresql-contrib-9.1, so it's more
likely that we can run something requiring this extension on a
torproject.org machine. Still, requiring extensions should be the last
resort if no other solution can be found. Leaving out searches for
nickname substrings is a valid solution for now.
> - ?search=nickname>> Do you have a list of searches you're planning to support?
>
>
> These are the ones that should *really* be supported:
>
> - ?search=fingerprint
> - ?lookup=fingerprint
> - ?search=address [done some limited testing, currently not focusing on
> this]
The lookup parameter is basically the same as search=fingerprint with
the additional requirement that fingerprint must be 40 characters long.
So, this is the current search parameter.
I agree, these would be good to support.
You might also add another parameter ?address=address for ExoneraTor.
That should, in theory, be just a subset of the search parameter.
> - ?running=<boolean>
This one is tricky. So far, Onionoo looks only at the very latest
consensus or bridge status to decide if a relay or bridge is running or not.
But now you're adding archives to Onionoo, so that people can search for
a certain consensus or certain bridge status in the past, or they can
search for a time interval of consensuses or bridge statuses. How do
you define that a relay or bridge is running, or more importantly
included as not running?
> - ?flag=flag [every kind of clause which further narrows down the query
> is not bad; the current db model supports all the flags that Stem does, andI'd say leave this one out until there's an actual use case.
> each flag has its own column]
> - ?first_seen_days=range
> - ?last_seen_days=range
>Oh, I think there's a misunderstanding of these two fields. These
> As per the plan, the db should be able to return a list of status entries /
> validafter ranges (which can be used in {first,last}_seen_days) given some
> fingerprint.
fields are only there to search for relays or bridges that have first
appeared or were last seen on a given day.
You'll need two new parameters, say, from=datetime and to=datetime (or
start=datetime and end=datetime) to define a valid-after range for your
search.