lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r493932 - in /incubator/lucene.net/trunk/C#/contrib/Highlighter.Net: ./ Highlighter.Net/ Test/
Date Mon, 08 Jan 2007 03:49:24 GMT
Author: aroush
Date: Sun Jan  7 19:49:23 2007
New Revision: 493932

URL: http://svn.apache.org/viewvc?view=rev&rev=493932
Log:
Release of Highlighter.Net.2.0 build 001 "final".


Modified:
    incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/HISTORY.txt
    incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/AssemblyInfo.cs
    incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/Highlighter.Net-2.0.0.csproj
    incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/QueryTermExtractor.cs
    incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/TextFragment.cs
    incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/AssemblyInfo.cs
    incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/HighlighterTest.cs
    incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/Test-2.0.0.csproj

Modified: incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/HISTORY.txt
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/contrib/Highlighter.Net/HISTORY.txt?view=diff&rev=493932&r1=493931&r2=493932
==============================================================================
--- incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/HISTORY.txt (original)
+++ incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/HISTORY.txt Sun Jan  7 19:49:23
2007
@@ -2,10 +2,17 @@
 -----------------------
 
 
+07Jan07:
+	- Release: Highlighter.Net.2.0.0 build 001 "final"
+	- Fix: Lucene.Net.Highlight.QueryTermExtractor.GetTerms -- was using the wrong integrator
+	- Fix: Lucene.Net.Highlight.TextFragment.ToString -- offset error
+	- Issue: TestEncoding() is failing because the test code is not fully ported to .NET
+
+
 27Dec06:
 	- Release: Highlighter.Net.2.0.0 build 000 "Alpha"
-	- Issues: Not fully tested / validated such that many of the NUnit tests are failing.
+	- Issue: Not fully tested / validated such that many of the NUnit tests are failing.
 
 
 05Jan05:
-	- Release: Highlighter.Net.1.4.0 RC1 build 001
+	- Release: Highlighter.Net.1.4.0 RC1 build 001
\ No newline at end of file

Modified: incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/contrib/Highlighter.Net/Highlighter.Net/AssemblyInfo.cs?view=diff&rev=493932&r1=493931&r2=493932
==============================================================================
--- incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/AssemblyInfo.cs
(original)
+++ incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/AssemblyInfo.cs
Sun Jan  7 19:49:23 2007
@@ -26,7 +26,7 @@
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
 
-[assembly: AssemblyVersion("2.0.0.000")]
+[assembly: AssemblyVersion("2.0.0.001")]
 
 //
 // In order to sign your assembly you must specify a key to use. Refer to the 

Modified: incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/Highlighter.Net-2.0.0.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/contrib/Highlighter.Net/Highlighter.Net/Highlighter.Net-2.0.0.csproj?view=diff&rev=493932&r1=493931&r2=493932
==============================================================================
--- incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/Highlighter.Net-2.0.0.csproj
(original)
+++ incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/Highlighter.Net-2.0.0.csproj
Sun Jan  7 19:49:23 2007
@@ -82,7 +82,7 @@
                 <Reference
                     Name = "Lucene.Net"
                     AssemblyName = "Lucene.Net"
-                    HintPath = "..\Lucene.Net.dll"
+                    HintPath = "..\..\Lucene.Net-2.0.1-001.src\Lucene.Net\bin\Debug\Lucene.Net.dll"
                 />
             </References>
         </Build>
@@ -94,6 +94,16 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "DefaultEncoder.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Encoder.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Formatter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
@@ -104,11 +114,21 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "GradientFormatter.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Highlighter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "NullFragmenter.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "Package.html"
                     BuildAction = "Content"
                 />
@@ -133,17 +153,32 @@
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "SimpleHTMLEncoder.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "SimpleHTMLFormatter.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
+                    RelPath = "SpanGradientFormatter.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "TextFragment.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
                 <File
                     RelPath = "TokenGroup.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "TokenSources.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />

Modified: incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/QueryTermExtractor.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/contrib/Highlighter.Net/Highlighter.Net/QueryTermExtractor.cs?view=diff&rev=493932&r1=493931&r2=493932
==============================================================================
--- incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/QueryTermExtractor.cs
(original)
+++ incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/QueryTermExtractor.cs
Sun Jan  7 19:49:23 2007
@@ -127,26 +127,16 @@
 				System.Collections.Hashtable nonWeightedTerms = new System.Collections.Hashtable();
 				query.ExtractTerms(nonWeightedTerms);
 
-                foreach (Term term in terms.Values)
+                System.Collections.IDictionaryEnumerator iter =  nonWeightedTerms.GetEnumerator();
+                while (iter.MoveNext())
                 {
+                    Term term = (Term)iter.Value;
                     if ((fieldName == null) || (term.Field() == fieldName))
                     {
-                        WeightedTerm temp = new WeightedTerm(query.GetBoost(), term.Text());
+                        WeightedTerm temp = new  WeightedTerm(query.GetBoost(), term.Text());
                         terms.Add(temp, temp);
                     }
                 }
-
-                /*
-				for (System.Collections.IEnumerator iter = nonWeightedTerms.GetEnumerator(); iter.MoveNext();
)
-				{
-					Term term = (Term) iter.Current;
-					if ((fieldName == null) || (term.Field() == fieldName))
-					{
-                        WeightedTerm temp = new WeightedTerm(query.GetBoost(), term.Text());
-						terms.Add(temp, temp);
-					}
-				}
-                */
 			}
 			catch (System.NotSupportedException ignore)
 			{

Modified: incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/TextFragment.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/contrib/Highlighter.Net/Highlighter.Net/TextFragment.cs?view=diff&rev=493932&r1=493931&r2=493932
==============================================================================
--- incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/TextFragment.cs
(original)
+++ incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Highlighter.Net/TextFragment.cs
Sun Jan  7 19:49:23 2007
@@ -74,7 +74,7 @@
 		*/
 		public override System.String ToString()
 		{
-			return markedUpText.ToString(textStartPos, textEndPos);
+			return markedUpText.ToString(textStartPos, textEndPos - textStartPos);
 		}
 	}
 }

Modified: incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/contrib/Highlighter.Net/Test/AssemblyInfo.cs?view=diff&rev=493932&r1=493931&r2=493932
==============================================================================
--- incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/AssemblyInfo.cs (original)
+++ incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/AssemblyInfo.cs Sun Jan  7
19:49:23 2007
@@ -26,7 +26,7 @@
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
 
-[assembly: AssemblyVersion("2.0.0.000")]
+[assembly: AssemblyVersion("2.0.0.001")]
 
 //
 // In order to sign your assembly you must specify a key to use. Refer to the 

Modified: incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/HighlighterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/contrib/Highlighter.Net/Test/HighlighterTest.cs?view=diff&rev=493932&r1=493931&r2=493932
==============================================================================
--- incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/HighlighterTest.cs (original)
+++ incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/HighlighterTest.cs Sun Jan
 7 19:49:23 2007
@@ -61,7 +61,8 @@
 	[TestFixture]
     public class HighlighterTest : Formatter
 	{
-        /*  // {{Aroush-2.0}} Fix-me
+        // {{Aroush-2.0.0}} Fix me
+        /*
 		private class AnonymousClassScorer : Scorer
 		{
 			public AnonymousClassScorer(HighlighterTest enclosingInstance)
@@ -97,24 +98,25 @@
             {
                 return false;
             }
-            public override Explanation Explain(int doc)
+            public override int Doc()
             {
-                return null;
+                return -1;
             }
-            public override float Score()
+            public override Explanation Explain(int doc)
             {
-                return 0;
+                return null;
             }
             public override bool Next()
             {
                 return false;
             }
-            public override int Doc()
+            public override float Score()
             {
-                return -1;
+                return 0;
             }
 		}
         */
+
 		private IndexReader reader;
 		private const System.String FIELD_NAME = "contents";
 		private Query query;
@@ -449,7 +451,10 @@
 		[Test]
 		public virtual void  TestEncoding()
 		{
-            /*  // {{Aroush-2.0}} Fix-me
+            Assert.Fail("This test is failing because it has porting issues.");
+
+            // {{Aroush-2.0.0}} Fix me
+            /*
 			System.String rawDocContent = "\"Smith & sons' prices < 3 and >4\" claims article";
 			//run the highlighter on the raw content (scorer does not score any tokens for 
 			// highlighting but scores a single fragment for selection
@@ -464,12 +469,10 @@
 			//UPGRADE_ISSUE: Class 'javax.xml.parsers.DocumentBuilderFactory' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaxxmlparsersDocumentBuilderFactory_3"'
 			//UPGRADE_ISSUE: Method 'javax.xml.parsers.DocumentBuilderFactory.newInstance' was not
converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaxxmlparsersDocumentBuilderFactory_3"'
 			DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-			//UPGRADE_TODO: Class 'javax.xml.parsers.DocumentBuilder' was converted to 'System.Xml.XmlDocument'
which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaxxmlparsersDocumentBuilder_3"'
 			System.Xml.XmlDocument db = new System.Xml.XmlDocument();
 			System.Xml.XmlDocument tempDocument;
-			//UPGRADE_TODO: Method 'javax.xml.parsers.DocumentBuilder.parse' was converted to 'System.Xml.XmlDocument.Load'
which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaxxmlparsersDocumentBuilderparse_javaioInputStream_3"'
 			tempDocument = (System.Xml.XmlDocument) db.Clone();
-			tempDocument.Load(new System.IO.MemoryStream(SupportClass.ToByteArray(xhtml)));
+			tempDocument.Load(new System.IO.MemoryStream(System.Text.UTF8Encoding.UTF8.GetBytes(xhtml)));
 			System.Xml.XmlDocument doc = tempDocument;
 			System.Xml.XmlElement root = (System.Xml.XmlElement) doc.DocumentElement;
 			System.Xml.XmlNodeList nodes = root.GetElementsByTagName("body");
@@ -645,7 +648,7 @@
 		/*
 		* @see TestCase#setUp()
 		*/
-		[TestFixtureSetUp]
+		[SetUp]
         protected virtual void  SetUp()
 		{
 			ramDir = new RAMDirectory();
@@ -672,7 +675,7 @@
 		/*
 		* @see TestCase#tearDown()
 		*/
-        [TestFixtureTearDown]
+        [TearDown]
 		protected virtual void  TearDown()
 		{
 			//base.TearDown();

Modified: incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/Test-2.0.0.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/contrib/Highlighter.Net/Test/Test-2.0.0.csproj?view=diff&rev=493932&r1=493931&r2=493932
==============================================================================
--- incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/Test-2.0.0.csproj (original)
+++ incubator/lucene.net/trunk/C#/contrib/Highlighter.Net/Test/Test-2.0.0.csproj Sun Jan 
7 19:49:23 2007
@@ -121,14 +121,14 @@
                     AssemblyFolderKey = "hklm\dn\nunit.framework"
                 />
                 <Reference
-                    Name = "Lucene.Net"
-                    AssemblyName = "Lucene.Net"
-                    HintPath = "..\..\Lucene.Net-2.0.0-003.src\Lucene.Net\bin\Debug\Lucene.Net.dll"
-                />
-                <Reference
                     Name = "Highlighter.Net"
                     AssemblyName = "Highlighter.Net"
                     HintPath = "..\bin\Debug\Highlighter.Net.dll"
+                />
+                <Reference
+                    Name = "Lucene.Net"
+                    AssemblyName = "Lucene.Net"
+                    HintPath = "..\..\Lucene.Net-2.0.1-001.src\Lucene.Net\bin\Debug\Lucene.Net.dll"
                 />
             </References>
         </Build>



Mime
View raw message