elastic_app_search 0.1.2 copy "elastic_app_search: ^0.1.2" to clipboard
elastic_app_search: ^0.1.2 copied to clipboard

outdated

Dart/Flutter package for using Elastic App Search through a simple API returning easy to handle objects

example/main.dart

import 'package:elastic_app_search/elastic_app_search.dart';

final service = ElasticAppSearch(
  endPoint: "https://localhost:5601",
  searchKey: "search-soaewu2ye6uc45dr8mcd54v8",
);

void main() async {
  ElasticResponse response = await service
      .engine("national-parks-demo")
      .query("parks")
      .filter("states", isEqualTo: "California")
      .filter("world_heritage_site", isEqualTo: true)
      .resultField("title")
      .resultField("description", snippetSize: 140)
      .page(1, size: 50)
      .get();

  for (ElasticResult result in response.results) {
    final data = result.data;
    if (data != null) {
      print("${data["title"]}: ${data["description"]}");
    }
  }
}
19
likes
0
pub points
74%
popularity

Publisher

verified publisherjulienlebren.dev

Dart/Flutter package for using Elastic App Search through a simple API returning easy to handle objects

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

dio, freezed_annotation, html_unescape

More

Packages that depend on elastic_app_search