1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/docs/dev/modules/search_indexes.py.md
Matt Griswold 8ef76dc5ab Support 202110 (#1085)
* Block registering private ASN ranges

* Add a continental region field for facilities #1007

* Incorrect order of search results #232

* Allow users to upload a small logo to their record #346

* Sponsor badge CSS and text translation issues #453

* IXP and Facility summary #18

* Add sales email and phone contact to ix object #949

* Increase timeout timer for IX-F JSON importer to 30s #962

* IX-F manually triggered import bugs #1054

* remove survey notifications

* IX-F importer: manual add followed by IX-F prompted add can result in "The server rejected your data" #807

* performance fix for net view

* api documentation generate broken #956

* fix poc set missing from net view

* Auto focus cursor on search field on main website #695

* PeeringDB website has a poor choice of line-breaks for IPv6 addresses. #748

* Delete childless org objects #838

* linting

* poetry lock

* re-add mistakingly dropped translation to email template

* fix template variables

* regen docs

* regen api docs

* fix merge cruft

* django-peeringdb to 2.11 and poetry relock

* linting

* comment out django-peeringdb volume mount

* add missing declaration

Co-authored-by: Stefan Pratter <stefan@20c.com>
Co-authored-by: David Poarch <dpoarch@20c.com>
2021-11-09 09:47:38 -06:00

3.7 KiB

Generated from search_indexes.py on 2021-11-02 10:01:21.611533

peeringdb_server.search_indexes

Defines django-haystack search indexes.

Classes


EntityIndex

EntityIndex(haystack.indexes.SearchIndex)

Search index for org, net, ix and fac entities.

Methods

build_queryset

def build_queryset(self, using=None, start_date=None, end_date=None)

Get the default QuerySet to index when doing an index update.

Subclasses can override this method to take into account related model modification times.

The default is to use SearchIndex.index_queryset and filter based on SearchIndex.get_updated_field


get_model

def get_model(self)

Should return the Model class (not an instance) that the rest of the SearchIndex should use.

This method is required & you must override it to return the correct class.


get_updated_field

def get_updated_field(self)

Use this field to determine object age. This is required for the --age parameter to function in the update_index command.


prepare

def prepare(self, obj)

Fetches and adds/alters data before indexing.


FacilityIndex

FacilityIndex(peeringdb_server.search_indexes.MainEntity, haystack.constants.Indexable)

Search index for org, net, ix and fac entities.

Methods

get_model

def get_model(self)

Should return the Model class (not an instance) that the rest of the SearchIndex should use.

This method is required & you must override it to return the correct class.


IXLanPrefixIndex

IXLanPrefixIndex(peeringdb_server.search_indexes.EntityIndex, haystack.constants.Indexable)

Search index for org, net, ix and fac entities.

Methods

get_model

def get_model(self)

Should return the Model class (not an instance) that the rest of the SearchIndex should use.

This method is required & you must override it to return the correct class.


InternetExchangeIndex

InternetExchangeIndex(peeringdb_server.search_indexes.MainEntity, haystack.constants.Indexable)

Search index for org, net, ix and fac entities.

Methods

get_model

def get_model(self)

Should return the Model class (not an instance) that the rest of the SearchIndex should use.

This method is required & you must override it to return the correct class.


MainEntity

MainEntity(peeringdb_server.search_indexes.EntityIndex)

Search index for org, net, ix and fac entities.

Methods

prepare

def prepare(self, obj)

Fetches and adds/alters data before indexing.


NetworkIXLanIndex

NetworkIXLanIndex(peeringdb_server.search_indexes.EntityIndex, haystack.constants.Indexable)

Search index for org, net, ix and fac entities.

Methods

get_model

def get_model(self)

Should return the Model class (not an instance) that the rest of the SearchIndex should use.

This method is required & you must override it to return the correct class.


NetworkIndex

NetworkIndex(peeringdb_server.search_indexes.MainEntity, haystack.constants.Indexable)

Search index for org, net, ix and fac entities.

Methods

get_model

def get_model(self)

Should return the Model class (not an instance) that the rest of the SearchIndex should use.

This method is required & you must override it to return the correct class.


OrganizationIndex

OrganizationIndex(peeringdb_server.search_indexes.MainEntity, haystack.constants.Indexable)

Search index for org, net, ix and fac entities.

Methods

get_model

def get_model(self)

Should return the Model class (not an instance) that the rest of the SearchIndex should use.

This method is required & you must override it to return the correct class.