
    5j$                         S SK JrJr  SSKJr  SSKJr  SSKJr  SSK	J
r
Jr  SSKJrJr  \(       a  SS	KJr   " S
 S\\\      5      rg)    )TYPE_CHECKINGUnion   )
SearchData)Views   )ContentType)create_reprvalidate_types)DataProviderLayerResponse)ExtendedParamsc                      ^  \ rS rSrSrS\R                  SSSSSSSSSSSSS4S\S\\\4   S	\S
\S\S\S\	S\	S\S\	S\S\S\S\SS4U 4S jjjr
S rSrU =r$ )
Definition   a  
This class describe parameters to retrieve data for search.

Parameters
----------
query: str, optional
    Keyword argument for view

view: Views or str, optional
    The view for searching see at Views enum.
    Default: Views.SEARCH_ALL

filter: str, optional
    Where query is for unstructured end-user-oriented restriction, filter is for
    structured programmatic restriction.

order_by: str, optional
    Defines the order in which matching documents should be returned.

boost: str, optional
    This argument supports exactly the same predicate expression syntax as filter,
    but where filter restricts which documents are matched at all,
    boost just applies a large scoring boost to documents it matches,
    which will almost always guarantee that they appear at the top of the results.

select: str, optional
    A comma-separated list of the properties of a document to be returned in the response.

top: int, optional
    the maximum number of documents to retrieve. Must be non-negative.
    default: 10

skip: int, optional
    The number of documents to skip in the sorted result set before returning the
    next top.

group_by: str, optional
    If specified, this must name a single Groupable property.
    returned documents are grouped into buckets based on their value for this
    property.

group_count: str, optional
    When supplied in combination with group_by, sets the maximum number of documents
    to be returned per bucket.
    default: 3

navigators: str, optional
    This can name one or more properties, separated by commas, each of which must
    be Navigable.

features: str, optional
    Comma-separated list of flags, typically niche or experimental things which most callers won't want

scope: str, optional
    Name of a `Symbol` property against which `Terms` will be matched
    Example: "RIC"

terms: str, optional
    Comma-separated list of up to 5000 symbols to be matched against the `Scope` property
    Example": "A,B,C,D"

extended_params : dict, optional
    Other parameters can be provided if necessary

Examples
--------
>>> from lseg.data.content import search
>>> definition = search.Definition(query="cfo", view=search.Views.PEOPLE)
N
   r   r   queryviewfilterorder_byboostselecttopskipgroup_bygroup_count
navigatorsfeaturesscopetermsextended_paramsr   c                   > [        U
[        /S5        [        U[        /S5        [        U[        /S5        Xl        X l        XPl        Xl        X0l        Xl        Xl        Xl	        X@l
        Xl        X`l        Xl        Xl        Xpl        Xl        ["        TU ]I  [&        R(                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  U R
                  U R                  U R                  U R                   S9  g )Nr   r   r   )	data_typer   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   )r   int_query_view_boost	_features_filter	_group_by_group_count_navigators	_order_by_scope_select_skip_terms_top_extended_paramssuper__init__r	   DISCOVERY_SEARCH)selfr   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   	__class__s                   c/root/lseg-credit/backend/venv/lib/python3.13/site-packages/lseg/data/content/search/_definition.pyr5   Definition.__init__T   s   $ 	{SE=9tcUF+sSE5)
!!'%!
	 /!22++<<^^++<<		^^))''^^++++ 11! 	 	
    c                 2    [        U SU R                   S3S9$ )Nz{query='z'})content)r
   r%   )r7   s    r9   __repr__Definition.__repr__   s    49T[[M)EFFr;   )r'   r3   r(   r)   r*   r+   r,   r-   r%   r.   r/   r0   r1   r2   r&   )__name__
__module____qualname____firstlineno____doc__r   
SEARCH_ALLstrr   r$   r5   r>   __static_attributes____classcell__)r8   s   @r9   r   r      s    DP "'"2"2,0!7
7
 E3J7
 	7

 7
 7
 7
 7
 7
 7
 7
 7
 7
 7
 7
  *!7
 7
rG Gr;   r   N)typingr   r   _data_providerr   _viewsr   _content_typer	   _toolsr
   r   delivery._data._data_providerr   r   _typesr   r    r;   r9   <module>rQ      s8    ' &  ( 1 H(AG"8J#78 AGr;   