Where to change something

The common changes and the files each one touches.

The common changes, and the files each one touches. One rule runs through all of them: anything that writes to the index must also keep the phone's copy in step, or the copy is wrong.

Store a new piece of photo information

The field in solr/conf/schema.xml, raise config_version in solrconfig.xml and IndexManager.CONFIG_VERSION together, and the server side of photos_ingest, which builds the document. On the phone, usually PhotoReader to read it off the file and IngestItem to carry it. To reach the phone's copy it also needs EditRepository.CLONE_FIELDS and storeDoc.

Change the phone's copy

A column: DOCS_TABLE, the VERSION constant and onUpgrade in PhotoCache.kt, then CLONE_FIELDS and storeDoc. Old installs only get the column through onUpgrade; if the copies already on phones cannot fill it, raise the clone format in AppPrefs so every phone reads its copy again.

Add a filter

SearchFilters and the filter query in SearchRepository.queryParams(), the facet, then the filter sheet in SearchScreen.kt, with its fold state and badge. The browsing lists are held in AppPrefs.facetsJson until something is written, so a new list travels with them.

Change how search ranks

QF, MM_LEVELS and the hybrid line in SearchRepository.queryParams(); the defaults of the two sliders in AppPrefs.

Change how browsing groups photos

The heading builder in AppViewModel and buildRows() in SearchScreen.kt, where the headings are drawn and folded.

Change when a photo counts as unchanged

The comparison in SyncEngine.runOnce(): file size and time, then the file md5 (PhotoReader.fileMd5 against PhotoCache.docFileHash) and the picture fingerprint. This is what keeps a metadata-only change from costing a new reading.

Change a suggestion list in a tag field

The word counts in AppViewModel over PhotoCache, with the spelling rule in Words.kt; not SearchRepository, which is not asked.

Call a new Opensolr endpoint

A function in OpensolrApi, any new refusal in Errors.kt, and a line in docs/how-it-works.md.

Change how a sync reacts to an error

The catch blocks at the end of SyncEngine.runOnce(), and the wording in SyncScreen.kt.

Add a screen or a setting

A value in Screen, a composable in ui/screens/, a branch in AppRoot.kt and the actions in AppViewModel. A setting is a property in AppPrefs, its value in UiState and its control on the Me screen.

Add a language

A res/values-xx/ folder with every string file, and its entry in AppLanguage.SUPPORTED and res/xml/locales_config.xml.

Add a notification, change colours, upgrade a library

Notifier.kt; ui/theme/Theme.kt; gradle/libs.versions.toml, then build.

Release a new version

versionCode and versionName in app/build.gradle.kts, a signed release build, and a GitHub release with the APK. See building from source.

For developers

Opensolr Photos is open source and MIT licensed. Questions about your Opensolr account, index or plan go to opensolr.com/contact; questions about the app itself belong on GitHub.

Opensolr Photos Documentation