-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
In order to make searching for an object easier and more powerful, I want to add a new query method (which will primarily be used by frontend).
The spec should be easy:
GET /api/v1/query
Parameters:
q: string - query
Output whould be the same as for /api/v1/query/simple.
The task is to create a small language that will be parsed by the method and translated into a set of filters. Valid search functions:
name:M33- will find everything close toM33by namepos:J123049.32+122233.2- everything inside the 1 arcsecond radius from coordinates (12h 30m 49.32sec, +12 deg 22' 33.2'')pos:"12h 30m 49.32s +12d 23' 33.2''"- the same as abovepos:B122817.46+123907.1- everything inside the 1 arcsecond radius from these B1950 coordinatespos:G283.79325+74.47647- the same for galactic coordinatespos:M33- the same for coordinates of the object with the name closest to M33pgc:123456- find the pgc number
Double qoutes are optional for things that do not require spaces and necessary for things that do contain spaces.
These filters can be concatenated using and and or operators, for example:
name:M33 or pos:J123049.32+122233.2
or
(name:M33 and pos:J123049.32+122233.2) or pgc:123456
Metadata
Metadata
Assignees
Labels
No labels