Skip to content

Commit 0f4ec27

Browse files
committed
Made building documentation part of the build redesign to clearly indicate the difference between elasticsearch.net and nest
1 parent 84fdfba commit 0f4ec27

File tree

134 files changed

+1408
-865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+1408
-865
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ build/tools/*
4242
!build/tools/ilmerge
4343
/dep/Newtonsoft.Json.4.0.2
4444
!new_docs/build
45-
45+
new_docs/node_modules
4646

4747
/src/Nest.Tests.Unit/*.ncrunchproject
4848
*.ncrunchproject

build.bat

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,43 @@
11
@echo off
2+
REM we need nuget to install tools locally
23
if not exist build\tools\nuget\nuget.exe (
34
ECHO Nuget not found.. Downloading..
45
mkdir build\tools\nuget
56
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'build\download-nuget.ps1'"
67
)
8+
9+
REM we need FAKE to process our build scripts
710
if not exist build\tools\FAKE\tools\Fake.exe (
811
ECHO FAKE not found.. Installing..
912
"build\tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
1013
)
14+
15+
REM we need nunit-console to run our tests
1116
if not exist build\tools\NUnit.Runners\tools\nunit-console.exe (
1217
ECHO Nunit not found.. Installing
1318
"build\tools\nuget\nuget.exe" "install" "NUnit.Runners" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
1419
)
20+
21+
REM we need wintersmith to build our documentation which in turn needs npm/node
22+
REM installing and calling this locally so that yours and CI's systems do not need to be configured prior to running build.bat
23+
if not exist build\tools\Node.js\node.exe (
24+
ECHO Local node not found.. Installing..
25+
"build\tools\nuget\nuget.exe" "install" "node.js" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
26+
)
27+
if not exist build\tools\Npm\node_modules\npm\cli.js (
28+
ECHO Local npm not found.. Installing..
29+
"build\tools\nuget\nuget.exe" "install" "npm" "-OutputDirectory" "build\tools" "-ExcludeVersion" "-Prerelease"
30+
)
31+
if not exist build\tools\node_modules\wintersmith\bin\wintersmith (
32+
ECHO wintersmith not found.. Installing..
33+
cd build\tools
34+
35+
"Node.js\node.exe" "Npm\node_modules\npm\cli.js" install wintersmith
36+
37+
cd ..\..
38+
)
39+
40+
1541
SET TARGET="Build"
1642

1743
IF NOT [%1]==[] (set TARGET="%1")

build/build.fsx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ Target "Test" (fun _ ->
3131
)
3232

3333
let keyFile = "build/keys/keypair.snk"
34-
let validateSignedAssembly = fun (name) ->
34+
let validateSignedAssembly = fun name ->
3535
let sn = "build/tools/sn/sn.exe"
3636
ExecProcess(fun p ->
3737
p.FileName <- sn
3838
p.Arguments <- sprintf @"-v build\output\%s.dll" name
3939
) (TimeSpan.FromMinutes 5.0)
4040

41-
let signAssembly = fun (name) ->
41+
let signAssembly = fun name ->
4242
let ilmerge = "build/tools/ilmerge/ILMerge.exe"
4343
let platform = @"/targetplatform:v4,C:\Windows\Microsoft.NET\Framework64\v4.0.30319"
4444
let i = sprintf "build\\output\\%s\\%s" name name
@@ -64,7 +64,7 @@ let signAssembly = fun (name) ->
6464
| _ ->
6565
failwithf "Failed to sign {0}" name
6666

67-
let nugetPack = fun (name) ->
67+
let nugetPack = fun name ->
6868

6969
CreateDir nugetOutDir
7070

@@ -80,6 +80,16 @@ let nugetPack = fun (name) ->
8080

8181
MoveFile nugetOutDir (buildDir + (sprintf "%s/%s.%s.nupkg" name name version))
8282

83+
let buildDocs = fun action ->
84+
let node = @"build\tools\Node.js\node.exe"
85+
let wintersmith = @"..\build\tools\node_modules\wintersmith\bin\wintersmith"
86+
ExecProcess (fun p ->
87+
p.WorkingDirectory <- "new_docs"
88+
p.FileName <- node
89+
p.Arguments <- sprintf "\"%s\" %s" wintersmith action
90+
) (TimeSpan.FromMinutes (if action = "preview" then 300.0 else 5.0))
91+
92+
8393
Target "Release" (fun _ ->
8494
if not <| fileExists keyFile
8595
then failwithf "{0} does not exist to sign the assemblies" keyFile
@@ -94,6 +104,13 @@ Target "Release" (fun _ ->
94104

95105
)
96106

107+
Target "Docs" (fun _ -> buildDocs "build" |> ignore)
108+
Target "DocsPreview" (fun _ ->
109+
buildDocs "plugin install livereload" |> ignore
110+
buildDocs "preview" |> ignore
111+
)
112+
113+
97114
// Dependencies
98115
"Clean"
99116
==> "BuildApp"
@@ -103,5 +120,7 @@ Target "Release" (fun _ ->
103120
"Build"
104121
==> "Release"
105122

123+
"DocsPreview"
124+
106125
// start build
107126
RunTargetOrDefault "Build"

new_docs/build/cluster/health.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<!DOCTYPE html><html><head><title>Nest - Connecting</title><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="pragma" content="no-cache"><meta http-equiv="content-type" content="text/html;charset=utf-8"><meta http-equiv="expires" content="0"><meta name="description" content="elasticsearch"><meta name="keywords" content="nest, elasticsearch, .net, client"><meta name="author" content="martijn laarman"><link rel="stylesheet" type="text/css" href="/styles/layout.css"><link rel="stylesheet" type="text/css" href="/styles/pygments.css"><link href="http://fonts.googleapis.com/css?family=Ubuntu+Mono|Ubuntu" rel="stylesheet" type="text/css"><link href="/prettify/prettify.css" type="text/css" rel="stylesheet"><link href="/prettify/sunburst.css" type="text/css" rel="stylesheet"><script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script><script type="text/javascript" src="/prettify/prettify.js"></script><script type="text/javascript" src="/prettify/fix_code_tags.js"></script></head><body><section id="site"><div class="actions"><iframe src="http://ghbtns.com/github-btn.html?user=Mpdreamz&amp;repo=NEST&amp;type=fork&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="95" height="20"></iframe><iframe src="http://ghbtns.com/github-btn.html?user=Mpdreamz&amp;repo=NEST&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe></div><aside><ul id="top_left_menu"><h4>External</h4><li><a href="http://www.elasticsearch.org" target="_blank">Elasticsearch Docs</a></li><li><a href="http://mpdreamz.mit-license.org/" target="_blank">MIT license</a></li></ul></aside><section id="content"><aside id="menu"><ul id="top_left_menu"><li><a href="/">+ Concepts</a></li><li><a href="/core/" class="">+ Core</a></li><li><a href="/indices/aliases.html" class="">+ Indices</a></li><h4>- Cluster</h4><ul><li><a href="/cluster/health.html" class="selected">Health</a></li><li><a href="/cluster/state.html" class="">State</a></li><li><a href="/cluster/update-settings.html" class="">Update Settings</a></li><li><a href="/cluster/nodes-info.html" class="">Nodes Info</a></li><li><a href="/cluster/nodes-stats.html" class="">Nodes Stats</a></li><li><a href="/cluster/nodes-shutdown.html" class="">Nodes Shutdown</a></li></ul><li><a href="/search/basics.html" class="">+ Search</a></li><li><a href="/facets/handling.html" class="">+ Facets</a></li><li><a href="/query/text.html" class="">+ Query DSL</a></li><li><a href="/filter/and.html" class="">+ Filter DSL</a></li></ul></aside><article><div id="content-margin-fix"><h1>Health</h1>
1+
<html><head><title>Nest - Connecting</title><meta http-equiv="cache-control" content="no-cache"/><meta http-equiv="pragma" content="no-cache"/><meta http-equiv="content-type" content="text/html;charset=utf-8"/><meta http-equiv="expires" content="0"/><meta name="description" content="elasticsearch"/><meta name="keywords" content="nest, elasticsearch, .net, client"/><meta name="author" content="martijn laarman"/><link rel="stylesheet" type="text/css" href="/styles/layout.css"/><link rel="stylesheet" type="text/css" href="/styles/pygments.css"/><link href="http://fonts.googleapis.com/css?family=Ubuntu+Mono|Ubuntu" rel="stylesheet" type="text/css"/><link href="/prettify/prettify.css" type="text/css" rel="stylesheet"/><link href="/prettify/sunburst.css" type="text/css" rel="stylesheet"/><script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script><script type="text/javascript" src="/prettify/prettify.js"></script><script type="text/javascript" src="/prettify/fix_code_tags.js"></script></head><body><section id="site"><div class="actions"><iframe src="http://ghbtns.com/github-btn.html?user=Mpdreamz&amp;repo=NEST&amp;type=fork&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="95" height="20"></iframe><iframe src="http://ghbtns.com/github-btn.html?user=Mpdreamz&amp;repo=NEST&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe></div><aside><ul id="top_left_menu"><h4>External</h4><li><a href="http://www.elasticsearch.org" target="_blank">Elasticsearch Docs</a></li><li><a href="http://mpdreamz.mit-license.org/" target="_blank">MIT license</a></li></ul></aside><section id="content"><aside id="menu"><ul id="top_left_menu"><li><a href="/">+ Concepts</a></li><li><a href="/core/">+ Core</a></li><li><a href="/indices/aliases.html">+ Indices</a></li><h4>- Cluster</h4><ul><li><a href="/cluster/health.html" class="selected">Health</a></li><li><a href="/cluster/state.html">State</a></li><li><a href="/cluster/update-settings.html">Update Settings</a></li><li><a href="/cluster/nodes-info.html">Nodes Info</a></li><li><a href="/cluster/nodes-stats.html">Nodes Stats</a></li><li><a href="/cluster/nodes-shutdown.html">Nodes Shutdown</a></li></ul><li><a href="/search/basics.html">+ Search</a></li><li><a href="/facets/handling.html">+ Facets</a></li><li><a href="/query/text.html">+ Query DSL</a></li><li><a href="/filter/and.html">+ Filter DSL</a></li></ul></aside><article><div id="content-margin-fix"><h1 id="health">Health</h1>
22
<p>Get cluster health simple</p>
3-
<pre><code>var r = this._client.Health(HealthLevel.Cluster);</code></pre>
4-
<p>Cluster health just for one (or more) index</p>
5-
<pre><code>var r = this._client.Health(new[] { Test.Default.DefaultIndex }, HealthLevel.Cluster);</code></pre>
6-
<p>Advanced options are mapped as well</p>
3+
<pre><code>var r = this._client.Health(HealthLevel.Cluster);
4+
</code></pre><p>Cluster health just for one (or more) index</p>
5+
<pre><code>var r = this._client.Health(new[] { Test.Default.DefaultIndex }, HealthLevel.Cluster);
6+
</code></pre><p>Advanced options are mapped as well</p>
77
<pre><code>var r = this._client.Health(new HealthParams
88
{
99
CheckLevel = HealthLevel.Shards,
1010
Timeout = &quot;30s&quot;,
1111
WaitForMinNodes = 1,
1212
WaitForRelocatingShards = 0,
1313
WaitForStatus = HealthStatus.Green
14-
});</code></pre>
15-
</div></article></section></section></body></html>
14+
});
15+
</code></pre></div></article></section></section></body></html>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<!DOCTYPE html><html><head><title>Nest - Connecting</title><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="pragma" content="no-cache"><meta http-equiv="content-type" content="text/html;charset=utf-8"><meta http-equiv="expires" content="0"><meta name="description" content="elasticsearch"><meta name="keywords" content="nest, elasticsearch, .net, client"><meta name="author" content="martijn laarman"><link rel="stylesheet" type="text/css" href="/styles/layout.css"><link rel="stylesheet" type="text/css" href="/styles/pygments.css"><link href="http://fonts.googleapis.com/css?family=Ubuntu+Mono|Ubuntu" rel="stylesheet" type="text/css"><link href="/prettify/prettify.css" type="text/css" rel="stylesheet"><link href="/prettify/sunburst.css" type="text/css" rel="stylesheet"><script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script><script type="text/javascript" src="/prettify/prettify.js"></script><script type="text/javascript" src="/prettify/fix_code_tags.js"></script></head><body><section id="site"><div class="actions"><iframe src="http://ghbtns.com/github-btn.html?user=Mpdreamz&amp;repo=NEST&amp;type=fork&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="95" height="20"></iframe><iframe src="http://ghbtns.com/github-btn.html?user=Mpdreamz&amp;repo=NEST&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe></div><aside><ul id="top_left_menu"><h4>External</h4><li><a href="http://www.elasticsearch.org" target="_blank">Elasticsearch Docs</a></li><li><a href="http://mpdreamz.mit-license.org/" target="_blank">MIT license</a></li></ul></aside><section id="content"><aside id="menu"><ul id="top_left_menu"><li><a href="/">+ Concepts</a></li><li><a href="/core/" class="">+ Core</a></li><li><a href="/indices/aliases.html" class="">+ Indices</a></li><h4>- Cluster</h4><ul><li><a href="/cluster/health.html" class="">Health</a></li><li><a href="/cluster/state.html" class="">State</a></li><li><a href="/cluster/update-settings.html" class="">Update Settings</a></li><li><a href="/cluster/nodes-info.html" class="selected">Nodes Info</a></li><li><a href="/cluster/nodes-stats.html" class="">Nodes Stats</a></li><li><a href="/cluster/nodes-shutdown.html" class="">Nodes Shutdown</a></li></ul><li><a href="/search/basics.html" class="">+ Search</a></li><li><a href="/facets/handling.html" class="">+ Facets</a></li><li><a href="/query/text.html" class="">+ Query DSL</a></li><li><a href="/filter/and.html" class="">+ Filter DSL</a></li></ul></aside><article><div id="content-margin-fix"><h1>Nodes info</h1>
1+
<html><head><title>Nest - Connecting</title><meta http-equiv="cache-control" content="no-cache"/><meta http-equiv="pragma" content="no-cache"/><meta http-equiv="content-type" content="text/html;charset=utf-8"/><meta http-equiv="expires" content="0"/><meta name="description" content="elasticsearch"/><meta name="keywords" content="nest, elasticsearch, .net, client"/><meta name="author" content="martijn laarman"/><link rel="stylesheet" type="text/css" href="/styles/layout.css"/><link rel="stylesheet" type="text/css" href="/styles/pygments.css"/><link href="http://fonts.googleapis.com/css?family=Ubuntu+Mono|Ubuntu" rel="stylesheet" type="text/css"/><link href="/prettify/prettify.css" type="text/css" rel="stylesheet"/><link href="/prettify/sunburst.css" type="text/css" rel="stylesheet"/><script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script><script type="text/javascript" src="/prettify/prettify.js"></script><script type="text/javascript" src="/prettify/fix_code_tags.js"></script></head><body><section id="site"><div class="actions"><iframe src="http://ghbtns.com/github-btn.html?user=Mpdreamz&amp;repo=NEST&amp;type=fork&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="95" height="20"></iframe><iframe src="http://ghbtns.com/github-btn.html?user=Mpdreamz&amp;repo=NEST&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe></div><aside><ul id="top_left_menu"><h4>External</h4><li><a href="http://www.elasticsearch.org" target="_blank">Elasticsearch Docs</a></li><li><a href="http://mpdreamz.mit-license.org/" target="_blank">MIT license</a></li></ul></aside><section id="content"><aside id="menu"><ul id="top_left_menu"><li><a href="/">+ Concepts</a></li><li><a href="/core/">+ Core</a></li><li><a href="/indices/aliases.html">+ Indices</a></li><h4>- Cluster</h4><ul><li><a href="/cluster/health.html">Health</a></li><li><a href="/cluster/state.html">State</a></li><li><a href="/cluster/update-settings.html">Update Settings</a></li><li><a href="/cluster/nodes-info.html" class="selected">Nodes Info</a></li><li><a href="/cluster/nodes-stats.html">Nodes Stats</a></li><li><a href="/cluster/nodes-shutdown.html">Nodes Shutdown</a></li></ul><li><a href="/search/basics.html">+ Search</a></li><li><a href="/facets/handling.html">+ Facets</a></li><li><a href="/query/text.html">+ Query DSL</a></li><li><a href="/filter/and.html">+ Filter DSL</a></li></ul></aside><article><div id="content-margin-fix"><h1 id="nodes-info">Nodes info</h1>
22
<pre><code>var r = this._client.NodeInfo(NodesInfo.All);
3-
var node = r.Nodes.Values.First();</code></pre>
4-
<p>You can then traverse all the stats i.e:</p>
5-
<pre><code>node.OS.CPU.Idle</code></pre>
6-
</div></article></section></section></body></html>
3+
var node = r.Nodes.Values.First();
4+
</code></pre><p>You can then traverse all the stats i.e:</p>
5+
<pre><code>node.OS.CPU.Idle
6+
</code></pre></div></article></section></section></body></html>

0 commit comments

Comments
 (0)