http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Queries/Similar/package.html ---------------------------------------------------------------------- diff --git a/src/contrib/Queries/Similar/package.html b/src/contrib/Queries/Similar/package.html deleted file mode 100644 index 8be8710..0000000 --- a/src/contrib/Queries/Similar/package.html +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<html> -<body> -Document similarity query generators. -</body> -</html> \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Queries/TermsFilter.cs ---------------------------------------------------------------------- diff --git a/src/contrib/Queries/TermsFilter.cs b/src/contrib/Queries/TermsFilter.cs deleted file mode 100644 index 3426732..0000000 --- a/src/contrib/Queries/TermsFilter.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Lucene.Net.Index; -using Lucene.Net.Util; - -namespace Lucene.Net.Search -{ - /// <summary> - /// A filter that contains multiple terms. - /// </summary> - public class TermsFilter : Filter - { - /// <summary> - /// The set of terms for this filter. - /// </summary> - protected ISet<Term> terms = new SortedSet<Term>(); - - /// <summary> - /// Add a term to the set. - /// </summary> - /// <param name="term">The term to add.</param> - public void AddTerm(Term term) - { - terms.Add(term); - } - - /// <summary> - /// Get the DocIdSet. - /// </summary> - /// <param name="reader">Applcible reader.</param> - /// <returns>The set.</returns> - public override DocIdSet GetDocIdSet(IndexReader reader) - { - OpenBitSet result = new OpenBitSet(reader.MaxDoc); - TermDocs td = reader.TermDocs(); - try - { - foreach (Term t in this.terms) - { - td.Seek(t); - while (td.Next()) - { - result.Set(td.Doc); - } - } - } - finally - { - td.Close(); - } - - return result; - } - - public override bool Equals(Object obj) - { - if (this == obj) - { - return true; - } - if ((obj == null) || !(obj is TermsFilter)) - { - return false; - } - TermsFilter test = (TermsFilter)obj; - // TODO: Does SortedSet have an issues like List<T>? see EquatableList in Support - return (terms == test.terms || (terms != null && terms.Equals(test.terms))); - } - - public override int GetHashCode() - { - int hash = 9; - foreach (Term t in this.terms) - { - hash = 31 * hash + t.GetHashCode(); - } - return hash; - } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("("); - foreach (Term t in this.terms) - { - sb.AppendFormat(" {0}:{1}", t.Field, t.Text); - } - sb.Append(" )"); - return sb.ToString(); - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/README.txt ---------------------------------------------------------------------- diff --git a/src/contrib/README.txt b/src/contrib/README.txt deleted file mode 100644 index d39fa74..0000000 --- a/src/contrib/README.txt +++ /dev/null @@ -1,22 +0,0 @@ -This folder contains legacy code contributed to the Lucene.Net project (some ported from the Java Lucene project). - -The code in this folder is deprecated and not guaranteed to work, and will be removed once we have finished the current effort of porting from Java Lucene 4.8. - -Ported code: ------------- - -Highlighter -Snowball -SpellChecker -WordNet -Similarity (obsolete. Use Queries) -Analyzers\BR -Spatial -FastVectorHighlighter -Queries - - -Contributed code: ------------------ - -DistributedSearch \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Regex/CSharpRegexCapabilities.cs ---------------------------------------------------------------------- diff --git a/src/contrib/Regex/CSharpRegexCapabilities.cs b/src/contrib/Regex/CSharpRegexCapabilities.cs deleted file mode 100644 index 21174a2..0000000 --- a/src/contrib/Regex/CSharpRegexCapabilities.cs +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; - -namespace Contrib.Regex -{ - /// <summary> - /// C# Regex based implementation of <see cref="IRegexCapabilities"/>. - /// </summary> - /// <remarks>http://www.java2s.com/Open-Source/Java-Document/Net/lucene-connector/org/apache/lucene/search/regex/JavaUtilRegexCapabilities.java.htm</remarks> - public class CSharpRegexCapabilities : IRegexCapabilities, IEquatable<CSharpRegexCapabilities> - { - private System.Text.RegularExpressions.Regex _rPattern; - - /// <summary> - /// Called by the constructor of <see cref="RegexTermEnum"/> allowing implementations to cache - /// a compiled version of the regular expression pattern. - /// </summary> - /// <param name="pattern">regular expression pattern</param> - public void Compile(string pattern) - { - _rPattern = new System.Text.RegularExpressions.Regex(pattern, - System.Text.RegularExpressions.RegexOptions.Compiled); - } - - /// <summary> - /// True on match. - /// </summary> - /// <param name="s">text to match</param> - /// <returns>true on match</returns> - public bool Match(string s) - { - return _rPattern.IsMatch(s); - } - - /// <summary> - /// A wise prefix implementation can reduce the term enumeration (and thus performance) - /// of RegexQuery dramatically. - /// </summary> - /// <returns>static non-regex prefix of the pattern last passed to <see cref="IRegexCapabilities.Compile"/>. - /// May return null</returns> - public string Prefix() - { - return null; - } - - /// <summary> - /// Indicates whether the current object is equal to another object of the same type. - /// </summary> - /// <returns> - /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false. - /// </returns> - /// <param name="other">An object to compare with this object</param> - public bool Equals(CSharpRegexCapabilities other) - { - if (other == null) return false; - if (this == other) return true; - - if (_rPattern != null ? !_rPattern.Equals(other._rPattern) : other._rPattern != null) - return false; - - return true; - } - - public override bool Equals(object obj) - { - if (obj as CSharpRegexCapabilities == null) return false; - return Equals((CSharpRegexCapabilities) obj); - } - - public override int GetHashCode() - { - return (_rPattern != null ? _rPattern.GetHashCode() : 0); - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Regex/Contrib.Regex.csproj ---------------------------------------------------------------------- diff --git a/src/contrib/Regex/Contrib.Regex.csproj b/src/contrib/Regex/Contrib.Regex.csproj deleted file mode 100644 index 5be8262..0000000 --- a/src/contrib/Regex/Contrib.Regex.csproj +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - ---> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{A26BD3B7-DF90-43B4-99E2-6A617CDE1579}</ProjectGuid> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Lucene.Net.Search.Regex</RootNamespace> - <AssemblyName>Lucene.Net.Contrib.Regex</AssemblyName> - <FileAlignment>512</FileAlignment> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\..\build\bin\contrib\Regex\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <DefineConstants>DEBUG;TRACE;$(Framework)</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <NoWarn>618</NoWarn> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug35|AnyCPU' "> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\..\build\bin\contrib\Regex\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <DefineConstants>DEBUG;TRACE;$(Framework)</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <NoWarn>618</NoWarn> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\..\build\bin\contrib\Regex\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <DefineConstants>TRACE;$(Framework)</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <NoWarn>618</NoWarn> - <DocumentationFile>..\..\..\build\bin\contrib\Regex\Release\NET40\Lucene.Net.Contrib.Regex.xml</DocumentationFile> - <DebugSymbols>true</DebugSymbols> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release35|AnyCPU' "> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\..\build\bin\contrib\Regex\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <DefineConstants>TRACE;$(Framework)</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <NoWarn>618</NoWarn> - <DocumentationFile>..\..\..\build\bin\contrib\Regex\Release\NET35\Lucene.Net.Contrib.Regex.xml</DocumentationFile> - <DebugSymbols>true</DebugSymbols> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup> - <SignAssembly>true</SignAssembly> - </PropertyGroup> - <PropertyGroup> - <AssemblyOriginatorKeyFile>Lucene.Net.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Condition="'$(Framework)' == 'NET35'" Include="System.Core" /> - </ItemGroup> - <ItemGroup> - <Compile Include="CSharpRegexCapabilities.cs" /> - <Compile Include="IRegexCapabilities.cs" /> - <Compile Include="IRegexQueryCapable.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="RegexQuery.cs" /> - <Compile Include="RegexTermEnum.cs" /> - <Compile Include="SpanRegexQuery.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\core\Lucene.Net.csproj"> - <Project>{5D4AD9BE-1FFB-41AB-9943-25737971BF57}</Project> - <Name>Lucene.Net</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="Lucene.Net.snk" /> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Regex/IRegexCapabilities.cs ---------------------------------------------------------------------- diff --git a/src/contrib/Regex/IRegexCapabilities.cs b/src/contrib/Regex/IRegexCapabilities.cs deleted file mode 100644 index e5225eb..0000000 --- a/src/contrib/Regex/IRegexCapabilities.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace Contrib.Regex -{ - /// <summary> - /// Defines basic operations needed by <see cref="RegexQuery"/> for a regular expression implementation. - /// </summary> - /// <remarks>http://www.java2s.com/Open-Source/Java-Document/Net/lucene-connector/org/apache/lucene/search/regex/RegexCapabilities.java.htm</remarks> - public interface IRegexCapabilities - { - /// <summary> - /// Called by the constructor of <see cref="RegexTermEnum"/> allowing implementations to cache - /// a compiled version of the regular expression pattern. - /// </summary> - /// <param name="pattern">regular expression pattern</param> - void Compile(string pattern); - - /// <summary> - /// True on match. - /// </summary> - /// <param name="s">text to match</param> - /// <returns>true on match</returns> - bool Match(string s); - - /// <summary> - /// A wise prefix implementation can reduce the term enumeration (and thus performance) - /// of RegexQuery dramatically. - /// </summary> - /// <returns>static non-regex prefix of the pattern last passed to <see cref="Compile"/>. - /// May return null</returns> - string Prefix(); - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Regex/IRegexQueryCapable.cs ---------------------------------------------------------------------- diff --git a/src/contrib/Regex/IRegexQueryCapable.cs b/src/contrib/Regex/IRegexQueryCapable.cs deleted file mode 100644 index b65513b..0000000 --- a/src/contrib/Regex/IRegexQueryCapable.cs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace Contrib.Regex -{ - /// <summary> - /// Defines methods for regular expression supporting queries to use. - /// </summary> - /// <remarks>http://www.java2s.com/Open-Source/Java-Document/Net/lucene-connector/org/apache/lucene/search/regex/RegexQueryCapable.java.htm</remarks> - public interface IRegexQueryCapable - { - IRegexCapabilities RegexImplementation { set; get; } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Regex/Properties/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/src/contrib/Regex/Properties/AssemblyInfo.cs b/src/contrib/Regex/Properties/AssemblyInfo.cs deleted file mode 100644 index c9ff782..0000000 --- a/src/contrib/Regex/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Lucene.Net.Contrib.Regex")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("The Apache Software Foundation")] -[assembly: AssemblyProduct("Lucene.Net.Contrib.Regex")] -[assembly: AssemblyCopyright("Copyright 2006 - 2011 The Apache Software Foundation")] -[assembly: AssemblyTrademark("Copyright 2006 - 2011 The Apache Software Foundation")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7c479233-95a2-4d53-b0fd-0ad2389556b1")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.3")] -[assembly: AssemblyFileVersion("3.0.3")] - -[assembly: AllowPartiallyTrustedCallers] http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Regex/RegexQuery.cs ---------------------------------------------------------------------- diff --git a/src/contrib/Regex/RegexQuery.cs b/src/contrib/Regex/RegexQuery.cs deleted file mode 100644 index 1dc452b..0000000 --- a/src/contrib/Regex/RegexQuery.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Text; -using Lucene.Net.Index; -using Lucene.Net.Search; -using Lucene.Net.Util; - -namespace Contrib.Regex -{ - /// <summary> - /// Regular expression based query. - /// </summary> - /// <remarks>http://www.java2s.com/Open-Source/Java-Document/Net/lucene-connector/org/apache/lucene/search/regex/RegexQuery.java.htm</remarks> - public class RegexQuery : MultiTermQuery, IRegexQueryCapable, IEquatable<RegexQuery> - { - private IRegexCapabilities _regexImpl = new CSharpRegexCapabilities(); - public Term Term { get; private set; } - - public RegexQuery(Term term) - { - Term = term; - } - - /// <summary>Construct the enumeration to be used, expanding the pattern term. </summary> - protected override FilteredTermEnum GetEnum(IndexReader reader) - { - return new RegexTermEnum(reader, Term, _regexImpl); - } - - public IRegexCapabilities RegexImplementation - { - set { _regexImpl = value; } - get { return _regexImpl; } - } - - - public override String ToString(String field) - { - StringBuilder buffer = new StringBuilder(); - if (!Term.Field.Equals(field)) - { - buffer.Append(Term.Field); - buffer.Append(":"); - } - buffer.Append(Term.Text); - buffer.Append(ToStringUtils.Boost(Boost)); - return buffer.ToString(); - } - - /// <summary> - /// Indicates whether the current object is equal to another object of the same type. - /// </summary> - /// <returns> - /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false. - /// </returns> - /// <param name="other">An object to compare with this object</param> - public bool Equals(RegexQuery other) - { - if (other == null) return false; - if (this == other) return true; - - if (!base.Equals(other)) return false; - return _regexImpl.Equals(other._regexImpl); - } - - public override bool Equals(object obj) - { - if ((obj == null) || (obj as RegexQuery == null)) return false; - if (this == obj) return true; - - return Equals((RegexQuery) obj); - } - - public override int GetHashCode() - { - return 29 * base.GetHashCode() + _regexImpl.GetHashCode(); - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Regex/RegexTermEnum.cs ---------------------------------------------------------------------- diff --git a/src/contrib/Regex/RegexTermEnum.cs b/src/contrib/Regex/RegexTermEnum.cs deleted file mode 100644 index 50c0480..0000000 --- a/src/contrib/Regex/RegexTermEnum.cs +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using Lucene.Net.Index; -using Lucene.Net.Search; - -namespace Contrib.Regex -{ - /// <summary> - /// Subclass of FilteredTermEnum for enumerating all terms that match the - /// specified regular expression term using the specified regular expression - /// implementation. - /// <para>Term enumerations are always ordered by Term.compareTo(). Each term in - /// the enumeration is greater than all that precede it.</para> - /// </summary> - /// <remarks>http://www.java2s.com/Open-Source/Java-Document/Net/lucene-connector/org/apache/lucene/search/regex/RegexTermEnum.java.htm</remarks> - public class RegexTermEnum : FilteredTermEnum - { - private string _sField = ""; - private string _sPre = ""; - private bool _bEndEnum; - private readonly IRegexCapabilities _regexImpl; - - public RegexTermEnum(IndexReader reader, Term term, IRegexCapabilities regexImpl) - { - _sField = term.Field; - string sText = term.Text; - - _regexImpl = regexImpl; - - _regexImpl.Compile(sText); - - _sPre = _regexImpl.Prefix() ?? ""; - - SetEnum(reader.Terms(new Term(term.Field, _sPre))); - } - - /// <summary>Equality compare on the term </summary> - protected override bool TermCompare(Term term) - { - if (_sField == term.Field) - { - string sSearchText = term.Text; - if (sSearchText.StartsWith(_sPre)) return _regexImpl.Match(sSearchText); - } //eif - - _bEndEnum = true; - return false; - } - - /// <summary>Equality measure on the term </summary> - public override float Difference() - { - // TODO: adjust difference based on distance of searchTerm.text() and term().text() - return 1.0F; - } - - /// <summary>Indicates the end of the enumeration has been reached </summary> - public override bool EndEnum() - { - return _bEndEnum; - } - - //public override void Close() - //{ - // base.Close(); - // _sField = null; - //} - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Regex/SpanRegexQuery.cs ---------------------------------------------------------------------- diff --git a/src/contrib/Regex/SpanRegexQuery.cs b/src/contrib/Regex/SpanRegexQuery.cs deleted file mode 100644 index 8bde844..0000000 --- a/src/contrib/Regex/SpanRegexQuery.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Collections.Generic; -using System.Text; -using Lucene.Net.Index; -using Lucene.Net.Search; -using Lucene.Net.Search.Spans; -using Lucene.Net.Util; - -namespace Contrib.Regex -{ - /// <summary> - /// A SpanQuery version of <see cref="RegexQuery"/> allowing regular expression queries to be nested - /// within other SpanQuery subclasses. - /// </summary> - /// <remarks>http://www.java2s.com/Open-Source/Java-Document/Net/lucene-connector/org/apache/lucene/search/regex/SpanRegexQuery.java.htm</remarks> - public class SpanRegexQuery : SpanQuery, IRegexQueryCapable, IEquatable<SpanRegexQuery> - { - private IRegexCapabilities _regexImpl = new CSharpRegexCapabilities(); - private readonly Term _term; - - public SpanRegexQuery(Term term) - { - _term = term; - } - - public Term Term - { - get { return _term; } - } - - public override string ToString(string field) - { - StringBuilder sb = new StringBuilder(); - sb.Append("SpanRegexQuery("); - sb.Append(_term); - sb.Append(')'); - sb.Append(ToStringUtils.Boost(Boost)); - return sb.ToString(); - } - - public override Query Rewrite(IndexReader reader) - { - RegexQuery orig = new RegexQuery(_term); - orig.RegexImplementation = _regexImpl; - - // RegexQuery (via MultiTermQuery).Rewrite always returns a BooleanQuery - orig.RewriteMethod = MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE; //@@ - BooleanQuery bq = (BooleanQuery) orig.Rewrite(reader); - - BooleanClause[] clauses = bq.GetClauses(); - SpanQuery[] sqs = new SpanQuery[clauses.Length]; - for (int i = 0; i < clauses.Length; i++) - { - BooleanClause clause = clauses[i]; - - // Clauses from RegexQuery.Rewrite are always TermQuery's - TermQuery tq = (TermQuery) clause.Query; - - sqs[i] = new SpanTermQuery(tq.Term); - sqs[i].Boost = tq.Boost; - } //efor - - SpanOrQuery query = new SpanOrQuery(sqs); - query.Boost = orig.Boost; - - return query; - } - - /// <summary>Expert: Returns the matches for this query in an index. Used internally - /// to search for spans. - /// </summary> - public override Lucene.Net.Search.Spans.Spans GetSpans(IndexReader reader) - { - throw new InvalidOperationException("Query should have been rewritten"); - } - - /// <summary>Returns the name of the field matched by this query.</summary> - public override string Field - { - get - { - return _term.Field; - } - } - - public ICollection<Term> GetTerms() - { - ICollection<Term> terms = new List<Term>(){_term}; - return terms; - } - - public IRegexCapabilities RegexImplementation - { - set { _regexImpl = value; } - get { return _regexImpl; } - } - - /// <summary> - /// Indicates whether the current object is equal to another object of the same type. - /// </summary> - /// <returns> - /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false. - /// </returns> - /// <param name="other">An object to compare with this object. - /// </param> - public bool Equals(SpanRegexQuery other) - { - if (other == null) return false; - if (ReferenceEquals(this, other)) return true; - - if (!_regexImpl.Equals(other._regexImpl)) return false; - if (!_term.Equals(other._term)) return false; - - return true; - } - - /// <summary> - /// True if this object equals the specified object. - /// </summary> - /// <param name="obj">object</param> - /// <returns>true on equality</returns> - public override bool Equals(object obj) - { - if (obj as SpanRegexQuery == null) return false; - - return Equals((SpanRegexQuery) obj); - } - - /// <summary> - /// Get hash code for this object. - /// </summary> - /// <returns>hash code</returns> - public override int GetHashCode() - { - return 29 * _regexImpl.GetHashCode() + _term.GetHashCode(); - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/SimpleFacetedSearch/Extensions.cs ---------------------------------------------------------------------- diff --git a/src/contrib/SimpleFacetedSearch/Extensions.cs b/src/contrib/SimpleFacetedSearch/Extensions.cs deleted file mode 100644 index 31bfd63..0000000 --- a/src/contrib/SimpleFacetedSearch/Extensions.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Lucene.Net.Search -{ - public static class Extensions - { - //CartesianProduct - Lambda - public static IEnumerable<IEnumerable<T>> CartesianProduct<T>(this IEnumerable<IList<T>> sequences) - { - IEnumerable<IEnumerable<T>> emptyProduct = new IEnumerable<T>[] { Enumerable.Empty<T>() }; - return sequences.Aggregate( - emptyProduct, - (accumulator, sequence) => - { - return accumulator.SelectMany( - (accseq => sequence), - (accseq, item) => accseq.Concat(new T[] { item }) - ); - } - ); - } - - //CartesianProduct - Lambda - public static IEnumerable<IEnumerable<T>> CartesianProduct<T>(this IEnumerable<IEnumerable<T>> sequences) - { - IEnumerable<IEnumerable<T>> emptyProduct = new IEnumerable<T>[] { Enumerable.Empty<T>() }; - return sequences.Aggregate( - emptyProduct, - (accumulator, sequence) => - { - return accumulator.SelectMany( - (accseq => sequence), - (accseq, item) => accseq.Concat(new T[] { item }) - ); - } - ); - } - - //CartesianProduct - LINQ - //http://blogs.msdn.com/b/ericlippert/archive/2010/06/28/computing-a-cartesian-product-with-linq.aspx - static IEnumerable<IEnumerable<T>> CartesianProduct2<T>(this IEnumerable<IEnumerable<T>> sequences) - { - IEnumerable<IEnumerable<T>> emptyProduct = new[] { Enumerable.Empty<T>() }; - return sequences.Aggregate( - emptyProduct, - (accumulator, sequence) => - from accseq in accumulator - from item in sequence - select accseq.Concat(new[] { item })); - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/SimpleFacetedSearch/FacetName.cs ---------------------------------------------------------------------- diff --git a/src/contrib/SimpleFacetedSearch/FacetName.cs b/src/contrib/SimpleFacetedSearch/FacetName.cs deleted file mode 100644 index ea3f74a..0000000 --- a/src/contrib/SimpleFacetedSearch/FacetName.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Lucene.Net.Search -{ - public partial class SimpleFacetedSearch - { - public class FacetName - { - string[] _Names; - internal FacetName(string[] names) - { - this._Names = names; - } - - public string this[int i] - { - get { return _Names[i]; } - } - - public int Length - { - get { return _Names.Length; } - } - - public override string ToString() - { - return String.Join("/", _Names); - } - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/SimpleFacetedSearch/FieldValuesBitSets.cs ---------------------------------------------------------------------- diff --git a/src/contrib/SimpleFacetedSearch/FieldValuesBitSets.cs b/src/contrib/SimpleFacetedSearch/FieldValuesBitSets.cs deleted file mode 100644 index 3c719f6..0000000 --- a/src/contrib/SimpleFacetedSearch/FieldValuesBitSets.cs +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Lucene.Net.Analysis; -using Lucene.Net.Documents; -using Lucene.Net.Analysis.Standard; -using Lucene.Net.Index; -using Lucene.Net.Search; -using Lucene.Net.QueryParsers; -using Lucene.Net.Store; -using Lucene.Net.Util; - -namespace Lucene.Net.Search -{ - - class FieldValuesBitSets - { - public string Field = ""; - public Dictionary<string, OpenBitSetDISI> FieldValueBitSetPair = new Dictionary<string, OpenBitSetDISI>(); - - IndexReader _Reader; - - public FieldValuesBitSets(IndexReader reader, string field) - { - this.Field = field; - this._Reader = reader; - - foreach (string val in GetFieldValues(field)) - { - FieldValueBitSetPair.Add(val, GetBitSet(field, val)); - } - } - - List<string> GetFieldValues(string groupByField) - { - List<string> list = new List<string>(); - TermEnum te = _Reader.Terms(new Term(groupByField, "")); - if (te.Term.Field != groupByField) return list; - list.Add(te.Term.Text); - - while (te.Next()) - { - if (te.Term.Field != groupByField) break; - list.Add(te.Term.Text); - } - return list; - } - - OpenBitSetDISI GetBitSet(string groupByField, string group) - { - TermQuery query = new TermQuery(new Term(groupByField, group)); - Filter filter = new CachingWrapperFilter(new QueryWrapperFilter(query)); - return new OpenBitSetDISI(filter.GetDocIdSet(_Reader).Iterator(), _Reader.MaxDoc); - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/SimpleFacetedSearch/Hits.cs ---------------------------------------------------------------------- diff --git a/src/contrib/SimpleFacetedSearch/Hits.cs b/src/contrib/SimpleFacetedSearch/Hits.cs deleted file mode 100644 index f5c3eb3..0000000 --- a/src/contrib/SimpleFacetedSearch/Hits.cs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Lucene.Net.Search -{ - public partial class SimpleFacetedSearch - { - public class Hits - { - long _TotalHitCount = -1; - HitsPerFacet[] _HitsPerGroup; - Dictionary<string, HitsPerFacet> _Indexer = new Dictionary<string, HitsPerFacet>(); - - public HitsPerFacet this[string name] - { - get{ return _Indexer[name];} - } - - public HitsPerFacet this[FacetName name] - { - get { return _Indexer[name.ToString()]; } - } - - public long TotalHitCount - { - get - { - if (_TotalHitCount == -1) - { - _TotalHitCount = 0; - foreach (var h in _HitsPerGroup) - { - _TotalHitCount += h.HitCount; - } - } - return _TotalHitCount; - } - } - - public HitsPerFacet[] HitsPerFacet - { - get { return _HitsPerGroup; } - internal set - { - _HitsPerGroup = value; - foreach (var h in _HitsPerGroup) - { - _Indexer.Add(h.Name.ToString(), h); - } - } - } - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/SimpleFacetedSearch/HitsPerFacet.cs ---------------------------------------------------------------------- diff --git a/src/contrib/SimpleFacetedSearch/HitsPerFacet.cs b/src/contrib/SimpleFacetedSearch/HitsPerFacet.cs deleted file mode 100644 index 6c7c756..0000000 --- a/src/contrib/SimpleFacetedSearch/HitsPerFacet.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Lucene.Net.Analysis; -using Lucene.Net.Documents; -using Lucene.Net.Analysis.Standard; -using Lucene.Net.Index; -using Lucene.Net.Search; -using Lucene.Net.QueryParsers; -using Lucene.Net.Store; -using Lucene.Net.Util; - -namespace Lucene.Net.Search -{ - public partial class SimpleFacetedSearch - { - public class HitsPerFacet : IEnumerable<Document>, IEnumerator<Document> - { - IndexReader _Reader; - int _MaxDocPerFacet; - int _ItemsReturned = 0; - DocIdSetIterator _ResultIterator; - OpenBitSet _ResultBitSet; - int _CurrentDocId; - DocIdSet _QueryDocidSet; - OpenBitSetDISI _GroupBitSet; - - FacetName _FacetName; - long _HitCount = -1; - - internal HitsPerFacet(FacetName facetName, IndexReader reader, DocIdSet queryDocidSet, OpenBitSetDISI groupBitSet, int maxDocPerFacet) - { - this._FacetName = facetName; - this._Reader = reader; - this._MaxDocPerFacet = maxDocPerFacet; - this._QueryDocidSet = queryDocidSet; - this._GroupBitSet = groupBitSet; - - } - - internal void Calculate() - { - if (_QueryDocidSet == DocIdBitSet.EMPTY_DOCIDSET) - { - _ResultBitSet = new OpenBitSet(0); - } - else - { - _ResultBitSet = (OpenBitSet)((OpenBitSet)_QueryDocidSet).Clone(); - _ResultBitSet.And(_GroupBitSet); - } - - _ResultIterator = _ResultBitSet.Iterator(); - - _HitCount = _ResultBitSet.Cardinality(); - - _ResultBitSet = null; - _QueryDocidSet = null; - _GroupBitSet = null; - } - - public FacetName Name - { - get { return _FacetName; } - } - - public long HitCount - { - get{ return _HitCount; } - } - - public Document Current - { - get { return _Reader.Document(_CurrentDocId); } - } - - object System.Collections.IEnumerator.Current - { - get { return _Reader.Document(_CurrentDocId); } - } - - public bool MoveNext() - { - _CurrentDocId = _ResultIterator.NextDoc(); - return _CurrentDocId != DocIdSetIterator.NO_MORE_DOCS && ++_ItemsReturned <= _MaxDocPerFacet; - } - - public IEnumerator<Document> GetEnumerator() - { - return this; - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return this; - } - - public void Reset() - { - throw new NotImplementedException(); - } - - public void Dispose() - { - - } - - public HitsPerFacet Documents - { - get { return this; } - } - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/SimpleFacetedSearch/Properties/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/src/contrib/SimpleFacetedSearch/Properties/AssemblyInfo.cs b/src/contrib/SimpleFacetedSearch/Properties/AssemblyInfo.cs deleted file mode 100644 index 54f888c..0000000 --- a/src/contrib/SimpleFacetedSearch/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Lucene.Net.Search.SimpleFacetedSearch")] -[assembly: AssemblyDescription("SimpleFacetedSearch for Lucene.Net")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("The Apache Software Foundation")] -[assembly: AssemblyProduct("Lucene.Net.SimpleFacetedSearch")] -[assembly: AssemblyCopyright("Copyright 2006 - 2011 The Apache Software Foundation")] -[assembly: AssemblyTrademark("Copyright 2006 - 2011 The Apache Software Foundation")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("dfa80a55-3bcc-4d3c-872c-dab7ccc1bfb5")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("3.0.3")] -[assembly: AssemblyFileVersion("3.0.3")] - -[assembly: AllowPartiallyTrustedCallers] - - - http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/SimpleFacetedSearch/README.txt ---------------------------------------------------------------------- diff --git a/src/contrib/SimpleFacetedSearch/README.txt b/src/contrib/SimpleFacetedSearch/README.txt deleted file mode 100644 index d4daeff..0000000 --- a/src/contrib/SimpleFacetedSearch/README.txt +++ /dev/null @@ -1,28 +0,0 @@ -SimpleFacetedSearch: Dynamic clustering of search results into categories according to values in given field(s). -Its instances are tread-safe. So, the same instance can be shared among many threads like IndexReader. - -Sample Usage: - - //Should be created only when IndexReader is opened/reopened. Creation with every search can be performance killer - SimpleFacetedSearch sfs = new SimpleFacetedSearch(indexReader, new string[] { "source", "category" }); - - Query query = new QueryParser(Lucene.Net.Util.Version.LUCENE_29, field, analyzer).Parse(searchString); - SimpleFacetedSearch.Hits hits = sfs.Search(query, 10); - - long totalHits = hits.TotalHitCount; - - foreach (SimpleFacetedSearch.HitsPerFacet hpf in hits.HitsPerFacet) - { - long hitCountPerFacet = hpf.HitCount; - SimpleFacetedSearch.FacetName name = hpf.Name; - //name[0] - //name[1] - //name.ToString() - - foreach (Document doc in hpf.Documents) - { - ........ - } - } - - http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.cs ---------------------------------------------------------------------- diff --git a/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.cs b/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.cs deleted file mode 100644 index 6a558f7..0000000 --- a/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.cs +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Lucene.Net.Analysis; -using Lucene.Net.Documents; -using Lucene.Net.Analysis.Standard; -using Lucene.Net.Index; -using Lucene.Net.Search; -using Lucene.Net.QueryParsers; -using Lucene.Net.Store; -using Lucene.Net.Util; -using System.Threading; - -#if !NET35 -using System.Threading.Tasks; -#endif - -/* - Suppose, we want a faceted search on fields f1 f2 f3, - and their values in index are - - f1 f2 f3 - -- -- -- -doc1 A I 1 -doc2 A I 2 -doc3 A I 3 -doc4 A J 1 -doc5 A J 2 -doc6 A J 3 -doc7 B I 1 - - Algorithm: - 1- Find all possible values for f1 which are (A,B) , for f2 which are (I,J) and for f3 which are (1,2,3) - 2- Find Cartesian Product of (A,B)X(I,J)X(1,2,3). (12 possible groups) - 3- Eliminate the ones that surely result in 0 hits. (for ex, B J 2. since they have no doc. in common) -*/ - -/* - TODO: Support for pre-built queries defining groups can be added -*/ - -namespace Lucene.Net.Search -{ - public partial class SimpleFacetedSearch : IDisposable - { - public const int DefaultMaxDocPerGroup = 25; - public static int MAX_FACETS = 2048; - - IndexReader _Reader; - List<KeyValuePair<List<string>, OpenBitSetDISI>> _Groups = new List<KeyValuePair<List<string>, OpenBitSetDISI>>(); - - public SimpleFacetedSearch(IndexReader reader, string groupByField) : this(reader, new string[] { groupByField }) - { - } - - public SimpleFacetedSearch(IndexReader reader, string[] groupByFields) - { - this._Reader = reader; - - List<FieldValuesBitSets> fieldValuesBitSets = new List<FieldValuesBitSets>(); - - //STEP 1 - //f1 = A, B - //f2 = I, J - //f3 = 1, 2, 3 - int maxFacets = 1; - IList<IList<string>> inputToCP = new List<IList<string>>(); - foreach (string field in groupByFields) - { - FieldValuesBitSets f = new FieldValuesBitSets(reader, field); - maxFacets *= f.FieldValueBitSetPair.Count; - if (maxFacets > MAX_FACETS) throw new Exception("Facet count exceeded " + MAX_FACETS); - fieldValuesBitSets.Add(f); - inputToCP.Add(f.FieldValueBitSetPair.Keys.ToList()); - } - - //STEP 2 - // comb1: A I 1 - // comb2: A I 2 etc. - var cp = inputToCP.CartesianProduct(); - - //SETP 3 - //create a single BitSet for each combination - //BitSet1: A AND I AND 1 - //BitSet2: A AND I AND 2 etc. - //and remove impossible comb's (for ex, B J 3) from list. -#if !NET35 - Parallel.ForEach(cp, combinations => -#else - foreach(var combinations in cp) -#endif - { - OpenBitSetDISI bitSet = new OpenBitSetDISI(_Reader.MaxDoc); - bitSet.Set(0, bitSet.Size()); - List<string> comb = combinations.ToList(); - - for (int j = 0; j < comb.Count; j++) - { - bitSet.And(fieldValuesBitSets[j].FieldValueBitSetPair[comb[j]]); - } - - //STEP 3 - if (bitSet.Cardinality() > 0) - { - lock(_Groups) - _Groups.Add(new KeyValuePair<List<string>, OpenBitSetDISI>(comb, bitSet)); - } - } -#if !NET35 - ); -#endif - - - //Now _Groups has 7 rows (as <List<string>, BitSet> pairs) - } - - public Hits Search(Query query) - { - return Search(query, DefaultMaxDocPerGroup); - } - - public Hits Search(Query query, int maxDocPerGroup) - { - var hitsPerGroup = new List<HitsPerFacet>(); - - DocIdSet queryDocidSet = new CachingWrapperFilter(new QueryWrapperFilter(query)).GetDocIdSet(_Reader); - var actions = new Action[_Groups.Count]; - for (int i = 0; i < _Groups.Count; i++) - { - var h = new HitsPerFacet(new FacetName(_Groups[i].Key.ToArray()), _Reader, queryDocidSet, _Groups[i].Value, maxDocPerGroup); - hitsPerGroup.Add(h); - actions[i] = h.Calculate; - } - -#if !NET35 - Parallel.Invoke(actions); -#else - foreach (var action in actions) - action(); -#endif - - Hits hits = new Hits {HitsPerFacet = hitsPerGroup.ToArray()}; - - return hits; - } - - public void Dispose() - { - } - } -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.csproj ---------------------------------------------------------------------- diff --git a/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.csproj b/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.csproj deleted file mode 100644 index d7e049b..0000000 --- a/src/contrib/SimpleFacetedSearch/SimpleFacetedSearch.csproj +++ /dev/null @@ -1,130 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - ---> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{66772190-FB3F-48F5-8E05-0B302BACEA73}</ProjectGuid> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Lucene.Net.Search.SimpleFacetedSearch</RootNamespace> - <AssemblyName>Lucene.Net.Contrib.SimpleFacetedSearch</AssemblyName> - <FileAlignment>512</FileAlignment> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\..\build\bin\contrib\SimpleFacetedSearch\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <DefineConstants>DEBUG;TRACE;$(Framework)</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <NoWarn>618</NoWarn> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug35|AnyCPU' "> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\..\build\bin\contrib\SimpleFacetedSearch\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <DefineConstants>DEBUG;TRACE;$(Framework)</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <NoWarn>618</NoWarn> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\..\build\bin\contrib\SimpleFacetedSearch\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <DefineConstants>TRACE;$(Framework)</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <NoWarn>618</NoWarn> - <DocumentationFile>..\..\..\build\bin\contrib\SimpleFacetedSearch\Release\NET40\Lucene.Net.Contrib.SimpleFacetedSearch.xml</DocumentationFile> - <DebugSymbols>true</DebugSymbols> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release35|AnyCPU' "> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\..\build\bin\contrib\SimpleFacetedSearch\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <DefineConstants>TRACE;$(Framework)</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <NoWarn>618</NoWarn> - <DocumentationFile>..\..\..\build\bin\contrib\SimpleFacetedSearch\Release\NET35\Lucene.Net.Contrib.SimpleFacetedSearch.xml</DocumentationFile> - <DebugSymbols>true</DebugSymbols> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup> - <SignAssembly>true</SignAssembly> - </PropertyGroup> - <PropertyGroup> - <AssemblyOriginatorKeyFile>Lucene.Net.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Condition="'$(Framework)' == 'NET35'" Include="System.Core" /> - <Reference Include="System.Core" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="Microsoft.CSharp" Condition="'$(Framework)' != 'NET35'" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Extensions.cs" /> - <Compile Include="FieldValuesBitSets.cs" /> - <Compile Include="FacetName.cs" /> - <Compile Include="Hits.cs" /> - <Compile Include="HitsPerFacet.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="SimpleFacetedSearch.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\core\Lucene.Net.csproj"> - <Project>{5D4AD9BE-1FFB-41AB-9943-25737971BF57}</Project> - <Name>Lucene.Net</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="Lucene.Net.snk" /> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Snowball/ABOUT.txt ---------------------------------------------------------------------- diff --git a/src/contrib/Snowball/ABOUT.txt b/src/contrib/Snowball/ABOUT.txt deleted file mode 100644 index 2969ad3..0000000 --- a/src/contrib/Snowball/ABOUT.txt +++ /dev/null @@ -1 +0,0 @@ -Snowball.Net is a port of Jakarta Snowball to C#. The port from Java to C# of version 1.4.3 and 2.0 are done primary by George Aroush. To contact George Aroush please visit http://www.aroush.net/ http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Snowball/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/src/contrib/Snowball/AssemblyInfo.cs b/src/contrib/Snowball/AssemblyInfo.cs deleted file mode 100644 index 6847c76..0000000 --- a/src/contrib/Snowball/AssemblyInfo.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Security; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Lucene.Net.Contrib.Snowball")] -[assembly: AssemblyDescription("The Apache Software Foundation Lucene.Net a full-text search engine library")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("The Apache Software Foundation")] -[assembly: AssemblyProduct("Lucene.Net.Contrib.Snowball")] -[assembly: AssemblyCopyright("Copyright 2007 - 2011 The Apache Software Foundation")] -[assembly: AssemblyTrademark("Copyright 2007 - 2011 The Apache Software Foundation")] -[assembly: AssemblyDefaultAlias("Lucene.Net.Snowball")] -[assembly: AssemblyCulture("")] - -[assembly: AssemblyInformationalVersionAttribute("2.0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Revision -// Build Number -// -// 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.001")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\..\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// - -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] - - -[assembly: ComVisibleAttribute(false)] - -[assembly: AllowPartiallyTrustedCallers] http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Snowball/Contrib.Snowball.csproj ---------------------------------------------------------------------- diff --git a/src/contrib/Snowball/Contrib.Snowball.csproj b/src/contrib/Snowball/Contrib.Snowball.csproj deleted file mode 100644 index 1623b4a..0000000 --- a/src/contrib/Snowball/Contrib.Snowball.csproj +++ /dev/null @@ -1,280 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - ---> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> - <PropertyGroup> - <ProjectType>Local</ProjectType> - <ProductVersion>8.0.30319</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{8F9D7A92-F122-413E-9D8D-027E4ECD327C}</ProjectGuid> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ApplicationIcon /> - <AssemblyKeyContainerName /> - <AssemblyName>Lucene.Net.Contrib.Snowball</AssemblyName> - <AssemblyOriginatorKeyFile>Lucene.Net.snk</AssemblyOriginatorKeyFile> - <DefaultClientScript>JScript</DefaultClientScript> - <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> - <DefaultTargetSchema>IE50</DefaultTargetSchema> - <DelaySign>false</DelaySign> - <RootNamespace>Lucene.Net.Analysis.Snowball</RootNamespace> - <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> - <StartupObject /> - <FileUpgradeFlags> - </FileUpgradeFlags> - <OldToolsVersion>0.0</OldToolsVersion> - <UpgradeBackupLocation /> - <PublishUrl>publish\</PublishUrl> - <Install>true</Install> - <InstallFrom>Disk</InstallFrom> - <UpdateEnabled>false</UpdateEnabled> - <UpdateMode>Foreground</UpdateMode> - <UpdateInterval>7</UpdateInterval> - <UpdateIntervalUnits>Days</UpdateIntervalUnits> - <UpdatePeriodically>false</UpdatePeriodically> - <UpdateRequired>false</UpdateRequired> - <MapFileExtensions>true</MapFileExtensions> - <ApplicationRevision>0</ApplicationRevision> - <ApplicationVersion>1.0.0.%2a</ApplicationVersion> - <IsWebBootstrapper>false</IsWebBootstrapper> - <UseApplicationTrust>false</UseApplicationTrust> - <BootstrapperEnabled>true</BootstrapperEnabled> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <OutputPath>..\..\..\build\bin\contrib\Snowball\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <AllowUnsafeBlocks>false</AllowUnsafeBlocks> - <BaseAddress>285212672</BaseAddress> - <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> - <ConfigurationOverrideFile /> - <DefineConstants>DEBUG;TRACE;$(Framework)</DefineConstants> - <DocumentationFile> - </DocumentationFile> - <DebugSymbols>true</DebugSymbols> - <FileAlignment>4096</FileAlignment> - <NoStdLib>false</NoStdLib> - <NoWarn>618</NoWarn> - <Optimize>false</Optimize> - <RegisterForComInterop>false</RegisterForComInterop> - <RemoveIntegerChecks>false</RemoveIntegerChecks> - <TreatWarningsAsErrors>false</TreatWarningsAsErrors> - <WarningLevel>4</WarningLevel> - <DebugType>full</DebugType> - <ErrorReport>prompt</ErrorReport> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug35|AnyCPU' "> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <OutputPath>..\..\..\build\bin\contrib\Snowball\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <AllowUnsafeBlocks>false</AllowUnsafeBlocks> - <BaseAddress>285212672</BaseAddress> - <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> - <ConfigurationOverrideFile /> - <DefineConstants>DEBUG;TRACE;$(Framework)</DefineConstants> - <DocumentationFile> - </DocumentationFile> - <DebugSymbols>true</DebugSymbols> - <FileAlignment>4096</FileAlignment> - <NoStdLib>false</NoStdLib> - <NoWarn>618</NoWarn> - <Optimize>false</Optimize> - <RegisterForComInterop>false</RegisterForComInterop> - <RemoveIntegerChecks>false</RemoveIntegerChecks> - <TreatWarningsAsErrors>false</TreatWarningsAsErrors> - <WarningLevel>4</WarningLevel> - <DebugType>full</DebugType> - <ErrorReport>prompt</ErrorReport> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <OutputPath>..\..\..\build\bin\contrib\Snowball\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <AllowUnsafeBlocks>false</AllowUnsafeBlocks> - <BaseAddress>285212672</BaseAddress> - <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> - <ConfigurationOverrideFile /> - <DefineConstants>TRACE;$(Framework)</DefineConstants> - <DocumentationFile>..\..\..\build\bin\contrib\Snowball\$(Configuration.Replace("35", ""))\$(Framework)\Lucene.Net.Contrib.Snowball.XML</DocumentationFile> - <DebugSymbols>true</DebugSymbols> - <FileAlignment>4096</FileAlignment> - <NoStdLib>false</NoStdLib> - <NoWarn>618</NoWarn> - <Optimize>true</Optimize> - <RegisterForComInterop>false</RegisterForComInterop> - <RemoveIntegerChecks>false</RemoveIntegerChecks> - <TreatWarningsAsErrors>false</TreatWarningsAsErrors> - <WarningLevel>4</WarningLevel> - <DebugType>pdbonly</DebugType> - <ErrorReport>prompt</ErrorReport> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release35|AnyCPU' "> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <Framework>$(TargetFrameworkVersion.Replace("v", "NET").Replace(".", ""))</Framework> - <OutputPath>..\..\..\build\bin\contrib\Snowball\$(Configuration.Replace("35", ""))\$(Framework)\</OutputPath> - <AllowUnsafeBlocks>false</AllowUnsafeBlocks> - <BaseAddress>285212672</BaseAddress> - <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> - <ConfigurationOverrideFile /> - <DefineConstants>TRACE;$(Framework)</DefineConstants> - <DocumentationFile>..\..\..\build\bin\contrib\Snowball\$(Configuration.Replace("35", ""))\$(Framework)\Lucene.Net.Contrib.Snowball.XML</DocumentationFile> - <DebugSymbols>true</DebugSymbols> - <FileAlignment>4096</FileAlignment> - <NoStdLib>false</NoStdLib> - <NoWarn>618</NoWarn> - <Optimize>true</Optimize> - <RegisterForComInterop>false</RegisterForComInterop> - <RemoveIntegerChecks>false</RemoveIntegerChecks> - <TreatWarningsAsErrors>false</TreatWarningsAsErrors> - <WarningLevel>4</WarningLevel> - <DebugType>pdbonly</DebugType> - <ErrorReport>prompt</ErrorReport> - <OutputType>Library</OutputType> - </PropertyGroup> - <PropertyGroup> - <SignAssembly>true</SignAssembly> - </PropertyGroup> - <ItemGroup> - <Reference Include="System"> - <Name>System</Name> - </Reference> - <Reference Condition="'$(Framework)' == 'NET35'" Include="System.Core" /> - </ItemGroup> - <ItemGroup> - <Compile Include="AssemblyInfo.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Lucene.Net\Analysis\Snowball\SnowballAnalyzer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Lucene.Net\Analysis\Snowball\SnowballFilter.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Among.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\DanishStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\DutchStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\EnglishStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\FinnishStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\FrenchStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\German2Stemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\GermanStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\HungarianStemmer.cs" /> - <Compile Include="SF\Snowball\Ext\ItalianStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\KpStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\LovinsStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\NorwegianStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\PorterStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\PortugueseStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\RomanianStemmer.cs" /> - <Compile Include="SF\Snowball\Ext\RussianStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\SpanishStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\SwedishStemmer.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\Ext\TurkishStemmer.cs" /> - <Compile Include="SF\Snowball\SnowballProgram.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="SF\Snowball\TestApp.cs"> - <SubType>Code</SubType> - </Compile> - <Content Include="Docs\Index.html" /> - <Content Include="LICENSE.txt" /> - <Content Include="Lucene.Net\Analysis\Snowball\Package.html" /> - <Content Include="README.txt" /> - <Content Include="SF\Overview.html" /> - <Content Include="SF\Snowball\Ext\Package.html" /> - <Content Include="SF\Snowball\Package.html" /> - <Content Include="Xdocs\Index.xml" /> - <Content Include="Xdocs\Stylesheets\Project.xml" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\core\Lucene.Net.csproj"> - <Project>{5D4AD9BE-1FFB-41AB-9943-25737971BF57}</Project> - <Name>Lucene.Net</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <BootstrapperPackage Include=".NETFramework,Version=v4.0"> - <Visible>False</Visible> - <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName> - <Install>true</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> - <Install>false</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1</ProductName> - <Install>false</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> - <Visible>False</Visible> - <ProductName>Windows Installer 3.1</ProductName> - <Install>true</Install> - </BootstrapperPackage> - </ItemGroup> - <ItemGroup> - <None Include="Lucene.Net.snk" /> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <PropertyGroup> - <PreBuildEvent /> - <PostBuildEvent /> - </PropertyGroup> -</Project> \ No newline at end of file
