1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/docs/dev/search.md
Matt Griswold 1eda45ffeb ignore new ixf field (#1082)
* ignore new ixf field

* pre-commit

* gh actions linting fix
2021-10-30 10:20:04 -05:00

1.4 KiB

PeeringDB has 3 areas where searches are processed:

This search occurs throught the top search bar on the PeeringDB website.

This search is backed by django-haystack using the whoosh backend.

Search-indexes and logic for this can be found in peeringdb_server/search_indexes.py and peeringdb_server/search.py

2. REST API filtering

REST API filtering happens when filter parameters are passed to REST API list retrievals.

This is almost a straight pass through to django query set filters (after some sanitizing of course).

Most querying logic for this is defined in rest.py

Note that there is some extra effort involved for more intricate query filters, such as relationship queries or customized queries like the whereis filter for ixpfx

These more complex querying behaviors should be implemented in serializers.py through the prepare_query method on the serializer.

name_search filter

The name_search filter will make use of django-haystack

The advanced-search UI is wired directly to the REST API, so whatever the REST api is capable of the advanced-search UI can make use of.

New form elements should be added as necessary.