A lot of this confusion is centered around a couple of things:
New Lucene Design
Lucene 4.x+ is a completely different design than prior versions. The Lucene.Net.Contrib
package is no longer part of that design. Instead, there are now specialized modules for different functionality. In this case, what you are looking for is the Lucene.Net.Spatial assembly.
Spatial4n no longer duplicates types
In Spatial4n 0.3.0, Spatial4n.Core.NTS
included copies of all of the types of Spatial4n.Core
. This meant that you could not reference both libraries at the same time because they had conflicting type names. It required Lucene.Net.Contrib.Spatial
to also duplicate types (in Lucene.Net.Contrib.Spatial.NTS
) in order to access the functionality of NetTopologySuite.
Since Spatial4n 0.4.1, Spatial4n.Core types are not included in Spatial4n.Core.NTS. Instead Spatial4n.Core.NTS
references Spatial4n.Core
.
This means in Lucene.NET 4.8 there is no need to have a separate Lucene.Net.Spatial.NTS
library that references Spatial4n.Core.NTS
(and its duplicate type system of Spatial4n.Core
). However, you can add the NTS functionality to your project by referencing Spatial4n.Core.NTS
directly.
<ItemGroup>
<PackageReference Include="Spatial4n.Core" Version="0.4.1" />
<PackageReference Include="Spatial4n.Core.NTS" Version="0.4.1" />
</ItemGroup>
Examples
As Ron C correctly pointed out, there are some basic tests of NetTopologySuite (NTS) functionality in the Lucene.Net 4.8.0 codebase. But as noted above, you need to reference Spatial4n.Core.NTS
to access the extensions for NTS.
There are also some additional tests for Spatial4n using NetTopologySuite that can be analyzed.
If you need more specific information about the functionality, I suggest you search for the Java examples using the terms "Lucene spatial JTS", "Spatial4j", and "JavaTopologySuite". Since the port is done line-by-line for the most part, the Java examples should be fairly easy to translate to .NET.