Permalink
Browse files

Partial port of NHibernate Search to .NET 1.1 - committed to get the …

…project files changes in to the .NET 2.0 projects

SVN: branches/1.2.x@3140
  • Loading branch information...
1 parent d260225 commit 62e699a1bfd4b637bd8885985597bce244a5637f @phatcher phatcher committed Nov 26, 2007
Showing with 292 additions and 69 deletions.
  1. +6 −6 src/NHibernate.Caches.MemCache.Tests/NHibernate.Caches.MemCache.Tests-1.1.csproj
  2. +1 −1 src/NHibernate.Caches.MemCache.Tests/NHibernate.Caches.MemCache.Tests-2.0.csproj
  3. +1 −1 src/NHibernate.Caches.MemCache/NHibernate.Caches.MemCache-2.0.csproj
  4. +5 −5 src/NHibernate.Caches.Prevalence.Tests/NHibernate.Caches.Prevalence.Tests-1.1.csproj
  5. +1 −1 src/NHibernate.Caches.Prevalence.Tests/NHibernate.Caches.Prevalence.Tests-2.0.csproj
  6. +1 −1 src/NHibernate.Caches.Prevalence/NHibernate.Caches.Prevalence-2.0.csproj
  7. +1 −1 src/NHibernate.Caches.SysCache.Tests/NHibernate.Caches.SysCache.Tests-2.0.csproj
  8. +1 −1 src/NHibernate.Caches.SysCache/NHibernate.Caches.SysCache-2.0.csproj
  9. +2 −2 src/NHibernate.Caches.SysCache2/NHibernate.Caches.SysCache2-2.0.csproj
  10. +3 −3 src/NHibernate.Everything-2.0.sln
  11. +1 −1 src/NHibernate.Examples/NHibernate.Examples-2.0.csproj
  12. +1 −1 src/NHibernate.JetDriver/NHibernate.JetDriver-2.0.csproj
  13. +6 −6 src/NHibernate.Mapping.Attributes.Test/NHibernate.Mapping.Attributes.Test-1.1.csproj
  14. +1 −1 src/NHibernate.Mapping.Attributes.Test/NHibernate.Mapping.Attributes.Test-2.0.csproj
  15. +11 −1 src/NHibernate.Mapping.Attributes/NHibernate.Mapping.Attributes-1.1.csproj
  16. +1 −1 src/NHibernate.Mapping.Attributes/NHibernate.Mapping.Attributes-2.0.csproj
  17. +2 −2 src/NHibernate.Search.Tests/{NHibernate.Search.Tests.csproj → NHibernate.Search.Tests-2.0.csproj}
  18. +11 −1 src/NHibernate.Search/AttributeUtil.cs
  19. +5 −1 src/NHibernate.Search/Bridge/BridgeFactory.cs
  20. +5 −1 src/NHibernate.Search/Bridge/IFieldBridge.cs
  21. +10 −2 src/NHibernate.Search/Bridge/String2FieldBridgeAdaptor.cs
  22. +85 −4 src/NHibernate.Search/Engine/DocumentBuilder.cs
  23. +25 −1 src/NHibernate.Search/Engine/SearchFactory.cs
  24. +1 −1 src/NHibernate.Search/Environment.cs
  25. +4 −2 src/NHibernate.Search/IFullTextSession.cs
  26. +6 −0 src/NHibernate.Search/Impl/FullTextSessionImpl.cs
  27. +13 −0 src/NHibernate.Search/Impl/SearchInterceptor.cs
  28. +4 −2 src/NHibernate.Search/{NHibernate.Search.csproj → NHibernate.Search-2.0.csproj}
  29. +6 −0 src/NHibernate.Search/Query/FullTextQueryImpl.cs
  30. +1 −1 src/NHibernate.Search/Search.cs
  31. +1 −1 src/NHibernate.Search/SearchException.cs
  32. +4 −0 src/NHibernate.Search/Store/DirectoryProviderFactory.cs
  33. +1 −1 src/NHibernate.Tasks/NHibernate.Tasks-2.0.csproj
  34. +4 −4 src/NHibernate.Test.Performance/NHibernate.Test.Performance-1.1.csproj
  35. +1 −1 src/NHibernate.Tool.hbm2net.Console/NHibernate.Tool.hbm2net.Console-2.0.csproj
  36. +1 −1 src/NHibernate.Tool.hbm2net.Tests/NHibernate.Tool.hbm2net.Tests-2.0.csproj
  37. +2 −2 src/NHibernate.Tool.hbm2net/NHibernate.Tool.hbm2net-1.1.csproj
  38. +1 −1 src/NHibernate.Tool.hbm2net/NHibernate.Tool.hbm2net-2.0.csproj
  39. +1 −1 src/NHibernate.UserTypes.Oracle/NHibernate.UserTypes.Oracle-2.0.csproj
  40. +1 −1 src/NHibernate.UserTypes.SqlTypes/NHibernate.UserTypes.SqlTypes-2.0.csproj
  41. +1 −1 src/NHibernate.UserTypes.Tests/NHibernate.UserTypes.Tests-2.0.csproj
  42. +2 −0 src/NHibernate/Driver/OracleDataClientDriver.cs
  43. +48 −1 src/NHibernate/NHibernate-1.1.csproj
  44. +1 −1 src/Nullables.NHibernate/Nullables.NHibernate-2.0.csproj
  45. +1 −1 src/Nullables.Tests/Nullables.Tests-2.0.csproj
  46. +1 −1 src/Nullables/Nullables-2.0.csproj
@@ -1,7 +1,7 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
- ProductVersion = "7.10.3077"
+ ProductVersion = "7.10.6030"
SchemaVersion = "2.0"
ProjectGuid = "{94E1F299-E404-4DDE-BFCE-A3E4F5AD3D41}"
>
@@ -79,11 +79,6 @@
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
- <Reference
- Name = "NHibernate.Caches.MemCache-1.1"
- Project = "{FD03BBC3-FED0-415B-B905-E9FCAFBA3E70}"
- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
- />
<Reference
Name = "nunit.framework"
AssemblyName = "nunit.framework"
@@ -99,6 +94,11 @@
Project = "{0D8B57B0-1310-4EF0-B50C-DD22F37310C7}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
+ <Reference
+ Name = "NHibernate.Caches.MemCache-1.1"
+ Project = "{FD03BBC3-FED0-415B-B905-E9FCAFBA3E70}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
</References>
</Build>
<Files>
@@ -14,7 +14,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -14,7 +14,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -79,11 +79,6 @@
AssemblyName = "System.Xml"
HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
- <Reference
- Name = "NHibernate.Caches.Prevalence-1.1"
- Project = "{51179C23-5555-45A4-9BBB-8F6E24D05C2B}"
- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
- />
<Reference
Name = "NHibernate-1.1"
Project = "{0D8B57B0-1310-4EF0-B50C-DD22F37310C7}"
@@ -99,6 +94,11 @@
AssemblyName = "nunit.framework"
HintPath = "..\..\lib\net\1.1\nunit.framework.dll"
/>
+ <Reference
+ Name = "NHibernate.Caches.Prevalence-1.1"
+ Project = "{51179C23-5555-45A4-9BBB-8F6E24D05C2B}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
</References>
</Build>
<Files>
@@ -28,7 +28,7 @@
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
@@ -28,7 +28,7 @@
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
@@ -28,7 +28,7 @@
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
@@ -28,7 +28,7 @@
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
@@ -16,12 +16,12 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <DocumentationFile>bin\Debug\NHibernate.Caches.SysCache2.xml</DocumentationFile>
+ <DocumentationFile>bin\Debug-2.0\NHibernate.Caches.SysCache2.xml</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis>
<NoWarn>1699</NoWarn>
</PropertyGroup>
@@ -168,7 +168,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\default.build = ..\default.build
EndProjectSection
EndProject
-Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "C:\...\NHibernate.Example.Web\", "NHibernate.Example.Web\", "{C5D6EE68-1760-4F97-AD31-42343593D8C1}"
+Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "C:\...\NHibernate.Example.Web\", "NHibernate.Example.Web", "{C5D6EE68-1760-4F97-AD31-42343593D8C1}"
ProjectSection(WebsiteProperties) = preProject
ProjectReferences = "{5909BFE7-93CF-4E5F-BE22-6293368AF01D}|NHibernate.dll;"
Debug.AspNetCompiler.VirtualPath = "/NHibernate.Example.Web"
@@ -195,13 +195,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Caches.SysCache2
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Search", "NHibernate.Search\NHibernate.Search.csproj", "{CC25D767-990D-4CE0-9F64-3426E244403B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Search-2.0", "NHibernate.Search\NHibernate.Search-2.0.csproj", "{CC25D767-990D-4CE0-9F64-3426E244403B}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Search.Tests", "NHibernate.Search.Tests\NHibernate.Search.Tests.csproj", "{71560152-A693-4F66-99CF-570685A33169}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Search.Tests-2.0", "NHibernate.Search.Tests\NHibernate.Search.Tests-2.0.csproj", "{71560152-A693-4F66-99CF-570685A33169}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.Debug = "False"
@@ -28,7 +28,7 @@
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
@@ -28,7 +28,7 @@
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
@@ -1,7 +1,7 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
- ProductVersion = "7.10.3077"
+ ProductVersion = "7.10.6030"
SchemaVersion = "2.0"
ProjectGuid = "{A6585067-79C1-41A9-A006-A83C3A800B21}"
>
@@ -76,11 +76,6 @@
Name = "System.XML"
AssemblyName = "System.Xml"
/>
- <Reference
- Name = "NHibernate.Mapping.Attributes-1.1"
- Project = "{AE0F3023-0ED6-45BE-8995-8C3B2E585A20}"
- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
- />
<Reference
Name = "nunit.framework"
AssemblyName = "nunit.framework"
@@ -92,6 +87,11 @@
AssemblyName = "Iesi.Collections"
HintPath = "..\..\lib\net\1.1\Iesi.Collections.dll"
/>
+ <Reference
+ Name = "NHibernate.Mapping.Attributes-1.1"
+ Project = "{AE0F3023-0ED6-45BE-8995-8C3B2E585A20}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
</References>
</Build>
<Files>
@@ -27,7 +27,7 @@
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
@@ -1,7 +1,7 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
- ProductVersion = "7.10.3077"
+ ProductVersion = "7.10.6030"
SchemaVersion = "2.0"
ProjectGuid = "{AE0F3023-0ED6-45BE-8995-8C3B2E585A20}"
>
@@ -449,6 +449,11 @@
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "PropertyGeneration.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
<File
RelPath = "QueryAttribute.cs"
SubType = "Code"
@@ -559,6 +564,11 @@
SubType = "Code"
BuildAction = "Compile"
/>
+ <File
+ RelPath = "VersionGeneration.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
</Include>
</Files>
</CSHARP>
@@ -28,7 +28,7 @@
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
@@ -14,7 +14,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
+ <OutputPath>bin\Debug-2.0\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -74,7 +74,7 @@
<Project>{5909BFE7-93CF-4E5F-BE22-6293368AF01D}</Project>
<Name>NHibernate-2.0</Name>
</ProjectReference>
- <ProjectReference Include="..\NHibernate.Search\NHibernate.Search.csproj">
+ <ProjectReference Include="..\NHibernate.Search\NHibernate.Search-2.0.csproj">
<Project>{CC25D767-990D-4CE0-9F64-3426E244403B}</Project>
<Name>NHibernate.Search</Name>
</ProjectReference>
@@ -4,7 +4,7 @@
namespace NHibernate.Search
{
- public static class AttributeUtil
+ public class AttributeUtil
{
public static bool IsIndexed(System.Type type)
{
@@ -33,7 +33,12 @@ public static DocumentIdAttribute GetDocumentId(MemberInfo member)
if (objects.Length == 0)
return null;
DocumentIdAttribute documentIdAttribute = (DocumentIdAttribute) objects[0];
+#if NET_2_0
documentIdAttribute.Name = documentIdAttribute.Name ?? member.Name;
+#else
+ if (documentIdAttribute.Name == null)
+ docuementIdAttribute.Name = member.Name;
+#endif
return documentIdAttribute;
}
@@ -43,7 +48,12 @@ public static FieldAttribute GetField(MemberInfo member)
if (objects.Length == 0)
return null;
FieldAttribute fieldAttribute = (FieldAttribute) objects[0];
+#if NET_2_0
fieldAttribute.Name = fieldAttribute.Name ?? member.Name;
+#else
+ if (fieldAttribute.Name == null)
+ fieldAttribute.Name = member.Name;
+#endif
return fieldAttribute;
}
@@ -9,7 +9,11 @@ namespace NHibernate.Search.Bridge
{
public class BridgeFactory
{
- private static readonly Dictionary<String, IFieldBridge> builtInBridges = new Dictionary<String, IFieldBridge>();
+#if NET_2_0
+ private static readonly Dictionary<String, IFieldBridge> builtInBridges = new Dictionary<String, IFieldBridge>();
+#else
+ private static readonly Hashtable builtInBridges = new Hashtable();
+#endif
private BridgeFactory()
{
@@ -9,6 +9,10 @@ namespace NHibernate.Search.Bridge
/// </summary>
public interface IFieldBridge
{
- void Set(string idKeywordName, object id, Document doc, Field.Store store, Field.Index index, float? boost);
+#if NET_2_0
+ void Set(string idKeywordName, object id, Document doc, Field.Store store, Field.Index index, float? boost);
+#else
+ void Set(string idKeywordName, object id, Document doc, Field.Store store, Field.Index index, float boost);
+#endif
}
}
@@ -14,14 +14,22 @@ public String2FieldBridgeAdaptor(IStringBridge stringBridge)
this.stringBridge = stringBridge;
}
- public void Set(String name, Object value, Document document, Field.Store store, Field.Index index, float? boost)
+#if NET_2_0
+ public void Set(String name, Object value, Document document, Field.Store store, Field.Index index, float? boost)
+#else
+ public void Set(String name, Object value, Document document, Field.Store store, Field.Index index, float boost)
+#endif
{
String indexedString = stringBridge.ObjectToString(value);
//Do not add fields on empty strings, seems a sensible default in most situations
if (StringHelper.IsNotEmpty(indexedString))
{
Field field = new Field(name, indexedString, store, index);
- if (boost != null)
+#if NET_2_0
+ if (boost != null)
+#else
+ if (boost != 0F)
+#endif
field.SetBoost(boost.Value);
document.Add(field);
}
Oops, something went wrong.

0 comments on commit 62e699a

Please sign in to comment.