File tree Expand file tree Collapse file tree 4 files changed +12
-13
lines changed Expand file tree Collapse file tree 4 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 4343
4444if  TYPE_CHECKING :
4545    from  elasticsearch  import  AsyncElasticsearch 
46- 
47-     from  ...esql .esql  import  ESQLBase 
46+     from  elasticsearch .esql .esql  import  ESQLBase 
4847
4948
5049class  AsyncIndexMeta (DocumentMeta ):
@@ -561,13 +560,15 @@ async def esql_execute(
561560        # nested fields, which ES|QL does not return, causing an error. When passing 
562561        # `ignore_missing_fields=True` the list will be generated with 
563562        # `for_esql=True`, so the error will not occur, but the documents will 
564-         # not have any nested  objects in them. 
563+         # not have any Nested  objects in them. 
565564        doc_fields  =  set (cls ._get_field_names (for_esql = ignore_missing_fields ))
566565        if  not  ignore_missing_fields  and  not  doc_fields .issubset (set (query_columns )):
567566            raise  ValueError (
568567                f"Not all fields of { cls .__name__ }   were returned by the query. " 
569568                "Make sure your document does not use Nested fields, which are " 
570-                 "currently not supported in ES|QL." 
569+                 "currently not supported in ES|QL. To force the query to be " 
570+                 "evaluated in spite of the missing fields, pass set the " 
571+                 "ignore_missing_fields=True option in the esql_execute() call." 
571572            )
572573        non_doc_fields : set [str ] =  set (query_columns ) -  doc_fields  -  {"_id" }
573574        index_id  =  query_columns .index ("_id" )
Original file line number Diff line number Diff line change 4343
4444if  TYPE_CHECKING :
4545    from  elasticsearch  import  Elasticsearch 
46- 
47-     from  ...esql .esql  import  ESQLBase 
46+     from  elasticsearch .esql .esql  import  ESQLBase 
4847
4948
5049class  IndexMeta (DocumentMeta ):
@@ -553,13 +552,15 @@ def esql_execute(
553552        # nested fields, which ES|QL does not return, causing an error. When passing 
554553        # `ignore_missing_fields=True` the list will be generated with 
555554        # `for_esql=True`, so the error will not occur, but the documents will 
556-         # not have any nested  objects in them. 
555+         # not have any Nested  objects in them. 
557556        doc_fields  =  set (cls ._get_field_names (for_esql = ignore_missing_fields ))
558557        if  not  ignore_missing_fields  and  not  doc_fields .issubset (set (query_columns )):
559558            raise  ValueError (
560559                f"Not all fields of { cls .__name__ }   were returned by the query. " 
561560                "Make sure your document does not use Nested fields, which are " 
562-                 "currently not supported in ES|QL." 
561+                 "currently not supported in ES|QL. To force the query to be " 
562+                 "evaluated in spite of the missing fields, pass set the " 
563+                 "ignore_missing_fields=True option in the esql_execute() call." 
563564            )
564565        non_doc_fields : set [str ] =  set (query_columns ) -  doc_fields  -  {"_id" }
565566        index_id  =  query_columns .index ("_id" )
Original file line number Diff line number Diff line change @@ -97,10 +97,7 @@ class ESQLBase(ABC):
9797    commands, used to build ES|QL queries. 
9898    """ 
9999
100-     def  __init__ (
101-         self ,
102-         parent : Optional ["ESQLBase" ] =  None ,
103-     ):
100+     def  __init__ (self , parent : Optional ["ESQLBase" ] =  None ):
104101        self ._parent  =  parent 
105102
106103    def  __repr__ (self ) ->  str :
Original file line number Diff line number Diff line change @@ -649,7 +649,7 @@ def min_over_time(field: ExpressionType) -> InstrumentedExpression:
649649
650650
651651def  multi_match (
652-     query : ExpressionType , * fields : ExpressionType , options : ExpressionType  =  None 
652+     query : ExpressionType , fields : ExpressionType , options : ExpressionType  =  None 
653653) ->  InstrumentedExpression :
654654    """Use `MULTI_MATCH` to perform a multi-match query on the specified field. 
655655    The multi_match query builds on the match query to allow multi-field queries. 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments