Skip to content

Commit d440348

Browse files
committed
Adds wiki example docs, fixes up some toc, adds logging to build, fixes filter config, updates to latest docfx version, updates to correct LUCENENET TODO
1 parent 789237e commit d440348

15 files changed

Lines changed: 79 additions & 36 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ apidocs/api/*.yml
5555
apidocs/tools/docfx.zip
5656
apidocs/tools/docfx/*
5757
apidocs/api/.manifest
58+
/apidocs/docfx.log

‎apidocs/api/index.md‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
<!-- TODO: Create the packages table of contents ... manually? Post processor? -->
1+
Apache Lucene.NET&trade; 4.8.0 API Docs
2+
===============
3+
4+
---------------
5+
6+
<!-- LUCENENET TODO: Create the packages table of contents ... manually? Post processor? -->
27

38

49
Apache Lucene is a high-performance, full-featured text search engine library.
510
Here's a simple example how to use Lucene for indexing and searching (using JUnit
611
to check if the results are what we expect):
712

813

9-
<!-- TODO: Convert this to .NET -->
14+
<!-- LUCENENET TODO: Convert this to .NET -->
1015
```csharp
1116
Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_CURRENT);
1217

@@ -41,7 +46,7 @@ to check if the results are what we expect):
4146

4247
The Lucene API is divided into several packages:
4348

44-
<!-- TODO: Fix links -->
49+
<!-- LUCENENET TODO: Fix links -->
4550

4651
<ul>
4752
<li>
@@ -129,7 +134,7 @@ index for all the files contained in a directory.</li>
129134
queries and searches an index.</li>
130135
</ul>
131136

132-
<!-- TODO: Fix this -->
137+
<!-- LUCENENET TODO: Fix this -->
133138

134139
To demonstrate these, try something like:
135140
<blockquote><tt>> <b>java -cp lucene-core.jar:lucene-demo.jar:lucene-analyzers-common.jar org.apache.lucene.demo.IndexFiles -index index -docs rec.food.recipes/soups</b></tt>

‎apidocs/docfx.filter.yml‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎apidocs/docfx.json‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
}
3737
],
3838
"dest": "api",
39-
"filter": "docfx.filter.yml"
39+
"filter": "filterConfig.yml"
4040
}
4141
],
4242
"build": {
@@ -51,6 +51,8 @@
5151
"files": [
5252
"docs/**.md",
5353
"docs/**/toc.yml",
54+
"wiki/**.md",
55+
"wiki/**/toc.yml",
5456
"toc.yml",
5557
"*.md"
5658
],
@@ -70,23 +72,23 @@
7072
"_site/**"
7173
]
7274
}
73-
],
75+
],
76+
"globalMetadata": {
77+
"_appTitle": "Apache Lucene.NET 4.8.0 Documentation",
78+
"_enableSearch": false,
79+
"_disableContribution": false
80+
},
7481
"overwrite": [
7582
{
7683
"files": [
77-
"apidoc/**.md"
84+
"apispec/**.md"
7885
],
7986
"exclude": [
8087
"obj/**",
8188
"_site/**"
8289
]
8390
}
8491
],
85-
"globalMetadata": {
86-
"_appTitle": "Apache Lucene.NET 4.8.0 Documentation",
87-
"_enableSearch": false,
88-
"_disableContribution": false
89-
},
9092
"dest": "_site",
9193
"globalMetadataFiles": [],
9294
"fileMetadataFiles": [],

‎apidocs/docs.ps1‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ param (
2323
$ServeDocs = 0,
2424
[Parameter(Mandatory=$false)]
2525
[int]
26-
$Clean = 1
26+
$Clean = 1,
27+
# LogLevel can be: Diagnostic, Verbose, Info, Warning, Error
28+
[Parameter(Mandatory=$false)]
29+
[string]
30+
$LogLevel = 'Info'
2731
)
2832

2933
$PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName
@@ -39,18 +43,20 @@ $FileExists = Test-Path $DocFxExe
3943
If ($FileExists -eq $False) {
4044
Write-Host "Retrieving docfx..."
4145
$DocFxZip = "$ToolsFolder\docfx.zip"
42-
$SourceDocFx = "https://github.com/dotnet/docfx/releases/download/v2.17.7/docfx.zip"
46+
$SourceDocFx = "https://github.com/dotnet/docfx/releases/download/v2.19.2/docfx.zip"
4347
Invoke-WebRequest $SourceDocFx -OutFile $DocFxZip
4448
#unzip
4549
Expand-Archive $DocFxZip -DestinationPath (Join-Path -Path $ToolsFolder -ChildPath "docfx")
4650
}
4751

4852
# delete anything that already exists
4953
if ($Clean -eq 1) {
50-
Remove-Item (Join-Path -Path $ApiDocsFolder "obj\*") -recurse -force -ErrorAction SilentlyContinue
51-
Remove-Item (Join-Path -Path $ApiDocsFolder "obj") -force -ErrorAction SilentlyContinue
52-
Remove-Item (Join-Path -Path $ApiDocsFolder "api\*") -exclude "*.md" -recurse -force -ErrorAction SilentlyContinue
53-
##Remove-Item (Join-Path -Path $ApiDocsFolder "api") -force -ErrorAction SilentlyContinue
54+
Write-Host "Cleaning..."
55+
Remove-Item (Join-Path -Path $ApiDocsFolder "_site\*") -recurse
56+
Remove-Item (Join-Path -Path $ApiDocsFolder "obj\*") -recurse
57+
Remove-Item (Join-Path -Path $ApiDocsFolder "obj") -force
58+
Remove-Item (Join-Path -Path $ApiDocsFolder "api\*") -exclude "*.md" -recurse -force
59+
# Remove-Item (Join-Path -Path $ApiDocsFolder "api") -force -ErrorAction SilentlyContinue
5460
}
5561

5662
# NOTE: There's a ton of Lucene docs that we want to copy and re-format. I'm not sure if we can really automate this
@@ -63,16 +69,16 @@ if ($Clean -eq 1) {
6369
$DocFxJson = Join-Path -Path $RepoRoot "apidocs\docfx.json"
6470

6571
Write-Host "Building metadata..."
66-
& $DocFxExe metadata $DocFxJson
72+
& $DocFxExe metadata $DocFxJson -l "obj\docfx.log" --loglevel $LogLevel
6773
if($?) {
6874
if ($ServeDocs -eq 0){
6975
# build the output
7076
Write-Host "Building docs..."
71-
& $DocFxExe build $DocFxJson
77+
& $DocFxExe build $DocFxJson -l "obj\docfx.log" --loglevel $LogLevel
7278
}
7379
else {
7480
# build + serve (for testing)
7581
Write-Host "starting website..."
76-
& $DocFxExe $DocFxJson --serve
82+
& $DocFxExe $DocFxJson --serve -l "obj\docfx.log" --loglevel $LogLevel
7783
}
7884
}

‎apidocs/docs/index.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
Apache Lucene.NET 4.8.0 Documentation
1+
Apache Lucene.NET&trade; 4.8.0 Documentation
22
===============
33

4-
Apache Lucene.NET&trade; 4.8.0 Documentation
54
---------------
65

76
Lucene is a Java full-text search engine. Lucene.NET is not a complete application, but rather a code library and API that can easily be used to add search capabilities to applications.

‎apidocs/docs/search/toc.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
- name: Highlight
2-
href: highlight/index.md
3-
topicHref: highlight/index.md
2+
href: highlight/index.md

‎apidocs/docs/toc.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
- name: Getting Started
22
href: index.md
3-
topicHref: index.md
43
- name: "Search"
54
href: search/toc.yml
65
topicHref: search/index.md

‎apidocs/filterConfig.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiRules:
2+
- exclude:
3+
uidRegex: ^Lucene\.Net\.Support\.Character\.\w*SURROGATE
4+
type: Field

‎apidocs/toc.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
- name: Lucene.NET WIKI
2+
href: wiki/
3+
topicHref: wiki/index.md
14
- name: Lucene.NET Docs
25
href: docs/
3-
homepage: docs/index.md
6+
topicHref: docs/index.md
47
- name: Lucene.NET API Docs
58
href: api/
6-
homepage: api/index.md
9+
topicHref: api/index.md
710
- name: Lucene.NET homepage
811
href: https://lucenenet.apache.org/
912
- name: Lucene.NET GitHub

0 commit comments

Comments
 (0)