apache / apache/lucenenet

Finish port of NativeUnixDirectory and WindowsDirectory

Open
#1,342 2 comments 0 reactions 1 assignee Claimed by @paulirwin View on GitHub
is:feature pri:normal
Dominant language
C#
Stars
2.4k
Forks
658
Avg merge
3d 5h
Merged PRs (30d)
9

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

The ports for NativeUnixDirectory and WindowsDirectory were never completed, and are currently excluded from compilation from the Lucene.Net.Misc project, Store directory. We should complete the port of these types for API parity with upstream.

https://github.com/apache/lucene/tree/releases/lucene-solr/4.8.1/lucene/misc/src/java/org/apache/lucene/store

Note that these were originally implemented in a mix of Java and C++ to be able to do native calls. However, they are quite simple, and I am fairly certain we can accomplish these via P/Invoke instead of having to add C++ to our project, without having any significant performance impact. This appears to be the direction that was started already but never completed.

Also note that as of Lucene 4.8.1, these types had no unit tests. We should add unit test coverage for these, restricted to running on their respective platforms.

### Describe the solution you'd like

The types are ported and work well, with good unit test coverage added.

### Additional context

Note that these types were removed in Lucene 9.0.0, but someone might find good use for them between now and then.

See #1341 discussion.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.