Skip to content

Commit

Permalink
Added support facets
Browse files Browse the repository at this point in the history
  • Loading branch information
nhathiwala committed Feb 4, 2019
1 parent 0c172ab commit 44b5292
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## [0.1.3+2] - Added support to manage index settings.
- Implementation & bug solved
- highlightResult [Bug] (commit ref: 0d76d24fe8aa347a0933920afe5ded43bdcbd68b)
- snippetResult [Implementation] (commit ref: 0d76d24fe8aa347a0933920afe5ded43bdcbd68b)
## [0.1.4+1] - Added support facets.
- Added `facets` to ``AlgoliaQuerySnapshot`` to list facets name with hits count.

## [0.1.3+2] - Implementation & bug solved.
- highlightResult [Bug] (commit ref: 0d76d24fe8aa347a0933920afe5ded43bdcbd68b)
- snippetResult [Implementation] (commit ref: 0d76d24fe8aa347a0933920afe5ded43bdcbd68b)

## [0.1.3+1] - Added support to manage index settings.
- Updated `example.dart`: Added index settings example.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you wish to contribute in our development process, refer to our [Contributing
You should ensure that you add the router as a dependency in your flutter project.
```yaml
dependencies:
algolia: ^0.1.3
algolia: ^0.1.4
```
You should then run `flutter packages upgrade` or update your packages in IntelliJ.

Expand Down Expand Up @@ -230,4 +230,4 @@ version of the release.
<hr/>
Algolia [Unofficial SDK for Dart] is a Knoxpo original.
<br/>
<a href="https://knoxpo.com" target="_knoxpo"><img src="https://www.knoxpo.com/assets/logo.png" width="60"></a>
<a href="https://knoxpo.com" target="_knoxpo"><img src="https://www.knoxpo.com/assets/logo.png" width="80"></a>
2 changes: 2 additions & 0 deletions lib/src/query_snapshot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class AlgoliaQuerySnapshot {
String query;
String params;
String index;
Map<String, dynamic> facets;

AlgoliaQuerySnapshot.fromMap(algolia, index, Map<String, dynamic> map) {
this.algolia = algolia;
Expand All @@ -47,5 +48,6 @@ class AlgoliaQuerySnapshot {
this.exhaustiveNbHits = map['exhaustiveNbHits'];
this.query = map['query'];
this.params = map['params'];
this.facets = map['facets'] != null ? map['facets'] : {};
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: algolia
version: 0.1.3+2
version: 0.1.4+1
authors:
- Nayan Hathiwala (Knoxpo) <[email protected]>
description: >
Expand Down
11 changes: 3 additions & 8 deletions test/algolia_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,9 @@ void main() async {

class Application {
static final Algolia algolia = Algolia.init(
applicationId: '86BGVLXUEM',
apiKey: '79ae086fe5a29c6c08e788e279b6b99d',
applicationId: 'YOUR_APPLICATION_ID',
apiKey: 'YOUR_API_KEY',
);
}

// class Application {
// static final Algolia algolia = Algolia.init(
// applicationId: 'YOUR_APPLICATION_ID',
// apiKey: 'YOUR_API_KEY',
// );
// }

0 comments on commit 44b5292

Please sign in to comment.