PIF Query¶
Extraction Sort¶
-
class
citrination_client.search.pif.query.extraction_sort.ExtractionSort(key=None, order=None, **kwargs)¶ Bases:
pypif.util.serializable.SerializableClass to store information about a sort on an extracted field.
-
__init__(key=None, order=None, **kwargs)¶ Constructor.
- Parameters
key – String with the key that will be sorted on.
order – The order to use. Either ASCENDING or DESCENDING.
-
key¶
-
order¶
-
PIF System Query¶
-
class
citrination_client.search.pif.query.pif_system_query.PifSystemQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, uid=None, updated_at=None, names=None, ids=None, classifications=None, source=None, quantity=None, chemical_formula=None, composition=None, properties=None, preparation=None, references=None, sub_systems=None, query=None, **kwargs)¶ Bases:
citrination_client.search.pif.query.core.base_object_query.BaseObjectQueryClass to store information about a PIF query.
-
__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, uid=None, updated_at=None, names=None, ids=None, classifications=None, source=None, quantity=None, chemical_formula=None, composition=None, properties=None, preparation=None, references=None, sub_systems=None, query=None, **kwargs)¶ Constructor.
- Parameters
logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.
weight – Weight of the query.
simple – String with the simple search to run against all fields.
simple_weight – Dictionary of relative paths to their weights for simple queries.
extract_as – String with the alias to save this field under.
extract_all – Boolean setting whether all values in an array should be extracted.
extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).
tags – One or more
FieldQueryoperations against the tags field.length – One or more
FieldQueryoperations against the length field.offset – One or more
FieldQueryoperations against the offset field.uid – One or more
Filterobjects with the filters against the uid field.updated_at – One or more
Filterobjects with filters against the time that the PIF record was last updated.names – One or more
FieldQueryobjects with queries against the names field.ids – One or more
IdQueryobjects with queries against the ids field.classifications – One or more
ClassificationQueryobjects with queries against the classifications field.source – One or more
SourceQueryobjects with queries against the source field.quantity – One or more
QuantityQueryobjects with queries against the quantity field.chemical_formula – One or more
ChemicalFieldQueryobjects with queries against the chemicalFormula field.composition – One or more
CompositionQueryobjects with queries against the composition field.properties – One or more
PropertyQueryobjects with queries against the properties field.preparation – One or more
ProcessStepQueryobjects with queries against the preparation field.references – One or more
ReferenceQueryobjects with queries against the references field.sub_systems – One or more
PifSystemQueryobjects with queries against the subSystems field.query – One or more
PifSystemQueryobjects with nested queries.
-
chemical_formula¶
-
classifications¶
-
composition¶
-
ids¶
-
names¶
-
preparation¶
-
properties¶
-
quantity¶
-
query¶
-
references¶
-
source¶
-
sub_systems¶
-
uid¶
-
updated_at¶
-
PIF System Returning Query¶
-
class
citrination_client.search.pif.query.pif_system_returning_query.PifSystemReturningQuery(query=None, extraction_sort=None, from_index=None, size=None, random_results=None, random_seed=None, score_relevance=None, return_max_score=None, timeout=None, return_system=None, add_latex=None, return_extracted_path=None, unwrap_single_value_extractions=None, **kwargs)¶ Bases:
citrination_client.search.core.query.base_returning_query.BaseReturningQueryQuery used to return information about PIFs. Citrination does not support pagination past the 50,000th result. Please chose values for from_index and size that do not exceed this limit
-
__init__(query=None, extraction_sort=None, from_index=None, size=None, random_results=None, random_seed=None, score_relevance=None, return_max_score=None, timeout=None, return_system=None, add_latex=None, return_extracted_path=None, unwrap_single_value_extractions=None, **kwargs)¶ Constructor.
- Parameters
query – One or more
DataQueryobjects with the queries to run.extraction_sort – A single
ExtractionSortobject for sorting.from_index – Index of the first hit that should be returned.
size – Total number of hits the should be returned.
random_results – Whether to return a random set of records.
random_seed – The random seed to use.
score_relevance – Whether to use relevance scoring.
return_max_score – Whether to return the maximum score.
timeout – The number of milliseconds to wait for the query to execute.
return_system – Whether to return the matched PIF systems.
add_latex – Whether to add latex formatting where possible in results.
return_extracted_path – Whether to return the path in PIFs for extracted values.
unwrap_single_value_extractions – Whether to unwrap extracted values when they are lists with one value.
-
add_latex¶
-
extraction_sort¶
-
return_extracted_path¶
-
return_system¶
-
unwrap_single_value_extractions¶
-