Changeset View
Changeset View
Standalone View
Standalone View
swh/search/interface.py
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | ) -> PagedResult[MinimalOriginDict]: | ||||
"""Searches for origins matching the `url_pattern`. | """Searches for origins matching the `url_pattern`. | ||||
Args: | Args: | ||||
query: Find origins according the queries written as per the | query: Find origins according the queries written as per the | ||||
swh-search query language syntax, if empty return all origins | swh-search query language syntax, if empty return all origins | ||||
url_pattern: Part of the URL to search for, if empty and no filter | url_pattern: Part of the URL to search for, if empty and no filter | ||||
parameters used return all origins | parameters used return all origins | ||||
metadata_pattern: Keywords to look for (across all the fields of | metadata_pattern: Keywords to look for (across all the fields of | ||||
intrinsic_metadata) | "jsonld") | ||||
with_visit: Whether origins with no visits are to be filtered out | with_visit: Whether origins with no visits are to be filtered out | ||||
visit_types: Only origins having any of the provided visit types | visit_types: Only origins having any of the provided visit types | ||||
(e.g. git, svn, pypi) will be returned | (e.g. git, svn, pypi) will be returned | ||||
min_nb_visits: Filter origins that have number of visits >= | min_nb_visits: Filter origins that have number of visits >= | ||||
the provided value | the provided value | ||||
min_last_visit_date: Filter origins that have | min_last_visit_date: Filter origins that have | ||||
last_visit_date on or after the provided date(ISO format) | last_visit_date on or after the provided date(ISO format) | ||||
min_last_eventful_visit_date: Filter origins that have | min_last_eventful_visit_date: Filter origins that have | ||||
last_eventful_visit_date (eventful = snapshot_id changed) | last_eventful_visit_date (eventful = snapshot_id changed) | ||||
on or after the provided date(ISO format) | on or after the provided date(ISO format) | ||||
min_last_revision_date: Filter origins that have | min_last_revision_date: Filter origins that have | ||||
last_revision_date on or after the provided date(ISO format) | last_revision_date on or after the provided date(ISO format) | ||||
min_last_release_date: Filter origins that have | min_last_release_date: Filter origins that have | ||||
last_release_date on or after the provided date(ISO format) | last_release_date on or after the provided date(ISO format) | ||||
min_date_created: Filter origins that have date_created | min_date_created: Filter origins that have date_created | ||||
from intrinsic_metadata on or after the provided date | from ``jsonld`` on or after the provided date | ||||
min_date_modified: Filter origins that have date_modified | min_date_modified: Filter origins that have date_modified | ||||
from intrinsic_metadata on or after the provided date | from ``jsonld`` on or after the provided date | ||||
min_date_published: Filter origins that have date_published | min_date_published: Filter origins that have date_published | ||||
from intrinsic_metadata on or after the provided date | from ``jsonld`` on or after the provided date | ||||
programming_languages: Filter origins with programming languages | programming_languages: Filter origins with programming languages | ||||
present in the given list (based on instrinsic_metadata) | present in the given list (based on instrinsic_metadata) | ||||
licenses: Filter origins with licenses present in the given list | licenses: Filter origins with licenses present in the given list | ||||
(based on instrinsic_metadata) | (based on instrinsic_metadata) | ||||
keywords: Filter origins having description/keywords | keywords: Filter origins having description/keywords | ||||
(extracted from instrinsic_metadata) that match given values | (extracted from instrinsic_metadata) that match given values | ||||
sort_by: Sort results based on a list of fields mentioned in SORT_BY_OPTIONS | sort_by: Sort results based on a list of fields mentioned in SORT_BY_OPTIONS | ||||
(nb_visits,last_visit_date, last_eventful_visit_date, | (nb_visits,last_visit_date, last_eventful_visit_date, | ||||
Show All 17 Lines |