You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2016/09/11 21:31:19 UTC
[48/50] [abbrv] lucenenet git commit: Cleaned up
QueryParser.Surround.Parser.QueryParser comments
Cleaned up QueryParser.Surround.Parser.QueryParser comments
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/927b5a2a
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/927b5a2a
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/927b5a2a
Branch: refs/heads/master
Commit: 927b5a2aee55422b98806c6ef0191cc28654655e
Parents: bf63501
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Sep 3 04:02:08 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Sep 3 04:02:08 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.QueryParser/Surround/Parser/QueryParser.cs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/927b5a2a/src/Lucene.Net.QueryParser/Surround/Parser/QueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Surround/Parser/QueryParser.cs b/src/Lucene.Net.QueryParser/Surround/Parser/QueryParser.cs
index 170eb74..cc18216 100644
--- a/src/Lucene.Net.QueryParser/Surround/Parser/QueryParser.cs
+++ b/src/Lucene.Net.QueryParser/Surround/Parser/QueryParser.cs
@@ -1,6 +1,7 @@
\ufeffusing Lucene.Net.QueryParser.Surround.Query;
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
namespace Lucene.Net.QueryParser.Surround.Parser
@@ -114,7 +115,7 @@ namespace Lucene.Net.QueryParser.Surround.Parser
/* W, 2W, 3W etc -> 1, 2 3, etc. Same for N, 2N ... */
return distanceOp.Length == 1
? 1
- : int.Parse(distanceOp.Substring(0, distanceOp.Length - 1));
+ : int.Parse(distanceOp.Substring(0, distanceOp.Length - 1)); // LUCENENET TODO: Culture from current thread?
}
protected static void CheckDistanceSubQueries(DistanceQuery distq, string opName)
@@ -499,7 +500,6 @@ namespace Lucene.Net.QueryParser.Surround.Parser
break;
case RegexpToken.QUOTED:
term = Jj_consume_token(RegexpToken.QUOTED);
- // TODO: Substring fix
{ if (true) return GetTermQuery(term.image.Substring(1, (term.image.Length - 1) - 1), true /* quoted */); }
break;
case RegexpToken.SUFFIXTERM:
@@ -509,7 +509,6 @@ namespace Lucene.Net.QueryParser.Surround.Parser
{
{ if (true) throw new ParseException(truncationErrorMessage + term.image); }
}
- // TODO: Substring fix
{ if (true) return GetPrefixQuery(term.image.Substring(0, term.image.Length - 1), false /* not quoted */); }
break;
case RegexpToken.TRUNCTERM:
@@ -528,7 +527,6 @@ namespace Lucene.Net.QueryParser.Surround.Parser
{
{ if (true) throw new ParseException(truncationErrorMessage + term.image); }
}
- // TODO: Substring fix
{ if (true) return GetPrefixQuery(term.image.Substring(1, (term.image.Length - 2) - 1), true /* quoted */); }
break;
default:
@@ -559,7 +557,7 @@ namespace Lucene.Net.QueryParser.Surround.Parser
float f;
try
{
- // TODO: Test parsing float in various cultures (.NET)
+ // LUCENENET TODO: Test parsing float in various cultures (.NET)
f = float.Parse(weight.image);
}
catch (Exception floatExc)