example does not work
Same as the example
final rs = await client.search( 'my_index', 'my_type', elastic.Query.term('some', ['data']));
and the traceback
Unhandled exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'int' in type cast #0 Client.search (package:elastic_client/src/elastic_client_impl.dart:123:46) <asynchronous suspension> #1 main (package:dartcli/dartcli.dart:12:27) <asynchronous suspension> #2 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:300:19) #3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)
@silverfox983 please include the stacktrace and what you are calling.
I get this error when I try to use the "indexExists()" or the "search()" function. Could it be because my ConsolHttpTransport data might be wrong? I am testing the example code on pub.dev and it is not working.
Error Exception has occurred. NoSuchMethodError (NoSuchMethodError: The getter 'keys' was called on null. Receiver: null Tried calling: keys)
@Kickbykick: could you please include the full stacktrace?
Does this help?
Object.noSuchMethod (dart:core-patch/object_patch.dart:51)
MapMixin.addAll (dart:collection/maps.dart:128)
HttpTransport._mergeHeader (c:\flutter_windows_v1.12.13+hotfix.5-stable\flutter.pub-cache\hosted\pub.dartlang.org\elastic_client-0.1.13\lib\src\http_transport.dart:47)
HttpTransport.send (c:\flutter_windows_v1.12.13+hotfix.5-stable\flutter.pub-cache\hosted\pub.dartlang.org\elastic_client-0.1.13\lib\src\http_transport.dart:32)
Client.flushIndex (c:\flutter_windows_v1.12.13+hotfix.5-stable\flutter.pub-cache\hosted\pub.dartlang.org\elastic_client-0.1.13\lib\src\elastic_client_impl.dart:45)
_MyHomePageState.main (c:\Users\Kiibati\Desktop\Projects Flut\elasticsearch\lib\main.dart:59)
I apologize for the false alarm but the search and the updateDoc functions do work. I previously had the wrong endpoint.
The flushIndex() and indexExists() still does not work and they give the same error. While I can, what exactly is flushIndex meant to do?