https://github.com/nehemiaharchives/lucene-kmp
[WIP] Apache Lucene port for Kotlin Multiplatform
https://github.com/nehemiaharchives/lucene-kmp
android android-lib android-library apachelucene ios ios-library kmp kmp-library kotlin kotlin-library kotlin-multiplatform lucene
Last synced: 5 months ago
JSON representation
[WIP] Apache Lucene port for Kotlin Multiplatform
- Host: GitHub
- URL: https://github.com/nehemiaharchives/lucene-kmp
- Owner: nehemiaharchives
- License: apache-2.0
- Created: 2025-03-11T01:22:11.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-12-20T12:12:09.000Z (6 months ago)
- Last Synced: 2025-12-21T23:05:18.484Z (5 months ago)
- Topics: android, android-lib, android-library, apachelucene, ios, ios-library, kmp, kmp-library, kotlin, kotlin-library, kotlin-multiplatform, lucene
- Language: Kotlin
- Homepage:
- Size: 5.1 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Lucene Kotlin Multiplatform
[](https://github.com/nehemiaharchives/lucene-kmp/actions/workflows/ci.yml)
[](https://codecov.io/gh/nehemiaharchives/lucene-kmp)
## What is it?
This repository contains a lucene-kmp library project, a [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html) port of [apache lucene](https://github.com/apache/lucene/) that is deployable to [Maven Central](https://central.sonatype.com/).
## Supported platforms
* jvm
* android
* iOS (iosX64, iosArm64, iosSimulatorArm64)
## Lucene Java Source Project
currently the port is based on following commit of lucene main branch which is some commits before lucene 10.2.0 release
```
commit ec75fcad5a4208c7b9e35e870229d9b703cda8f3 (HEAD -> main, origin/main, origin/HEAD)
Author: Robert Muir
Date: Sun Mar 2 14:11:10 2025 -0500
reformat the python code with 'make reformat' and enable format in CI check
currently the python code has a mix of indentation, styles, imports
ordering, etc. for example, it is very difficult to work with mixed
indentation levels: the language is sensitive to indentation.
reformat all the code with 'make reformat' and enable format checks when
linting. It works like spotless, just don't think about it.
```
## PROGRESS
### Classes needed to port to write minimum index:
* [x] org.apache.lucene.index.IndexWriter
* [x] org.apache.lucene.index.IndexWriterConfig
* [x] org.apache.lucene.store.FSDirectory
* [x] org.apache.lucene.analysis.Analyzer
* [x] org.apache.lucene.document.Document
* [x] org.apache.lucene.document.Field
* [x] org.apache.lucene.document.IntPoint
* [x] org.apache.lucene.document.StoredField
* [x] org.apache.lucene.document.TextField
### Classes needed to port to perform minimum search:
* [x] org.apache.lucene.index.DirectoryReader
* [x] org.apache.lucene.index.StandardDirectoryReader
* [x] org.apache.lucene.queryparser.classic.QueryParser
* [x] org.apache.lucene.search.IndexSearcher
* [x] org.apache.lucene.store.FSLockFactory
* [x] org.apache.lucene.store.NIOFSDirectory
* [x] org.apache.lucene.document.IntPoint
* [x] org.apache.lucene.search.Query
* [x] org.apache.lucene.search.BooleanQuery
* [x] org.apache.lucene.search.BooleanClause
* [x] org.apache.lucene.search.Sort
* [x] org.apache.lucene.search.SortField
### Unit tests needed to port to verify the above classes:
[PROGRESS.md](PROGRESS.md) for overview of the progress including unit test classes. The file is automatically generated by [progress.main.kts](progress.main.kts) script which also outputs progress report to the console.
[PROGRESS2.md](PROGRESS2.md) for more detailed progress report. The file is automatically generated by [progressv2.main.kts](progressv2.main.kts) script which also outputs progress report to the console.
## TODO
[TODO.md](TODO.md) and [TODO_TEST.md](TODO_TEST.md) is generated by AI based on progress docs to tell what to port next.
After completing those TODOs, we need to catch up with lucene main branch automatically using AI agent such as GitHub Copilot, [open ai codex](http://www.chatgpt.com/codex), [google jules](https://jules.google.com), and/or [jetbrains junie](https://www.jetbrains.com/junie/) one commit by commit up to 10.2.0 and later versions of Lucene.