Skip to content

Commit

Permalink
Merge pull request #7 from Novicell/development
Browse files Browse the repository at this point in the history
Merge to master - release
  • Loading branch information
bielu authored Feb 7, 2020
2 parents c9f7d55 + c643dad commit 3c2249c
Show file tree
Hide file tree
Showing 23 changed files with 559 additions and 114 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

[![Build status](https://ci.appveyor.com/api/projects/status/qrkvmx8jnxg8n2up/branch/master?svg=true)](https://ci.appveyor.com/project/bielu/novicell-examine-elasticsearch/branch/master)

| Nuget Packages | Version |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Release | Soon |
| Pre-release | [![Build status](https://img.shields.io/nuget/vpre/Novicell.Examine.ElasticSearch)](https://www.nuget.org/packages/Novicell.Examine.ElasticSearch/) |

| Umbraco Packages | Version |
| ---------------- | ------- |
| Release | soon |
| Pre-release | soon |
| Nuget Package | Status | Version |
| -------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Novicell.Examine.ElasticSearch | Release | Soon |
| | Pre-release | [![Build status](https://img.shields.io/nuget/vpre/Novicell.Examine.ElasticSearch)](https://www.nuget.org/packages/Novicell.Examine.ElasticSearch/) |
| Novicell.Examine.ElasticSearch.Umbraco | Release | Soon |
| | Pre-release | |

| Umbraco Package | Version |
| --------------- | ------- |
| Release | soon |
| Pre-release | soon |

# Introduction:

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# version format
version: 0.5.1.{build}
version: 1.0.0.{build}
nuget:
account_feed: false
project_feed: false
Expand All @@ -17,7 +17,7 @@ branches:

environment:
# Version Suffix
version_suffix: alpha
version_suffix: RC

install:
- nuget sources add -Name MyAccountFeed -Source https://ci.appveyor.com/nuget/bielu-s77m8i59ehlc/ -UserName %nuget_user% -Password %nuget_password%
Expand Down
58 changes: 49 additions & 9 deletions build/Novicell.Examine.ElasticSearch.proj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

<!-- SHARED PROPERTIES -->
<PropertyGroup>
<PackageName>Novicell.Examine.ElasticSearch</PackageName>
<PackageName>Novicell.Examine.ElasticSearch.Umbraco</PackageName>
<MinUmbracoVersion>8.4.0</MinUmbracoVersion>
<Readme>Novicell.Examine.ElasticSearch is a Custom Search Provider for Umbraco v8</Readme>
<Readme>Novicell.Examine.ElasticSearch is custom Examine provider.</Readme>
<AuthorName>Arkadiusz Biel</AuthorName>
<AuthorUrl>https://github.com/novicell/Novicell.Examine.ElasticSearch/graphs/contributors</AuthorUrl>
<PackageLicenseName>MIT license</PackageLicenseName>
Expand All @@ -29,13 +29,15 @@
<PackageId>Novicell.Examine.ElasticSearch</PackageId>
<Copyright>Novicell</Copyright>
<Owners>Novicell,Arkadiusz Biel</Owners>
<Description>Novicell.Examine.ElasticSearch is a Custom Search Provider for Umbraco v8</Description>
<Description>Novicell.Examine.ElasticSearch is a Custom Search Provider for Examine</Description>
<IconUrl>https://raw.githubusercontent.com/elastic/elasticsearch/master/server/src/main/resources/config/favicon.ico</IconUrl>
<Tags>Umbraco, Novicell,Examine,ElasticSearch</Tags>
<Language>en-GB</Language>
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
</PropertyGroup>

<PropertyGroup>
<DescriptionUmbraco>Novicell.Examine.ElasticSearch.Umbraco is a composer to attach Elastich Search Examine provider to Umbravo v8</DescriptionUmbraco>
</PropertyGroup>
<!-- APPVEYOR PROPERTIES -->
<PropertyGroup>
<FileVersion>$(mssemver)</FileVersion>
Expand All @@ -48,6 +50,7 @@
<BuildDir>$(MSBuildProjectDirectory)\_temp</BuildDir>
<BuildUmbDir>$(BuildDir)\_umbraco</BuildUmbDir>
<BuildNuGetDir>$(BuildDir)\_nuget</BuildNuGetDir>
<BuildNuGetUmbracoDir>$(BuildDir)\umrbaco\_nuget</BuildNuGetUmbracoDir>
<ArtifactsDir>$(RootDir)\artifacts</ArtifactsDir>
<CoreProjectDir>$(RootDir)\source\Novicell.Examine.ElasticSearch</CoreProjectDir>
<TestProjectDir>$(RootDir)\source\Novicell.Examine.ElasticSearch.Tests</TestProjectDir>
Expand All @@ -60,12 +63,14 @@
<MakeDir Directories="$(BuildDir)" />
<MakeDir Directories="$(BuildUmbDir)" />
<MakeDir Directories="$(BuildNuGetDir)" />
<MakeDir Directories="$(BuildNuGetUmbracoDir)" />
<MakeDir Directories="$(ArtifactsDir)" />
</Target>

<!-- COMPILE -->
<Target Name="Compile" DependsOnTargets="Clean">
<MSBuild Projects="$(CoreProjectDir)\Novicell.Examine.ElasticSearch.csproj" Properties="Configuration=$(BuildConfig)" />
<MSBuild Projects="$(CoreProjectDir).Umbraco\Novicell.Examine.ElasticSearch.Umbraco.csproj" Properties="Configuration=$(BuildConfig)" />
<MSBuild Projects="$(TestProjectDir)\Novicell.Examine.ElasticSearch.Tests.csproj" Properties="Configuration=$(BuildConfig)" />
</Target>

Expand All @@ -75,9 +80,11 @@
<!-- Shared -->
<BinFiles Include="$(CoreProjectDir)\bin\$(BuildConfig)\Novicell.Examine.ElasticSearch.dll" />
<PdbFiles Include="$(CoreProjectDir)\bin\$(BuildConfig)\Novicell.Examine.ElasticSearch.pdb" />

<BinFiles2 Include="$(CoreProjectDir).Umbraco\bin\$(BuildConfig)\Novicell.Examine.ElasticSearch.Umbraco.dll" />
<PdbFiles2 Include="$(CoreProjectDir).Umbraco\bin\$(BuildConfig)\Novicell.Examine.ElasticSearch.Umbraco.pdb" />
<!-- Umbraco specific -->
<PackageFile Include="$(MSBuildProjectDirectory)\package.xml" />
<UmbracoBinFiles Include="$(CoreProjectDir).Umbraco\bin\$(BuildConfig)\Novicell.Examine.ElasticSearch.Umbraco.dll" />
<UmbracoBinFiles Include="$(CoreProjectDir)\bin\$(BuildConfig)\Elasticsearch.Net.dll" />
<UmbracoBinFiles Include="$(CoreProjectDir)\bin\$(BuildConfig)\Elasticsearch.Net.xml" />
<UmbracoBinFiles Include="$(CoreProjectDir)\bin\$(BuildConfig)\Nest.dll" />
Expand All @@ -86,6 +93,7 @@
<!-- NuGet specific -->
<SrcFiles Include="$(CoreProjectDir)\**\*.cs" Exclude="$(CoreProjectDir)\obj\**"/>
<NuSpecFile Include="$(MSBuildProjectDirectory)\package.nuspec" />
<NuSpecFile2 Include="$(MSBuildProjectDirectory)\Umbraco\package.nuspec" />
<!--<NugetReadme Include="$(MSBuildProjectDirectory)\readme.txt" />-->
</ItemGroup>

Expand All @@ -102,7 +110,10 @@
<Copy SourceFiles="@(SrcFiles)" DestinationFiles="@(SrcFiles->'$(BuildNuGetDir)\src\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(NuSpecFile)" DestinationFolder="$(BuildNuGetDir)" />
<Copy SourceFiles="@(NugetReadme)" DestinationFolder="$(BuildNuGetDir)" />

<!-- Umbraco Nuget Package -->
<Copy SourceFiles="@(BinFiles2)" DestinationFolder="$(BuildNuGetUmbracoDir)\lib\net45" />
<Copy SourceFiles="@(PdbFiles2)" DestinationFolder="$(BuildNuGetUmbracoDir)\lib\net45" />
<Copy SourceFiles="@(NuSpecFile2)" DestinationFolder="$(BuildNuGetUmbracoDir)" />
</Target>

<!-- MANIFEST UMBRACO -->
Expand Down Expand Up @@ -151,9 +162,33 @@
Tags="$(Tags)"
Files="@(ManifestFiles)" />
</Target>

<!-- MANIFEST FOR Umbraco NUGET PACKAGE -->
<Target Name="ManifestNuGetUmbraco" DependsOnTargets="PrepareFiles">
<ItemGroup>
<ManifestFiles Include="$(BuildNuGetUmbracoDir)\**\*" Exclude="$(BuildNuGetUmbracoDir)\package.nuspec" />
</ItemGroup>
<MSBuild.NuGet.Tasks.ManifestUpdate
ManifestFile="$(BuildNuGetUmbracoDir)\package.nuspec"
WorkingDirectory="$(BuildNuGetUmbracoDir)"
Title="$(PackageName)"
Description="$(DescriptionUmbraco)"
Summary="$(Readme)"
Version="$(FileVersion)"
MinimumRequiredUmbracoVersion ="$(MinUmbracoVersion)"
Authors="$(AuthorName)"
Owners="$(Owners)"
Copyright="$(Copyright)"
LicenseUrl="$(PackageLicenseUrl)"
ProjectUrl="$(ProjectUrl)"
Id="$(PackageId).Umbraco"
IconUrl="$(IconUrl)"
Language="$(Language)"
RequireLicenseAcceptance="$(RequireLicenseAcceptance)"
Tags="$(Tags)"
Files="@(ManifestFiles)" />
</Target>
<!-- PACKAGE -->
<Target Name="Package" DependsOnTargets="ManifestUmbraco; ManifestNuGet">
<Target Name="Package" DependsOnTargets="ManifestUmbraco; ManifestNuGet;ManifestNuGetUmbraco">
<ItemGroup>
<PackageFiles Include="$(BuildUmbDir)\**\*.*" />
</ItemGroup>
Expand All @@ -169,7 +204,12 @@
Version="$(FileVersion)"
OutputDirectory="$(ArtifactsDir)"
Symbols="true" />

<MSBuild.NuGet.Tasks.Pack NuGetExePath="NuGet.exe"
ManifestFile="$(BuildNuGetUmbracoDir)\package.nuspec"
BasePath="$(BuildNuGetUmbracoDir)"
Version="$(FileVersion)"
OutputDirectory="$(ArtifactsDir)"
Symbols="true" />
<RemoveDir Directories="$(BuildDir)" Condition="Exists('$(BuildDir)')" />

</Target>
Expand Down
26 changes: 26 additions & 0 deletions build/Umbraco/package.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id></id>
<version>0.0.0</version>
<title></title>
<authors></authors>
<owners></owners>
<projectUrl></projectUrl>
<iconUrl></iconUrl>
<requireLicenseAcceptance></requireLicenseAcceptance>
<description></description>
<summary></summary>
<copyright></copyright>
<licenseUrl></licenseUrl>
<language></language>
<tags></tags>
<dependencies>
<dependency id="UmbracoCms.Core" version="0.0.0" />
<dependency id="Novicell.Examine.Elasticsearch" version="[1.0,2.0)" />
<dependency id="NEST" version="7.4.1" />
<dependency id="Elasticsearch.Net" version="7.4.1" />

</dependencies>
</metadata>
</package>
1 change: 0 additions & 1 deletion build/package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<language></language>
<tags></tags>
<dependencies>
<dependency id="UmbracoCms.Core" version="0.0.0" />
<dependency id="NEST" version="7.4.1" />
<dependency id="Elasticsearch.Net" version="7.4.1" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Umbraco.Core.Models;
using Umbraco.Core.Services.Changes;

namespace Novicell.Examine.ElasticSearch.ContentTypes
namespace Novicell.Examine.ElasticSearch.Tests.ContentTypes
{
internal static class ContentTypeChangeExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Elasticsearch.Net, Version=7.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d">
<HintPath>..\packages\Elasticsearch.Net.7.4.1\lib\net461\Elasticsearch.Net.dll</HintPath>
<HintPath>..\packages\Elasticsearch.Net.7.5.1\lib\net461\Elasticsearch.Net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ElasticsearchInside, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
Expand Down Expand Up @@ -66,7 +66,7 @@
</Reference>
<Reference Include="mscorlib" />
<Reference Include="Nest, Version=7.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d">
<HintPath>..\packages\NEST.7.4.1\lib\net461\Nest.dll</HintPath>
<HintPath>..\packages\NEST.7.5.1\lib\net461\Nest.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb">
Expand Down Expand Up @@ -99,6 +99,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ContentTypes\ContentTypeChangeExtensions.cs" />
<Compile Include="DataServices\TestContentService.cs" />
<Compile Include="IndexInitializer.cs" />
<Compile Include="Index\ElasticIndexTests.cs" />
Expand Down
4 changes: 2 additions & 2 deletions source/Novicell.Examine.ElasticSearch.Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Elasticsearch.Net" version="7.4.1" targetFramework="net472" />
<package id="Elasticsearch.Net" version="7.5.1" targetFramework="net472" />
<package id="ElasticsearchInside" version="7.1.2" targetFramework="net472" />
<package id="Examine" version="1.0.1" targetFramework="net472" />
<package id="K4os.Compression.LZ4" version="1.1.11" targetFramework="net472" />
<package id="K4os.Compression.LZ4.Legacy" version="1.1.11" targetFramework="net472" />
<package id="K4os.Compression.LZ4.Streams" version="1.1.11" targetFramework="net472" />
<package id="K4os.Hash.xxHash" version="1.0.6" targetFramework="net472" />
<package id="Lucene.Net" version="3.0.3" targetFramework="net452" />
<package id="NEST" version="7.4.1" targetFramework="net472" />
<package id="NEST" version="7.5.1" targetFramework="net472" />
<package id="NUnit" version="3.12.0" targetFramework="net472" />
<package id="NUnit3TestAdapter" version="3.11.0" targetFramework="net45" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net452" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
using System.Linq;
using Examine;
using Novicell.Examine.ElasticSearch.Indexers;
using Novicell.Examine.ElasticSearch.Umbraco.Indexers;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Services;
using Umbraco.Examine;
using Umbraco.Web.Search;

namespace Novicell.Examine.ElasticSearch
namespace Novicell.Examine.ElasticSearch.Umbraco
{
public class ElasticIndexCreator : LuceneIndexCreator, IUmbracoIndexesCreator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using Examine;
using Umbraco.Core;
using Umbraco.Core.Cache;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
using Umbraco.Core.Scoping;
using Umbraco.Core.Services;
using Umbraco.Core.Services.Changes;
using Umbraco.Core.Sync;
using Umbraco.Examine;
using Umbraco.Web.Cache;
using Umbraco.Web.Search;
using Novicell.Examine.ElasticSearch.ContentTypes;
using Novicell.Examine.ElasticSearch.Indexers;

namespace Novicell.Examine.ElasticSearch
namespace Novicell.Examine.ElasticSearch.Umbraco
{
public class ElasticSearchExamineComponent : IComponent, Umbraco.Core.Composing.IComponent
public class ElasticSearchExamineComponent : IComponent,global::Umbraco.Core.Composing.IComponent
{
private readonly IExamineManager _examineManager;
private readonly IUmbracoIndexesCreator _indexCreator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
using System.Configuration;
using Examine;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Services;
using Umbraco.Core.Strings;
using Umbraco.Examine;
using Umbraco.Web.Search;

namespace Novicell.Examine.ElasticSearch
namespace Novicell.Examine.ElasticSearch.Umbraco
{
[RuntimeLevel(MinLevel = RuntimeLevel.Run)]
[ComposeAfter(typeof(ExamineComposer))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Umbraco.Core.Logging;
using Umbraco.Examine;

namespace Novicell.Examine.ElasticSearch.Indexers
namespace Novicell.Examine.ElasticSearch.Umbraco.Indexers
{
public class ContentElasticSearchIndex : ElasticSearchUmbracoIndex, IUmbracoContentIndex
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
using Examine;
using Examine.LuceneEngine.Providers;
using Nest;
using Novicell.Examine.ElasticSearch.Indexers;
using Novicell.Examine.ElasticSearch.Model;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;
using Umbraco.Examine;

namespace Novicell.Examine.ElasticSearch.Indexers
namespace Novicell.Examine.ElasticSearch.Umbraco.Indexers
{
public class ElasticSearchUmbracoIndex : ElasticSearchBaseIndex, IUmbracoIndex, IIndexDiagnostics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Umbraco.Core.Logging;
using Umbraco.Examine;

namespace Novicell.Examine.ElasticSearch.Indexers
namespace Novicell.Examine.ElasticSearch.Umbraco.Indexers
{
public class MemberElasticSearchIndex : ElasticSearchUmbracoIndex, IUmbracoMemberIndex
{
Expand Down
Loading

0 comments on commit 3c2249c

Please sign in to comment.