
    5j              !           S SK JrJr  SSKJr  SSKJr  SSKJr  \(       a
  S SK	r
SSKJ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SS4 S jjrg)    )TYPE_CHECKINGUnion   )content)OptStr)ViewsN)ExtendedParams
      queryviewfilterorder_byboostselecttopskipgroup_bygroup_countfeaturesscopeterms
navigatorsextended_paramsr	   returnzpd.DataFramec                     [         R                  R                  U UUUUUUUUU	UU
UUUS9R                  5       R                  R
                  $ )a  
The search service identifies a matching set of documents which satisfy the caller's criteria, sorts it,
and selects a subset of the matches to return as the result set. Each step can be controlled via parameters.

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.
    Example: "HullType"

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
--------
>>> import lseg.data as ld
>>> df1 = ld.discovery.search(query="cfo", view=ld.discovery.Views.PEOPLE)
>>> # What's the general distribution of earnings per share in the 0-20 range using fixed-value-width bucket ranges?
>>> df2 = ld.discovery.search(
...     view=ld.discovery.Views.EQUITY_QUOTES,
...     top=0,
...     filter="Eps gt 0 and Eps lt 20",
...     navigators="Eps(type:histogram,buckets:4)"
... )
>>> # Top ten currencies for govcorp bonds, ranked by total outstanding value, along with the maximum coupon of each.
>>> df3 = ld.discovery.search(
...     view=ld.discovery.Views.GOV_CORP_INSTRUMENTS,
...     top=0,
...     navigators="Currency(buckets:10,desc:sum_FaceOutstandingUSD,calc:max_CouponRate)"
... )
)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   search
Definitionget_datadatadf)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s                  Z/root/lseg-credit/backend/venv/lib/python3.13/site-packages/lseg/data/discovery/_search.pyr   r      s`    L 	!!#!+ 	" 	
" 
	bb'    )typingr   r    r   _typesr   content.searchr   pandaspdr	   
SEARCH_ALLstrintr    r#   r"   <module>r.      s
   '   "' #..(,yy
s

y y 	y
 y y 
y y y y y y y y &y  !yr#   