elastic_client 0.1.3

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 83

Dart bindings for ElasticSearch HTTP API. #

ElasticSearch is a full-text search engine based on Lucene.

0.1.3 #

  • Upgrade http_client dependency.

0.1.2 #

  • BasicAuth option for HttpTransport.

0.1.1 #

  • Support suggest queries.

0.1.0 #

  • First public version.

example/example.dart

import 'package:elastic_client/console_http_transport.dart';
import 'package:elastic_client/elastic_client.dart' as elastic;

main() async {
  final transport =
      new ConsoleHttpTransport(Uri.parse('http://localhost:9200/'));
  final client = new elastic.Client(transport);

  await client.updateDoc('my_index', 'my_type', 'my_id', {'some': 'data'});
  await client.flushIndex('my_index');

  final rs = await client.search(
      'my_index', 'my_type', elastic.Query.term('some', ['data']));
  print(rs.toMap());

  await transport.close();
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  elastic_client: ^0.1.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:elastic_client/elastic_client.dart';
  
Version Uploaded Documentation Archive
0.1.3 Feb 21, 2019 Go to the documentation of elastic_client 0.1.3 Download elastic_client 0.1.3 archive
0.1.2 Dec 9, 2018 Go to the documentation of elastic_client 0.1.2 Download elastic_client 0.1.2 archive
0.1.1 Nov 23, 2018 Go to the documentation of elastic_client 0.1.1 Download elastic_client 0.1.1 archive
0.1.0+1 Oct 16, 2018 Go to the documentation of elastic_client 0.1.0+1 Download elastic_client 0.1.0+1 archive
0.1.0 Oct 16, 2018 Go to the documentation of elastic_client 0.1.0 Download elastic_client 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
67
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
83
Learn more about scoring.

We analyzed this package on Mar 6, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:elastic_client/elastic_client.dart.

Health issues and suggestions

Document public APIs. (-1 points)

79 out of 79 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/elastic_client_impl.dart. (-1 points)

Analysis of lib/src/elastic_client_impl.dart reported 2 hints:

line 62 col 21: Use = to separate a named parameter from its default value.

line 106 col 47: Use = to separate a named parameter from its default value.

Fix lib/src/http_transport.dart. (-0.50 points)

Analysis of lib/src/http_transport.dart reported 1 hint:

line 16 col 24: Use = to separate a named parameter from its default value.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http_client ^1.0.0 1.0.3
Transitive dependencies
buffer 1.0.5+1
executor 2.1.2
meta 1.1.7
path 1.6.2
stack_trace 1.9.3
Dev dependencies
test ^1.0.0