+
    [«Ñg+  ã                   óP   € ^ RI Ht  ! R R]4      t ! R R4      t ! R R4      tR# )	é    )ÚEnumc                   ó&   € ] tR t^tRt^t^t^tRtR# )ÚQueryPresencezBDefines possible behaviours for the term's presence in a document.© N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚOPTIONALÚREQUIREDÚ
PROHIBITEDÚ__static_attributes__r   ó    Ú,/usr/lib/python3/dist-packages/lunr/query.pyr   r      s   † ÙLà€HØ€HØ„Jr   r   c                   óR   a € ] tR t^t o RtRt^ t^t^tR t	R t
R tR tR tRtV tR	# )
ÚQueryzóA `lunr.Query` provides a programmatic way of defining queries to be
performed against a `lunr.Index`.

Prefer constructing a `lunr.Query` using `the lunr.Index.query` method
so the query object is pre-initialized with the right index fields.
Ú*c                ó    € . V n         Wn        R # ©N)ÚclausesÚ
all_fields)Úselfr   s   &&r   Ú__init__ÚQuery.__init__   s   € ØˆŒØ$Žr   c                ó˜   € R P                  RP                  V P                  4      RP                  R V P                   4       4      4      # )z <Query fields="{}" clauses="{}">Ú,c              3   ó8   "  € T F  qP                   x € K  	  R # 5ir   )Úterm)Ú.0Úcs   & r   Ú	<genexpr>Ú!Query.__repr__.<locals>.<genexpr>%   s   é € Ð/MÁ¸1·¶Ãùs   ‚)ÚformatÚjoinr   r   ©r   s   &r   Ú__repr__ÚQuery.__repr__#   s:   € Ø1×8Ñ8Ø�H‰H�T—_‘_Ó% s§x¡xÑ/MÀÇÂÓ/MÓ'Mó
ð 	
r   c                óÂ  € V'       d(   \        V^ ,          \        4      '       d   V^ ,          pM\        V/ VB pVP                  '       g   V P                  Vn        VP                  \
        P                  ,          '       dM   VP                  ^ ,          \
        P                  8w  d'   \
        P                  VP                  ,           Vn        VP                  \
        P                  ,          '       dM   VP                  R,          \
        P                  8w  d'   VP                  \
        P                  ,           Vn        V P                  P                  V4       V # )a_  Adds a `lunr.Clause` to this query.

Unless the clause contains the fields to be matched all fields will be
matched. In addition a default boost of 1 is applied to the clause.

If the first argument is a `lunr.Clause` it will be mutated and added,
otherwise args and kwargs will be used in the constructor.

Returns:
    lunr.Query: The Query itself.
éÿÿÿÿ)Ú
isinstanceÚClauseÚfieldsr   Úwildcardr   ÚWILDCARD_LEADINGr   ÚWILDCARDÚWILDCARD_TRAILINGr   Úappend)r   ÚargsÚkwargsÚclauses   &*, r   r5   ÚQuery.clause(   sÔ   € ÷ ”J˜t A�w¬×/Ò/Ø˜!•W‰Fä˜TÐ, VÑ,ˆFà�}�}ˆ}Ø ŸO™OˆFŒMà�O‰Oœe×4Ñ4×4Ô4Ø�K‰K˜�NœeŸn™nÔ,äŸ.™.¨6¯;©;Õ6ˆFŒKà�O‰Oœe×5Ñ5×5Ô5Ø�K‰K˜�OœuŸ~™~Ô-à Ÿ+™+¬¯©Õ6ˆFŒKà�‰×Ñ˜FÔ#Øˆr   c                ó²   € \        V\        \        34      '       d   V F  pV P                  ! V3/ VB  K  	  V # V P                  ! \        V4      3/ VB  V # )a¸  Adds a term to the current query, creating a Clause and adds it to
the list of clauses making up this Query.

The term is not tokenized and used "as is". Any conversion to token
or token-like strings should be performed before calling this method.

For example:
    query.term(lunr.Tokenizer("foo bar"))

Args:
    term (Token or iterable): Token or iterable of tokens to add.
    kwargs (dict): Additional properties to add to the Clause.
)r+   ÚlistÚtupler   r5   Ústr)r   r   r4   Úts   &&, r   r   Ú
Query.termI   sS   € ô �dœT¤5˜M×*Ò*Û�Ø—	’	˜!Ñ&˜vÔ&ñ ð
 ˆð �KŠKœ˜D›	Ñ, VÒ,àˆr   c                ó’   € \         ;QJ d&    R V P                   4       F  '       d   K   R# 	  R# ! R V P                   4       4      # )z™A negated query is one in which every clause has a presence of
prohibited. These queries require some special processing to return
the expected results.
c              3   óZ   "  € T F!  qP                   \        P                  8H  x € K#  	  R # 5ir   )Úpresencer   r   )r    r5   s   & r   r"   Ú#Query.is_negated.<locals>.<genexpr>d   s    é € ð 
ÙFR¸F�O‰Oœ}×7Ñ7Ö7Ãlùs   ‚)+FT)Úallr   r&   s   &r   Ú
is_negatedÚQuery.is_negated_   sG   € ÷
 ‹sñ 
ØFJÇlÂló
�sŒsð 	
Šsð 	
ˆsñ 
ØFJÇlÂló
ó 
ð 	
r   )r   r   N)r   r   r	   r
   r   r0   ÚWILDCARD_NONEr/   r1   r   r'   r5   r   rB   r   Ú__classdictcell__)Ú__classdict__s   @r   r   r      sA   ø‡ € ñð €HØ€MØÐØÐò%ò
ò
òB÷,
ð 
r   r   c                   óv   a a€ ] tR t^it oRtRR^ R^]P                  ]P                  3V 3R llt	R t
RtVtV ;t# )r,   a.  A single clause in a `lunr.Query` contains a term and details on
how to match that term against a `lunr.Index`

Args:
    term (str, optional): The term for the clause.
    field (iterable, optional): The fields for the term to be searched
        against.
    edit_distance (int, optional): The character distance to use, defaults
        to 0.
    use_pipeline (bool, optional): Whether the clause should be pre
        processed by the index's pipeline, default to True.
    boost (int, optional): Boost to apply to the clause, defaults to 1.
    wildcard (Query.WILDCARD_*, optional): Any of the Query.WILDCARD
        constants defining if a wildcard is to be used and how, defaults
        to Query.WILDCARD_NONE.
    presence (QueryPresence, optional): Behaviour for a terms presence
        in a document.
NTc                óŽ   <€ \         SV `  4        Wn        T;'       g    . V n        W0n        W@n        WPn        W`n        Wpn        R # r   )	Úsuperr   r   r-   Úedit_distanceÚuse_pipelineÚboostr.   r?   )	r   r   r-   rJ   rK   rL   r.   r?   Ú	__class__s	   &&&&&&&&€r   r   ÚClause.__init__}   s=   ø€ ô 	‰ÑÔØŒ	Ø—l�l ˆŒØ*ÔØ(ÔØŒ
Ø ŒØ Žr   c                ó8   € R P                  V P                  4      # )z<Clause term="{}">)r$   r   r&   s   &r   r'   ÚClause.__repr__�   s   € Ø#×*Ñ*¨4¯9©9Ó5Ð5r   )rL   rJ   r-   r?   r   rK   r.   )r   r   r	   r
   r   r   rD   r   r   r   r'   r   rE   Ú__classcell__)rM   rF   s   @@r   r,   r,   i   s<   ù‡ € ñð* ØØØØØ×$Ñ$Ø×'Ñ'÷!÷&6ò 6r   r,   N)Úenumr   r   r   r,   r   r   r   Ú<module>rS      s+   ðÝ ô�Dô ÷Z
ñ Z
÷z(6ó (6r   