feat(server)!: search via typesense (#1778)

* build: add typesense to docker

* feat(server): typesense search

* feat(web): search

* fix(web): show api error response message

* chore: search tests

* chore: regenerate open api

* fix: disable typesense on e2e

* fix: number properties for open api (dart)

* fix: e2e test

* fix: change lat/lng from floats to typesense geopoint

* dev: Add smartInfo relation to findAssetById to be able to query against it

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Jason Rasmussen
2023-03-02 21:47:08 -05:00
committed by GitHub
parent 1cc184ed10
commit 0aaeab124d
87 changed files with 3638 additions and 77 deletions

View File

@@ -0,0 +1,42 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for SearchAlbumResponseDto
void main() {
// final instance = SearchAlbumResponseDto();
group('test SearchAlbumResponseDto', () {
// int total
test('to test the property `total`', () async {
// TODO
});
// int count
test('to test the property `count`', () async {
// TODO
});
// List<AlbumResponseDto> items (default value: const [])
test('to test the property `items`', () async {
// TODO
});
// List<SearchFacetResponseDto> facets (default value: const [])
test('to test the property `facets`', () async {
// TODO
});
});
}

35
mobile/openapi/test/search_api_test.dart generated Normal file
View File

@@ -0,0 +1,35 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:openapi/api.dart';
import 'package:test/test.dart';
/// tests for SearchApi
void main() {
// final instance = SearchApi();
group('tests for SearchApi', () {
//
//
//Future<SearchConfigResponseDto> getSearchConfig() async
test('test getSearchConfig', () async {
// TODO
});
//
//
//Future<SearchResponseDto> search({ String query, String type, bool isFavorite, String exifInfoPeriodCity, String exifInfoPeriodState, String exifInfoPeriodCountry, String exifInfoPeriodMake, String exifInfoPeriodModel, List<String> smartInfoPeriodObjects, List<String> smartInfoPeriodTags }) async
test('test search', () async {
// TODO
});
});
}

View File

@@ -0,0 +1,42 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for SearchAssetResponseDto
void main() {
// final instance = SearchAssetResponseDto();
group('test SearchAssetResponseDto', () {
// int total
test('to test the property `total`', () async {
// TODO
});
// int count
test('to test the property `count`', () async {
// TODO
});
// List<AssetResponseDto> items (default value: const [])
test('to test the property `items`', () async {
// TODO
});
// List<SearchFacetResponseDto> facets (default value: const [])
test('to test the property `facets`', () async {
// TODO
});
});
}

View File

@@ -0,0 +1,27 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for SearchConfigResponseDto
void main() {
// final instance = SearchConfigResponseDto();
group('test SearchConfigResponseDto', () {
// bool enabled
test('to test the property `enabled`', () async {
// TODO
});
});
}

View File

@@ -0,0 +1,32 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for SearchFacetCountResponseDto
void main() {
// final instance = SearchFacetCountResponseDto();
group('test SearchFacetCountResponseDto', () {
// int count
test('to test the property `count`', () async {
// TODO
});
// String value
test('to test the property `value`', () async {
// TODO
});
});
}

View File

@@ -0,0 +1,32 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for SearchFacetResponseDto
void main() {
// final instance = SearchFacetResponseDto();
group('test SearchFacetResponseDto', () {
// String fieldName
test('to test the property `fieldName`', () async {
// TODO
});
// List<SearchFacetCountResponseDto> counts (default value: const [])
test('to test the property `counts`', () async {
// TODO
});
});
}

View File

@@ -0,0 +1,32 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for SearchResponseDto
void main() {
// final instance = SearchResponseDto();
group('test SearchResponseDto', () {
// SearchAlbumResponseDto albums
test('to test the property `albums`', () async {
// TODO
});
// SearchAssetResponseDto assets
test('to test the property `assets`', () async {
// TODO
});
});
}