title: Lucene .net core custom string sorting
body: <p>I want to create a string custom sorter for Lucene .Net core. How would I go about doing this? I tried following this example (<a href="https://stackoverflow.com/questions/40744865/custom-sorting-of-null-values-in-lucene-net-3-0-3#">Custom sorting of null values in Lucene.Net 3.0.3</a>) but FieldComparator and FieldComparatorSource doesn't seem to exist in the .Net Core library. I am using package Lucene.Net 4.8.0-beta00013.</p>
  <p>--- UPDATE ---</p>
  <p>I found FieldComparer and FieldComparerSource classes (thanks andrewjames), docs here: <a href="https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/Lucene.Net.Search.FieldComparer.html" rel="nofollow noreferrer">https://lucenenet.apache.org/docs/4.8.0-beta00013/api/core/Lucene.Net.Search.FieldComparer.html</a></p>
  <p>What I need to do is sort strings. More specifically I need to sort like this:</p>
  <pre><code>data in index   wanted sort result
  &quot;1&quot;             &quot;k&quot;
  &quot;2&quot;             &quot;st&quot;
  &quot;k&quot;             &quot;1&quot;
  &quot;3&quot;             &quot;2&quot;
  &quot;st&quot;            &quot;3&quot;
  </code></pre>
  <p>I have already done the sorter for this, so the sorting itself is done. However, I can't find any examples of an overlaoded FieldComparer sorting strings. I can only find sorting integers examples (found here <a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Search/FieldComparator.cs/#L747" rel="nofollow noreferrer">https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Search/FieldComparator.cs/#L747</a>). Specifically it's the functions Copy, SetNextReader, etc. that I do not know how to override properly. Anyone with an example of how to implement these for a string comparer? Thanks.</p>