lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [1/6] lucenenet git commit: Lucene.Net.Core.Document.Field: Corrected implementation of GetStringValue() to be more like the original
Date Thu, 09 Mar 2017 05:53:11 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/api-work db85011e3 -> 369f738bb


Lucene.Net.Core.Document.Field: Corrected implementation of GetStringValue() to be more like
the original


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

Branch: refs/heads/api-work
Commit: 74c013a4ae95ce4fc528f6c6433a1f8f15ad9716
Parents: db85011
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Mar 9 11:08:51 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Mar 9 11:08:51 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Document/Field.cs | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/74c013a4/src/Lucene.Net.Core/Document/Field.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/Field.cs b/src/Lucene.Net.Core/Document/Field.cs
index 91cc425..7621fa0 100644
--- a/src/Lucene.Net.Core/Document/Field.cs
+++ b/src/Lucene.Net.Core/Document/Field.cs
@@ -270,16 +270,14 @@ namespace Lucene.Net.Documents
         /// </summary>
         public virtual string GetStringValue() // LUCENENET specific: Added verb Get to make
it more clear that this returns the value
         {
-            return m_fieldsData == null ? null : m_fieldsData.ToString();
-
-            /*if (FieldsData is string || FieldsData is Number)
+            if (m_fieldsData is string || m_fieldsData is int || m_fieldsData is float ||
m_fieldsData is double || m_fieldsData is long)
             {
-            return FieldsData.ToString();
+                return m_fieldsData.ToString();
             }
             else
             {
                 return null;
-            }*/
+            }
         }
 
         /// <summary>


Mime
View raw message