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.
_______________________________________________ tor-dev mailing list tor-dev@xxxxxxxxxxxxxxxxxxxx https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev