Skip to content

Commit 3eeac22

Browse files
committed
More C# 14 field keyword changes
1 parent f4acd1f commit 3eeac22

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/Lucene.Net.Facet/SortedSet/DefaultSortedSetDocValuesReaderState.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Lucene.Net.Facet.SortedSet
2929
/// </summary>
3030
public class DefaultSortedSetDocValuesReaderState : SortedSetDocValuesReaderState
3131
{
32-
private readonly string field;
32+
private readonly string _field; // LUCENENET: must name as _field in C# 14 since 'field' is now a keyword
3333
private readonly AtomicReader topReader;
3434
private readonly int valueCount;
3535

@@ -45,7 +45,7 @@ public class DefaultSortedSetDocValuesReaderState : SortedSetDocValuesReaderStat
4545
/// </summary>
4646
public DefaultSortedSetDocValuesReaderState(IndexReader reader, string field = FacetsConfig.DEFAULT_INDEX_FIELD_NAME)
4747
{
48-
this.field = field;
48+
this._field = field;
4949
this.origReader = reader;
5050

5151
// We need this to create thread-safe MultiSortedSetDV
@@ -104,7 +104,7 @@ public DefaultSortedSetDocValuesReaderState(IndexReader reader, string field = F
104104
/// </summary>
105105
public override SortedSetDocValues GetDocValues()
106106
{
107-
return topReader.GetSortedSetDocValues(field);
107+
return topReader.GetSortedSetDocValues(_field);
108108
}
109109

110110
/// <summary>
@@ -124,7 +124,7 @@ public override OrdRange GetOrdRange(string dim)
124124
/// <summary>
125125
/// Indexed field we are reading.
126126
/// </summary>
127-
public override string Field => field;
127+
public override string Field => _field;
128128

129129
public override IndexReader OrigReader => origReader;
130130

src/Lucene.Net.Facet/Taxonomy/DocValuesOrdinalsReader.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace Lucene.Net.Facet.Taxonomy
3131
/// </summary>
3232
public class DocValuesOrdinalsReader : OrdinalsReader
3333
{
34-
private readonly string field;
34+
private readonly string _field; // LUCENENET: must name as _field in C# 14 since 'field' is now a keyword
3535

3636
/// <summary>
3737
/// Default constructor.
@@ -46,12 +46,12 @@ public DocValuesOrdinalsReader()
4646
/// </summary>
4747
public DocValuesOrdinalsReader(string field)
4848
{
49-
this.field = field;
49+
this._field = field;
5050
}
5151

5252
public override OrdinalsSegmentReader GetReader(AtomicReaderContext context)
5353
{
54-
BinaryDocValues values0 = context.AtomicReader.GetBinaryDocValues(field);
54+
BinaryDocValues values0 = context.AtomicReader.GetBinaryDocValues(_field);
5555
if (values0 is null)
5656
{
5757
values0 = DocValues.EMPTY_BINARY;
@@ -82,7 +82,7 @@ public override void Get(int docID, Int32sRef ordinals)
8282
}
8383
}
8484

85-
public override string IndexFieldName => field;
85+
public override string IndexFieldName => _field;
8686

8787
/// <summary>
8888
/// Subclass &amp; override if you change the encoding.

0 commit comments

Comments
 (0)