feat: enhance search (#7127)

* feat: hybrid search

* fixing normal search

* building out the query

* okla

* filters

* date

* order by date

* Remove hybrid search endpoint

* remove search hybrid endpoint

* faces query

* search for person

* search and pagination

* with exif

* with exif

* justify gallery viewer

* memory view

* Fixed userId is null

* openapi and styling

* searchdto

* lint and format

* remove term

* generate sql

* fix test

* chips

* not showing true

* pr feedback

* pr feedback

* nit name

* linting

* pr feedback

* styling

* linting
This commit is contained in:
Alex
2024-02-17 11:00:55 -06:00
committed by GitHub
parent 60ba37b3a7
commit 69983ff83a
40 changed files with 3400 additions and 2585 deletions

View File

@@ -110,7 +110,7 @@ void main() {
// TODO
});
//Future<List<AssetResponseDto>> searchAssets({ String checksum, String city, String country, DateTime createdAfter, DateTime createdBefore, String deviceAssetId, String deviceId, String encodedVideoPath, String id, bool isArchived, bool isEncoded, bool isExternal, bool isFavorite, bool isMotion, bool isOffline, bool isReadOnly, bool isVisible, String lensModel, String libraryId, String make, String model, AssetOrder order, String originalFileName, String originalPath, num page, String resizePath, num size, String state, DateTime takenAfter, DateTime takenBefore, DateTime trashedAfter, DateTime trashedBefore, AssetTypeEnum type, DateTime updatedAfter, DateTime updatedBefore, String webpPath, bool withArchived, bool withDeleted, bool withExif, bool withPeople, bool withStacked }) async
//Future<List<AssetResponseDto>> searchAssets({ String checksum, String city, String country, DateTime createdAfter, DateTime createdBefore, String deviceAssetId, String deviceId, String encodedVideoPath, String id, bool isArchived, bool isEncoded, bool isExternal, bool isFavorite, bool isMotion, bool isNotInAlbum, bool isOffline, bool isReadOnly, bool isVisible, String lensModel, String libraryId, String make, String model, AssetOrder order, String originalFileName, String originalPath, num page, List<String> personIds, String resizePath, num size, String state, DateTime takenAfter, DateTime takenBefore, DateTime trashedAfter, DateTime trashedBefore, AssetTypeEnum type, DateTime updatedAfter, DateTime updatedBefore, String webpPath, bool withArchived, bool withDeleted, bool withExif, bool withPeople, bool withStacked }) async
test('test searchAssets', () async {
// TODO
});

View File

@@ -0,0 +1,237 @@
//
// 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 MetadataSearchDto
void main() {
// final instance = MetadataSearchDto();
group('test MetadataSearchDto', () {
// String checksum
test('to test the property `checksum`', () async {
// TODO
});
// String city
test('to test the property `city`', () async {
// TODO
});
// String country
test('to test the property `country`', () async {
// TODO
});
// DateTime createdAfter
test('to test the property `createdAfter`', () async {
// TODO
});
// DateTime createdBefore
test('to test the property `createdBefore`', () async {
// TODO
});
// String deviceAssetId
test('to test the property `deviceAssetId`', () async {
// TODO
});
// String deviceId
test('to test the property `deviceId`', () async {
// TODO
});
// String encodedVideoPath
test('to test the property `encodedVideoPath`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// bool isArchived
test('to test the property `isArchived`', () async {
// TODO
});
// bool isEncoded
test('to test the property `isEncoded`', () async {
// TODO
});
// bool isExternal
test('to test the property `isExternal`', () async {
// TODO
});
// bool isFavorite
test('to test the property `isFavorite`', () async {
// TODO
});
// bool isMotion
test('to test the property `isMotion`', () async {
// TODO
});
// bool isNotInAlbum
test('to test the property `isNotInAlbum`', () async {
// TODO
});
// bool isOffline
test('to test the property `isOffline`', () async {
// TODO
});
// bool isReadOnly
test('to test the property `isReadOnly`', () async {
// TODO
});
// bool isVisible
test('to test the property `isVisible`', () async {
// TODO
});
// String lensModel
test('to test the property `lensModel`', () async {
// TODO
});
// String libraryId
test('to test the property `libraryId`', () async {
// TODO
});
// String make
test('to test the property `make`', () async {
// TODO
});
// String model
test('to test the property `model`', () async {
// TODO
});
// AssetOrder order
test('to test the property `order`', () async {
// TODO
});
// String originalFileName
test('to test the property `originalFileName`', () async {
// TODO
});
// String originalPath
test('to test the property `originalPath`', () async {
// TODO
});
// num page
test('to test the property `page`', () async {
// TODO
});
// List<String> personIds (default value: const [])
test('to test the property `personIds`', () async {
// TODO
});
// String resizePath
test('to test the property `resizePath`', () async {
// TODO
});
// num size
test('to test the property `size`', () async {
// TODO
});
// String state
test('to test the property `state`', () async {
// TODO
});
// DateTime takenAfter
test('to test the property `takenAfter`', () async {
// TODO
});
// DateTime takenBefore
test('to test the property `takenBefore`', () async {
// TODO
});
// DateTime trashedAfter
test('to test the property `trashedAfter`', () async {
// TODO
});
// DateTime trashedBefore
test('to test the property `trashedBefore`', () async {
// TODO
});
// AssetTypeEnum type
test('to test the property `type`', () async {
// TODO
});
// DateTime updatedAfter
test('to test the property `updatedAfter`', () async {
// TODO
});
// DateTime updatedBefore
test('to test the property `updatedBefore`', () async {
// TODO
});
// String webpPath
test('to test the property `webpPath`', () async {
// TODO
});
// bool withArchived
test('to test the property `withArchived`', () async {
// TODO
});
// bool withDeleted
test('to test the property `withDeleted`', () async {
// TODO
});
// bool withExif
test('to test the property `withExif`', () async {
// TODO
});
// bool withPeople
test('to test the property `withPeople`', () async {
// TODO
});
// bool withStacked
test('to test the property `withStacked`', () async {
// TODO
});
});
}

View File

@@ -32,7 +32,7 @@ void main() {
// TODO
});
//Future<SearchResponseDto> searchMetadata({ String checksum, String city, String country, DateTime createdAfter, DateTime createdBefore, String deviceAssetId, String deviceId, String encodedVideoPath, String id, bool isArchived, bool isEncoded, bool isExternal, bool isFavorite, bool isMotion, bool isOffline, bool isReadOnly, bool isVisible, String lensModel, String libraryId, String make, String model, AssetOrder order, String originalFileName, String originalPath, num page, String resizePath, num size, String state, DateTime takenAfter, DateTime takenBefore, DateTime trashedAfter, DateTime trashedBefore, AssetTypeEnum type, DateTime updatedAfter, DateTime updatedBefore, String webpPath, bool withArchived, bool withDeleted, bool withExif, bool withPeople, bool withStacked }) async
//Future<SearchResponseDto> searchMetadata(MetadataSearchDto metadataSearchDto) async
test('test searchMetadata', () async {
// TODO
});
@@ -42,7 +42,7 @@ void main() {
// TODO
});
//Future<SearchResponseDto> searchSmart(String query, { String city, String country, DateTime createdAfter, DateTime createdBefore, String deviceId, bool isArchived, bool isEncoded, bool isExternal, bool isFavorite, bool isMotion, bool isOffline, bool isReadOnly, bool isVisible, String lensModel, String libraryId, String make, String model, num page, num size, String state, DateTime takenAfter, DateTime takenBefore, DateTime trashedAfter, DateTime trashedBefore, AssetTypeEnum type, DateTime updatedAfter, DateTime updatedBefore, bool withArchived, bool withDeleted, bool withExif }) async
//Future<SearchResponseDto> searchSmart(SmartSearchDto smartSearchDto) async
test('test searchSmart', () async {
// TODO
});

View File

@@ -0,0 +1,177 @@
//
// 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 SmartSearchDto
void main() {
// final instance = SmartSearchDto();
group('test SmartSearchDto', () {
// String city
test('to test the property `city`', () async {
// TODO
});
// String country
test('to test the property `country`', () async {
// TODO
});
// DateTime createdAfter
test('to test the property `createdAfter`', () async {
// TODO
});
// DateTime createdBefore
test('to test the property `createdBefore`', () async {
// TODO
});
// String deviceId
test('to test the property `deviceId`', () async {
// TODO
});
// bool isArchived
test('to test the property `isArchived`', () async {
// TODO
});
// bool isEncoded
test('to test the property `isEncoded`', () async {
// TODO
});
// bool isExternal
test('to test the property `isExternal`', () async {
// TODO
});
// bool isFavorite
test('to test the property `isFavorite`', () async {
// TODO
});
// bool isMotion
test('to test the property `isMotion`', () async {
// TODO
});
// bool isOffline
test('to test the property `isOffline`', () async {
// TODO
});
// bool isReadOnly
test('to test the property `isReadOnly`', () async {
// TODO
});
// bool isVisible
test('to test the property `isVisible`', () async {
// TODO
});
// String lensModel
test('to test the property `lensModel`', () async {
// TODO
});
// String libraryId
test('to test the property `libraryId`', () async {
// TODO
});
// String make
test('to test the property `make`', () async {
// TODO
});
// String model
test('to test the property `model`', () async {
// TODO
});
// num page
test('to test the property `page`', () async {
// TODO
});
// String query
test('to test the property `query`', () async {
// TODO
});
// num size
test('to test the property `size`', () async {
// TODO
});
// String state
test('to test the property `state`', () async {
// TODO
});
// DateTime takenAfter
test('to test the property `takenAfter`', () async {
// TODO
});
// DateTime takenBefore
test('to test the property `takenBefore`', () async {
// TODO
});
// DateTime trashedAfter
test('to test the property `trashedAfter`', () async {
// TODO
});
// DateTime trashedBefore
test('to test the property `trashedBefore`', () async {
// TODO
});
// AssetTypeEnum type
test('to test the property `type`', () async {
// TODO
});
// DateTime updatedAfter
test('to test the property `updatedAfter`', () async {
// TODO
});
// DateTime updatedBefore
test('to test the property `updatedBefore`', () async {
// TODO
});
// bool withArchived
test('to test the property `withArchived`', () async {
// TODO
});
// bool withDeleted
test('to test the property `withDeleted`', () async {
// TODO
});
// bool withExif
test('to test the property `withExif`', () async {
// TODO
});
});
}