Commit Graph

83 Commits

Author SHA1 Message Date
Cameron
be483c9c1a Add database optimizations for photo search and pagination
Implement database-level sorting with composite indexes for efficient date and tag queries. Add pagination metadata support and optimize tag count queries using batch processing.
2026-01-18 19:17:10 -05:00
Cameron
af35a996a3 Cleanup unused message embedding code
Fixup some warnings
2026-01-14 13:33:36 -05:00
Cameron
e2d6cd7258 Run clippy fix 2026-01-14 13:17:58 -05:00
Cameron
f65f4efde8 Make date parse from metadata a little more consistent 2026-01-14 12:54:36 -05:00
Cameron
fa600f1c2c Fallback to sorting by Metadata date 2026-01-11 14:39:50 -05:00
Cameron
d86b2c3746 Add Google Takeout data import infrastructure
Implements Phase 1 & 2 of Google Takeout RAG integration:
- Database migrations for calendar_events, location_history, search_history
- DAO implementations with hybrid time + semantic search
- Parsers for .ics, JSON, and HTML Google Takeout formats
- Import utilities with batch insert optimization

Features:
- CalendarEventDao: Hybrid time-range + semantic search for events
- LocationHistoryDao: GPS proximity with Haversine distance calculation
- SearchHistoryDao: Semantic-first search (queries are embedding-rich)
- Batch inserts for performance (1M+ records in minutes vs hours)
- OpenTelemetry tracing for all database operations

Import utilities:
- import_calendar: Parse .ics with optional embedding generation
- import_location_history: High-volume GPS data with batch inserts
- import_search_history: Always generates embeddings for semantic search

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 14:50:49 -05:00
Cameron
1171f19845 Create Insight Generation Feature
Added integration with Messages API and Ollama
2026-01-03 10:30:37 -05:00
Cameron
54e23a29b3 Fix warnings 2025-12-29 14:29:29 -05:00
Cameron
ccd16ba987 Files endpoint refactoring 2025-12-26 22:20:01 -05:00
Cameron
c035678162 Add tracing to EXIF DAO methods 2025-12-23 22:57:24 -05:00
Cameron
636701a69e Refactor file type checking for better consistency
Fix tests
2025-12-23 22:30:53 -05:00
Cameron
3a64b30621 Fix Date sorting in tagged/recursive search 2025-12-23 22:07:40 -05:00
Cameron
df94010d21 Fix tests and improve memories date error log 2025-12-19 14:20:51 -05:00
Cameron
28d85dc4a5 Fix recursive search and media filtering 2025-12-18 11:25:50 -05:00
Cameron
721b66481e Add EXIF search implementation to list photos endpoint 2025-12-18 10:06:13 -05:00
Cameron
eb8e08b9ff Add EXIF search infrastructure (Phase 1 & 2)
Implements foundation for EXIF-based photo search capabilities:

- Add geo.rs module with GPS distance calculations (Haversine + bounding box)
- Extend FilesRequest with EXIF search parameters (camera, GPS, date, media type)
- Add MediaType enum and DateTakenAsc/DateTakenDesc sort options
- Create date_taken index migration for efficient date queries
- Implement ExifDao methods: get_exif_batch, query_by_exif, get_camera_makes
- Add FileWithMetadata struct for date-aware sorting
- Implement date sorting with filename extraction fallback
- Make extract_date_from_filename public for reuse

Next: Integrate EXIF filtering into list_photos() and enhance get_all_tags()
2025-12-18 09:34:07 -05:00
Cameron
e4d988a9fd Cargo formatting 2025-12-17 22:10:03 -05:00
Cameron
07c27bf1bb Add HEIC and TIF image extensions to files endpoint 2025-12-17 16:57:27 -05:00
Cameron
f02a858368 Bump to 0.3.1 and format/clippy 2025-12-01 13:04:55 -05:00
Cameron
273b877e16 Update to Rust 2024 edition
Formatted code.
2025-09-01 13:36:27 -04:00
Cameron
85093ff0c7 Add parsing date from filename for memories 2025-08-12 20:55:22 -04:00
Cameron
6aa3c932fb Run cargo fmt 2025-08-11 17:08:24 -04:00
Cameron
b3a885de28 Run cargo fmt 2025-08-08 15:06:43 -04:00
Cameron
2ea36a4c9b Get tests building and sort of passing 2025-07-17 20:32:23 -04:00
Cameron
3fbdba2b9c Merge branch 'master' into feature/video-gifs 2025-06-16 21:06:38 -04:00
Cameron
2c553a8016 Additional logging and tracing enhancements 2025-06-04 15:05:23 -04:00
Cameron
7c882fd31c Add webp files and improve logging 2025-06-03 15:23:39 -04:00
Cameron
6aff7f456a Manually pass the current context around 2025-06-03 14:06:19 -04:00
Cameron
785ce157e6 Get Otel span from the request 2025-05-23 18:24:54 -04:00
Cameron
d37deb36fe Additional Otel logging and spans 2025-05-23 14:51:54 -04:00
Cameron
fe0446a43f Merge branch 'master' into feature/video-gifs
# Conflicts:
#	Cargo.toml
#	src/files.rs
#	src/main.rs
2025-05-17 15:57:01 -04:00
Cameron
5b17fba51f Add sorting by a File's Tag Count 2025-05-17 13:41:14 -04:00
Cameron
0edb0dbdd1 Cleanup 2024-12-07 21:53:39 -05:00
Cameron
4e4a2240cf Move video.rs into its own module 2024-12-07 21:46:37 -05:00
Cameron
3ce1b84604 Sort on recursive search
Run clippy
2024-12-06 11:21:42 -05:00
Cameron
787d1fd5d0 Fix recursive search at the root, cleanup video generation return 2024-12-06 09:47:21 -05:00
Cameron
18ba5796b0 Update to rust 2021
Fix tests
2024-12-05 20:27:01 -05:00
Cameron
9c2cd2566f Prepare for rust edition 2021 2024-12-05 20:25:00 -05:00
Cameron
8daa35b5a7 Fix recursive search when beneath top level directory 2024-12-05 20:19:38 -05:00
Cameron
2b2a811cae Fix recursive filtering under base path 2024-12-04 19:50:04 -05:00
Cameron
d280db8482 Fix exclude filtering 2024-11-27 16:42:17 -05:00
Cameron
0af7c8f98b Fix missing return and update test signatures 2024-11-27 15:43:27 -05:00
Cameron
9327208deb Remove filtering when recursively searching with tags 2024-11-25 21:40:25 -05:00
Cameron
a668b14116 Update deprecated functions 2024-11-24 12:56:21 -05:00
Cameron
860e7a97fb Use TagDao for improved filtering 2024-11-24 09:49:03 -05:00
Cameron
9a32a1cfe7 Allow for excluding certain tags from a file search 2024-11-23 20:21:19 -05:00
Cameron
6986540295 Add sorting shuffle, and name asc/desc 2024-11-23 19:13:25 -05:00
Cameron
287a61ae3f Update dependencies, improve startup logging 2024-11-23 12:14:12 -05:00
Cameron Cordes
1881b9efb9 Trim spaces from new tags
Fix unit test build
2024-03-20 22:16:06 -04:00
Cameron Cordes
3925d835f6 Fix recursive searching with tags 2024-03-10 20:45:18 -04:00