o
    hN                     @   s  d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
mZ d dlmZ ddlmZ zd d	lmZ d d
lmZ d dlmZ W n eyS   dZY nw edkZer_ddiZndddiiZeed  dkdG dd deeZeed  dkdG dd deZeed  dkdG dd deZeed  dkdG dd deZeed  dkdG dd deZeed  dkde dG dd deZ!dS )     N)mock)Q)TestCase)	MATCH_ALLFuzzyPhrase)models   )%ElasticsearchCommonSearchBackendTests)VERSION)JSONSerializer)Elasticsearch7SearchBackend)r   r   r   )      queryQUERYbodyr   zElasticsearch 7 requiredc                   @   s   e Zd ZdZdS )TestElasticsearch7SearchBackendz&wagtail.search.backends.elasticsearch7N)__name__
__module____qualname__backend_path r   r   p/var/www/html/ndineBlogger/venv/lib/python3.10/site-packages/wagtail/search/tests/test_elasticsearch7_backend.pyr   !   s    r   c                       sD  e Zd ZdZdd Ze fddZdd Zdd	 Zd
d Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zd(d) Zd*d+ Zd,d- Zd.d/ Zd0d1 Zd2d3 Zd4d5 Zd6d7 Zd8d9 Z d:d; Z!d<d= Z"d>d? Z#d@dA Z$dBdC Z%dDdE Z&dFdG Z'dHdI Z(dJdK Z)  Z*S )LTestElasticsearch7SearchQueryNc                 C   0   t  j}| tj|d|dtj|d|d d S NT)	sort_keysdefaultr   r   assertEqualjsondumpsselfabr   r   r   r   assertDictEqual*   
   z-TestElasticsearch7SearchQuery.assertDictEqualc                    s   t    tj| _tj| _d S N)super
setUpClassr   query_compiler_class!autocomplete_query_compiler_class)cls	__class__r   r   r+   1   s   
z(TestElasticsearch7SearchQuery.setUpClassc                 C   sL   |  tjj d}ddddiidddgdd	id
i}| | | d S )NHelloboolmatchcontent_typesearchtests.Bookmulti_match	_all_text_all_text_boost_2_0^2.0fieldsr   filtermustr,   r   Bookobjectsallr'   	get_queryr$   r   expected_resultr   r   r   test_simple9   s   
z)TestElasticsearch7SearchQuery.test_simplec                 C   sJ   |  tjj d}ddddiiddddiiidi}| | | d S )	Nr1   r2   r3   r4   r5   _edgengramsr   r;   )r-   r   r?   r@   rA   r'   rB   rC   r   r   r   test_simple_autocompleteN   s   
z6TestElasticsearch7SearchQuery.test_simple_autocompletec                 C   B   |  tjj t}ddddiidi idi}| | | d S Nr2   r3   r4   r5   	match_allr;   )r-   r   r?   r@   rA   r   r'   rB   rC   r   r   r   test_match_all_autocompletec   s   
z9TestElasticsearch7SearchQuery.test_match_all_autocompletec                 C   sP   |  tjj td}| t |  W d    d S 1 s!w   Y  d S )Nr1   )	r-   r   r?   r@   rA   r   assertRaisesNotImplementedErrorrB   )r$   r   r   r   r   'test_non_supported_queries_autocompleter   s   
"zETestElasticsearch7SearchQuery.test_non_supported_queries_autocompletec                 C   rH   rI   )r,   r   r?   r@   rA   r   r'   rB   rC   r   r   r   test_none_query_string|   s   
z4TestElasticsearch7SearchQuery.test_none_query_stringc                 C   sR   | j tjj ddd}ddddiidd	d
gdddidi}| | | d S )Nr1   andoperatorr2   r3   r4   r5   r6   r7   r8   r:   r   rR   r;   r>   rC   r   r   r   test_and_operator   s    
z/TestElasticsearch7SearchQuery.test_and_operatorc                 C   \   |  tjjjddd}ddddiidd	diigd
ddgddidi}| | | d S )NTesttitler1   r2   r3   r4   r5   termtitle_filterr6   r7   r8   r9   r;   r,   r   r?   r@   r<   r'   rB   rC   r   r   r   test_filter   "   

z)TestElasticsearch7SearchQuery.test_filterc              	   C   s   |  tjjjdtddddd}ddd	d
iidddddiidddiigiigdddgddidi}| }|d d d d d }t|dd d|d d < | 	|| d S )NrV     
      )rX   publication_dater1   r2   r3   r4   r5   r=   rY   publication_date_filter
2017-10-18rZ   r6   r7   r8   r9   r;   r<   r	   c                 S      t | d  d S NrY   r   listkeysfr   r   r   <lambda>       z?TestElasticsearch7SearchQuery.test_and_filter.<locals>.<lambda>key)
r,   r   r?   r@   r<   datetimedaterB   sortedr'   )r$   r   rD   field_filtersr   r   r   test_and_filter   s>   	


z-TestElasticsearch7SearchQuery.test_and_filterc                 C   s   |  tjjtddttddddB d}| }|d d	 d
 d d }t	|dd d|d d < ddddiidddddiidddiigiigdddgddidi}| 
|| d S )NrV   rW   r^   r_   r`   ra   r1   r2   r<   r	   shouldc                 S   rd   re   rf   ri   r   r   r   rk      rl   z>TestElasticsearch7SearchQuery.test_or_filter.<locals>.<lambda>rm   r3   r4   r5   rY   rb   rc   rZ   r6   r7   r8   r9   r;   )r,   r   r?   r@   r<   r   ro   rp   rB   rq   r'   )r$   r   rr   rD   r   r   r   test_or_filter   s>   


z,TestElasticsearch7SearchQuery.test_or_filterc                 C   sn   |  tjjjtddddd}dddd	iidd
dddiiiigdddgddidi}| | | d S )Nr^   r_   r`   rt   r1   r2   r3   r4   r5   mustNotrY   rb   rc   r6   r7   r8   r9   r;   )	r,   r   r?   r@   excludero   rp   r'   rB   rC   r   r   r   test_negated_filter  s.   
z1TestElasticsearch7SearchQuery.test_negated_filterc                 C   sR   | j tjj ddgd}ddddiiddddd	iid
i}| | | d S )Nr1   rX   r:   r2   r3   r4   r5          @r   boostr;   r>   rC   r   r   r   test_fields3  s   
z)TestElasticsearch7SearchQuery.test_fieldsc                 C   sV   | j tjj ddgdd}ddddiidddd	dd
iidi}| | | d S )Nr1   rX   rP   r:   rR   r2   r3   r4   r5   r{   )r   r}   rR   r;   r>   rC   r   r   r   test_fields_with_and_operatorI  s    
z;TestElasticsearch7SearchQuery.test_fields_with_and_operatorc                 C   sT   | j tjj dddgd}ddddiid	d
dgddidi}| | | d S )Nr1   rX   summaryrz   r2   r3   r4   r5   r6   	title^2.0r9   r;   r>   rC   r   r   r   test_multiple_fields`  s   
z2TestElasticsearch7SearchQuery.test_multiple_fieldsc                 C   sX   | j tjj dddgdd}dddd	iid
ddgdddidi}| | | d S )Nr1   rX   r   rP   r   r2   r3   r4   r5   r6   r   rS   r;   r>   rC   r   r   r   &test_multiple_fields_with_and_operatorw  s&   
	
zDTestElasticsearch7SearchQuery.test_multiple_fields_with_and_operatorc                 C   rU   )NrV   )title__exactr1   r2   r3   r4   r5   rY   rZ   r6   r7   r8   r9   r;   r[   rC   r   r   r   test_exact_lookup  r]   z/TestElasticsearch7SearchQuery.test_exact_lookupc                 C   sd   |  tjjjd dd}ddddiidddd	d
iiiigdddgddidi}| | | d S )NrW   r1   r2   r3   r4   r5   rw   existsfieldrZ   r6   r7   r8   r9   r;   r[   rC   r   r   r   test_none_lookup  "   
z.TestElasticsearch7SearchQuery.test_none_lookupc                 C   sd   |  tjjjddd}ddddiiddd	d
diiiigdddgddidi}| | | d S )NTtitle__isnullr1   r2   r3   r4   r5   rw   r   r   rZ   r6   r7   r8   r9   r;   r[   rC   r   r   r   test_isnull_true_lookup  r   z5TestElasticsearch7SearchQuery.test_isnull_true_lookupc                 C   s\   |  tjjjddd}ddddiidd	d
iigdddgddidi}| | | d S )NFr   r1   r2   r3   r4   r5   r   r   rZ   r6   r7   r8   r9   r;   r[   rC   r   r   r   test_isnull_false_lookup  r]   z6TestElasticsearch7SearchQuery.test_isnull_false_lookupc                 C   rU   )NrV   )title__startswithr1   r2   r3   r4   r5   prefixrZ   r6   r7   r8   r9   r;   r[   rC   r   r   r   test_startswith_lookup  r]   z4TestElasticsearch7SearchQuery.test_startswith_lookupc                 C   j   |  tjjjtddddd}dddd	iid
dddiiigdddgddidi}| | | d S )N        )publication_date__gtr1   r2   r3   r4   r5   rangerb   gt
2014-04-29r6   r7   r8   r9   r;   r,   r   r?   r@   r<   ro   r'   rB   rC   r   r   r   test_gt_lookup  s(   	
z,TestElasticsearch7SearchQuery.test_gt_lookupc                 C   r   )Nr   r   r   )publication_date__ltr1   r2   r3   r4   r5   r   rb   ltr   r6   r7   r8   r9   r;   r   rC   r   r   r   test_lt_lookup3  (   	
z,TestElasticsearch7SearchQuery.test_lt_lookupc                 C   r   )Nr   r   r   )publication_date__gter1   r2   r3   r4   r5   r   rb   gter   r6   r7   r8   r9   r;   r   rC   r   r   r   test_gte_lookupP  r   z-TestElasticsearch7SearchQuery.test_gte_lookupc                 C   r   )Nr   r   r   )publication_date__lter1   r2   r3   r4   r5   r   rb   lter   r6   r7   r8   r9   r;   r   rC   r   r   r   test_lte_lookupm  r   z-TestElasticsearch7SearchQuery.test_lte_lookupc                 C   s   t  ddd}t  ddd}| tjjj||fdd}dd	d
diidddddiigdddgddidi}| | | d S )Nr   r   r         )publication_date__ranger1   r2   r3   r4   r5   r   rb   r   z
2014-08-19)r   r   r6   r7   r8   r9   r;   )ro   r,   r   r?   r@   r<   r'   rB   )r$   
start_dateend_dater   rD   r   r   r   test_range_lookup  s4   
z/TestElasticsearch7SearchQuery.test_range_lookupc                 C   8   | j tjjdddd}ddig}| | | d S )Nra   r1   Forder_by_relevancerb   ascr,   r   r?   r@   order_byr'   get_sortrC   r   r   r   test_custom_ordering     
z2TestElasticsearch7SearchQuery.test_custom_orderingc                 C   r   )Nz-publication_dater1   Fr   rb   descr   rC   r   r   r   test_custom_ordering_reversed  r   z;TestElasticsearch7SearchQuery.test_custom_ordering_reversedc                 C   s@   | j tjjddddd}ddiddig}| | | d S )	Nra   number_of_pagesr1   Fr   rb   r   number_of_pages_filterr   rC   r   r   r   test_custom_ordering_multiple  s   z;TestElasticsearch7SearchQuery.test_custom_ordering_multiplec                 C   @   |  tjj td}dddgdddi}| | | d S )NHello worldr6   r7   r8   phrase)r:   r   typer,   r   r?   r@   rA   r   r'   get_inner_queryr$   query_compilerrD   r   r   r   test_phrase_query  s   
z/TestElasticsearch7SearchQuery.test_phrase_queryc                 C   sH   | j tjj tdddgd}ddddgddi}| | | d S )	Nr   rX   r   rz   r6   r   r   )r   r:   r   r   r   r   r   r   !test_phrase_query_multiple_fields  s   

z?TestElasticsearch7SearchQuery.test_phrase_query_multiple_fieldsc                 C   sD   | j tjj tddgd}dddddii}| | | d S )Nr   rX   rz   match_phraser{   r|   r   r   r   r   r   test_phrase_query_single_field  s   z<TestElasticsearch7SearchQuery.test_phrase_query_single_fieldc                 C   r   )Nr   r6   r7   r8   AUTOr:   r   	fuzzinessr,   r   r?   r@   rA   r   r'   r   r   r   r   r   test_fuzzy_query  s   

z.TestElasticsearch7SearchQuery.test_fuzzy_queryc                 C   sF   | j tjj tddgd}ddddddii}| | | d S )Nr   rX   rz   r3   r   r{   )r   r   r}   r   r   r   r   r   test_fuzzy_query_single_field#  s   
	z;TestElasticsearch7SearchQuery.test_fuzzy_query_single_fieldc                 C   sH   | j tjj tdddgd}dddgdddi}| | | d S )	Nr   rX   r   rz   r6   r   r   r   r   r   r   r   r    test_fuzzy_query_multiple_fields7  s   

z>TestElasticsearch7SearchQuery.test_fuzzy_query_multiple_fieldsc                 C   sF   |  tjj tddd}dddgddddi}| | | d S )	Nr   rP   rQ   r6   r7   r8   r   )r:   r   r   rR   r   r   r   r   r   test_fuzzy_query_with_operatorK  s   

z<TestElasticsearch7SearchQuery.test_fuzzy_query_with_operatorc                 C   s`   |  tjjjddd}ddddiidd	d
diiigdddgddidi}| | | d S )Nil  )publication_date__year__ltr1   r2   r3   r4   r5   r   rb   r   z
1900-01-01r6   r7   r8   r9   r;   r[   r   r   r   r   test_year_filter`  s"   
z.TestElasticsearch7SearchQuery.test_year_filter)+r   r   r   maxDiffr'   classmethodr+   rE   rG   rK   rN   rO   rT   r\   rs   rv   ry   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   __classcell__r   r   r/   r   r   &   sP    
,+!%r   c                   @   s   e Zd ZdgZdd Zdd Zdd Zedd	d
 Z	eddd Z
eddd Zeddd Zeddd Zeddd Zeddd Zeddd Zeddd Zeddd Zeddd ZdS ) TestElasticsearch7SearchResultssearchc                 C   s&   t  j}| tj|d|dtj d S r   r   r#   r   r   r   r'     s   z/TestElasticsearch7SearchResults.assertDictEqualc                 C   s:   t i }t }tjj |_d|j_	d |j
_	|||S )Nr   )r   r   	MagicMockr   r?   r@   rA   querysetrB   return_valuer   results_class)r$   backendr   r   r   r   get_results  s   z+TestElasticsearch7SearchResults.get_resultsc                 C   s,   dddddd |D dt |ddd	d
S )Nr      )failed
successfultotalc              	   S   s.   g | ]}d t | ddddt |gidqS )zsearchtests_book:wagtailr	   searchtests_bookpk)_id_index_score_typer:   )str).0resultr   r   r   
<listcomp>  s    


zMTestElasticsearch7SearchResults.construct_search_response.<locals>.<listcomp>r	   )hits	max_scorer   F   )_shardsr   	timed_outtook)len)r$   resultsr   r   r   construct_search_response  s   

z9TestElasticsearch7SearchResults.construct_search_responsez"elasticsearch.Elasticsearch.searchc                 C   s<   |  g |_|  }t| |jdddddddt d S )NFr   wagtail__searchtests_book2md   )_sourcestored_fieldsindexscrollsizer   r   r   r   rg   assert_any_callsearch_query_kwargsr$   r   r   r   r   r   test_basic_search  s   
z1TestElasticsearch7SearchResults.test_basic_searchc                 C   s>   |  dg|_|  }|d  |jdddddddt d S )Nr	   r_   Fr   r   from_r   r   r   r   r   r   r   r   r   r   r   r   r   r   test_get_single_item  s   
z4TestElasticsearch7SearchResults.test_get_single_itemc                 C   sD   |  g |_|  dd }t| |jdddddddt d S )	Nr	   r   Fr   r      r   r   r   r   r   r   r   test_slice_results  s   
z2TestElasticsearch7SearchResults.test_slice_resultsc                 C   sL   |  g |_|  dd  d d }t| |jdddddddt d S )Nr_   Fr   r   r   r   r   r   r   r   r   !test_slice_results_multiple_times  s   
zATestElasticsearch7SearchResults.test_slice_results_multiple_timesc                 C   sF   |  dg|_|  dd  }|d  |jdddddddt d S )	Nr	   r_      Fr   r   r   r   r  r   r   r   r   test_slice_results_and_get_item  s   
z?TestElasticsearch7SearchResults.test_slice_results_and_get_itemc                 C   s6   |  dg|_|  }| |d tjjjdd d S )Nr	   r   id)r   r   r   r    r   r?   r@   getr   r   r   r   test_result_returned  s    z4TestElasticsearch7SearchResults.test_result_returnedc                 C   s*   |  dg|_|  }| t|d d S )Nr	   r   r   r   r    r   r   r   r   r   
test_len_1  s   z*TestElasticsearch7SearchResults.test_len_1c                 C   s,   |  ddg|_|  }| t|d d S )Nr	   r   r  r   r   r   r   
test_len_2  s   z*TestElasticsearch7SearchResults.test_len_2c                 C   sh   |  ddg|_t|  }| t|d | |d tjjj	dd | |d tjjj	dd d S )Nr	   r   r   r	  )
r   r   rg   r   r    r   r   r?   r@   r  r   r   r   r   test_duplicate_results	  s    z6TestElasticsearch7SearchResults.test_duplicate_resultsc                 C   st   |  g d|_t|  }| |d tjjjdd | |d tjjjdd | |d tjjjdd d S )N)r	   r   r  r   r	   r	  r   r  	r   r   rg   r   r    r   r?   r@   r  r   r   r   r   test_result_order      z1TestElasticsearch7SearchResults.test_result_orderc                 C   st   |  g d|_t|  }| |d tjjjdd | |d tjjjdd | |d tjjjdd d S )N)r  r   r	   r   r  r	  r	   r   r  r   r   r   r   test_result_order_2  r  z3TestElasticsearch7SearchResults.test_result_order_2N)r   r   r   fixturesr'   r   r   r   patchr   r  r  r  r  r  r  r  r  r  r  r   r   r   r   r   {  s6    











r   c                   @   F   e Zd ZdgZdZdd Zdd Zdd Zd	d
 Zdd Z	dd Z
dS )TestElasticsearch7Mappingr   Nc                 C   r   r   r   r#   r   r   r   r'   1  r(   z)TestElasticsearch7Mapping.assertDictEqualc                 C   $   t tj| _tjjjdd| _d S Nr   r	  )r   mapping_classr   r?   
es_mappingr@   r  objr$   r   r   r   setUp8  s   zTestElasticsearch7Mapping.setUpc                 C      |  | j d d S Ndocr    r  get_document_typer  r   r   r   test_get_document_type?     z0TestElasticsearch7Mapping.test_get_document_typec                 C   s   | j  }ddddddiddiddidddd	dd
dgdddddddiddd
ddddd	ddiddddiddid
ddddiddd
dddiddddidi}| || d S )N
propertieskeywordTr   storer   textedgengram_analyzerstandardanalyzersearch_analyzerr   r7   _all_text_boost_2_0r   copy_tor   r/  r0  nestedrp   namename_edgengramsdate_of_birth_filterr   r'  integerr3  r   r7  slug_filter)r   r4   r7   r1  rF   rX   title_edgengramsrZ   authorsauthors_filterrb   r   r   tagstags_filterr  get_mappingr'   r$   mappingrD   r   r   r   test_get_mappingB  sP   
0z*TestElasticsearch7Mapping.test_get_mappingc                 C   "   |  | j| jt| jj d S r)   r    r  get_document_idr  r   r   r  r   r   r   test_get_document_idy  s   "z.TestElasticsearch7Mapping.test_get_document_idc                 C   sx   | j | j}d|v r|d   ddgddgdddddtdddd	gd
gtdddddg g d}| || d S )NrF   4r5   J. R. R. TolkienThe Fellowship of the Ringd  r	   r  r6  r     r   r      )r   r4   rF   rX   r?  rZ   r@  rA  rb   r   r   rB  rC  r  get_documentr  sortro   rp   r'   r$   documentrD   r   r   r   test_get_document|  s0   z+TestElasticsearch7Mapping.test_get_documentr   r   r   r  r   r'   r  r%  rH  rL  rY  r   r   r   r   r  +  s    7r  c                   @   r  )$TestElasticsearch7MappingInheritancer   Nc                 C   r   r   r   r#   r   r   r   r'     r(   z4TestElasticsearch7MappingInheritance.assertDictEqualc                 C   r  r  )r   r  r   Novelr  r@   r  r  r  r   r   r   r    s   z*TestElasticsearch7MappingInheritance.setUpc                 C   r   r!  r#  r  r   r   r   r%    r&  z;TestElasticsearch7MappingInheritance.test_get_document_typec              	   C   s\  | j  }di ddddddddd	d
ddddgdddidddddiddddddgdiddddddddidddidddidddidddidddddddddgdddddd	dddid dddddddddd!id"dd#ddidd!iddiddd$ddddddid%dddid&i}| || d S )'Nr'  searchtests_novel__settingr+  r7   r2  %searchtests_novel__setting_edgengramsr,  r-  r4  searchtests_novel__protagonistr5  _all_text_boost_0_5r   r;  r7  novel_id_filterr:  (searchtests_novel__protagonist_id_filtersearchtests_novel__charactersr7  _all_text_boost_0_25r   r(  Tr)  r4   r1  rF   r.  rX   r?  rZ   r@  rp   r6  rA  r<  r=  )rb   r   r   rB  rC  rD  rF  r   r   r   rH    s   

 !"#$%&+/45ABQz5TestElasticsearch7MappingInheritance.test_get_mappingc                 C   rI  r)   rJ  r  r   r   r   rL    s   "z9TestElasticsearch7MappingInheritance.test_get_document_idc              	   C   s   | j | j}d|v r|d   d|v r|d jdd d i ddddd	d
dddddddidd
iddigdddgdg ddddddddddddtddd d!gd"d#gd$td%d&d'd(d)d*d+d,g d-g i}| || d S ).NrF   rd  c                 S   s   | d S )Nr7  r   )cr   r   r   rk     s    zHTestElasticsearch7MappingInheritance.test_get_document.<locals>.<lambda>rm   r]  Middle Earthr^  r_  zFrodo Bagginsr   ra  rc  r   r7  zBilbo BagginsGandalfr4   zsearchtests.Novelr5   )rN  rg  rO  r   rM  rX   rO  r?  rZ   r@  rN  rP  r	   r  r6  rA  r   rb   rQ  r   r   r   rS  r   rR  rB  rC  rT  rW  r   r   r   rY    sn   	!"#$%&)z6TestElasticsearch7MappingInheritance.test_get_documentrZ  r   r   r   r   r[    s    Xr[  z4wagtail.search.backends.elasticsearch7.Elasticsearchc                   @   s$   e Zd Zdd Zdd Zdd ZdS )TestBackendConfigurationc                 C   s,   t i d |jdddddd dgdd d S )	Nparams	localhosti#  rR  Fhostport
url_prefixuse_sslverify_certs	http_authr_   hoststimeoutr   assert_called_withr$   Elasticsearchr   r   r   test_default_settingsP  s   


z.TestBackendConfiguration.test_default_settingsc                 C   s8   t ddddddgid |jdddddgdd d S )	NHOSTS	127.0.0.1iT$  T)rn  ro  rq  rr  rj  r_   rt  rw  ry  r   r   r   
test_hostsa  s&   
z#TestBackendConfiguration.test_hostsc                 C   sd   t dg did |jdddddd dd	d
dddd dddddddddddddd dgdd d S )NURLS)zhttp://localhost:12345zhttps://127.0.0.1:54321z1http://username:password@elasticsearch.mysite.comz&https://elasticsearch.mysite.com/hellorj  rl  i90  rR  Frm  r}  i1  Tzelasticsearch.mysite.comP   )usernamepasswordi  z/hellor_   rt  rw  ry  r   r   r   	test_urls{  sH   			"
z"TestBackendConfiguration.test_urlsN)r   r   r   r{  r~  r  r   r   r   r   ri  M  s    ri  )"ro   r!   unittestr   django.db.modelsr   django.testr   wagtail.search.queryr   r   r   wagtail.test.searchr   elasticsearch_common_testsr
   elasticsearchr   ELASTICSEARCH_VERSIONelasticsearch.serializerr   &wagtail.search.backends.elasticsearch7r   ImportErroruse_new_elasticsearch_apir   skipIfr   r   r   r  r[  r  ri  r   r   r   r   <module>   sT          Z 0u ,