Skip to content

More powerful object search #282

@Kraysent

Description

@Kraysent

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 to M33 by name
  • pos: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 above
  • pos:B122817.46+123907.1 - everything inside the 1 arcsecond radius from these B1950 coordinates
  • pos:G283.79325+74.47647 - the same for galactic coordinates
  • pos:M33 - the same for coordinates of the object with the name closest to M33
  • pgc: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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions