lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [2/5] lucenenet git commit: API: Lucene.Net.Index.IIndexableField: Renamed FieldType > IndexableFieldType and added additional FieldType property on Lucene.Net.Documents.Field that returns FieldType rather than IIndexableFieldType so we can avoid casting
Date Sun, 13 Aug 2017 16:33:34 GMT
API: Lucene.Net.Index.IIndexableField: Renamed FieldType > IndexableFieldType and added
additional FieldType property on Lucene.Net.Documents.Field that returns FieldType rather
than IIndexableFieldType so we can avoid casting.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/361ceb66
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/361ceb66
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/361ceb66

Branch: refs/heads/master
Commit: 361ceb6610dd3975b6afd9ad5cccdf57c4f5409b
Parents: 729ce5b
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Aug 12 17:33:03 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Aug 12 17:33:03 2017 +0700

----------------------------------------------------------------------
 .../ByTask/Tasks/ReadTokensTask.cs              |  2 +-
 src/Lucene.Net.Facet/FacetsConfig.cs            |  8 +++---
 .../PostingsHighlight/PostingsHighlighter.cs    |  2 +-
 .../VectorHighlight/BaseFragmentsBuilder.cs     |  2 +-
 .../VectorHighlight/FieldTermStack.cs           |  2 +-
 src/Lucene.Net.Misc/Document/LazyDocument.cs    |  4 +--
 .../Analysis/BaseTokenStreamTestCase.cs         |  2 +-
 .../Index/BaseStoredFieldsFormatTestCase.cs     |  4 +--
 src/Lucene.Net.TestFramework/Index/DocHelper.cs | 14 +++++------
 .../Support/ApiScanTestBase.cs                  |  4 +--
 src/Lucene.Net.TestFramework/Util/TestUtil.cs   | 12 ++++-----
 .../ByTask/Feeds/DocMakerTest.cs                | 20 +++++++--------
 .../Index/Memory/MemoryIndexTest.cs             |  2 +-
 src/Lucene.Net.Tests/Document/TestDocument.cs   |  4 +--
 .../Index/TestBagOfPositions.cs                 |  2 +-
 .../Index/TestDocumentWriter.cs                 |  4 +--
 src/Lucene.Net.Tests/Index/TestFieldInfos.cs    |  2 +-
 src/Lucene.Net.Tests/Index/TestFieldsReader.cs  | 20 +++++++--------
 .../Index/TestIndexWriterExceptions.cs          |  6 ++---
 .../Index/TestIndexableField.cs                 |  2 +-
 src/Lucene.Net.Tests/Index/TestSegmentReader.cs |  4 +--
 src/Lucene.Net/Analysis/NumericTokenStream.cs   |  4 +--
 src/Lucene.Net/Codecs/StoredFieldsWriter.cs     |  4 +--
 src/Lucene.Net/Document/Field.cs                | 19 ++++++++++----
 src/Lucene.Net/Index/DocFieldProcessor.cs       |  4 +--
 src/Lucene.Net/Index/DocInverterPerField.cs     |  2 +-
 src/Lucene.Net/Index/DocValuesProcessor.cs      |  2 +-
 .../Index/FreqProxTermsWriterPerField.cs        |  2 +-
 src/Lucene.Net/Index/IndexableField.cs          |  7 +++++-
 src/Lucene.Net/Index/StoredFieldsProcessor.cs   |  2 +-
 .../Index/TermVectorsConsumerPerField.cs        | 26 ++++++++++----------
 31 files changed, 104 insertions(+), 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Benchmark/ByTask/Tasks/ReadTokensTask.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Benchmark/ByTask/Tasks/ReadTokensTask.cs b/src/Lucene.Net.Benchmark/ByTask/Tasks/ReadTokensTask.cs
index 1a8125d..d2b6058 100644
--- a/src/Lucene.Net.Benchmark/ByTask/Tasks/ReadTokensTask.cs
+++ b/src/Lucene.Net.Benchmark/ByTask/Tasks/ReadTokensTask.cs
@@ -67,7 +67,7 @@ namespace Lucene.Net.Benchmarks.ByTask.Tasks
             int tokenCount = 0;
             foreach (IIndexableField field in fields)
             {
-                if (!field.FieldType.IsTokenized ||
+                if (!field.IndexableFieldType.IsTokenized ||
                     field is Int32Field ||
                     field is Int64Field ||
                     field is SingleField ||

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Facet/FacetsConfig.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/FacetsConfig.cs b/src/Lucene.Net.Facet/FacetsConfig.cs
index f855a84..abbaf4b 100644
--- a/src/Lucene.Net.Facet/FacetsConfig.cs
+++ b/src/Lucene.Net.Facet/FacetsConfig.cs
@@ -292,7 +292,7 @@ namespace Lucene.Net.Facet
 
             foreach (IIndexableField field in doc.Fields)
             {
-                if (field.FieldType == FacetField.TYPE)
+                if (field.IndexableFieldType == FacetField.TYPE)
                 {
                     FacetField facetField = (FacetField)field;
                     FacetsConfig.DimConfig dimConfig = GetDimConfig(facetField.Dim);
@@ -310,7 +310,7 @@ namespace Lucene.Net.Facet
                     fields.Add(facetField);
                 }
 
-                if (field.FieldType == SortedSetDocValuesFacetField.TYPE)
+                if (field.IndexableFieldType == SortedSetDocValuesFacetField.TYPE)
                 {
                     var facetField = (SortedSetDocValuesFacetField)field;
                     FacetsConfig.DimConfig dimConfig = GetDimConfig(facetField.Dim);
@@ -328,7 +328,7 @@ namespace Lucene.Net.Facet
                     fields.Add(facetField);
                 }
 
-                if (field.FieldType == AssociationFacetField.TYPE)
+                if (field.IndexableFieldType == AssociationFacetField.TYPE)
                 {
                     AssociationFacetField facetField = (AssociationFacetField)field;
                     FacetsConfig.DimConfig dimConfig = GetDimConfig(facetField.Dim);
@@ -392,7 +392,7 @@ namespace Lucene.Net.Facet
 
             foreach (IIndexableField field in doc.Fields)
             {
-                IIndexableFieldType ft = field.FieldType;
+                IIndexableFieldType ft = field.IndexableFieldType;
                 if (ft != FacetField.TYPE && ft != SortedSetDocValuesFacetField.TYPE
&& ft != AssociationFacetField.TYPE)
                 {
                     result.Add(field);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
index 85d6925..3219c14 100644
--- a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
+++ b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
@@ -57,7 +57,7 @@ namespace Lucene.Net.Search.PostingsHighlight
     /// Example usage:
     /// <code>
     ///     // configure field with offsets at index time
-    ///     FieldType offsetsType = new FieldType(TextField.TYPE_STORED);
+    ///     IndexableFieldType offsetsType = new IndexableFieldType(TextField.TYPE_STORED);
     ///     offsetsType.IndexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS;
     ///     Field body = new Field("body", "foobar", offsetsType);
     ///     

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Highlighter/VectorHighlight/BaseFragmentsBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/VectorHighlight/BaseFragmentsBuilder.cs b/src/Lucene.Net.Highlighter/VectorHighlight/BaseFragmentsBuilder.cs
index 696cf7d..6f77027 100644
--- a/src/Lucene.Net.Highlighter/VectorHighlight/BaseFragmentsBuilder.cs
+++ b/src/Lucene.Net.Highlighter/VectorHighlight/BaseFragmentsBuilder.cs
@@ -214,7 +214,7 @@ namespace Lucene.Net.Search.VectorHighlight
             }
             int bufferLength = buffer.Length;
             // we added the multi value char to the last buffer, ignore it
-            if (values[index[0] - 1].FieldType.IsTokenized)
+            if (values[index[0] - 1].IndexableFieldType.IsTokenized)
             {
                 bufferLength--;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Highlighter/VectorHighlight/FieldTermStack.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/VectorHighlight/FieldTermStack.cs b/src/Lucene.Net.Highlighter/VectorHighlight/FieldTermStack.cs
index ad83dbc..0c5396c 100644
--- a/src/Lucene.Net.Highlighter/VectorHighlight/FieldTermStack.cs
+++ b/src/Lucene.Net.Highlighter/VectorHighlight/FieldTermStack.cs
@@ -44,7 +44,7 @@ namespace Lucene.Net.Search.VectorHighlight
         //  Directory dir = new RAMDirectory();
         //  IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig(Version.LUCENE_CURRENT,
analyzer));
         //  Document doc = new Document();
-        //  FieldType ft = new FieldType(TextField.TYPE_STORED);
+        //  IndexableFieldType ft = new IndexableFieldType(TextField.TYPE_STORED);
         //  ft.setStoreTermVectors(true);
         //  ft.setStoreTermVectorOffsets(true);
         //  ft.setStoreTermVectorPositions(true);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Misc/Document/LazyDocument.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Misc/Document/LazyDocument.cs b/src/Lucene.Net.Misc/Document/LazyDocument.cs
index 6495164..7bab218 100644
--- a/src/Lucene.Net.Misc/Document/LazyDocument.cs
+++ b/src/Lucene.Net.Misc/Document/LazyDocument.cs
@@ -204,9 +204,9 @@ namespace Lucene.Net.Documents
                 return GetRealValue().GetNumericValue();
             }
 
-            public virtual IIndexableFieldType FieldType
+            public virtual IIndexableFieldType IndexableFieldType
             {
-                get { return GetRealValue().FieldType; }
+                get { return GetRealValue().IndexableFieldType; }
             }
 
             public virtual TokenStream GetTokenStream(Analyzer analyzer)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
index 78cdd7a..0f2c4de 100644
--- a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
@@ -832,7 +832,7 @@ namespace Lucene.Net.Analysis
                             if (random.Next(7) == 0)
                             {
                                 // pile up a multivalued field
-                                var ft = (FieldType)field.FieldType;
+                                var ft = field.FieldType;
                                 currentField = new Field("dummy", bogus, ft);
                                 doc.Add(currentField);
                             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index e5515ad..6ba93de 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -357,8 +357,8 @@ namespace Lucene.Net.Index
             w.AddDocument(doc);
             IndexReader r = w.Reader;
             w.Dispose();
-            Assert.IsFalse(r.Document(0).GetField("field").FieldType.IsIndexed);
-            Assert.IsTrue(r.Document(0).GetField("field2").FieldType.IsIndexed);
+            Assert.IsFalse(r.Document(0).GetField("field").IndexableFieldType.IsIndexed);
+            Assert.IsTrue(r.Document(0).GetField("field2").IndexableFieldType.IsIndexed);
             r.Dispose();
             dir.Dispose();
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.TestFramework/Index/DocHelper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/DocHelper.cs b/src/Lucene.Net.TestFramework/Index/DocHelper.cs
index afdbb3b..e5b50f5 100644
--- a/src/Lucene.Net.TestFramework/Index/DocHelper.cs
+++ b/src/Lucene.Net.TestFramework/Index/DocHelper.cs
@@ -264,7 +264,7 @@ namespace Lucene.Net.Index
             {
                 IIndexableField f = Fields[i];
                 Add(All, f);
-                if (f.FieldType.IsIndexed)
+                if (f.IndexableFieldType.IsIndexed)
                 {
                     Add(Indexed, f);
                 }
@@ -272,15 +272,15 @@ namespace Lucene.Net.Index
                 {
                     Add(Unindexed, f);
                 }
-                if (f.FieldType.StoreTermVectors)
+                if (f.IndexableFieldType.StoreTermVectors)
                 {
                     Add(Termvector, f);
                 }
-                if (f.FieldType.IsIndexed && !f.FieldType.StoreTermVectors)
+                if (f.IndexableFieldType.IsIndexed && !f.IndexableFieldType.StoreTermVectors)
                 {
                     Add(Notermvector, f);
                 }
-                if (f.FieldType.IsStored)
+                if (f.IndexableFieldType.IsStored)
                 {
                     Add(Stored, f);
                 }
@@ -288,15 +288,15 @@ namespace Lucene.Net.Index
                 {
                     Add(Unstored, f);
                 }
-                if (f.FieldType.IndexOptions == IndexOptions.DOCS_ONLY)
+                if (f.IndexableFieldType.IndexOptions == IndexOptions.DOCS_ONLY)
                 {
                     Add(NoTf, f);
                 }
-                if (f.FieldType.OmitNorms)
+                if (f.IndexableFieldType.OmitNorms)
                 {
                     Add(NoNorms, f);
                 }
-                if (f.FieldType.IndexOptions == IndexOptions.DOCS_ONLY)
+                if (f.IndexableFieldType.IndexOptions == IndexOptions.DOCS_ONLY)
                 {
                     Add(NoTf, f);
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.TestFramework/Support/ApiScanTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Support/ApiScanTestBase.cs b/src/Lucene.Net.TestFramework/Support/ApiScanTestBase.cs
index 8f389cb..5000115 100644
--- a/src/Lucene.Net.TestFramework/Support/ApiScanTestBase.cs
+++ b/src/Lucene.Net.TestFramework/Support/ApiScanTestBase.cs
@@ -1084,8 +1084,8 @@ namespace Lucene.Net.Support
                             }
                         }
                         //else if (member.MemberType == MemberTypes.Field
-                        //    && ((FieldInfo)member).FieldType.IsGenericType
-                        //    && ((FieldInfo)member).FieldType.GetGenericTypeDefinition().IsAssignableFrom(lookFor)
+                        //    && ((FieldInfo)member).IndexableFieldType.IsGenericType
+                        //    && ((FieldInfo)member).IndexableFieldType.GetGenericTypeDefinition().IsAssignableFrom(lookFor)
                         //    && (!publiclyVisibleOnly || (((FieldInfo)member).IsFamily
|| ((FieldInfo)member).IsFamilyOrAssembly)))
                         //{
                         //    result.Add(string.Concat(t.FullName, ".", member.Name, " (field)"));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.TestFramework/Util/TestUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/TestUtil.cs b/src/Lucene.Net.TestFramework/Util/TestUtil.cs
index bfc73dd..cec067e 100644
--- a/src/Lucene.Net.TestFramework/Util/TestUtil.cs
+++ b/src/Lucene.Net.TestFramework/Util/TestUtil.cs
@@ -1052,7 +1052,7 @@ namespace Lucene.Net.Util
                 Field field1 = (Field)f;
                 Field field2;
                 DocValuesType dvType = field1.FieldType.DocValueType;
-                NumericType numType = ((FieldType)field1.FieldType).NumericType;
+                NumericType numType = field1.FieldType.NumericType;
                 if (dvType != DocValuesType.NONE)
                 {
                     switch (dvType)
@@ -1078,19 +1078,19 @@ namespace Lucene.Net.Util
                     switch (numType)
                     {
                         case NumericType.INT32:
-                            field2 = new Int32Field(field1.Name, (int)field1.GetNumericValue(),
(FieldType)field1.FieldType);
+                            field2 = new Int32Field(field1.Name, (int)field1.GetNumericValue(),
field1.FieldType);
                             break;
 
                         case NumericType.SINGLE:
-                            field2 = new SingleField(field1.Name, (int)field1.GetNumericValue(),
(FieldType)field1.FieldType);
+                            field2 = new SingleField(field1.Name, (int)field1.GetNumericValue(),
field1.FieldType);
                             break;
 
                         case NumericType.INT64:
-                            field2 = new Int64Field(field1.Name, (int)field1.GetNumericValue(),
(FieldType)field1.FieldType);
+                            field2 = new Int64Field(field1.Name, (int)field1.GetNumericValue(),
field1.FieldType);
                             break;
 
                         case NumericType.DOUBLE:
-                            field2 = new DoubleField(field1.Name, (int)field1.GetNumericValue(),
(FieldType)field1.FieldType);
+                            field2 = new DoubleField(field1.Name, (int)field1.GetNumericValue(),
field1.FieldType);
                             break;
 
                         default:
@@ -1099,7 +1099,7 @@ namespace Lucene.Net.Util
                 }
                 else
                 {
-                    field2 = new Field(field1.Name, field1.GetStringValue(), (FieldType)field1.FieldType);
+                    field2 = new Field(field1.Name, field1.GetStringValue(), field1.FieldType);
                 }
                 doc2.Add(field2);
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests.Benchmark/ByTask/Feeds/DocMakerTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Benchmark/ByTask/Feeds/DocMakerTest.cs b/src/Lucene.Net.Tests.Benchmark/ByTask/Feeds/DocMakerTest.cs
index e919fb1..ce13abe 100644
--- a/src/Lucene.Net.Tests.Benchmark/ByTask/Feeds/DocMakerTest.cs
+++ b/src/Lucene.Net.Tests.Benchmark/ByTask/Feeds/DocMakerTest.cs
@@ -141,28 +141,28 @@ namespace Lucene.Net.Benchmarks.ByTask.Feeds
 
             // Don't set anything, use the defaults
             doc = createTestNormsDocument(false, false, false, false);
-            assertTrue(doc.GetField(DocMaker.TITLE_FIELD).FieldType.OmitNorms);
-            assertFalse(doc.GetField(DocMaker.BODY_FIELD).FieldType.OmitNorms);
+            assertTrue(doc.GetField(DocMaker.TITLE_FIELD).IndexableFieldType.OmitNorms);
+            assertFalse(doc.GetField(DocMaker.BODY_FIELD).IndexableFieldType.OmitNorms);
 
             // Set norms to false
             doc = createTestNormsDocument(true, false, false, false);
-            assertTrue(doc.GetField(DocMaker.TITLE_FIELD).FieldType.OmitNorms);
-            assertFalse(doc.GetField(DocMaker.BODY_FIELD).FieldType.OmitNorms);
+            assertTrue(doc.GetField(DocMaker.TITLE_FIELD).IndexableFieldType.OmitNorms);
+            assertFalse(doc.GetField(DocMaker.BODY_FIELD).IndexableFieldType.OmitNorms);
 
             // Set norms to true
             doc = createTestNormsDocument(true, true, false, false);
-            assertFalse(doc.GetField(DocMaker.TITLE_FIELD).FieldType.OmitNorms);
-            assertFalse(doc.GetField(DocMaker.BODY_FIELD).FieldType.OmitNorms);
+            assertFalse(doc.GetField(DocMaker.TITLE_FIELD).IndexableFieldType.OmitNorms);
+            assertFalse(doc.GetField(DocMaker.BODY_FIELD).IndexableFieldType.OmitNorms);
 
             // Set body norms to false
             doc = createTestNormsDocument(false, false, true, false);
-            assertTrue(doc.GetField(DocMaker.TITLE_FIELD).FieldType.OmitNorms);
-            assertTrue(doc.GetField(DocMaker.BODY_FIELD).FieldType.OmitNorms);
+            assertTrue(doc.GetField(DocMaker.TITLE_FIELD).IndexableFieldType.OmitNorms);
+            assertTrue(doc.GetField(DocMaker.BODY_FIELD).IndexableFieldType.OmitNorms);
 
             // Set body norms to true
             doc = createTestNormsDocument(false, false, true, true);
-            assertTrue(doc.GetField(DocMaker.TITLE_FIELD).FieldType.OmitNorms);
-            assertFalse(doc.GetField(DocMaker.BODY_FIELD).FieldType.OmitNorms);
+            assertTrue(doc.GetField(DocMaker.TITLE_FIELD).IndexableFieldType.OmitNorms);
+            assertFalse(doc.GetField(DocMaker.BODY_FIELD).IndexableFieldType.OmitNorms);
         }
 
         [Test]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests.Memory/Index/Memory/MemoryIndexTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Memory/Index/Memory/MemoryIndexTest.cs b/src/Lucene.Net.Tests.Memory/Index/Memory/MemoryIndexTest.cs
index 3eba683..553be5a 100644
--- a/src/Lucene.Net.Tests.Memory/Index/Memory/MemoryIndexTest.cs
+++ b/src/Lucene.Net.Tests.Memory/Index/Memory/MemoryIndexTest.cs
@@ -487,7 +487,7 @@ namespace Lucene.Net.Index.Memory
                 Document doc = new Document();
                 foreach (IIndexableField field in nextDoc.Fields)
                 {
-                    if (field.FieldType.IsIndexed)
+                    if (field.IndexableFieldType.IsIndexed)
                     {
                         doc.Add(field);
                         if (Random().nextInt(3) == 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests/Document/TestDocument.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Document/TestDocument.cs b/src/Lucene.Net.Tests/Document/TestDocument.cs
index 2fd16ed..040690d 100644
--- a/src/Lucene.Net.Tests/Document/TestDocument.cs
+++ b/src/Lucene.Net.Tests/Document/TestDocument.cs
@@ -67,8 +67,8 @@ namespace Lucene.Net.Documents
             Assert.AreEqual(2, doc.Fields.Count);
 
             Assert.IsTrue(binaryFld.GetBinaryValue() != null);
-            Assert.IsTrue(binaryFld.FieldType.IsStored);
-            Assert.IsFalse(binaryFld.FieldType.IsIndexed);
+            Assert.IsTrue(binaryFld.IndexableFieldType.IsStored);
+            Assert.IsFalse(binaryFld.IndexableFieldType.IsIndexed);
 
             string binaryTest = doc.GetBinaryValue("binary").Utf8ToString();
             Assert.IsTrue(binaryTest.Equals(BinaryVal));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs b/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs
index 79b96ba..f64a553 100644
--- a/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs
+++ b/src/Lucene.Net.Tests/Index/TestBagOfPositions.cs
@@ -94,7 +94,7 @@ namespace Lucene.Net.Index
             }
 
             Field prototype = NewTextField("field", "", Field.Store.NO);
-            FieldType fieldType = new FieldType((FieldType)prototype.FieldType);
+            FieldType fieldType = new FieldType(prototype.FieldType);
             if (Random().NextBoolean())
             {
                 fieldType.OmitNorms = true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests/Index/TestDocumentWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestDocumentWriter.cs b/src/Lucene.Net.Tests/Index/TestDocumentWriter.cs
index 0232486..81a27c6 100644
--- a/src/Lucene.Net.Tests/Index/TestDocumentWriter.cs
+++ b/src/Lucene.Net.Tests/Index/TestDocumentWriter.cs
@@ -80,12 +80,12 @@ namespace Lucene.Net.Index
             IIndexableField[] fields = doc.GetFields("textField2");
             Assert.IsTrue(fields != null && fields.Length == 1);
             Assert.IsTrue(fields[0].GetStringValue().Equals(DocHelper.FIELD_2_TEXT));
-            Assert.IsTrue(fields[0].FieldType.StoreTermVectors);
+            Assert.IsTrue(fields[0].IndexableFieldType.StoreTermVectors);
 
             fields = doc.GetFields("textField1");
             Assert.IsTrue(fields != null && fields.Length == 1);
             Assert.IsTrue(fields[0].GetStringValue().Equals(DocHelper.FIELD_1_TEXT));
-            Assert.IsFalse(fields[0].FieldType.StoreTermVectors);
+            Assert.IsFalse(fields[0].IndexableFieldType.StoreTermVectors);
 
             fields = doc.GetFields("keyField");
             Assert.IsTrue(fields != null && fields.Length == 1);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests/Index/TestFieldInfos.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestFieldInfos.cs b/src/Lucene.Net.Tests/Index/TestFieldInfos.cs
index 35f8d8a..45ec4e8 100644
--- a/src/Lucene.Net.Tests/Index/TestFieldInfos.cs
+++ b/src/Lucene.Net.Tests/Index/TestFieldInfos.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Index
             FieldInfos.Builder builder = new FieldInfos.Builder();
             foreach (IIndexableField field in TestDoc)
             {
-                builder.AddOrUpdate(field.Name, field.FieldType);
+                builder.AddOrUpdate(field.Name, field.IndexableFieldType);
             }
             FieldInfos fieldInfos = builder.Finish();
             //Since the complement is stored as well in the fields map

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests/Index/TestFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestFieldsReader.cs b/src/Lucene.Net.Tests/Index/TestFieldsReader.cs
index 5f03962..81251fd 100644
--- a/src/Lucene.Net.Tests/Index/TestFieldsReader.cs
+++ b/src/Lucene.Net.Tests/Index/TestFieldsReader.cs
@@ -59,7 +59,7 @@ namespace Lucene.Net.Index
             DocHelper.SetupDoc(TestDoc);
             foreach (IIndexableField field in TestDoc)
             {
-                FieldInfos.AddOrUpdate(field.Name, field.FieldType);
+                FieldInfos.AddOrUpdate(field.Name, field.IndexableFieldType);
             }
             Dir = NewDirectory();
             IndexWriterConfig conf = NewIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())).SetMergePolicy(NewLogMergePolicy());
@@ -92,22 +92,22 @@ namespace Lucene.Net.Index
 
             Field field = (Field)doc.GetField(DocHelper.TEXT_FIELD_2_KEY);
             Assert.IsTrue(field != null);
-            Assert.IsTrue(field.FieldType.StoreTermVectors);
+            Assert.IsTrue(field.IndexableFieldType.StoreTermVectors);
 
-            Assert.IsFalse(field.FieldType.OmitNorms);
-            Assert.IsTrue(field.FieldType.IndexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
+            Assert.IsFalse(field.IndexableFieldType.OmitNorms);
+            Assert.IsTrue(field.IndexableFieldType.IndexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
 
             field = (Field)doc.GetField(DocHelper.TEXT_FIELD_3_KEY);
             Assert.IsTrue(field != null);
-            Assert.IsFalse(field.FieldType.StoreTermVectors);
-            Assert.IsTrue(field.FieldType.OmitNorms);
-            Assert.IsTrue(field.FieldType.IndexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
+            Assert.IsFalse(field.IndexableFieldType.StoreTermVectors);
+            Assert.IsTrue(field.IndexableFieldType.OmitNorms);
+            Assert.IsTrue(field.IndexableFieldType.IndexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
 
             field = (Field)doc.GetField(DocHelper.NO_TF_KEY);
             Assert.IsTrue(field != null);
-            Assert.IsFalse(field.FieldType.StoreTermVectors);
-            Assert.IsFalse(field.FieldType.OmitNorms);
-            Assert.IsTrue(field.FieldType.IndexOptions == IndexOptions.DOCS_ONLY);
+            Assert.IsFalse(field.IndexableFieldType.StoreTermVectors);
+            Assert.IsFalse(field.IndexableFieldType.OmitNorms);
+            Assert.IsTrue(field.IndexableFieldType.IndexOptions == IndexOptions.DOCS_ONLY);
 
             DocumentStoredFieldVisitor visitor = new DocumentStoredFieldVisitor(DocHelper.TEXT_FIELD_3_KEY);
             reader.Document(0, visitor);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
index 6733d2f..feded19 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
@@ -1629,7 +1629,7 @@ namespace Lucene.Net.Index
                         try
                         {
                             w.AddDocument(doc);
-                            Assert.IsFalse(field.FieldType.StoreTermVectors);
+                            Assert.IsFalse(field.IndexableFieldType.StoreTermVectors);
                         }
                         catch (Exception e)
                         {
@@ -1654,7 +1654,7 @@ namespace Lucene.Net.Index
                         try
                         {
                             w.AddDocument(doc);
-                            Assert.IsFalse(field.FieldType.StoreTermVectors);
+                            Assert.IsFalse(field.IndexableFieldType.StoreTermVectors);
                         }
                         catch (Exception e)
                         {
@@ -2001,7 +2001,7 @@ namespace Lucene.Net.Index
                 get { return "foo"; }
             }
 
-            public IIndexableFieldType FieldType
+            public IIndexableFieldType IndexableFieldType
             {
                 get { return StringField.TYPE_NOT_STORED; }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests/Index/TestIndexableField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexableField.cs b/src/Lucene.Net.Tests/Index/TestIndexableField.cs
index e7f5856..b41f9c2 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexableField.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexableField.cs
@@ -195,7 +195,7 @@ namespace Lucene.Net.Index
                 return null;
             }
 
-            public IIndexableFieldType FieldType
+            public IIndexableFieldType IndexableFieldType
             {
                 get { return fieldType; }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net.Tests/Index/TestSegmentReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestSegmentReader.cs b/src/Lucene.Net.Tests/Index/TestSegmentReader.cs
index b98287d..d96376a 100644
--- a/src/Lucene.Net.Tests/Index/TestSegmentReader.cs
+++ b/src/Lucene.Net.Tests/Index/TestSegmentReader.cs
@@ -191,9 +191,9 @@ namespace Lucene.Net.Index
             for (int i = 0; i < DocHelper.Fields.Length; i++)
             {
                 IIndexableField f = DocHelper.Fields[i];
-                if (f.FieldType.IsIndexed)
+                if (f.IndexableFieldType.IsIndexed)
                 {
-                    Assert.AreEqual(reader.GetNormValues(f.Name) != null, !f.FieldType.OmitNorms);
+                    Assert.AreEqual(reader.GetNormValues(f.Name) != null, !f.IndexableFieldType.OmitNorms);
                     Assert.AreEqual(reader.GetNormValues(f.Name) != null, !DocHelper.NoNorms.ContainsKey(f.Name));
                     if (reader.GetNormValues(f.Name) == null)
                     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Analysis/NumericTokenStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Analysis/NumericTokenStream.cs b/src/Lucene.Net/Analysis/NumericTokenStream.cs
index e616ada..c4bf124 100644
--- a/src/Lucene.Net/Analysis/NumericTokenStream.cs
+++ b/src/Lucene.Net/Analysis/NumericTokenStream.cs
@@ -38,7 +38,7 @@ namespace Lucene.Net.Analysis
     /// <para/>Here's an example usage, for an <see cref="int"/> field:
     ///
     /// <code>
-    ///     FieldType fieldType = new FieldType(TextField.TYPE_NOT_STORED)
+    ///     IndexableFieldType fieldType = new IndexableFieldType(TextField.TYPE_NOT_STORED)
     ///     {
     ///         OmitNorms = true,
     ///         IndexOptions = IndexOptions.DOCS_ONLY
@@ -52,7 +52,7 @@ namespace Lucene.Net.Analysis
     ///
     /// <code>
     ///     NumericTokenStream stream = new NumericTokenStream(precisionStep);
-    ///     FieldType fieldType = new FieldType(TextField.TYPE_NOT_STORED)
+    ///     IndexableFieldType fieldType = new IndexableFieldType(TextField.TYPE_NOT_STORED)
     ///     {
     ///         OmitNorms = true,
     ///         IndexOptions = IndexOptions.DOCS_ONLY

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Codecs/StoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/StoredFieldsWriter.cs b/src/Lucene.Net/Codecs/StoredFieldsWriter.cs
index 15f7112..130cfc1 100644
--- a/src/Lucene.Net/Codecs/StoredFieldsWriter.cs
+++ b/src/Lucene.Net/Codecs/StoredFieldsWriter.cs
@@ -135,7 +135,7 @@ namespace Lucene.Net.Codecs
             int storedCount = 0;
             foreach (IIndexableField field in doc)
             {
-                if (field.FieldType.IsStored)
+                if (field.IndexableFieldType.IsStored)
                 {
                     storedCount++;
                 }
@@ -145,7 +145,7 @@ namespace Lucene.Net.Codecs
 
             foreach (IIndexableField field in doc)
             {
-                if (field.FieldType.IsStored)
+                if (field.IndexableFieldType.IsStored)
                 {
                     WriteField(fieldInfos.FieldInfo(field.Name), field);
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Document/Field.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Document/Field.cs b/src/Lucene.Net/Document/Field.cs
index 8d85c80..9c0f6ce 100644
--- a/src/Lucene.Net/Document/Field.cs
+++ b/src/Lucene.Net/Document/Field.cs
@@ -567,19 +567,28 @@ namespace Lucene.Net.Documents
         }
 
         /// <summary>
-        /// Returns the <see cref="Documents.FieldType"/> for this field. </summary>
-        public virtual IIndexableFieldType FieldType
+        /// Returns the <see cref="Documents.FieldType"/> for this field as type <see
cref="Documents.FieldType"/>. </summary>
+        // LUCENENET specific property to prevent the need to cast. The FieldType property
was renamed IndexableFieldType
+        // in order to accommodate this (more Lucene like) property.
+        public virtual FieldType FieldType
+        {
+            get { return m_type; }
+        }
+
+        /// <summary>
+        /// Returns the <see cref="Documents.FieldType"/> for this field as type <see
cref="IIndexableFieldType"/> </summary>
+        public virtual IIndexableFieldType IndexableFieldType
         {
             get { return m_type; }
         }
 
         public virtual TokenStream GetTokenStream(Analyzer analyzer)
         {
-            if (!((FieldType)FieldType).IsIndexed)
+            if (!FieldType.IsIndexed)
             {
                 return null;
             }
-            NumericType numericType = ((FieldType)FieldType).NumericType;
+            NumericType numericType = FieldType.NumericType;
             if (numericType != NumericType.NONE)
             {
                 if (!(internalTokenStream is NumericTokenStream))
@@ -615,7 +624,7 @@ namespace Lucene.Net.Documents
                 return internalTokenStream;
             }
 
-            if (!((FieldType)FieldType).IsTokenized)
+            if (!IndexableFieldType.IsTokenized)
             {
                 if (GetStringValue() == null)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Index/DocFieldProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/DocFieldProcessor.cs b/src/Lucene.Net/Index/DocFieldProcessor.cs
index b3c288c..e0a412f 100644
--- a/src/Lucene.Net/Index/DocFieldProcessor.cs
+++ b/src/Lucene.Net/Index/DocFieldProcessor.cs
@@ -227,7 +227,7 @@ namespace Lucene.Net.Index
                     // needs to be more "pluggable" such that if I want
                     // to have a new "thing" my Fields can do, I can
                     // easily add it
-                    FieldInfo fi = fieldInfos.AddOrUpdate(fieldName, field.FieldType);
+                    FieldInfo fi = fieldInfos.AddOrUpdate(fieldName, field.IndexableFieldType);
 
                     fp = new DocFieldProcessorPerField(this, fi);
                     fp.next = fieldHash[hashPos];
@@ -243,7 +243,7 @@ namespace Lucene.Net.Index
                 {
                     // need to addOrUpdate so that FieldInfos can update globalFieldNumbers
                     // with the correct DocValue type (LUCENE-5192)
-                    FieldInfo fi = fieldInfos.AddOrUpdate(fieldName, field.FieldType);
+                    FieldInfo fi = fieldInfos.AddOrUpdate(fieldName, field.IndexableFieldType);
                     Debug.Assert(fi == fp.fieldInfo, "should only have updated an existing
FieldInfo instance");
                 }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Index/DocInverterPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/DocInverterPerField.cs b/src/Lucene.Net/Index/DocInverterPerField.cs
index 9724363..d9bb0c4 100644
--- a/src/Lucene.Net/Index/DocInverterPerField.cs
+++ b/src/Lucene.Net/Index/DocInverterPerField.cs
@@ -72,7 +72,7 @@ namespace Lucene.Net.Index
             for (int i = 0; i < count; i++)
             {
                 IIndexableField field = fields[i];
-                IIndexableFieldType fieldType = field.FieldType;
+                IIndexableFieldType fieldType = field.IndexableFieldType;
 
                 // TODO FI: this should be "genericized" to querying
                 // consumer if it wants to see this particular field

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Index/DocValuesProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/DocValuesProcessor.cs b/src/Lucene.Net/Index/DocValuesProcessor.cs
index 6de3f99..0e820f0 100644
--- a/src/Lucene.Net/Index/DocValuesProcessor.cs
+++ b/src/Lucene.Net/Index/DocValuesProcessor.cs
@@ -54,7 +54,7 @@ namespace Lucene.Net.Index
 
         public override void AddField(int docID, IIndexableField field, FieldInfo fieldInfo)
         {
-            DocValuesType dvType = field.FieldType.DocValueType;
+            DocValuesType dvType = field.IndexableFieldType.DocValueType;
             if (dvType != DocValuesType.NONE)
             {
                 fieldInfo.DocValuesType = dvType;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Index/FreqProxTermsWriterPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/FreqProxTermsWriterPerField.cs b/src/Lucene.Net/Index/FreqProxTermsWriterPerField.cs
index 8b108ce..07fce0c 100644
--- a/src/Lucene.Net/Index/FreqProxTermsWriterPerField.cs
+++ b/src/Lucene.Net/Index/FreqProxTermsWriterPerField.cs
@@ -125,7 +125,7 @@ namespace Lucene.Net.Index
         {
             for (int i = 0; i < count; i++)
             {
-                if (fields[i].FieldType.IsIndexed)
+                if (fields[i].IndexableFieldType.IsIndexed)
                 {
                     return true;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Index/IndexableField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/IndexableField.cs b/src/Lucene.Net/Index/IndexableField.cs
index 99d09f7..98b38d7 100644
--- a/src/Lucene.Net/Index/IndexableField.cs
+++ b/src/Lucene.Net/Index/IndexableField.cs
@@ -43,7 +43,12 @@ namespace Lucene.Net.Index
         /// <see cref="IIndexableFieldType"/> describing the properties
         /// of this field.
         /// </summary>
-        IIndexableFieldType FieldType { get; }
+        // LUCENENET specific: Renamed from FieldType so we can use that name
+        // on the Field class and return FieldType instead of IIndexableFieldType
+        // to avoid a bunch of casting. In Java, it compiles when you implement this
+        // property with a class that derives from IIndexableFieldType, but in .NET it
+        // does not. 
+        IIndexableFieldType IndexableFieldType { get; }
 
         /// <summary>
         /// Returns the field's index-time boost.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Index/StoredFieldsProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/StoredFieldsProcessor.cs b/src/Lucene.Net/Index/StoredFieldsProcessor.cs
index 53ad45e..ff03302 100644
--- a/src/Lucene.Net/Index/StoredFieldsProcessor.cs
+++ b/src/Lucene.Net/Index/StoredFieldsProcessor.cs
@@ -160,7 +160,7 @@ namespace Lucene.Net.Index
 
         public override void AddField(int docID, IIndexableField field, FieldInfo fieldInfo)
         {
-            if (field.FieldType.IsStored)
+            if (field.IndexableFieldType.IsStored)
             {
                 if (numStoredFields == storedFields.Length)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/361ceb66/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs b/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs
index 16dacea..68a036a 100644
--- a/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs
+++ b/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs
@@ -78,18 +78,18 @@ namespace Lucene.Net.Index
             for (int i = 0; i < count; i++)
             {
                 IIndexableField field = fields[i];
-                if (field.FieldType.IsIndexed)
+                if (field.IndexableFieldType.IsIndexed)
                 {
-                    if (field.FieldType.StoreTermVectors)
+                    if (field.IndexableFieldType.StoreTermVectors)
                     {
                         doVectors = true;
-                        doVectorPositions |= field.FieldType.StoreTermVectorPositions;
-                        doVectorOffsets |= field.FieldType.StoreTermVectorOffsets;
+                        doVectorPositions |= field.IndexableFieldType.StoreTermVectorPositions;
+                        doVectorOffsets |= field.IndexableFieldType.StoreTermVectorOffsets;
                         if (doVectorPositions)
                         {
-                            doVectorPayloads |= field.FieldType.StoreTermVectorPayloads;
+                            doVectorPayloads |= field.IndexableFieldType.StoreTermVectorPayloads;
                         }
-                        else if (field.FieldType.StoreTermVectorPayloads)
+                        else if (field.IndexableFieldType.StoreTermVectorPayloads)
                         {
                             // TODO: move this check somewhere else, and impl the other missing
ones
                             throw new System.ArgumentException("cannot index term vector
payloads without term vector positions (field=\"" + field.Name + "\")");
@@ -97,15 +97,15 @@ namespace Lucene.Net.Index
                     }
                     else
                     {
-                        if (field.FieldType.StoreTermVectorOffsets)
+                        if (field.IndexableFieldType.StoreTermVectorOffsets)
                         {
                             throw new System.ArgumentException("cannot index term vector
offsets when term vectors are not indexed (field=\"" + field.Name + "\")");
                         }
-                        if (field.FieldType.StoreTermVectorPositions)
+                        if (field.IndexableFieldType.StoreTermVectorPositions)
                         {
                             throw new System.ArgumentException("cannot index term vector
positions when term vectors are not indexed (field=\"" + field.Name + "\")");
                         }
-                        if (field.FieldType.StoreTermVectorPayloads)
+                        if (field.IndexableFieldType.StoreTermVectorPayloads)
                         {
                             throw new System.ArgumentException("cannot index term vector
payloads when term vectors are not indexed (field=\"" + field.Name + "\")");
                         }
@@ -113,19 +113,19 @@ namespace Lucene.Net.Index
                 }
                 else
                 {
-                    if (field.FieldType.StoreTermVectors)
+                    if (field.IndexableFieldType.StoreTermVectors)
                     {
                         throw new System.ArgumentException("cannot index term vectors when
field is not indexed (field=\"" + field.Name + "\")");
                     }
-                    if (field.FieldType.StoreTermVectorOffsets)
+                    if (field.IndexableFieldType.StoreTermVectorOffsets)
                     {
                         throw new System.ArgumentException("cannot index term vector offsets
when field is not indexed (field=\"" + field.Name + "\")");
                     }
-                    if (field.FieldType.StoreTermVectorPositions)
+                    if (field.IndexableFieldType.StoreTermVectorPositions)
                     {
                         throw new System.ArgumentException("cannot index term vector positions
when field is not indexed (field=\"" + field.Name + "\")");
                     }
-                    if (field.FieldType.StoreTermVectorPayloads)
+                    if (field.IndexableFieldType.StoreTermVectorPayloads)
                     {
                         throw new System.ArgumentException("cannot index term vector payloads
when field is not indexed (field=\"" + field.Name + "\")");
                     }


Mime
View raw message