search.domain.base module

Base domain classes for search service.

class search.domain.base.Classification(group=None, archive=None, category=None)[source]

Bases: object

Represents an arXiv classification for a paper.

archive = None
archive_display

Get a human-friendly display label for the archive.

Return type:str
category = None
category_display

Get a human-friendly display label for the category.

Return type:str
group = None
group_display

Get a human-friendly display label for the group.

Return type:str
class search.domain.base.ClassificationList[source]

Bases: list

Represents a list of arXiv classifications.

class search.domain.base.DateRange(start_date=datetime.datetime(1990, 1, 1, 0, 0, tzinfo=<DstTzInfo 'US/Eastern' LMT-1 day, 19:04:00 STD>), end_date=datetime.datetime(2019, 2, 8, 12, 36, 49, 201527, tzinfo=<DstTzInfo 'US/Eastern' EST-1 day, 19:00:00 STD>), date_type='submitted_date')[source]

Bases: object

Represents an open or closed date range, for use in Query.

ANNOUNCED = 'announced_date_first'
SUBMITTED_CURRENT = 'submitted_date'
SUBMITTED_ORIGINAL = 'submitted_date_first'
date_type = 'submitted_date'

The date associated with the paper that should be queried.

end_date = datetime.datetime(2019, 2, 8, 12, 36, 49, 201527, tzinfo=<DstTzInfo 'US/Eastern' EST-1 day, 19:00:00 STD>)

The day/time at (just before) which the range ends.

start_date = datetime.datetime(1990, 1, 1, 0, 0, tzinfo=<DstTzInfo 'US/Eastern' LMT-1 day, 19:04:00 STD>)

The day/time on which the range begins.

class search.domain.base.DocMeta(paper_id=<factory>, abstract=<factory>, abstract_utf8=<factory>, authors_parsed=<factory>, authors_utf8=<factory>, author_owners=<factory>, authors=<factory>, submitted_date=<factory>, submitted_date_all=<factory>, modified_date=<factory>, updated_date=<factory>, announced_date_first=<factory>, is_current=True, is_withdrawn=False, license=<factory>, primary_classification=<factory>, secondary_classification=<factory>, title=<factory>, title_utf8=<factory>, source=<factory>, version=1, submitter=<factory>, report_num=<factory>, proxy=False, msc_class=<factory>, acm_class=<factory>, metadata_id=-1, document_id=-1, journal_ref=<factory>, journal_ref_utf8=<factory>, doi=<factory>, comments=<factory>, comments_utf8=<factory>, abs_categories=<factory>, formats=<factory>, latest_version=1, latest=<factory>)[source]

Bases: object

Metadata for an arXiv paper, retrieved from the core repository.

document_id = -1
is_current = True
is_withdrawn = False
latest_version = 1
metadata_id = -1
proxy = False
version = 1
class search.domain.base.Document(submitted_date=None, announced_date_first=None, submitted_date_first=None, submitted_date_latest=None, submitted_date_all=<factory>, id=<factory>, abstract=<factory>, abstract_tex=<factory>, authors=<factory>, authors_freeform=<factory>, owners=<factory>, modified_date=<factory>, updated_date=<factory>, is_current=True, is_withdrawn=False, license=<factory>, paper_id=<factory>, paper_id_v=<factory>, title=<factory>, title_tex=<factory>, source=<factory>, version=1, latest=<factory>, latest_version=0, submitter=None, report_num=<factory>, proxy=False, msc_class=<factory>, acm_class=<factory>, metadata_id=-1, journal_ref=<factory>, doi=<factory>, comments=<factory>, abs_categories=<factory>, formats=<factory>, primary_classification=<factory>, secondary_classification=<factory>, score=1.0, highlight=<factory>, preview=<factory>, match=<factory>, truncated=<factory>)[source]

Bases: object

A search document, representing an arXiv paper.

announced_date_first = None
classmethod fields()[source]

Get the names of fields on this class.

Return type:List[str]
highlight = None

Contains highlighted versions of field values.

is_current = True
is_withdrawn = False
latest_version = 0
match = None

Contains fields that matched but lack highlighting.

metadata_id = -1
preview = None

Contains truncations of field values for preview/snippet display.

proxy = False
score = 1.0
submitted_date = None
submitted_date_first = None
submitted_date_latest = None
submitter = None
truncated = None

Contains fields for which the preview is truncated.

version = 1
class search.domain.base.DocumentSet(metadata, results)[source]

Bases: object

A set of search results retrieved from the search index.

class search.domain.base.Fulltext(content, version, created)[source]

Bases: object

Fulltext content for an arXiv paper, including extraction metadata.

class search.domain.base.Person(full_name, last_name=<factory>, first_name=<factory>, suffix=<factory>, affiliation=<factory>, orcid=None, author_id=None)[source]

Bases: object

Represents an author, owner, or other person in metadata.

affiliation = None

Institutional affiliations.

author_id = None

Legacy arXiv author identifier.

classmethod fields()[source]

Get the names of fields on this class.

Return type:List[str]
orcid = None

ORCID identifier.

class search.domain.base.Query(order=None, size=50, page_start=0, include_older_versions=False, hide_abstracts=False)[source]

Bases: object

Represents a search query originating from the UI or API.

MAXIMUM_size = 500

The maximum number of records that can be retrieved.

SUPPORTED_FIELDS = [('all', 'All fields'), ('title', 'Title'), ('author', 'Author(s)'), ('abstract', 'Abstract'), ('comments', 'Comments'), ('journal_ref', 'Journal reference'), ('acm_class', 'ACM classification'), ('msc_class', 'MSC classification'), ('report_num', 'Report number'), ('paper_id', 'arXiv identifier'), ('doi', 'DOI'), ('orcid', 'ORCID'), ('license', 'License (URI)'), ('author_id', 'arXiv author ID'), ('help', 'Help pages'), ('full_text', 'Full text')]
hide_abstracts = False
include_older_versions = False
order = None
page

Get the approximate page number.

Return type:int
page_end

Get the index/offset of the end of the page.

Return type:int
page_start = 0
size = 50
class search.domain.base.SimpleQuery(order=None, size=50, page_start=0, include_older_versions=False, hide_abstracts=False, search_field=<factory>, value=<factory>, classification=<factory>, include_cross_list=True)[source]

Bases: search.domain.base.Query

Represents a simple search query.

classification = None

Classification(s) by which to limit results.

include_cross_list = True

If True, secondaries are considered when limiting by classification.

search.domain.base.asdict(obj)[source]

Coerce a dataclass object to a dict.

Return type:dict