From 39366fcb98d93eb5b66e102e9aeb14bdcaacb25a Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Thu, 20 Jun 2024 21:33:15 -0600 Subject: [PATCH 01/36] WIP on updating docfx --- websites/apidocs/docfx.global.json | 26 ++++----- websites/apidocs/docfx.global.subsite.json | 8 ++- websites/apidocs/docs.ps1 | 66 ++++------------------ websites/apidocs/toc.yml | 8 ++- websites/apidocs/toc/toc.yml | 8 ++- 5 files changed, 45 insertions(+), 71 deletions(-) diff --git a/websites/apidocs/docfx.global.json b/websites/apidocs/docfx.global.json index b46149ea1b..b6891a991f 100644 --- a/websites/apidocs/docfx.global.json +++ b/websites/apidocs/docfx.global.json @@ -1,15 +1,15 @@ { - "_appTitle": "Apache Lucene.NET 4.8.0-beta00016 Documentation", - "_disableContribution": false, - "_appFaviconPath": "logo/favicon.ico", - "_enableSearch": true, - "_appLogoPath": "logo/lucene-net-color.png", - "_appFooter": "Copyright \u0026copy; 2022 The Apache Software Foundation, Licensed under the \u003ca href=\u0027http://www.apache.org/licenses/LICENSE-2.0\u0027 target=\u0027_blank\u0027\u003eApache License, Version 2.0\u003c/a\u003e\u003cbr/\u003e \u003csmall\u003eApache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation. \u003cbr/\u003eAll other marks mentioned may be trademarks or registered trademarks of their respective owners.\u003c/small\u003e", - "_gitContribute": { - "repo": "https://github.com/apache/lucenenet", - "branch": "docs/4.8.0-beta00016", - "apiSpecFolder": "websites/apidocs/apiSpec", - "tag": "Lucene.Net_4_8_0_beta00016" - }, - "_gitSource": "https://github.com/apache/lucenenet.git" + "_appTitle": "Apache Lucene.NET 4.8.0-beta00016 Documentation", + "_disableContribution": false, + "_appFaviconPath": "logo/favicon.ico", + "_enableSearch": true, + "_appLogoPath": "logo/lucene-net-color.png", + "_appFooter": "Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
", + "_gitContribute": { + "repo": "https://github.com/apache/lucenenet", + "branch": "docs/4.8.0-beta00016", + "apiSpecFolder": "websites/apidocs/apiSpec", + "tag": "Lucene.Net_4_8_0_beta00016" + }, + "_gitSource": "https://github.com/apache/lucenenet.git" } diff --git a/websites/apidocs/docfx.global.subsite.json b/websites/apidocs/docfx.global.subsite.json index 6cf6b985f1..5657233832 100644 --- a/websites/apidocs/docfx.global.subsite.json +++ b/websites/apidocs/docfx.global.subsite.json @@ -1,4 +1,10 @@ -{ +{ "_rel": "https://lucenenet.apache.org/docs/4.8.0-beta00009/", "_api": "https://lucenenet.apache.org/docs/4.8.0-beta00016/" } + + + + + + diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 38728b50ab..fc454689b4 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -23,6 +23,7 @@ param ( [string] $LuceneNetVersion, [switch] $ServeDocs = $false, [switch] $Clean = $false, + [switch] $SkipToolInstall = $false, # to speed up iteration if you already have the tool installed [switch] $DisableMetaData = $false, [switch] $DisableBuild = $false, [switch] $DisablePlugins = $false, @@ -34,7 +35,7 @@ param ( [Parameter(Mandatory = $false)] [int] $StagingPort = 8080 ) -$MinimumSdkVersion = "3.1.100" # Minimum Required .NET SDK (must not be a pre-release) +$MinimumSdkVersion = "8.0.204" # Minimum Required .NET SDK (must not be a pre-release) $ErrorActionPreference = "Stop" @@ -57,36 +58,17 @@ $env:LuceneNetReleaseTag = $VCSLabel $PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName $RepoRoot = (get-item $PSScriptFilePath).Directory.Parent.Parent.FullName; $ApiDocsFolder = Join-Path -Path $RepoRoot -ChildPath "websites\apidocs"; -$ToolsFolder = Join-Path -Path $ApiDocsFolder -ChildPath "tools"; $CliIndexPath = Join-Path -Path $RepoRoot -ChildPath "src\dotnet\tools\lucene-cli\docs\index.md"; $TocPath1 = Join-Path -Path $ApiDocsFolder -ChildPath "toc.yml" $TocPath2 = Join-Path -Path $ApiDocsFolder -ChildPath "toc\toc.yml" $BreadcrumbPath = Join-Path -Path $ApiDocsFolder -ChildPath "docfx.global.subsite.json" -#ensure the /build/tools folder -New-Item $ToolsFolder -type directory -force - -if ($Clean) { - Write-Host "Cleaning tools..." - Remove-Item (Join-Path -Path $ToolsFolder "\*") -recurse -force -ErrorAction SilentlyContinue -} - -New-Item "$ToolsFolder\tmp" -type directory -force - -# Go get docfx.exe if we don't have it -New-Item "$ToolsFolder\docfx" -type directory -force -$DocFxExe = "$ToolsFolder\docfx\docfx.exe" -if (-not (test-path $DocFxExe)) { - Write-Host "Retrieving docfx..." - $DocFxZip = "$ToolsFolder\tmp\docfx.zip" - Invoke-WebRequest "https://github.com/dotnet/docfx/releases/download/v2.58/docfx.zip" -OutFile $DocFxZip -TimeoutSec 60 - - #unzip - Expand-Archive $DocFxZip -DestinationPath (Join-Path -Path $ToolsFolder -ChildPath "docfx") +# install docfx tool +if ($SkipToolInstall -eq $false) { + Write-Host "Installing docfx global tool..." + dotnet tool install -g docfx --version 2.76.0 } -Remove-Item -Recurse -Force "$ToolsFolder\tmp" - # delete anything that already exists if ($Clean) { Write-Host "Cleaning..." @@ -168,13 +150,7 @@ if ($? -and $DisableMetaData -eq $false) { # build the output Write-Host "Building api metadata for $projFile..." - - if ($Clean) { - & $DocFxExe metadata $projFile --log "$DocFxLog" --loglevel $LogLevel --force - } - else { - & $DocFxExe metadata $projFile --log "$DocFxLog" --loglevel $LogLevel - } + & docfx metadata $projFile --log "$DocFxLog" --logLevel $LogLevel } } @@ -198,21 +174,7 @@ if ($? -and $DisableBuild -eq $false) { # build the output Write-Host "Building site output for $projFile..." - - # Specifying --force, --forcePostProcess and --cleanupCacheHistory - # seems to be required in order for all xref links to resolve consistently across - # all of the docfx builds (see https://dotnet.github.io/docfx/RELEASENOTE.html?tabs=csharp). - # Previously we used to do this: - # Remove-Item (Join-Path -Path $ApiDocsFolder "obj\.cache") -recurse -force -ErrorAction SilentlyContinue - # to force remove the cache else the xref's wouldn't work correctly. So far with these new parameters - # it seems much happier. - - if ($Clean) { - & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel --force --debug --cleanupCacheHistory --force --forcePostProcess - } - else { - & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel --debug --cleanupCacheHistory --force --forcePostProcess - } + & docfx build $projFile --log "$DocFxLog" --logLevel $LogLevel --debug # Add the baseUrl to the output xrefmap, see https://github.com/dotnet/docfx/issues/2346#issuecomment-356054027 $projFileJson = Get-Content $projFile | ConvertFrom-Json @@ -239,18 +201,12 @@ if ($?) { # build the output Write-Host "Building docs..." - - if ($Clean) { - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --force --debug - } - else { - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --debug - } + & docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --debug } else { # build + serve (for testing) Write-Host "starting website..." - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --serve --port $StagingPort --debug + & docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --serve --port $StagingPort --debug } } @@ -258,4 +214,4 @@ if ($?) { # and then many of these params can be excluded from the json file # .\docfx.exe ..\..\docfx.core.json --globalMetadataFiles docfx.global.json --output _TEST --serve --force --loglevel Warning -# docfx.exe --output TARGET --globalMetadataFiles docfx.global.json Warning \ No newline at end of file +# docfx.exe --output TARGET --globalMetadataFiles docfx.global.json Warning diff --git a/websites/apidocs/toc.yml b/websites/apidocs/toc.yml index 446bef5a3d..1b9b2b6815 100644 --- a/websites/apidocs/toc.yml +++ b/websites/apidocs/toc.yml @@ -1,7 +1,13 @@ -- name: Lucene.Net API +- name: Lucene.Net API topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016/ - name: Lucene.Net CLI href: ../../src/dotnet/tools/lucene-cli/docs/ topicHref: ../../src/dotnet/tools/lucene-cli/docs/index.md - name: Lucene.Net Website href: https://lucenenet.apache.org/ + + + + + + diff --git a/websites/apidocs/toc/toc.yml b/websites/apidocs/toc/toc.yml index f4c7b8d969..fd3ea32b8f 100644 --- a/websites/apidocs/toc/toc.yml +++ b/websites/apidocs/toc/toc.yml @@ -1,6 +1,12 @@ -- name: Lucene.Net API +- name: Lucene.Net API topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016 - name: Lucene.Net CLI topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016/cli/index.html - name: Lucene.Net Website topicHref: https://lucenenet.apache.org/ + + + + + + From 823ae75a958e5aebc64268ad0e950b4b14926407 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Thu, 20 Jun 2024 22:03:04 -0600 Subject: [PATCH 02/36] Fix some build errors --- websites/apidocs/docfx.global.json | 6 ------ websites/apidocs/docfx.global.subsite.json | 8 ++++++++ websites/apidocs/docfx.json | 9 ++------- websites/apidocs/docs.ps1 | 14 ++++++++++---- websites/apidocs/toc.yml | 8 ++++++++ websites/apidocs/toc/toc.yml | 8 ++++++++ 6 files changed, 36 insertions(+), 17 deletions(-) diff --git a/websites/apidocs/docfx.global.json b/websites/apidocs/docfx.global.json index b6891a991f..6bc0eda9ee 100644 --- a/websites/apidocs/docfx.global.json +++ b/websites/apidocs/docfx.global.json @@ -5,11 +5,5 @@ "_enableSearch": true, "_appLogoPath": "logo/lucene-net-color.png", "_appFooter": "Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
", - "_gitContribute": { - "repo": "https://github.com/apache/lucenenet", - "branch": "docs/4.8.0-beta00016", - "apiSpecFolder": "websites/apidocs/apiSpec", - "tag": "Lucene.Net_4_8_0_beta00016" - }, "_gitSource": "https://github.com/apache/lucenenet.git" } diff --git a/websites/apidocs/docfx.global.subsite.json b/websites/apidocs/docfx.global.subsite.json index 5657233832..968ad8ab3c 100644 --- a/websites/apidocs/docfx.global.subsite.json +++ b/websites/apidocs/docfx.global.subsite.json @@ -8,3 +8,11 @@ + + + + + + + + diff --git a/websites/apidocs/docfx.json b/websites/apidocs/docfx.json index 3a2bad07fc..41da04793e 100644 --- a/websites/apidocs/docfx.json +++ b/websites/apidocs/docfx.json @@ -582,12 +582,7 @@ "_appFaviconPath": "logo/favicon.ico", "_enableSearch": true, "_appLogoPath": "logo/lucene-net-color.png", - "_appFooter": "Copyright © 2020 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
", - "_gitContribute": { - "repo": "https://github.com/apache/lucenenet", - "branch": "docs/4.8.0-beta00008", - "apiSpecFolder": "websites/apidocs/apiSpec" - } + "_appFooter": "Copyright © 2020 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
" }, "overwrite": [ { @@ -624,7 +619,7 @@ "fileMetadataFiles": [], "template": [ "default", - "LuceneTemplate" + "LuceneTemplate" ], "postProcessors": [], "markdownEngineName": "dfm", diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index fc454689b4..0c6a8b5f15 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -106,10 +106,16 @@ $DocFxGlobalJson = Join-Path -Path $ApiDocsFolder "docfx.global.json" $DocFxJsonContent = Get-Content $DocFxGlobalJson | ConvertFrom-Json $DocFxJsonContent._appFooter = "Copyright © $((Get-Date).Year) The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
" $DocFxJsonContent._appTitle = "Apache Lucene.NET $LuceneNetVersion Documentation" -$DocFxJsonContent._gitContribute.branch = "docs/$LuceneNetVersion" -$DocFxJsonContent._gitContribute.tag = "$VCSLabel" +#$DocFxJsonContent._gitContribute.branch = "docs/$LuceneNetVersion" +#$DocFxJsonContent._gitContribute.tag = "$VCSLabel" $DocFxJsonContent | ConvertTo-Json -depth 100 | Set-Content $DocFxGlobalJson +# update the docfx.json file +#$DocFxJson = Join-Path -Path $ApiDocsFolder "docfx.json" +#$DocFxJsonContent = Get-Content $DocFxJson | ConvertFrom-Json +#$DocFxJsonContent.build.globalMetadata._gitContribute.branch = "docs/$LuceneNetVersion" +#$DocFxJsonContent.build.globalMetadata._gitContribute.tag = "$VCSLabel" + # NOTE: The order of these depends on if one of the projects requries the xref map of another, normally all require the core xref map $DocFxJsonMeta = @( "docfx.codecs.json", @@ -150,7 +156,7 @@ if ($? -and $DisableMetaData -eq $false) { # build the output Write-Host "Building api metadata for $projFile..." - & docfx metadata $projFile --log "$DocFxLog" --logLevel $LogLevel + & docfx metadata $projFile --log "$DocFxLog" --logLevel $LogLevel --disableGitFeatures } } @@ -174,7 +180,7 @@ if ($? -and $DisableBuild -eq $false) { # build the output Write-Host "Building site output for $projFile..." - & docfx build $projFile --log "$DocFxLog" --logLevel $LogLevel --debug + & docfx build $projFile --log "$DocFxLog" --logLevel $LogLevel --debug --disableGitFeatures # Add the baseUrl to the output xrefmap, see https://github.com/dotnet/docfx/issues/2346#issuecomment-356054027 $projFileJson = Get-Content $projFile | ConvertFrom-Json diff --git a/websites/apidocs/toc.yml b/websites/apidocs/toc.yml index 1b9b2b6815..ce0c5f93de 100644 --- a/websites/apidocs/toc.yml +++ b/websites/apidocs/toc.yml @@ -11,3 +11,11 @@ + + + + + + + + diff --git a/websites/apidocs/toc/toc.yml b/websites/apidocs/toc/toc.yml index fd3ea32b8f..e9aad23387 100644 --- a/websites/apidocs/toc/toc.yml +++ b/websites/apidocs/toc/toc.yml @@ -10,3 +10,11 @@ + + + + + + + + From 63ed962a1fdfbae7cf3441c4e68e761b981fde52 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 8 Sep 2024 11:33:14 -0600 Subject: [PATCH 03/36] Fix docfx warnings, use net6.0 for docfx build --- .../Analysis/Util/CharArrayMap.cs | 8 +-- .../Highlight/WeightedSpanTermExtractor.cs | 16 +++--- .../PostingsHighlight/PostingsHighlighter.cs | 8 +-- .../Suggest/Fst/FSTCompletionLookup.cs | 2 +- .../Jaspell/JaspellTernarySearchTrie.cs | 6 +-- src/Lucene.Net/Index/SegmentInfos.cs | 2 +- src/Lucene.Net/Store/DataOutput.cs | 4 +- src/Lucene.Net/Support/Util/NumberFormat.cs | 2 +- websites/apidocs/docfx.analysis-common.json | 2 +- websites/apidocs/docfx.analysis-kuromoji.json | 2 +- .../apidocs/docfx.analysis-morfologik.json | 2 +- websites/apidocs/docfx.analysis-opennlp.json | 2 +- websites/apidocs/docfx.analysis-phonetic.json | 2 +- websites/apidocs/docfx.analysis-smartcn.json | 2 +- websites/apidocs/docfx.analysis-stempel.json | 2 +- websites/apidocs/docfx.benchmark.json | 2 +- websites/apidocs/docfx.classification.json | 2 +- websites/apidocs/docfx.codecs.json | 2 +- websites/apidocs/docfx.core.json | 5 +- websites/apidocs/docfx.demo.json | 2 +- websites/apidocs/docfx.expressions.json | 2 +- websites/apidocs/docfx.facet.json | 2 +- websites/apidocs/docfx.grouping.json | 2 +- websites/apidocs/docfx.highlighter.json | 2 +- websites/apidocs/docfx.icu.json | 2 +- websites/apidocs/docfx.join.json | 2 +- websites/apidocs/docfx.json | 54 +++++++++---------- websites/apidocs/docfx.memory.json | 2 +- websites/apidocs/docfx.misc.json | 2 +- websites/apidocs/docfx.queries.json | 2 +- websites/apidocs/docfx.queryparser.json | 2 +- websites/apidocs/docfx.replicator.json | 2 +- websites/apidocs/docfx.sandbox.json | 2 +- websites/apidocs/docfx.spatial.json | 2 +- websites/apidocs/docfx.suggest.json | 2 +- websites/apidocs/docfx.test-framework.json | 2 +- 36 files changed, 80 insertions(+), 79 deletions(-) diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs index 4a390badb1..d5c6d9a655 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs @@ -162,7 +162,7 @@ public CharArrayDictionary(LuceneVersion matchVersion, int capacity, bool ignore /// /// compatibility match version see for details. /// - /// a dictionary () whose mappings to be copied. + /// a dictionary () whose mappings to be copied. /// /// false if and only if the set should be case sensitive; /// otherwise true. @@ -191,7 +191,7 @@ public CharArrayDictionary(LuceneVersion matchVersion, IDictionary /// compatibility match version see for details. /// - /// a dictionary () whose mappings to be copied. + /// a dictionary () whose mappings to be copied. /// /// false if and only if the set should be case sensitive; /// otherwise true. @@ -220,7 +220,7 @@ public CharArrayDictionary(LuceneVersion matchVersion, IDictionary /// compatibility match version see for details. /// - /// a dictionary () whose mappings to be copied. + /// a dictionary () whose mappings to be copied. /// /// false if and only if the set should be case sensitive; /// otherwise true. @@ -1754,7 +1754,7 @@ private bool Equals(string text1, char[] text2) /// LUCENENET Specific - test for value equality similar to how it is done in Java /// /// Another dictionary to test the values of - /// true if the given object is an that contains + /// true if the given object is an that contains /// the same text value pairs as the current dictionary public override bool Equals(object? obj) { diff --git a/src/Lucene.Net.Highlighter/Highlight/WeightedSpanTermExtractor.cs b/src/Lucene.Net.Highlighter/Highlight/WeightedSpanTermExtractor.cs index 8499a2c762..d1989a337c 100644 --- a/src/Lucene.Net.Highlighter/Highlight/WeightedSpanTermExtractor.cs +++ b/src/Lucene.Net.Highlighter/Highlight/WeightedSpanTermExtractor.cs @@ -58,7 +58,7 @@ public WeightedSpanTermExtractor(string defaultField) } /// - /// Fills a with s using the terms from the supplied . + /// Fills a with s using the terms from the supplied . /// /// to extract Terms from /// Map to place created s in @@ -237,9 +237,9 @@ protected virtual void ExtractUnknownQuery(Query query, } /// - /// Fills a with s using the terms from the supplied . + /// Fills a with s using the terms from the supplied . /// - /// to place created s in + /// to place created s in /// to extract Terms from /// If there is a low-level I/O error protected virtual void ExtractWeightedSpanTerms(IDictionary terms, SpanQuery spanQuery) @@ -336,10 +336,10 @@ protected virtual void ExtractWeightedSpanTerms(IDictionary - /// Fills a with s using the terms from + /// Fills a with s using the terms from /// the supplied . /// - /// to place created s in + /// to place created s in /// to extract Terms from /// If there is a low-level I/O error protected virtual void ExtractWeightedTerms(IDictionary terms, Query query) @@ -448,7 +448,7 @@ public override IBits GetDocsWithField(string field) } /// - /// Creates an from the given and . + /// Creates an from the given and . /// /// that caused hit /// of text to be highlighted @@ -461,7 +461,7 @@ public virtual IDictionary GetWeightedSpanTerms(Query /// - /// Creates an from the given and . + /// Creates an from the given and . /// /// that caused hit /// of text to be highlighted @@ -495,7 +495,7 @@ public virtual IDictionary GetWeightedSpanTerms(Query } /// - /// Creates an from the given and . Uses a supplied + /// Creates an from the given and . Uses a supplied /// to properly Weight terms (for gradient highlighting). /// /// that caused hit diff --git a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs index d7f661da72..da517f697c 100644 --- a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs +++ b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs @@ -245,7 +245,7 @@ public virtual string[] Highlight(string field, Query query, IndexSearcher searc /// searcher that was previously used to execute the query. /// TopDocs containing the summary result documents to highlight. /// - /// keyed on field name, containing the array of formatted snippets + /// keyed on field name, containing the array of formatted snippets /// corresponding to the documents in . /// If no highlights were found for a document, the /// first sentence from the field will be returned. @@ -278,7 +278,7 @@ public virtual IDictionary HighlightFields(string[] fields, Qu /// TopDocs containing the summary result documents to highlight. /// The maximum number of top-N ranked passages per-field used to form the highlighted snippets. /// - /// keyed on field name, containing the array of formatted snippets + /// keyed on field name, containing the array of formatted snippets /// corresponding to the documents in . /// If no highlights were found for a document, the /// first sentences from the @@ -308,7 +308,7 @@ public virtual IDictionary HighlightFields(string[] fields, Qu /// containing the document IDs to highlight. /// The maximum number of top-N ranked passages per-field used to form the highlighted snippets. /// - /// keyed on field name, containing the array of formatted snippets + /// keyed on field name, containing the array of formatted snippets /// corresponding to the documents in . /// If no highlights were found for a document, the /// first maxPassages from the field will @@ -375,7 +375,7 @@ protected override int Compare(int i, int j) /// containing the document IDs to highlight. /// The maximum number of top-N ranked passages per-field used to form the highlighted snippets. /// - /// keyed on field name, containing the array of formatted snippets + /// keyed on field name, containing the array of formatted snippets /// corresponding to the documents in . /// If no highlights were found for a document, the /// first from the field will diff --git a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs index fcb1603d98..3b2ed954b9 100644 --- a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs +++ b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs @@ -289,7 +289,7 @@ public override IList DoLookup(string key, IEnumerable c } /// - /// Returns the bucket (weight) as a for the provided key if it exists, + /// Returns the bucket (weight) as a for the provided key if it exists, /// otherwise null if it does not. /// public virtual long? Get(string key) diff --git a/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellTernarySearchTrie.cs b/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellTernarySearchTrie.cs index dfad9a8a4d..21943db8d6 100644 --- a/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellTernarySearchTrie.cs +++ b/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellTernarySearchTrie.cs @@ -501,11 +501,11 @@ public virtual object Get(string key) } /// - /// Retrieve the indexed by key, increment it by one unit - /// and store the new . + /// Retrieve the indexed by key, increment it by one unit + /// and store the new . /// /// A index. - /// The retrieved from the Ternary Search Trie. + /// The retrieved from the Ternary Search Trie. public virtual float? GetAndIncrement(string key) { string key2 = culture.TextInfo.ToLower(key.Trim()); diff --git a/src/Lucene.Net/Index/SegmentInfos.cs b/src/Lucene.Net/Index/SegmentInfos.cs index c071399e63..1295df946a 100644 --- a/src/Lucene.Net/Index/SegmentInfos.cs +++ b/src/Lucene.Net/Index/SegmentInfos.cs @@ -104,7 +104,7 @@ namespace Lucene.Net.Index /// SegCodec is the of the that encoded /// this segment. /// CommitUserData stores an optional user-supplied opaque - /// that was passed to + /// that was passed to /// . /// FieldInfosGen is the generation count of the fieldInfos file. If this is -1, /// there are no updates to the fieldInfos in that segment. Anything above zero diff --git a/src/Lucene.Net/Store/DataOutput.cs b/src/Lucene.Net/Store/DataOutput.cs index f3144bb861..a48b6a1e42 100644 --- a/src/Lucene.Net/Store/DataOutput.cs +++ b/src/Lucene.Net/Store/DataOutput.cs @@ -287,13 +287,13 @@ public virtual void CopyBytes(DataInput input, long numBytes) } /// - /// Writes a . + /// Writes a . /// /// First the size is written as an , /// followed by each key-value pair written as two consecutive /// s. /// - /// Input . May be null (equivalent to an empty dictionary) + /// Input . May be null (equivalent to an empty dictionary) public virtual void WriteStringStringMap(IDictionary map) { if (map is null) diff --git a/src/Lucene.Net/Support/Util/NumberFormat.cs b/src/Lucene.Net/Support/Util/NumberFormat.cs index a460530b77..1dc4178dba 100644 --- a/src/Lucene.Net/Support/Util/NumberFormat.cs +++ b/src/Lucene.Net/Support/Util/NumberFormat.cs @@ -97,7 +97,7 @@ public virtual string Format(long number) /// /// When overridden in a subclass, provides the numeric format as a . - /// Generally, this is the same format that is passed into the + /// Generally, this is the same format that is passed into the /// method. /// /// A numeric format string. diff --git a/websites/apidocs/docfx.analysis-common.json b/websites/apidocs/docfx.analysis-common.json index 674f5a3b48..12d85c10db 100644 --- a/websites/apidocs/docfx.analysis-common.json +++ b/websites/apidocs/docfx.analysis-common.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/analysis-common", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.analysis-kuromoji.json b/websites/apidocs/docfx.analysis-kuromoji.json index 027496033a..8c62d92556 100644 --- a/websites/apidocs/docfx.analysis-kuromoji.json +++ b/websites/apidocs/docfx.analysis-kuromoji.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/analysis-kuromoji", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.analysis-morfologik.json b/websites/apidocs/docfx.analysis-morfologik.json index 8a34b5f633..4600e403db 100644 --- a/websites/apidocs/docfx.analysis-morfologik.json +++ b/websites/apidocs/docfx.analysis-morfologik.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/analysis-morfologik", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.analysis-opennlp.json b/websites/apidocs/docfx.analysis-opennlp.json index b266a1cbd1..3c13f07a5e 100644 --- a/websites/apidocs/docfx.analysis-opennlp.json +++ b/websites/apidocs/docfx.analysis-opennlp.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/analysis-opennlp", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.analysis-phonetic.json b/websites/apidocs/docfx.analysis-phonetic.json index 7957aa9bfc..8f337a8a27 100644 --- a/websites/apidocs/docfx.analysis-phonetic.json +++ b/websites/apidocs/docfx.analysis-phonetic.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/analysis-phonetic", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.analysis-smartcn.json b/websites/apidocs/docfx.analysis-smartcn.json index c1a900a3c2..d144071f9b 100644 --- a/websites/apidocs/docfx.analysis-smartcn.json +++ b/websites/apidocs/docfx.analysis-smartcn.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/analysis-smartcn", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.analysis-stempel.json b/websites/apidocs/docfx.analysis-stempel.json index 62e723df6a..5879b36aa6 100644 --- a/websites/apidocs/docfx.analysis-stempel.json +++ b/websites/apidocs/docfx.analysis-stempel.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/analysis-stempel", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.benchmark.json b/websites/apidocs/docfx.benchmark.json index c201e9d82f..ca472649fa 100644 --- a/websites/apidocs/docfx.benchmark.json +++ b/websites/apidocs/docfx.benchmark.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/benchmark", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.classification.json b/websites/apidocs/docfx.classification.json index 0494da0927..b5a48c9990 100644 --- a/websites/apidocs/docfx.classification.json +++ b/websites/apidocs/docfx.classification.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/classification", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.codecs.json b/websites/apidocs/docfx.codecs.json index 3c530bb97c..20cdd90a14 100644 --- a/websites/apidocs/docfx.codecs.json +++ b/websites/apidocs/docfx.codecs.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/codecs", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.core.json b/websites/apidocs/docfx.core.json index 17f090ee81..f2ca35e772 100644 --- a/websites/apidocs/docfx.core.json +++ b/websites/apidocs/docfx.core.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/core", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -67,7 +67,8 @@ } ], "xref": [ - "_site/api/codecs/xrefmap.yml" + "_site/api/codecs/xrefmap.yml", + "https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" ], "dest": "_site/api/core", "globalMetadataFiles": [ diff --git a/websites/apidocs/docfx.demo.json b/websites/apidocs/docfx.demo.json index 9387b01993..9bda691380 100644 --- a/websites/apidocs/docfx.demo.json +++ b/websites/apidocs/docfx.demo.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/demo", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.expressions.json b/websites/apidocs/docfx.expressions.json index a505676a4a..54e44ee1a6 100644 --- a/websites/apidocs/docfx.expressions.json +++ b/websites/apidocs/docfx.expressions.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/expressions", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.facet.json b/websites/apidocs/docfx.facet.json index 401c9521cf..e5c4364340 100644 --- a/websites/apidocs/docfx.facet.json +++ b/websites/apidocs/docfx.facet.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/facet", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.grouping.json b/websites/apidocs/docfx.grouping.json index 9c7fa00341..fbec79971c 100644 --- a/websites/apidocs/docfx.grouping.json +++ b/websites/apidocs/docfx.grouping.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/grouping", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.highlighter.json b/websites/apidocs/docfx.highlighter.json index a1911531ff..0654853e18 100644 --- a/websites/apidocs/docfx.highlighter.json +++ b/websites/apidocs/docfx.highlighter.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/highlighter", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.icu.json b/websites/apidocs/docfx.icu.json index 2049a534c3..bf931588cd 100644 --- a/websites/apidocs/docfx.icu.json +++ b/websites/apidocs/docfx.icu.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/icu", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.join.json b/websites/apidocs/docfx.join.json index 8ce0f4a746..16257f10e0 100644 --- a/websites/apidocs/docfx.join.json +++ b/websites/apidocs/docfx.join.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/join", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.json b/websites/apidocs/docfx.json index 41da04793e..0c3f82cb79 100644 --- a/websites/apidocs/docfx.json +++ b/websites/apidocs/docfx.json @@ -16,7 +16,7 @@ ], "dest": "obj/docfx/api/Lucene.Net", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -35,7 +35,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Common", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -54,7 +54,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Kuromoji", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -73,7 +73,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Morfologik", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -92,7 +92,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.OpenNLP", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -111,7 +111,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Phonetic", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -130,7 +130,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.SmartCn", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -149,7 +149,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Stempel", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -168,7 +168,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Benchmarks", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -187,7 +187,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Classification", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -206,7 +206,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Codecs", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -225,7 +225,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Expressions", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -244,7 +244,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Facet", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -263,7 +263,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Grouping", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -282,7 +282,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Highlighter", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -301,7 +301,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.ICU", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -320,7 +320,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Join", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -339,7 +339,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Memory", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -358,7 +358,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Misc", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -377,7 +377,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Queries", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -396,7 +396,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.QueryParser", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -415,7 +415,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Replicator", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -434,7 +434,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Sandbox", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -453,7 +453,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Spatial", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -472,7 +472,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Suggest", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -490,7 +490,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.TestFramework", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -509,7 +509,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Demo", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.memory.json b/websites/apidocs/docfx.memory.json index 07908a8dd5..ab053fb603 100644 --- a/websites/apidocs/docfx.memory.json +++ b/websites/apidocs/docfx.memory.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/memory", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.misc.json b/websites/apidocs/docfx.misc.json index 09165167e1..948c9690ab 100644 --- a/websites/apidocs/docfx.misc.json +++ b/websites/apidocs/docfx.misc.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/misc", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.queries.json b/websites/apidocs/docfx.queries.json index 4566e4f787..0b80d78d6a 100644 --- a/websites/apidocs/docfx.queries.json +++ b/websites/apidocs/docfx.queries.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/queries", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.queryparser.json b/websites/apidocs/docfx.queryparser.json index 76096622a0..e40801792d 100644 --- a/websites/apidocs/docfx.queryparser.json +++ b/websites/apidocs/docfx.queryparser.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/queryparser", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.replicator.json b/websites/apidocs/docfx.replicator.json index 1be897ae24..adf2cd6398 100644 --- a/websites/apidocs/docfx.replicator.json +++ b/websites/apidocs/docfx.replicator.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/replicator", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.sandbox.json b/websites/apidocs/docfx.sandbox.json index c6ce693dd5..901c462bf9 100644 --- a/websites/apidocs/docfx.sandbox.json +++ b/websites/apidocs/docfx.sandbox.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/sandbox", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.spatial.json b/websites/apidocs/docfx.spatial.json index 995bd9657c..99ed18f0ef 100644 --- a/websites/apidocs/docfx.spatial.json +++ b/websites/apidocs/docfx.spatial.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/spatial", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.suggest.json b/websites/apidocs/docfx.suggest.json index 036cf7646c..2f41c8f869 100644 --- a/websites/apidocs/docfx.suggest.json +++ b/websites/apidocs/docfx.suggest.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/suggest", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], diff --git a/websites/apidocs/docfx.test-framework.json b/websites/apidocs/docfx.test-framework.json index 2ad8e81072..257ab01d67 100644 --- a/websites/apidocs/docfx.test-framework.json +++ b/websites/apidocs/docfx.test-framework.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/test-framework", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], From bad758cf45208cf7f0ee497106c0a530ebfe069e Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Mon, 12 Aug 2024 09:09:18 -0600 Subject: [PATCH 04/36] WIP on docs fixes --- .../.idea.DocumentationTools/.idea/.gitignore | 13 ++++++++ .../.idea.DocumentationTools/.idea/.name | 1 + .../.idea/encodings.xml | 4 +++ .../.idea/indexLayout.xml | 8 +++++ .../.idea/material_theme_project_new.xml | 13 ++++++++ .../.idea.DocumentationTools/.idea/misc.xml | 22 +++++++++++++ .../.idea.DocumentationTools/.idea/vcs.xml | 6 ++++ .../EnvironmentVariableInLinkInlineRule.cs | 4 +-- .../EnvironmentVariableInlineRule.cs | 5 ++- .../LuceneDocsPlugins.csproj | 32 +++++-------------- src/docs/LuceneDocsPlugins/app.config | 31 ------------------ src/dotnet/tools/lucene-cli/docs/index.md | 16 +++++++++- 12 files changed, 93 insertions(+), 62 deletions(-) create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/.name create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml delete mode 100644 src/docs/LuceneDocsPlugins/app.config diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore b/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore new file mode 100644 index 0000000000..828f634208 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/contentModel.xml +/projectSettingsUpdater.xml +/.idea.DocumentationTools.iml +/modules.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/.name b/src/docs/.idea/.idea.DocumentationTools/.idea/.name new file mode 100644 index 0000000000..71a7101d59 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/.name @@ -0,0 +1 @@ +DocumentationTools \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml new file mode 100644 index 0000000000..df87cf951f --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml new file mode 100644 index 0000000000..7b08163ceb --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml new file mode 100644 index 0000000000..d96f72ae34 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml new file mode 100644 index 0000000000..a5200749c3 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml @@ -0,0 +1,22 @@ + + + + + + + + GeneralJavaScript and TypeScript + + + JavaScript and TypeScript + + + + + User defined + + + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml new file mode 100644 index 0000000000..b2bdec2d71 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableInLinkInlineRule.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableInLinkInlineRule.cs index 73f3ca8ce6..ed873bb78d 100644 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableInLinkInlineRule.cs +++ b/src/docs/LuceneDocsPlugins/EnvironmentVariableInLinkInlineRule.cs @@ -1,6 +1,4 @@ -using Microsoft.DocAsCode.MarkdownLite; -using System; -using System.Text; +using System.Text; using System.Text.RegularExpressions; namespace LuceneDocsPlugins diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs index 545b83bce1..5085b3df7f 100644 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs +++ b/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs @@ -1,5 +1,4 @@ -using Microsoft.DocAsCode.MarkdownLite; -using System; +using System; namespace LuceneDocsPlugins { @@ -50,4 +49,4 @@ public IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext c return new MarkdownTextToken(this, parser.Context, text, sourceInfo); } } -} \ No newline at end of file +} diff --git a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj index f656c64d87..c272c1fa6c 100644 --- a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj +++ b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj @@ -20,13 +20,13 @@ under the License. - net472 + net8.0 LuceneDocsPlugins LuceneDocsPlugins - + - 7.3 + latest @@ -39,32 +39,16 @@ under the License. true - + false - - - - - - - - - - - - - - - - - - - + + + - \ No newline at end of file + diff --git a/src/docs/LuceneDocsPlugins/app.config b/src/docs/LuceneDocsPlugins/app.config deleted file mode 100644 index c10b554820..0000000000 --- a/src/docs/LuceneDocsPlugins/app.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/dotnet/tools/lucene-cli/docs/index.md b/src/dotnet/tools/lucene-cli/docs/index.md index 8cf65c05f3..06a7197717 100644 --- a/src/dotnet/tools/lucene-cli/docs/index.md +++ b/src/dotnet/tools/lucene-cli/docs/index.md @@ -1,4 +1,4 @@ -# Lucene.NET command line interface (CLI) tools +# Lucene.NET command line interface (CLI) tools The Lucene.NET command line interface (CLI) is a new cross-platform toolchain with utilities for maintaining Lucene.NET and demos for learning basic Lucene.NET functionality. @@ -44,3 +44,17 @@ CLI command structure consists of the driver ("lucene"), the command, and possib lucene index check C:\my-index --verbose lucene index fix C:\my-index ``` + + + + + + + + + + + + + + From 7efda99280c95273fd0f559d94a6a8077cfe3e96 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 8 Sep 2024 11:45:58 -0600 Subject: [PATCH 05/36] Add missing line endings --- src/dotnet/tools/lucene-cli/docs/index.md | 1 + websites/apidocs/docfx.global.subsite.json | 1 + websites/apidocs/toc.yml | 1 + websites/apidocs/toc/toc.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/src/dotnet/tools/lucene-cli/docs/index.md b/src/dotnet/tools/lucene-cli/docs/index.md index 06a7197717..88da7a3a94 100644 --- a/src/dotnet/tools/lucene-cli/docs/index.md +++ b/src/dotnet/tools/lucene-cli/docs/index.md @@ -58,3 +58,4 @@ lucene index fix C:\my-index + diff --git a/websites/apidocs/docfx.global.subsite.json b/websites/apidocs/docfx.global.subsite.json index 968ad8ab3c..55a1071a09 100644 --- a/websites/apidocs/docfx.global.subsite.json +++ b/websites/apidocs/docfx.global.subsite.json @@ -16,3 +16,4 @@ + diff --git a/websites/apidocs/toc.yml b/websites/apidocs/toc.yml index ce0c5f93de..69eedd7c4d 100644 --- a/websites/apidocs/toc.yml +++ b/websites/apidocs/toc.yml @@ -19,3 +19,4 @@ + diff --git a/websites/apidocs/toc/toc.yml b/websites/apidocs/toc/toc.yml index e9aad23387..20c51e9da4 100644 --- a/websites/apidocs/toc/toc.yml +++ b/websites/apidocs/toc/toc.yml @@ -18,3 +18,4 @@ + From 472f838c602b43f5843ef13083113319acf92b74 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 8 Sep 2024 13:03:40 -0600 Subject: [PATCH 06/36] Add a check for docfx version to docs.ps1 script --- websites/apidocs/docs.ps1 | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 0c6a8b5f15..1b1879af8e 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -36,6 +36,7 @@ param ( [int] $StagingPort = 8080 ) $MinimumSdkVersion = "8.0.204" # Minimum Required .NET SDK (must not be a pre-release) +$DocFxVersion = "2.77.0" # Required DocFx version $ErrorActionPreference = "Stop" @@ -65,8 +66,26 @@ $BreadcrumbPath = Join-Path -Path $ApiDocsFolder -ChildPath "docfx.global.subsit # install docfx tool if ($SkipToolInstall -eq $false) { - Write-Host "Installing docfx global tool..." - dotnet tool install -g docfx --version 2.76.0 + $InstallDocFx = $false + try { + $InstalledDocFxVersion = (& docfx --version).Trim().Split('+')[0] + + if ([version]$InstalledDocFxVersion -lt [version]$DocFxVersion) { + Write-Host "DocFx is installed, but the version is less than $DocFxVersion, will install it." + $InstallDocFx = $true + } + else { + Write-Host "DocFx is installed and the version is $InstalledDocFxVersion." + } + } catch { + Write-Host "DocFx is not installed or not in the PATH, will install it." + $InstallDocFx = $true + } + + if ($InstallDocFx -eq $true) { + Write-Host "Installing docfx global tool..." + dotnet tool install -g docfx --version $DocFxVersion + } } # delete anything that already exists @@ -118,8 +137,8 @@ $DocFxJsonContent | ConvertTo-Json -depth 100 | Set-Content $DocFxGlobalJson # NOTE: The order of these depends on if one of the projects requries the xref map of another, normally all require the core xref map $DocFxJsonMeta = @( - "docfx.codecs.json", "docfx.core.json", + "docfx.codecs.json", "docfx.analysis-common.json", "docfx.analysis-kuromoji.json", "docfx.analysis-morfologik.json", From 4278bf966e21732e051d0bad9a9c3b6e5df598bf Mon Sep 17 00:00:00 2001 From: Nikolaj Brask-Nielsen Date: Sat, 14 Sep 2024 00:21:03 +0200 Subject: [PATCH 07/36] feat: Partial docfx fix - Missing some plugins --- .../.idea.DocumentationTools/.idea/.gitignore | 13 ++ .../.idea.DocumentationTools/.idea/.name | 1 + .../.idea/encodings.xml | 4 + .../.idea/indexLayout.xml | 8 ++ .../.idea/material_theme_project_new.xml | 13 ++ .../.idea.DocumentationTools/.idea/misc.xml | 22 ++++ .../.idea.DocumentationTools/.idea/vcs.xml | 6 + .../EnvironmentVariableProcessor.cs | 45 +++++++ .../EnvironmentVariableUtil.cs | 41 +++--- .../LuceneDfmEngineCustomizer.cs | 124 +++++++++--------- .../LuceneDocsPlugins.csproj | 32 ++--- .../LuceneDocsPlugins/LuceneNoteBlockRule.cs | 82 ++++++------ .../LuceneDocsPlugins/LuceneNoteBlockToken.cs | 74 +++++------ .../LuceneNoteTokenRendererPart.cs | 90 ++++++------- .../LuceneDocsPlugins/RendererPartProvider.cs | 72 +++++----- src/dotnet/tools/lucene-cli/docs/index.md | 2 +- .../partials/_head.liquid | 10 +- .../partials/_logo.liquid | 6 +- .../partials/_scripts.liquid | 6 +- .../partials/head.tmpl.partial | 8 +- .../partials/logo.tmpl.partial | 4 +- .../partials/scripts.tmpl.partial | 6 +- .../LuceneTemplate/partials/logo.tmpl.partial | 2 +- websites/apidocs/docfx.analysis-common.json | 12 +- websites/apidocs/docfx.analysis-kuromoji.json | 14 +- .../apidocs/docfx.analysis-morfologik.json | 16 ++- websites/apidocs/docfx.analysis-opennlp.json | 14 +- websites/apidocs/docfx.analysis-phonetic.json | 16 ++- websites/apidocs/docfx.analysis-smartcn.json | 16 ++- websites/apidocs/docfx.analysis-stempel.json | 16 ++- websites/apidocs/docfx.benchmark.json | 16 ++- websites/apidocs/docfx.classification.json | 16 ++- websites/apidocs/docfx.codecs.json | 18 +-- websites/apidocs/docfx.core.json | 17 ++- websites/apidocs/docfx.demo.json | 18 +-- websites/apidocs/docfx.expressions.json | 20 +-- websites/apidocs/docfx.facet.json | 20 +-- websites/apidocs/docfx.global.json | 8 +- websites/apidocs/docfx.global.subsite.json | 6 +- websites/apidocs/docfx.grouping.json | 20 +-- websites/apidocs/docfx.highlighter.json | 18 +-- websites/apidocs/docfx.icu.json | 14 +- websites/apidocs/docfx.join.json | 18 +-- websites/apidocs/docfx.json | 69 +++++----- websites/apidocs/docfx.memory.json | 18 +-- websites/apidocs/docfx.misc.json | 18 +-- websites/apidocs/docfx.queries.json | 18 +-- websites/apidocs/docfx.queryparser.json | 20 +-- websites/apidocs/docfx.replicator.json | 18 +-- websites/apidocs/docfx.sandbox.json | 20 +-- websites/apidocs/docfx.site.json | 16 ++- websites/apidocs/docfx.spatial.json | 18 +-- websites/apidocs/docfx.suggest.json | 20 +-- websites/apidocs/docfx.test-framework.json | 12 +- websites/apidocs/docs.ps1 | 95 ++++++-------- websites/apidocs/toc.yml | 2 +- websites/apidocs/toc/toc.yml | 2 +- 57 files changed, 727 insertions(+), 603 deletions(-) create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/.name create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml create mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml create mode 100644 src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore b/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore new file mode 100644 index 0000000000..828f634208 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/contentModel.xml +/projectSettingsUpdater.xml +/.idea.DocumentationTools.iml +/modules.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/.name b/src/docs/.idea/.idea.DocumentationTools/.idea/.name new file mode 100644 index 0000000000..71a7101d59 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/.name @@ -0,0 +1 @@ +DocumentationTools \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml new file mode 100644 index 0000000000..df87cf951f --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml new file mode 100644 index 0000000000..7b08163ceb --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml new file mode 100644 index 0000000000..d96f72ae34 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml new file mode 100644 index 0000000000..a5200749c3 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/misc.xml @@ -0,0 +1,22 @@ + + + + + + + + GeneralJavaScript and TypeScript + + + JavaScript and TypeScript + + + + + User defined + + + + + + \ No newline at end of file diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml new file mode 100644 index 0000000000..b2bdec2d71 --- /dev/null +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs new file mode 100644 index 0000000000..d32db2c831 --- /dev/null +++ b/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs @@ -0,0 +1,45 @@ +using Docfx.Common; +using Docfx.Plugins; +using System.Collections.Immutable; +using System.Composition; +using System.IO; +using System.Linq; + +namespace LuceneDocsPlugins; + +[Export(nameof(EnvironmentVariableProcessor), typeof(IPostProcessor))] +public class EnvironmentVariableProcessor : IPostProcessor +{ + public ImmutableDictionary PrepareMetadata(ImmutableDictionary metadata) + { + return metadata; + } + + public Manifest Process(Manifest manifest, string outputFolder) + { + foreach (var manifestItem in manifest.Files.Where(x => x.Type == "Conceptual")) + { + foreach (var manifestItemOutputFile in manifestItem.Output) + { + var outputPath = Path.Combine(outputFolder, manifestItemOutputFile.Value.RelativePath); + + var content = File.ReadAllText(outputPath); + + Logger.LogInfo($"Replacing environment variables in {outputPath}"); + + var newContent = EnvironmentVariableUtil.ReplaceEnvironmentVariables(content); + + if (content == newContent) + { + continue; + } + + Logger.LogInfo($"Writing new content to {outputPath}"); + + File.WriteAllText(outputPath, newContent); + } + } + + return manifest; + } +} diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs index 9bdd241281..27ecb583c6 100644 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs +++ b/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs @@ -1,4 +1,5 @@ -using System; +using Docfx.Common; +using System; using System.Text; using System.Text.RegularExpressions; @@ -21,46 +22,42 @@ namespace LuceneDocsPlugins * limitations under the License. */ - public class EnvironmentVariableUtil + public partial class EnvironmentVariableUtil { - public const string EnvVarRegexString = @"[\<\[]EnvVar\:(\w+?)[\>\]]"; - public static readonly Regex EnvVarRegex = new Regex("^" + EnvVarRegexString, RegexOptions.Compiled); - public static readonly Regex EnvVarRegexInline = new Regex(EnvVarRegexString, RegexOptions.Compiled | RegexOptions.Multiline); + [GeneratedRegex(@"EnvVar\:(\w+)", RegexOptions.Compiled)] + private static partial Regex EnvVarRegex(); - - public static string ReplaceEnvironmentVariables(string sourceText, Match match) - => ReplaceEnvironmentVariables(sourceText, match, reuse: null); - - public static string ReplaceEnvironmentVariables(string sourceText, Match match, StringBuilder reuse) + public static string ReplaceEnvironmentVariables(string sourceText) { - if (match.Success) + var matches = EnvVarRegex().Matches(sourceText); + + if (matches.Count > 0) { - if (reuse is null) - reuse = new StringBuilder(); - else - reuse.Clear(); + var sb = new StringBuilder(sourceText.Length); int lastMatchEnd = 0; - do + foreach (Match match in matches) { var envVar = match.Groups[1].Value; // Append the prefix that didn't match the regex (or text since last match) - reuse.Append(sourceText.Substring(lastMatchEnd, match.Index - lastMatchEnd)); + sb.Append(sourceText.AsSpan(lastMatchEnd, match.Index - lastMatchEnd)); // Do the replacement of the regex match - reuse.Append(Environment.GetEnvironmentVariable(envVar)); + string envVarValue = Environment.GetEnvironmentVariable(envVar); + sb.Append(envVarValue); + Logger.LogInfo($"Replaced environment variable '{envVar}' with value '{envVarValue}' on match {match.Value}"); lastMatchEnd = match.Index + match.Length; - - } while ((match = match.NextMatch()).Success); + } // Append the suffix that didn't match the regex - reuse.Append(sourceText.Substring(lastMatchEnd)); + sb.Append(sourceText.AsSpan(lastMatchEnd)); - return reuse.ToString(); + return sb.ToString(); } + return sourceText; } } diff --git a/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs b/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs index 08865b52e2..5c0b8a6175 100644 --- a/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs +++ b/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs @@ -1,69 +1,69 @@ -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Composition; -using Microsoft.DocAsCode.Dfm; -using Microsoft.DocAsCode.MarkdownLite; +//using System; +//using System.Collections.Generic; +//using System.Collections.Immutable; +//using System.Composition; +//using Microsoft.DocAsCode.Dfm; +//using Microsoft.DocAsCode.MarkdownLite; -namespace LuceneDocsPlugins -{ - /* - * 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 LuceneDocsPlugins +//{ +// /* +// * 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. +// */ - /// - /// Exports our custom markdown parser via MEF to DocFx - /// - [Export(typeof(IDfmEngineCustomizer))] - public class LuceneDfmEngineCustomizer : IDfmEngineCustomizer - { - public void Customize(DfmEngineBuilder builder, IReadOnlyDictionary parameters) - { - // insert inline rule at the top - builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInLinkInlineRule()); - builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInlineRule()); - // LUCENENET TODO: The inline text replacement still isn't working. Not sure why. - //builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableDfmTextInlineRule()); +// /// +// /// Exports our custom markdown parser via MEF to DocFx +// /// +// [Export(typeof(IDfmEngineCustomizer))] +// public class LuceneDfmEngineCustomizer : IDfmEngineCustomizer +// { +// public void Customize(DfmEngineBuilder builder, IReadOnlyDictionary parameters) +// { +// // insert inline rule at the top +// builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInLinkInlineRule()); +// builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInlineRule()); +// // LUCENENET TODO: The inline text replacement still isn't working. Not sure why. +// //builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableDfmTextInlineRule()); - //// Find the MarkdownLinkInlineRule position, and insert rules to replace text within the link before it - //var markdownLinkInlineRuleIndex = builder.InlineRules.FindIndex(r => r is MarkdownLinkInlineRule); - //builder.InlineRules.Insert(markdownLinkInlineRuleIndex, new EnvironmentVariableInLinkInlineRule()); +// //// Find the MarkdownLinkInlineRule position, and insert rules to replace text within the link before it +// //var markdownLinkInlineRuleIndex = builder.InlineRules.FindIndex(r => r is MarkdownLinkInlineRule); +// //builder.InlineRules.Insert(markdownLinkInlineRuleIndex, new EnvironmentVariableInLinkInlineRule()); - //builder.InlineRules = Replace(builder.InlineRules); +// //builder.InlineRules = Replace(builder.InlineRules); - // insert block rule above header rule. Why? I dunno, that's what the docs say: - // https://dotnet.github.io/docfx/tutorial/intro_markdown_lite.html#select-token-kind - var blockIndex = builder.BlockRules.FindIndex(r => r is MarkdownHeadingBlockRule); - builder.BlockRules = builder.BlockRules.Insert(blockIndex, new LuceneNoteBlockRule()); +// // insert block rule above header rule. Why? I dunno, that's what the docs say: +// // https://dotnet.github.io/docfx/tutorial/intro_markdown_lite.html#select-token-kind +// var blockIndex = builder.BlockRules.FindIndex(r => r is MarkdownHeadingBlockRule); +// builder.BlockRules = builder.BlockRules.Insert(blockIndex, new LuceneNoteBlockRule()); - // LUCENENET TODO: The code replacement still isn't working (or even matching). Not sure why. - //builder.BlockRules = Replace(builder.BlockRules); - } +// // LUCENENET TODO: The code replacement still isn't working (or even matching). Not sure why. +// //builder.BlockRules = Replace(builder.BlockRules); +// } - private static ImmutableList Replace(ImmutableList blockRules) - where TSource : IMarkdownRule - where TReplacement : IMarkdownRule, new() - { - var index = blockRules.FindIndex(item => item is TSource); - if (index < 0) - { - throw new ArgumentException($"{typeof(TSource).Name} should exist!"); - } - blockRules = blockRules.Insert(index, new TReplacement()); - return blockRules.RemoveAt(index + 1); - } - } -} +// private static ImmutableList Replace(ImmutableList blockRules) +// where TSource : IMarkdownRule +// where TReplacement : IMarkdownRule, new() +// { +// var index = blockRules.FindIndex(item => item is TSource); +// if (index < 0) +// { +// throw new ArgumentException($"{typeof(TSource).Name} should exist!"); +// } +// blockRules = blockRules.Insert(index, new TReplacement()); +// return blockRules.RemoveAt(index + 1); +// } +// } +//} diff --git a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj index f656c64d87..c272c1fa6c 100644 --- a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj +++ b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj @@ -20,13 +20,13 @@ under the License. - net472 + net8.0 LuceneDocsPlugins LuceneDocsPlugins - + - 7.3 + latest @@ -39,32 +39,16 @@ under the License. true - + false - - - - - - - - - - - - - - - - - - - + + + - \ No newline at end of file + diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs b/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs index 938ef3f16a..15cb039c2f 100644 --- a/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs +++ b/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs @@ -1,46 +1,46 @@ -using System.Text.RegularExpressions; -using Microsoft.DocAsCode.MarkdownLite; +//using System.Text.RegularExpressions; +//using Microsoft.DocAsCode.MarkdownLite; -namespace LuceneDocsPlugins -{ - /* - * 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 LuceneDocsPlugins +//{ +// /* +// * 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. +// */ - /// - /// The regex rule to parse out the custom Lucene tokens - /// - public class LuceneNoteBlockRule : IMarkdownRule - { - // TODO: I think there's an issue with this regex and multi-line or something, for example see: DrillDownQuery class - // since this isn't matching it's experimental tag (there's lots of others too) - public virtual Regex LabelRegex { get; } = new Regex("^@lucene\\.(?(experimental|internal))", RegexOptions.Compiled); +// /// +// /// The regex rule to parse out the custom Lucene tokens +// /// +// public class LuceneNoteBlockRule : IMarkdownRule +// { +// // TODO: I think there's an issue with this regex and multi-line or something, for example see: DrillDownQuery class +// // since this isn't matching it's experimental tag (there's lots of others too) +// public virtual Regex LabelRegex { get; } = new Regex("^@lucene\\.(?(experimental|internal))", RegexOptions.Compiled); - public virtual IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context) - { +// public virtual IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context) +// { - var match = LabelRegex.Match(context.CurrentMarkdown); - if (match.Length == 0) - { - return null; - } - var sourceInfo = context.Consume(match.Length); - return new LuceneNoteBlockToken(this, parser.Context, match.Groups[1].Value, sourceInfo); - } +// var match = LabelRegex.Match(context.CurrentMarkdown); +// if (match.Length == 0) +// { +// return null; +// } +// var sourceInfo = context.Consume(match.Length); +// return new LuceneNoteBlockToken(this, parser.Context, match.Groups[1].Value, sourceInfo); +// } - public virtual string Name => "LuceneNote"; - } -} \ No newline at end of file +// public virtual string Name => "LuceneNote"; +// } +//} diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs b/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs index d8dd4f6d0c..dffcfb6a6d 100644 --- a/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs +++ b/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs @@ -1,44 +1,44 @@ -using Microsoft.DocAsCode.MarkdownLite; +//using Microsoft.DocAsCode.MarkdownLite; -namespace LuceneDocsPlugins -{ - /* - * 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 LuceneDocsPlugins +//{ +// /* +// * 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. +// */ - /// - /// A custom token class representing our custom Lucene tokens - /// - public class LuceneNoteBlockToken : IMarkdownToken - { - public LuceneNoteBlockToken(IMarkdownRule rule, IMarkdownContext context, string label, SourceInfo sourceInfo) - { - Rule = rule; - Context = context; - Label = label; - SourceInfo = sourceInfo; - } +// /// +// /// A custom token class representing our custom Lucene tokens +// /// +// public class LuceneNoteBlockToken : IMarkdownToken +// { +// public LuceneNoteBlockToken(IMarkdownRule rule, IMarkdownContext context, string label, SourceInfo sourceInfo) +// { +// Rule = rule; +// Context = context; +// Label = label; +// SourceInfo = sourceInfo; +// } - public IMarkdownRule Rule { get; } +// public IMarkdownRule Rule { get; } - public IMarkdownContext Context { get; } +// public IMarkdownContext Context { get; } - public string Label { get; } +// public string Label { get; } - public SourceInfo SourceInfo { get; } - } +// public SourceInfo SourceInfo { get; } +// } -} \ No newline at end of file +//} diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs b/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs index 8782ae16a5..95fb04dca2 100644 --- a/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs +++ b/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs @@ -1,52 +1,52 @@ -using Microsoft.DocAsCode.Dfm; -using Microsoft.DocAsCode.MarkdownLite; -using System.Text; +//using Microsoft.DocAsCode.Dfm; +//using Microsoft.DocAsCode.MarkdownLite; +//using System.Text; -namespace LuceneDocsPlugins -{ - /* - * 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 LuceneDocsPlugins +//{ +// /* +// * 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. +// */ - /// - /// Used to replace custom Lucene tokens with custom HTML markup - /// - public sealed class LuceneNoteTokenRendererPart : DfmCustomizedRendererPartBase - { - private const string ExperimentalMessage = "This API is experimental and might change in incompatible ways in the next release."; - private const string InternalMessage = "This API is for internal purposes only and might change in incompatible ways in the next release."; +// /// +// /// Used to replace custom Lucene tokens with custom HTML markup +// /// +// public sealed class LuceneNoteTokenRendererPart : DfmCustomizedRendererPartBase +// { +// private const string ExperimentalMessage = "This API is experimental and might change in incompatible ways in the next release."; +// private const string InternalMessage = "This API is for internal purposes only and might change in incompatible ways in the next release."; - private readonly StringBuilder builder = new StringBuilder(); +// private readonly StringBuilder builder = new StringBuilder(); - public override string Name => "LuceneTokenRendererPart"; +// public override string Name => "LuceneTokenRendererPart"; - public override bool Match(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) - => true; +// public override bool Match(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) +// => true; - public override StringBuffer Render(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) - { - string message = token.Label.ToUpperInvariant() == "INTERNAL" ? InternalMessage : ExperimentalMessage; +// public override StringBuffer Render(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) +// { +// string message = token.Label.ToUpperInvariant() == "INTERNAL" ? InternalMessage : ExperimentalMessage; - builder.Clear(); // Reuse string builder - builder.AppendLine("
"); - builder.AppendLine("
Note
"); - builder.Append("

").Append(message).AppendLine("

"); - builder.AppendLine("
"); - return builder.ToString(); - //return "
" + string.Format(Message, token.Label.ToUpper()) + "
"; - } - } -} \ No newline at end of file +// builder.Clear(); // Reuse string builder +// builder.AppendLine("
"); +// builder.AppendLine("
Note
"); +// builder.Append("

").Append(message).AppendLine("

"); +// builder.AppendLine("
"); +// return builder.ToString(); +// //return "
" + string.Format(Message, token.Label.ToUpper()) + "
"; +// } +// } +//} diff --git a/src/docs/LuceneDocsPlugins/RendererPartProvider.cs b/src/docs/LuceneDocsPlugins/RendererPartProvider.cs index 58ddda35ac..aa778c54f7 100644 --- a/src/docs/LuceneDocsPlugins/RendererPartProvider.cs +++ b/src/docs/LuceneDocsPlugins/RendererPartProvider.cs @@ -1,40 +1,40 @@ -using System.Collections.Generic; -using System.Composition; -using Microsoft.DocAsCode.Dfm; +//using System.Collections.Generic; +//using System.Composition; +//using Microsoft.DocAsCode.Dfm; -namespace LuceneDocsPlugins -{ - /* - * 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 LuceneDocsPlugins +//{ +// /* +// * 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. +// */ - /// - /// Exports our custom renderer via MEF to DocFx - /// - [Export(typeof(IDfmCustomizedRendererPartProvider))] - public class RendererPartProvider : IDfmCustomizedRendererPartProvider - { - private readonly LuceneNoteTokenRendererPart luceneNoteTokenRendererPart = new LuceneNoteTokenRendererPart(); +// /// +// /// Exports our custom renderer via MEF to DocFx +// /// +// [Export(typeof(IDfmCustomizedRendererPartProvider))] +// public class RendererPartProvider : IDfmCustomizedRendererPartProvider +// { +// private readonly LuceneNoteTokenRendererPart luceneNoteTokenRendererPart = new LuceneNoteTokenRendererPart(); - public IEnumerable CreateParts(IReadOnlyDictionary parameters) - { - yield return luceneNoteTokenRendererPart; - //yield return new EnvironmentVariableRendererPart(); - //yield return new EnvironmentVariableBlockRendererPart(); - } - } +// public IEnumerable CreateParts(IReadOnlyDictionary parameters) +// { +// yield return luceneNoteTokenRendererPart; +// //yield return new EnvironmentVariableRendererPart(); +// //yield return new EnvironmentVariableBlockRendererPart(); +// } +// } -} \ No newline at end of file +//} diff --git a/src/dotnet/tools/lucene-cli/docs/index.md b/src/dotnet/tools/lucene-cli/docs/index.md index 8cf65c05f3..422f81d288 100644 --- a/src/dotnet/tools/lucene-cli/docs/index.md +++ b/src/dotnet/tools/lucene-cli/docs/index.md @@ -1,4 +1,4 @@ -# Lucene.NET command line interface (CLI) tools +# Lucene.NET command line interface (CLI) tools The Lucene.NET command line interface (CLI) is a new cross-platform toolchain with utilities for maintaining Lucene.NET and demos for learning basic Lucene.NET functionality. diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid index 2af71a645e..96dc4c32e5 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid @@ -17,13 +17,13 @@ {%- endif -%} {%- if _appFaviconPath -%} - + {%- else -%} - + {%- endif -%} - - - + + + {%- if _noindex -%} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid index 7bc65a65b8..85922ab504 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid @@ -1,8 +1,8 @@ {% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} - + {%- if _appLogoPath -%} - + {%- else -%} - + {%- endif -%} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid index 6640a85cdf..fa95fcd7b9 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid @@ -1,4 +1,4 @@ {% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} - - - + + + diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial index 4e8cd7918b..064de9db10 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial @@ -8,10 +8,10 @@ {{#_description}}{{/_description}} - - - - + + + + {{#_noindex}}{{/_noindex}} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial index 8209615a35..5cb694628a 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial @@ -1,5 +1,5 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - - + + diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial index ab3204ecb9..73dada5141 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial @@ -1,5 +1,5 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - - - + + + diff --git a/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial b/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial index f2b652b42d..ee0b7d6415 100644 --- a/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial +++ b/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial @@ -1,5 +1,5 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - + diff --git a/websites/apidocs/docfx.analysis-common.json b/websites/apidocs/docfx.analysis-common.json index 674f5a3b48..166949ba60 100644 --- a/websites/apidocs/docfx.analysis-common.json +++ b/websites/apidocs/docfx.analysis-common.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/analysis-common", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -33,15 +33,15 @@ "**.md" ], "src": "obj/docfx/api/analysis-common" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-common/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-kuromoji.json b/websites/apidocs/docfx.analysis-kuromoji.json index 027496033a..dafdaeb449 100644 --- a/websites/apidocs/docfx.analysis-kuromoji.json +++ b/websites/apidocs/docfx.analysis-kuromoji.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-kuromoji", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-kuromoji" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-kuromoji/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-morfologik.json b/websites/apidocs/docfx.analysis-morfologik.json index 8a34b5f633..c75895949e 100644 --- a/websites/apidocs/docfx.analysis-morfologik.json +++ b/websites/apidocs/docfx.analysis-morfologik.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/analysis-morfologik", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-morfologik" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-morfologik/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-opennlp.json b/websites/apidocs/docfx.analysis-opennlp.json index b266a1cbd1..6051ec5fe4 100644 --- a/websites/apidocs/docfx.analysis-opennlp.json +++ b/websites/apidocs/docfx.analysis-opennlp.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-opennlp", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-opennlp" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-opennlp/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-phonetic.json b/websites/apidocs/docfx.analysis-phonetic.json index 7957aa9bfc..75a380ed36 100644 --- a/websites/apidocs/docfx.analysis-phonetic.json +++ b/websites/apidocs/docfx.analysis-phonetic.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-phonetic", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-phonetic" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-phonetic/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/analysis-phonetic/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-smartcn.json b/websites/apidocs/docfx.analysis-smartcn.json index c1a900a3c2..d5ac444488 100644 --- a/websites/apidocs/docfx.analysis-smartcn.json +++ b/websites/apidocs/docfx.analysis-smartcn.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-smartcn", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-smartcn" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-smartcn/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/analysis-smartcn/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.analysis-stempel.json b/websites/apidocs/docfx.analysis-stempel.json index 62e723df6a..41a0708333 100644 --- a/websites/apidocs/docfx.analysis-stempel.json +++ b/websites/apidocs/docfx.analysis-stempel.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/analysis-stempel", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/analysis-stempel" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "analysis-stempel/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/analysis-stempel/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.benchmark.json b/websites/apidocs/docfx.benchmark.json index c201e9d82f..0ea98bd224 100644 --- a/websites/apidocs/docfx.benchmark.json +++ b/websites/apidocs/docfx.benchmark.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/benchmark", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/benchmark" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "benchmark/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/benchmark/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.classification.json b/websites/apidocs/docfx.classification.json index 0494da0927..6aa4cc6959 100644 --- a/websites/apidocs/docfx.classification.json +++ b/websites/apidocs/docfx.classification.json @@ -15,27 +15,27 @@ ], "dest": "obj/docfx/api/classification", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/classification" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "classification/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/classification/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.codecs.json b/websites/apidocs/docfx.codecs.json index 3c530bb97c..502458ab23 100644 --- a/websites/apidocs/docfx.codecs.json +++ b/websites/apidocs/docfx.codecs.json @@ -15,33 +15,33 @@ ], "dest": "obj/docfx/api/codecs", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.Codecs" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/codecs" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "codecs/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/codecs/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.core.json b/websites/apidocs/docfx.core.json index 17f090ee81..67d87654c5 100644 --- a/websites/apidocs/docfx.core.json +++ b/websites/apidocs/docfx.core.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/core", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -37,7 +37,7 @@ }, { "files": [ - "toc.yml", + "./toc.yml", "core/toc.yml" ], "src": "toc" @@ -48,8 +48,8 @@ ], "src": "../../src/dotnet/docs" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -59,7 +59,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/core/**/*.md" @@ -67,7 +67,8 @@ } ], "xref": [ - "_site/api/codecs/xrefmap.yml" + "_site/api/codecs/xrefmap.yml", + "https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" ], "dest": "_site/api/core", "globalMetadataFiles": [ @@ -79,7 +80,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.demo.json b/websites/apidocs/docfx.demo.json index 9387b01993..cc3c1c80a2 100644 --- a/websites/apidocs/docfx.demo.json +++ b/websites/apidocs/docfx.demo.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/demo", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/demo" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "demo/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/demo/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.expressions.json b/websites/apidocs/docfx.expressions.json index a505676a4a..af8cf5c017 100644 --- a/websites/apidocs/docfx.expressions.json +++ b/websites/apidocs/docfx.expressions.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/expressions", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.Expressions" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/expressions" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "expressions/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/expressions/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.facet.json b/websites/apidocs/docfx.facet.json index 401c9521cf..88273e39e0 100644 --- a/websites/apidocs/docfx.facet.json +++ b/websites/apidocs/docfx.facet.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/facet", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "package.md" ], "src": "../../src/Lucene.Net.Facet" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/facet" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "facet/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/facet/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.global.json b/websites/apidocs/docfx.global.json index b46149ea1b..59e6a7b44f 100644 --- a/websites/apidocs/docfx.global.json +++ b/websites/apidocs/docfx.global.json @@ -4,12 +4,6 @@ "_appFaviconPath": "logo/favicon.ico", "_enableSearch": true, "_appLogoPath": "logo/lucene-net-color.png", - "_appFooter": "Copyright \u0026copy; 2022 The Apache Software Foundation, Licensed under the \u003ca href=\u0027http://www.apache.org/licenses/LICENSE-2.0\u0027 target=\u0027_blank\u0027\u003eApache License, Version 2.0\u003c/a\u003e\u003cbr/\u003e \u003csmall\u003eApache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation. \u003cbr/\u003eAll other marks mentioned may be trademarks or registered trademarks of their respective owners.\u003c/small\u003e", - "_gitContribute": { - "repo": "https://github.com/apache/lucenenet", - "branch": "docs/4.8.0-beta00016", - "apiSpecFolder": "websites/apidocs/apiSpec", - "tag": "Lucene.Net_4_8_0_beta00016" - }, + "_appFooter": "Copyright \u0026copy; 2024 The Apache Software Foundation, Licensed under the \u003ca href=\u0027http://www.apache.org/licenses/LICENSE-2.0\u0027 target=\u0027_blank\u0027\u003eApache License, Version 2.0\u003c/a\u003e\u003cbr/\u003e \u003csmall\u003eApache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation. \u003cbr/\u003eAll other marks mentioned may be trademarks or registered trademarks of their respective owners.\u003c/small\u003e", "_gitSource": "https://github.com/apache/lucenenet.git" } diff --git a/websites/apidocs/docfx.global.subsite.json b/websites/apidocs/docfx.global.subsite.json index 6cf6b985f1..30838e720d 100644 --- a/websites/apidocs/docfx.global.subsite.json +++ b/websites/apidocs/docfx.global.subsite.json @@ -1,4 +1,4 @@ -{ - "_rel": "https://lucenenet.apache.org/docs/4.8.0-beta00009/", +{ + "_rel": "https://lucenenet.apache.org/docs/4.8.0-beta00009", "_api": "https://lucenenet.apache.org/docs/4.8.0-beta00016/" -} +} \ No newline at end of file diff --git a/websites/apidocs/docfx.grouping.json b/websites/apidocs/docfx.grouping.json index 9c7fa00341..fa2bd3a5ce 100644 --- a/websites/apidocs/docfx.grouping.json +++ b/websites/apidocs/docfx.grouping.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/grouping", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "package.md" ], "src": "../../src/Lucene.Net.Grouping" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/grouping" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "grouping/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/grouping/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.highlighter.json b/websites/apidocs/docfx.highlighter.json index a1911531ff..496333dc54 100644 --- a/websites/apidocs/docfx.highlighter.json +++ b/websites/apidocs/docfx.highlighter.json @@ -15,12 +15,12 @@ ], "dest": "obj/docfx/api/highlighter", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" @@ -33,16 +33,16 @@ "**.md" ], "src": "obj/docfx/api/highlighter" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "highlighter/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/highlighter/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.icu.json b/websites/apidocs/docfx.icu.json index 2049a534c3..3948383d60 100644 --- a/websites/apidocs/docfx.icu.json +++ b/websites/apidocs/docfx.icu.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/icu", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -33,15 +33,15 @@ "**.md" ], "src": "obj/docfx/api/icu" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "icu/toc.yml" ], "src": "toc" } - ], + ], "overwrite": [ { "files": [ @@ -52,7 +52,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/icu/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.join.json b/websites/apidocs/docfx.join.json index 8ce0f4a746..10b40889b3 100644 --- a/websites/apidocs/docfx.join.json +++ b/websites/apidocs/docfx.join.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/join", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -26,23 +26,23 @@ "package.md" ], "src": "../../src/Lucene.Net.Join" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/join" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "join/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/join/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.json b/websites/apidocs/docfx.json index 3a2bad07fc..307a4f40cf 100644 --- a/websites/apidocs/docfx.json +++ b/websites/apidocs/docfx.json @@ -16,7 +16,7 @@ ], "dest": "obj/docfx/api/Lucene.Net", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -35,7 +35,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Common", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -54,7 +54,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Kuromoji", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -73,7 +73,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Morfologik", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -92,7 +92,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.OpenNLP", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -111,7 +111,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Phonetic", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -130,7 +130,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.SmartCn", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -149,7 +149,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Analysis.Stempel", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -168,7 +168,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Benchmarks", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -187,7 +187,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Classification", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -206,7 +206,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Codecs", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -225,7 +225,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Expressions", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -244,7 +244,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Facet", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -263,7 +263,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Grouping", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -282,7 +282,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Highlighter", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -301,7 +301,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.ICU", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -320,7 +320,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Join", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -339,7 +339,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Memory", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -358,7 +358,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Misc", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -377,7 +377,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Queries", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -396,7 +396,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.QueryParser", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -415,7 +415,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Replicator", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -434,7 +434,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Sandbox", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -453,7 +453,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Spatial", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -472,7 +472,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Suggest", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -490,7 +490,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.TestFramework", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } }, { @@ -509,7 +509,7 @@ ], "dest": "obj/docfx/api/Lucene.Net.Demo", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -559,7 +559,7 @@ }, { "files": [ - "toc.yml", + "./toc.yml", "*.md", "web.config" ] @@ -582,12 +582,7 @@ "_appFaviconPath": "logo/favicon.ico", "_enableSearch": true, "_appLogoPath": "logo/lucene-net-color.png", - "_appFooter": "Copyright © 2020 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
", - "_gitContribute": { - "repo": "https://github.com/apache/lucenenet", - "branch": "docs/4.8.0-beta00008", - "apiSpecFolder": "websites/apidocs/apiSpec" - } + "_appFooter": "Copyright © 2020 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
" }, "overwrite": [ { @@ -624,13 +619,13 @@ "fileMetadataFiles": [], "template": [ "default", - "LuceneTemplate" + "LuceneTemplate" ], - "postProcessors": [], + "postProcessors": ["EnvironmentVariableProcessor"], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, "cleanupCacheHistory": false, "disableGitFeatures": false } -} +} \ No newline at end of file diff --git a/websites/apidocs/docfx.memory.json b/websites/apidocs/docfx.memory.json index 07908a8dd5..afe756cb3d 100644 --- a/websites/apidocs/docfx.memory.json +++ b/websites/apidocs/docfx.memory.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/memory", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/memory" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "memory/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/memory/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.misc.json b/websites/apidocs/docfx.misc.json index 09165167e1..8e09b32933 100644 --- a/websites/apidocs/docfx.misc.json +++ b/websites/apidocs/docfx.misc.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/misc", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/misc" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "misc/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/misc/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.queries.json b/websites/apidocs/docfx.queries.json index 4566e4f787..9fb38e106c 100644 --- a/websites/apidocs/docfx.queries.json +++ b/websites/apidocs/docfx.queries.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/queries", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/queries" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "queries/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/queries/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.queryparser.json b/websites/apidocs/docfx.queryparser.json index 76096622a0..90a7d92086 100644 --- a/websites/apidocs/docfx.queryparser.json +++ b/websites/apidocs/docfx.queryparser.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/queryparser", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.QueryParser" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/queryparser" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "queryparser/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/queryparser/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.replicator.json b/websites/apidocs/docfx.replicator.json index 1be897ae24..b1d3015dcb 100644 --- a/websites/apidocs/docfx.replicator.json +++ b/websites/apidocs/docfx.replicator.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/replicator", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/replicator" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "replicator/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/replicator/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.sandbox.json b/websites/apidocs/docfx.sandbox.json index c6ce693dd5..a88c090799 100644 --- a/websites/apidocs/docfx.sandbox.json +++ b/websites/apidocs/docfx.sandbox.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/sandbox", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.Sandbox" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/sandbox" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "sandbox/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/sandbox/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.site.json b/websites/apidocs/docfx.site.json index 384446c6fb..c14b0177ef 100644 --- a/websites/apidocs/docfx.site.json +++ b/websites/apidocs/docfx.site.json @@ -1,9 +1,9 @@ -{ +{ "build": { "content": [ { "files": [ - "toc.yml", + "./toc.yml", "*.md" ] }, @@ -44,7 +44,7 @@ "_site/api/grouping/xrefmap.yml", "_site/api/highlighter/xrefmap.yml", "_site/api/icu/xrefmap.yml", - "_site/api/join/xrefmap.yml", + "_site/api/join/xrefmap.yml", "_site/api/memory/xrefmap.yml", "_site/api/misc/xrefmap.yml", "_site/api/queries/xrefmap.yml", @@ -52,18 +52,22 @@ "_site/api/replicator/xrefmap.yml", "_site/api/sandbox/xrefmap.yml", "_site/api/spatial/xrefmap.yml", - "_site/api/suggest/xrefmap.yml", + "_site/api/suggest/xrefmap.yml", "_site/api/test-framework/xrefmap.yml", "_site/api/demo/xrefmap.yml" ], "dest": "_site", - "globalMetadataFiles": ["docfx.global.json"], + "globalMetadataFiles": [ + "docfx.global.json" + ], "template": [ "default", "Templates/LuceneTemplate", "Templates/LuceneTemplateAssets" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.spatial.json b/websites/apidocs/docfx.spatial.json index 995bd9657c..34f49ddbaf 100644 --- a/websites/apidocs/docfx.spatial.json +++ b/websites/apidocs/docfx.spatial.json @@ -15,28 +15,28 @@ ], "dest": "obj/docfx/api/spatial", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/spatial" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "spatial/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -46,7 +46,7 @@ "exclude": [ "package.md" ] - }, + }, { "files": [ "apiSpec/spatial/**/*.md" @@ -66,7 +66,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.suggest.json b/websites/apidocs/docfx.suggest.json index 036cf7646c..f5c712400a 100644 --- a/websites/apidocs/docfx.suggest.json +++ b/websites/apidocs/docfx.suggest.json @@ -15,34 +15,34 @@ ], "dest": "obj/docfx/api/suggest", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], "build": { - "content": [ + "content": [ { "files": [ "overview.md" ], "src": "../../src/Lucene.Net.Suggest" - }, + }, { "files": [ "**.yml", "**.md" ], "src": "obj/docfx/api/suggest" - }, + }, { "files": [ - "toc.yml", + "./toc.yml", "suggest/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "**/package.md", @@ -52,7 +52,7 @@ "exclude": [ "overview.md" ] - }, + }, { "files": [ "apiSpec/suggest/**/*.md" @@ -72,7 +72,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docfx.test-framework.json b/websites/apidocs/docfx.test-framework.json index 2ad8e81072..278086d742 100644 --- a/websites/apidocs/docfx.test-framework.json +++ b/websites/apidocs/docfx.test-framework.json @@ -15,7 +15,7 @@ ], "dest": "obj/docfx/api/test-framework", "properties": { - "TargetFramework": "netstandard2.0" + "TargetFramework": "net6.0" } } ], @@ -36,13 +36,13 @@ }, { "files": [ - "toc.yml", + "./toc.yml", "test-framework/toc.yml" ], "src": "toc" } - ], - "overwrite": [ + ], + "overwrite": [ { "files": [ "apiSpec/test-framework/**/*.md" @@ -59,7 +59,9 @@ "Templates/LuceneTemplate", "Templates/LuceneApiDocs" ], - "postProcessors": [], + "postProcessors": [ + "EnvironmentVariableProcessor" + ], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 38728b50ab..02f667a89f 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -23,6 +23,7 @@ param ( [string] $LuceneNetVersion, [switch] $ServeDocs = $false, [switch] $Clean = $false, + [switch] $SkipToolInstall = $false, # to speed up iteration if you already have the tool installed [switch] $DisableMetaData = $false, [switch] $DisableBuild = $false, [switch] $DisablePlugins = $false, @@ -34,7 +35,8 @@ param ( [Parameter(Mandatory = $false)] [int] $StagingPort = 8080 ) -$MinimumSdkVersion = "3.1.100" # Minimum Required .NET SDK (must not be a pre-release) +$MinimumSdkVersion = "8.0.204" # Minimum Required .NET SDK (must not be a pre-release) +$DocFxVersion = "2.77.0" # Required DocFx version $ErrorActionPreference = "Stop" @@ -57,36 +59,35 @@ $env:LuceneNetReleaseTag = $VCSLabel $PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName $RepoRoot = (get-item $PSScriptFilePath).Directory.Parent.Parent.FullName; $ApiDocsFolder = Join-Path -Path $RepoRoot -ChildPath "websites\apidocs"; -$ToolsFolder = Join-Path -Path $ApiDocsFolder -ChildPath "tools"; $CliIndexPath = Join-Path -Path $RepoRoot -ChildPath "src\dotnet\tools\lucene-cli\docs\index.md"; $TocPath1 = Join-Path -Path $ApiDocsFolder -ChildPath "toc.yml" $TocPath2 = Join-Path -Path $ApiDocsFolder -ChildPath "toc\toc.yml" $BreadcrumbPath = Join-Path -Path $ApiDocsFolder -ChildPath "docfx.global.subsite.json" -#ensure the /build/tools folder -New-Item $ToolsFolder -type directory -force +# install docfx tool +if ($SkipToolInstall -eq $false) { + $InstallDocFx = $false + try { + $InstalledDocFxVersion = (& docfx --version).Trim().Split('+')[0] -if ($Clean) { - Write-Host "Cleaning tools..." - Remove-Item (Join-Path -Path $ToolsFolder "\*") -recurse -force -ErrorAction SilentlyContinue -} - -New-Item "$ToolsFolder\tmp" -type directory -force - -# Go get docfx.exe if we don't have it -New-Item "$ToolsFolder\docfx" -type directory -force -$DocFxExe = "$ToolsFolder\docfx\docfx.exe" -if (-not (test-path $DocFxExe)) { - Write-Host "Retrieving docfx..." - $DocFxZip = "$ToolsFolder\tmp\docfx.zip" - Invoke-WebRequest "https://github.com/dotnet/docfx/releases/download/v2.58/docfx.zip" -OutFile $DocFxZip -TimeoutSec 60 + if ([version]$InstalledDocFxVersion -lt [version]$DocFxVersion) { + Write-Host "DocFx is installed, but the version is less than $DocFxVersion, will install it." + $InstallDocFx = $true + } + else { + Write-Host "DocFx is installed and the version is $InstalledDocFxVersion." + } + } catch { + Write-Host "DocFx is not installed or not in the PATH, will install it." + $InstallDocFx = $true + } - #unzip - Expand-Archive $DocFxZip -DestinationPath (Join-Path -Path $ToolsFolder -ChildPath "docfx") + if ($InstallDocFx -eq $true) { + Write-Host "Installing docfx global tool..." + dotnet tool install -g docfx --version $DocFxVersion + } } -Remove-Item -Recurse -Force "$ToolsFolder\tmp" - # delete anything that already exists if ($Clean) { Write-Host "Cleaning..." @@ -124,14 +125,20 @@ $DocFxGlobalJson = Join-Path -Path $ApiDocsFolder "docfx.global.json" $DocFxJsonContent = Get-Content $DocFxGlobalJson | ConvertFrom-Json $DocFxJsonContent._appFooter = "Copyright © $((Get-Date).Year) The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
" $DocFxJsonContent._appTitle = "Apache Lucene.NET $LuceneNetVersion Documentation" -$DocFxJsonContent._gitContribute.branch = "docs/$LuceneNetVersion" -$DocFxJsonContent._gitContribute.tag = "$VCSLabel" +#$DocFxJsonContent._gitContribute.branch = "docs/$LuceneNetVersion" +#$DocFxJsonContent._gitContribute.tag = "$VCSLabel" $DocFxJsonContent | ConvertTo-Json -depth 100 | Set-Content $DocFxGlobalJson +# update the docfx.json file +#$DocFxJson = Join-Path -Path $ApiDocsFolder "docfx.json" +#$DocFxJsonContent = Get-Content $DocFxJson | ConvertFrom-Json +#$DocFxJsonContent.build.globalMetadata._gitContribute.branch = "docs/$LuceneNetVersion" +#$DocFxJsonContent.build.globalMetadata._gitContribute.tag = "$VCSLabel" + # NOTE: The order of these depends on if one of the projects requries the xref map of another, normally all require the core xref map $DocFxJsonMeta = @( - "docfx.codecs.json", "docfx.core.json", + "docfx.codecs.json", "docfx.analysis-common.json", "docfx.analysis-kuromoji.json", "docfx.analysis-morfologik.json", @@ -168,13 +175,7 @@ if ($? -and $DisableMetaData -eq $false) { # build the output Write-Host "Building api metadata for $projFile..." - - if ($Clean) { - & $DocFxExe metadata $projFile --log "$DocFxLog" --loglevel $LogLevel --force - } - else { - & $DocFxExe metadata $projFile --log "$DocFxLog" --loglevel $LogLevel - } + & docfx metadata $projFile --log "$DocFxLog" --logLevel $LogLevel --disableGitFeatures } } @@ -196,23 +197,11 @@ if ($? -and $DisableBuild -eq $false) { $DocFxLog = Join-Path -Path $ApiDocsFolder "obj\${proj}.build.log" + Start-Sleep -Seconds 1 + # build the output Write-Host "Building site output for $projFile..." - - # Specifying --force, --forcePostProcess and --cleanupCacheHistory - # seems to be required in order for all xref links to resolve consistently across - # all of the docfx builds (see https://dotnet.github.io/docfx/RELEASENOTE.html?tabs=csharp). - # Previously we used to do this: - # Remove-Item (Join-Path -Path $ApiDocsFolder "obj\.cache") -recurse -force -ErrorAction SilentlyContinue - # to force remove the cache else the xref's wouldn't work correctly. So far with these new parameters - # it seems much happier. - - if ($Clean) { - & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel --force --debug --cleanupCacheHistory --force --forcePostProcess - } - else { - & $DocFxExe build $projFile --log "$DocFxLog" --loglevel $LogLevel --debug --cleanupCacheHistory --force --forcePostProcess - } + & docfx build $projFile --log "$DocFxLog" --logLevel $LogLevel --debug --disableGitFeatures # Add the baseUrl to the output xrefmap, see https://github.com/dotnet/docfx/issues/2346#issuecomment-356054027 $projFileJson = Get-Content $projFile | ConvertFrom-Json @@ -239,18 +228,12 @@ if ($?) { # build the output Write-Host "Building docs..." - - if ($Clean) { - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --force --debug - } - else { - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --debug - } + & docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --debug } else { # build + serve (for testing) Write-Host "starting website..." - & $DocFxExe $DocFxJsonSite --log "$DocFxLog" --loglevel $LogLevel --serve --port $StagingPort --debug + & docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --serve --port $StagingPort --debug } } @@ -258,4 +241,4 @@ if ($?) { # and then many of these params can be excluded from the json file # .\docfx.exe ..\..\docfx.core.json --globalMetadataFiles docfx.global.json --output _TEST --serve --force --loglevel Warning -# docfx.exe --output TARGET --globalMetadataFiles docfx.global.json Warning \ No newline at end of file +# docfx.exe --output TARGET --globalMetadataFiles docfx.global.json Warning diff --git a/websites/apidocs/toc.yml b/websites/apidocs/toc.yml index 446bef5a3d..58f33f6be5 100644 --- a/websites/apidocs/toc.yml +++ b/websites/apidocs/toc.yml @@ -1,4 +1,4 @@ -- name: Lucene.Net API +- name: Lucene.Net API topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016/ - name: Lucene.Net CLI href: ../../src/dotnet/tools/lucene-cli/docs/ diff --git a/websites/apidocs/toc/toc.yml b/websites/apidocs/toc/toc.yml index f4c7b8d969..abc5e44a61 100644 --- a/websites/apidocs/toc/toc.yml +++ b/websites/apidocs/toc/toc.yml @@ -1,4 +1,4 @@ -- name: Lucene.Net API +- name: Lucene.Net API topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016 - name: Lucene.Net CLI topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016/cli/index.html From f8c36f0803c11982f8b80b9496c863eabe4c590b Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 15 Sep 2024 08:26:21 -0600 Subject: [PATCH 08/36] Fix locking of toc file, add back git features --- websites/apidocs/docs.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 1b1879af8e..21f8ff5747 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -175,7 +175,7 @@ if ($? -and $DisableMetaData -eq $false) { # build the output Write-Host "Building api metadata for $projFile..." - & docfx metadata $projFile --log "$DocFxLog" --logLevel $LogLevel --disableGitFeatures + & docfx metadata $projFile --log "$DocFxLog" --logLevel $LogLevel } } @@ -199,7 +199,7 @@ if ($? -and $DisableBuild -eq $false) { # build the output Write-Host "Building site output for $projFile..." - & docfx build $projFile --log "$DocFxLog" --logLevel $LogLevel --debug --disableGitFeatures + & docfx build $projFile --log "$DocFxLog" --logLevel $LogLevel --debug --maxParallelism 1 # Add the baseUrl to the output xrefmap, see https://github.com/dotnet/docfx/issues/2346#issuecomment-356054027 $projFileJson = Get-Content $projFile | ConvertFrom-Json From 2eb07cc6f9bf9afc0198a6408bba836718312a77 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 15 Sep 2024 16:01:35 -0600 Subject: [PATCH 09/36] Un-exclude docs from VS Code workspace --- .vscode/settings.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index d47dddebf3..4f7d121a28 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,6 @@ { "files.exclude": { - "**/.git": true, - "**/docs": true + "**/.git": true }, "dotnet-test-explorer.testProjectPath": "src/**/*.Tests.*.csproj" -} \ No newline at end of file +} From 6d66534e75fb9076052f16516ce381afca0d5891 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 15 Sep 2024 21:47:12 -0600 Subject: [PATCH 10/36] Exclude old files from LuceneDocsPlugins for now, #911 --- Lucene.Net.sln | 13 +++++++++++-- src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj | 13 +++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Lucene.Net.sln b/Lucene.Net.sln index 3c51015dc7..a7a55a7b3d 100644 --- a/Lucene.Net.sln +++ b/Lucene.Net.sln @@ -7,9 +7,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # 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 @@ -282,6 +282,10 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "websites", "websites\", "{8 SlnRelativePath = "websites\" EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{42599646-275F-4970-BC60-A3349F6498CC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuceneDocsPlugins", "src\docs\LuceneDocsPlugins\LuceneDocsPlugins.csproj", "{FED4A824-1F32-4948-8D37-2B7610804DB5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -554,6 +558,10 @@ Global {9880B87D-8D14-476B-B093-9C3AA0DA8B24}.Release|Any CPU.Build.0 = Release|Any CPU {8988CDA4-8420-4BEE-869A-66825055EED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8988CDA4-8420-4BEE-869A-66825055EED2}.Release|Any CPU.ActiveCfg = Debug|Any CPU + {FED4A824-1F32-4948-8D37-2B7610804DB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FED4A824-1F32-4948-8D37-2B7610804DB5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FED4A824-1F32-4948-8D37-2B7610804DB5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FED4A824-1F32-4948-8D37-2B7610804DB5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -574,6 +582,7 @@ Global {5CD4D4E8-6132-4384-98FC-6AB1C97E0B80} = {8CA61D33-3590-4024-A304-7B1F75B50653} {E5E8C5DC-7048-4818-B884-FB2D037D2EF2} = {8CA61D33-3590-4024-A304-7B1F75B50653} {4D0ED7D9-ABEE-4890-B06C-477E3A32B9A0} = {E5E8C5DC-7048-4818-B884-FB2D037D2EF2} + {FED4A824-1F32-4948-8D37-2B7610804DB5} = {42599646-275F-4970-BC60-A3349F6498CC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9F2179CC-CFD2-4419-AB74-D72856931F36} diff --git a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj index c272c1fa6c..d1f47a2278 100644 --- a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj +++ b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj @@ -51,4 +51,17 @@ under the License. + + + + + + + + + + + + + From e12b9a24d9af0f8daa8b05144a270aed5a3314ea Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Mon, 16 Sep 2024 07:40:29 -0600 Subject: [PATCH 11/36] Add @lucene note plugin --- .../AggregatePostProcessor.cs | 53 ++++++++ .../EnvironmentVariableProcessor.cs | 21 +++- .../EnvironmentVariableUtil.cs | 89 +++++++------ .../LuceneDocsPlugins/LuceneNoteProcessor.cs | 118 ++++++++++++++++++ websites/apidocs/docfx.analysis-common.json | 4 +- websites/apidocs/docfx.analysis-kuromoji.json | 4 +- .../apidocs/docfx.analysis-morfologik.json | 4 +- websites/apidocs/docfx.analysis-opennlp.json | 4 +- websites/apidocs/docfx.analysis-phonetic.json | 4 +- websites/apidocs/docfx.analysis-smartcn.json | 4 +- websites/apidocs/docfx.analysis-stempel.json | 4 +- websites/apidocs/docfx.benchmark.json | 4 +- websites/apidocs/docfx.classification.json | 4 +- websites/apidocs/docfx.codecs.json | 4 +- websites/apidocs/docfx.core.json | 4 +- websites/apidocs/docfx.demo.json | 4 +- websites/apidocs/docfx.expressions.json | 4 +- websites/apidocs/docfx.facet.json | 4 +- websites/apidocs/docfx.grouping.json | 4 +- websites/apidocs/docfx.highlighter.json | 4 +- websites/apidocs/docfx.icu.json | 4 +- websites/apidocs/docfx.join.json | 4 +- websites/apidocs/docfx.json | 4 +- websites/apidocs/docfx.memory.json | 4 +- websites/apidocs/docfx.misc.json | 4 +- websites/apidocs/docfx.queries.json | 4 +- websites/apidocs/docfx.queryparser.json | 4 +- websites/apidocs/docfx.replicator.json | 4 +- websites/apidocs/docfx.sandbox.json | 4 +- websites/apidocs/docfx.site.json | 4 +- websites/apidocs/docfx.spatial.json | 4 +- websites/apidocs/docfx.suggest.json | 4 +- websites/apidocs/docfx.test-framework.json | 4 +- 33 files changed, 291 insertions(+), 106 deletions(-) create mode 100644 src/docs/LuceneDocsPlugins/AggregatePostProcessor.cs create mode 100644 src/docs/LuceneDocsPlugins/LuceneNoteProcessor.cs diff --git a/src/docs/LuceneDocsPlugins/AggregatePostProcessor.cs b/src/docs/LuceneDocsPlugins/AggregatePostProcessor.cs new file mode 100644 index 0000000000..c2bafd98a3 --- /dev/null +++ b/src/docs/LuceneDocsPlugins/AggregatePostProcessor.cs @@ -0,0 +1,53 @@ +/* + * 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 Docfx.Plugins; +using System; +using System.Collections.Immutable; +using System.Composition; + +namespace LuceneDocsPlugins; + +[Export(nameof(AggregatePostProcessor), typeof(IPostProcessor))] +public class AggregatePostProcessor : IPostProcessor +{ + private readonly IPostProcessor[] _postProcessors = + [ + new LuceneNoteProcessor(), + new EnvironmentVariableProcessor(), + ]; + + public ImmutableDictionary PrepareMetadata(ImmutableDictionary metadata) + { + foreach (var postProcessor in _postProcessors) + { + metadata = postProcessor.PrepareMetadata(metadata); + } + + return metadata; + } + + public Manifest Process(Manifest manifest, string outputFolder) + { + foreach (var postProcessor in _postProcessors) + { + manifest = postProcessor.Process(manifest, outputFolder); + } + + return manifest; + } +} diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs index d32db2c831..9a83a7ef28 100644 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs +++ b/src/docs/LuceneDocsPlugins/EnvironmentVariableProcessor.cs @@ -1,13 +1,28 @@ -using Docfx.Common; +/* + * 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 Docfx.Common; using Docfx.Plugins; using System.Collections.Immutable; -using System.Composition; using System.IO; using System.Linq; namespace LuceneDocsPlugins; -[Export(nameof(EnvironmentVariableProcessor), typeof(IPostProcessor))] public class EnvironmentVariableProcessor : IPostProcessor { public ImmutableDictionary PrepareMetadata(ImmutableDictionary metadata) diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs index 27ecb583c6..bb1c548708 100644 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs +++ b/src/docs/LuceneDocsPlugins/EnvironmentVariableUtil.cs @@ -1,64 +1,63 @@ -using Docfx.Common; +/* + * 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 Docfx.Common; using System; using System.Text; using System.Text.RegularExpressions; -namespace LuceneDocsPlugins +namespace LuceneDocsPlugins; + +public partial class EnvironmentVariableUtil { - /* - * 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. - */ + [GeneratedRegex(@"EnvVar\:(\w+)", RegexOptions.Compiled)] + private static partial Regex EnvVarRegex(); - public partial class EnvironmentVariableUtil + public static string ReplaceEnvironmentVariables(string sourceText) { - [GeneratedRegex(@"EnvVar\:(\w+)", RegexOptions.Compiled)] - private static partial Regex EnvVarRegex(); + var matches = EnvVarRegex().Matches(sourceText); - public static string ReplaceEnvironmentVariables(string sourceText) + if (matches.Count > 0) { - var matches = EnvVarRegex().Matches(sourceText); - - if (matches.Count > 0) - { - var sb = new StringBuilder(sourceText.Length); - - int lastMatchEnd = 0; + var sb = new StringBuilder(sourceText.Length); - foreach (Match match in matches) - { - var envVar = match.Groups[1].Value; + int lastMatchEnd = 0; - // Append the prefix that didn't match the regex (or text since last match) - sb.Append(sourceText.AsSpan(lastMatchEnd, match.Index - lastMatchEnd)); - - // Do the replacement of the regex match - string envVarValue = Environment.GetEnvironmentVariable(envVar); - sb.Append(envVarValue); + foreach (Match match in matches) + { + var envVar = match.Groups[1].Value; - Logger.LogInfo($"Replaced environment variable '{envVar}' with value '{envVarValue}' on match {match.Value}"); - lastMatchEnd = match.Index + match.Length; - } + // Append the prefix that didn't match the regex (or text since last match) + sb.Append(sourceText.AsSpan(lastMatchEnd, match.Index - lastMatchEnd)); - // Append the suffix that didn't match the regex - sb.Append(sourceText.AsSpan(lastMatchEnd)); + // Do the replacement of the regex match + string envVarValue = Environment.GetEnvironmentVariable(envVar); + sb.Append(envVarValue); - return sb.ToString(); + Logger.LogInfo($"Replaced environment variable '{envVar}' with value '{envVarValue}' on match {match.Value}"); + lastMatchEnd = match.Index + match.Length; } - return sourceText; + // Append the suffix that didn't match the regex + sb.Append(sourceText.AsSpan(lastMatchEnd)); + + return sb.ToString(); } + + return sourceText; } } diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteProcessor.cs b/src/docs/LuceneDocsPlugins/LuceneNoteProcessor.cs new file mode 100644 index 0000000000..a5afc08961 --- /dev/null +++ b/src/docs/LuceneDocsPlugins/LuceneNoteProcessor.cs @@ -0,0 +1,118 @@ +/* + * 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 Docfx.Common; +using Docfx.Plugins; +using System; +using System.Collections.Immutable; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +namespace LuceneDocsPlugins; + +public partial class LuceneNoteProcessor : IPostProcessor +{ + private const string ExperimentalMessage = + "This API is experimental and might change in incompatible ways in the next release."; + + private const string InternalMessage = + "This API is for internal purposes only and might change in incompatible ways in the next release."; + + [GeneratedRegex("@lucene\\.(?(experimental|internal))")] + private static partial Regex LuceneNoteRegex(); + + public ImmutableDictionary PrepareMetadata(ImmutableDictionary metadata) + { + return metadata; + } + + public Manifest Process(Manifest manifest, string outputFolder) + { + foreach (var manifestItem in manifest.Files) + { + foreach (var manifestItemOutputFile in manifestItem.Output) + { + var outputPath = Path.Combine(outputFolder, manifestItemOutputFile.Value.RelativePath); + + var content = File.ReadAllText(outputPath); + + Logger.LogInfo($"Replacing @lucene notes in {outputPath}"); + + var newContent = ReplaceLuceneNotes(content); + + if (content == newContent) + { + continue; + } + + Logger.LogInfo($"Writing new content to {outputPath}"); + + File.WriteAllText(outputPath, newContent); + } + } + + return manifest; + } + + private static string ReplaceLuceneNotes(string sourceText) + { + var matches = LuceneNoteRegex().Matches(sourceText); + + if (matches.Count > 0) + { + var sb = new StringBuilder(sourceText.Length); + + int lastMatchEnd = 0; + + foreach (Match match in matches) + { + var noteType = match.Groups["notetype"].Value; + + // Append the prefix that didn't match the regex (or text since last match) + sb.Append(sourceText.AsSpan(lastMatchEnd, match.Index - lastMatchEnd)); + + // Do the replacement of the regex match + string noteValue = GetLuceneNoteValue(noteType); + sb.Append(noteValue); + + Logger.LogInfo($"Replaced @lucene note '{noteType}'"); + lastMatchEnd = match.Index + match.Length; + } + + // Append the suffix that didn't match the regex + sb.Append(sourceText.AsSpan(lastMatchEnd)); + + return sb.ToString(); + } + + return sourceText; + } + + private static string GetLuceneNoteValue(string noteType) + { + string message = noteType == "internal" ? InternalMessage : ExperimentalMessage; + + var builder = new StringBuilder(); + builder.AppendLine("
"); + builder.AppendLine("
Note
"); + builder.Append("

").Append(message).AppendLine("

"); + builder.AppendLine("
"); + return builder.ToString(); + } +} diff --git a/websites/apidocs/docfx.analysis-common.json b/websites/apidocs/docfx.analysis-common.json index 166949ba60..3660723bcd 100644 --- a/websites/apidocs/docfx.analysis-common.json +++ b/websites/apidocs/docfx.analysis-common.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.analysis-kuromoji.json b/websites/apidocs/docfx.analysis-kuromoji.json index dafdaeb449..e1ec1383c1 100644 --- a/websites/apidocs/docfx.analysis-kuromoji.json +++ b/websites/apidocs/docfx.analysis-kuromoji.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.analysis-morfologik.json b/websites/apidocs/docfx.analysis-morfologik.json index c75895949e..b1e4c2090f 100644 --- a/websites/apidocs/docfx.analysis-morfologik.json +++ b/websites/apidocs/docfx.analysis-morfologik.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.analysis-opennlp.json b/websites/apidocs/docfx.analysis-opennlp.json index 6051ec5fe4..98abbc158d 100644 --- a/websites/apidocs/docfx.analysis-opennlp.json +++ b/websites/apidocs/docfx.analysis-opennlp.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.analysis-phonetic.json b/websites/apidocs/docfx.analysis-phonetic.json index 75a380ed36..c7fbb6afeb 100644 --- a/websites/apidocs/docfx.analysis-phonetic.json +++ b/websites/apidocs/docfx.analysis-phonetic.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.analysis-smartcn.json b/websites/apidocs/docfx.analysis-smartcn.json index d5ac444488..09b08e6ffd 100644 --- a/websites/apidocs/docfx.analysis-smartcn.json +++ b/websites/apidocs/docfx.analysis-smartcn.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.analysis-stempel.json b/websites/apidocs/docfx.analysis-stempel.json index 41a0708333..969be28deb 100644 --- a/websites/apidocs/docfx.analysis-stempel.json +++ b/websites/apidocs/docfx.analysis-stempel.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.benchmark.json b/websites/apidocs/docfx.benchmark.json index 0ea98bd224..f201370e2c 100644 --- a/websites/apidocs/docfx.benchmark.json +++ b/websites/apidocs/docfx.benchmark.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.classification.json b/websites/apidocs/docfx.classification.json index 6aa4cc6959..770cb9ab85 100644 --- a/websites/apidocs/docfx.classification.json +++ b/websites/apidocs/docfx.classification.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.codecs.json b/websites/apidocs/docfx.codecs.json index 502458ab23..82c4bbc911 100644 --- a/websites/apidocs/docfx.codecs.json +++ b/websites/apidocs/docfx.codecs.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.core.json b/websites/apidocs/docfx.core.json index 67d87654c5..de92ac9e1a 100644 --- a/websites/apidocs/docfx.core.json +++ b/websites/apidocs/docfx.core.json @@ -81,7 +81,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -89,4 +89,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.demo.json b/websites/apidocs/docfx.demo.json index cc3c1c80a2..fff0070518 100644 --- a/websites/apidocs/docfx.demo.json +++ b/websites/apidocs/docfx.demo.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.expressions.json b/websites/apidocs/docfx.expressions.json index af8cf5c017..dd1d29b168 100644 --- a/websites/apidocs/docfx.expressions.json +++ b/websites/apidocs/docfx.expressions.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.facet.json b/websites/apidocs/docfx.facet.json index 88273e39e0..96404fdd40 100644 --- a/websites/apidocs/docfx.facet.json +++ b/websites/apidocs/docfx.facet.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.grouping.json b/websites/apidocs/docfx.grouping.json index fa2bd3a5ce..4db6beedab 100644 --- a/websites/apidocs/docfx.grouping.json +++ b/websites/apidocs/docfx.grouping.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.highlighter.json b/websites/apidocs/docfx.highlighter.json index 496333dc54..ffbcbca1ee 100644 --- a/websites/apidocs/docfx.highlighter.json +++ b/websites/apidocs/docfx.highlighter.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.icu.json b/websites/apidocs/docfx.icu.json index 3948383d60..0787a690a3 100644 --- a/websites/apidocs/docfx.icu.json +++ b/websites/apidocs/docfx.icu.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.join.json b/websites/apidocs/docfx.join.json index 10b40889b3..ae239e816e 100644 --- a/websites/apidocs/docfx.join.json +++ b/websites/apidocs/docfx.join.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.json b/websites/apidocs/docfx.json index 307a4f40cf..65b6deedd6 100644 --- a/websites/apidocs/docfx.json +++ b/websites/apidocs/docfx.json @@ -621,11 +621,11 @@ "default", "LuceneTemplate" ], - "postProcessors": ["EnvironmentVariableProcessor"], + "postProcessors": ["AggregatePostProcessor"], "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.memory.json b/websites/apidocs/docfx.memory.json index afe756cb3d..7e4d3fe131 100644 --- a/websites/apidocs/docfx.memory.json +++ b/websites/apidocs/docfx.memory.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.misc.json b/websites/apidocs/docfx.misc.json index 8e09b32933..c9213c649f 100644 --- a/websites/apidocs/docfx.misc.json +++ b/websites/apidocs/docfx.misc.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.queries.json b/websites/apidocs/docfx.queries.json index 9fb38e106c..255d2221cd 100644 --- a/websites/apidocs/docfx.queries.json +++ b/websites/apidocs/docfx.queries.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.queryparser.json b/websites/apidocs/docfx.queryparser.json index 90a7d92086..8e11bbb1d8 100644 --- a/websites/apidocs/docfx.queryparser.json +++ b/websites/apidocs/docfx.queryparser.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.replicator.json b/websites/apidocs/docfx.replicator.json index b1d3015dcb..839e1553e3 100644 --- a/websites/apidocs/docfx.replicator.json +++ b/websites/apidocs/docfx.replicator.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.sandbox.json b/websites/apidocs/docfx.sandbox.json index a88c090799..41a0583436 100644 --- a/websites/apidocs/docfx.sandbox.json +++ b/websites/apidocs/docfx.sandbox.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.site.json b/websites/apidocs/docfx.site.json index c14b0177ef..0884d127eb 100644 --- a/websites/apidocs/docfx.site.json +++ b/websites/apidocs/docfx.site.json @@ -66,7 +66,7 @@ "Templates/LuceneTemplateAssets" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -74,4 +74,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.spatial.json b/websites/apidocs/docfx.spatial.json index 34f49ddbaf..72e0432dff 100644 --- a/websites/apidocs/docfx.spatial.json +++ b/websites/apidocs/docfx.spatial.json @@ -67,7 +67,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -75,4 +75,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.suggest.json b/websites/apidocs/docfx.suggest.json index f5c712400a..2f5d10344f 100644 --- a/websites/apidocs/docfx.suggest.json +++ b/websites/apidocs/docfx.suggest.json @@ -73,7 +73,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -81,4 +81,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/apidocs/docfx.test-framework.json b/websites/apidocs/docfx.test-framework.json index 278086d742..bb52149a5c 100644 --- a/websites/apidocs/docfx.test-framework.json +++ b/websites/apidocs/docfx.test-framework.json @@ -60,7 +60,7 @@ "Templates/LuceneApiDocs" ], "postProcessors": [ - "EnvironmentVariableProcessor" + "AggregatePostProcessor" ], "markdownEngineName": "dfm", "noLangKeyword": false, @@ -68,4 +68,4 @@ "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} From a87d8d783b656e2d3a297985a6cb0e86362114d8 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Tue, 17 Sep 2024 15:07:39 -0600 Subject: [PATCH 12/36] Use EnvVar:LuceneNetVersion in CLI docs, remove old files --- .../AggregatePostProcessor.cs | 1 - .../EnvironmentVariableDfmTextInlineRule.cs | 49 ---------- .../EnvironmentVariableInCodeBlockRule.cs | 47 --------- .../EnvironmentVariableInLinkInlineRule.cs | 96 ------------------- .../EnvironmentVariableInlineRule.cs | 52 ---------- .../EnvironmentVariableRendererPart.cs | 40 -------- .../LuceneDfmEngineCustomizer.cs | 69 ------------- .../LuceneDocsPlugins/LuceneNoteBlockRule.cs | 46 --------- .../LuceneDocsPlugins/LuceneNoteBlockToken.cs | 44 --------- .../LuceneNoteTokenRendererPart.cs | 52 ---------- .../LuceneDocsPlugins/RendererPartProvider.cs | 40 -------- src/dotnet/tools/lucene-cli/docs/index.md | 2 +- websites/apidocs/docs.ps1 | 4 - 13 files changed, 1 insertion(+), 541 deletions(-) delete mode 100644 src/docs/LuceneDocsPlugins/EnvironmentVariableDfmTextInlineRule.cs delete mode 100644 src/docs/LuceneDocsPlugins/EnvironmentVariableInCodeBlockRule.cs delete mode 100644 src/docs/LuceneDocsPlugins/EnvironmentVariableInLinkInlineRule.cs delete mode 100644 src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs delete mode 100644 src/docs/LuceneDocsPlugins/EnvironmentVariableRendererPart.cs delete mode 100644 src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs delete mode 100644 src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs delete mode 100644 src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs delete mode 100644 src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs delete mode 100644 src/docs/LuceneDocsPlugins/RendererPartProvider.cs diff --git a/src/docs/LuceneDocsPlugins/AggregatePostProcessor.cs b/src/docs/LuceneDocsPlugins/AggregatePostProcessor.cs index c2bafd98a3..675434b12c 100644 --- a/src/docs/LuceneDocsPlugins/AggregatePostProcessor.cs +++ b/src/docs/LuceneDocsPlugins/AggregatePostProcessor.cs @@ -16,7 +16,6 @@ */ using Docfx.Plugins; -using System; using System.Collections.Immutable; using System.Composition; diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableDfmTextInlineRule.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableDfmTextInlineRule.cs deleted file mode 100644 index e68145c429..0000000000 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableDfmTextInlineRule.cs +++ /dev/null @@ -1,49 +0,0 @@ -//using Microsoft.DocAsCode.Dfm; -//using Microsoft.DocAsCode.MarkdownLite; -//using System; -//using System.Text; -//using System.Text.RegularExpressions; - -//namespace LuceneDocsPlugins -//{ -// // LUCENENET TODO: This is not functional yet - -// /* -// * 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. -// */ - -// public class EnvironmentVariableDfmTextInlineRule : DfmTextInlineRule -// { -// public static readonly Regex EnvVar = EnvironmentVariableUtil.EnvVarRegexInline; - -// public override IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context) -// { -// var match = Text.Match(context.CurrentMarkdown); -// if (match.Length == 0) -// { -// return null; -// } -// var sourceInfo = context.Consume(match.Length); - -// //Console.WriteLine("Hey!!!!"); - -// var environmentVariableMatch = EnvVar.Match(match.Groups[0].Value); -// //Console.WriteLine(environmentVariableMatch.Success); -// string replacement = environmentVariableMatch.Success ? EnvironmentVariableUtil.ReplaceEnvironmentVariables(match.Groups[0].Value, match, new StringBuilder(match.Groups[0].Value.Length)) : match.Groups[0].Value; -// return new MarkdownTextToken(this, parser.Context, StringHelper.Escape(Smartypants(parser.Options, replacement)), sourceInfo); -// } -// } -//} diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableInCodeBlockRule.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableInCodeBlockRule.cs deleted file mode 100644 index 9d648928e4..0000000000 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableInCodeBlockRule.cs +++ /dev/null @@ -1,47 +0,0 @@ -//using Microsoft.DocAsCode.MarkdownLite; -//using System.Text.RegularExpressions; - -//namespace LuceneDocsPlugins -//{ -// // LUCENENET TODO: This is not functional yet - -// /* -// * 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. -// */ - -// public class EnvironmentVariableInCodeBlockRule : MarkdownCodeBlockRule -// { -// public static readonly Regex EnvVarRegex = EnvironmentVariableUtil.EnvVarRegexInline; - -// public override IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context) -// { -// //Console.WriteLine("Hello World!"); - -// var token = base.TryMatch(parser, context) as MarkdownCodeBlockToken; -// if (token is null) return null; - -// //Console.WriteLine("Alert: Code."); -// //Console.WriteLine(token.Code); - -// var environmentVariableMatch = EnvVarRegex.Match(token.Code); -// if (!environmentVariableMatch.Success) return token; - -// var code = EnvironmentVariableUtil.ReplaceEnvironmentVariables(token.Code, environmentVariableMatch); - -// return new MarkdownCodeBlockToken(token.Rule, token.Context, code, token.Lang, token.SourceInfo); -// } -// } -//} diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableInLinkInlineRule.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableInLinkInlineRule.cs deleted file mode 100644 index ed873bb78d..0000000000 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableInLinkInlineRule.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System.Text; -using System.Text.RegularExpressions; - -namespace LuceneDocsPlugins -{ - /* - * 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. - */ - - /// - /// Replaces an environment variables that are nested within the text, href, or title of a Markdown link. - /// - public class EnvironmentVariableInLinkInlineRule : MarkdownLinkInlineRule - { - public override string Name => "EnvVar.Link"; - - public static readonly Regex EnvVarRegex = EnvironmentVariableUtil.EnvVarRegexInline; - - public override IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context) - { - // NOTE: This copies the logic from MarkdownLinkInlineRule, but does not match if there are no links to replace. - // This isn't perfect, but at least it ensures we only match the one [Changes]() link it is intended to match - // and replaces multiple environment variables if they exist. - - // The when the Consume() method below is called, there doesn't appear to be any way to make the cursor backtrack, - // and the scan is only performed once. This is why we have to resort to this. Not sure if there is a better way to make - // nested tokens than this, but it doesn't seem like there is. - - var match = Link.Match(context.CurrentMarkdown); - if (match.Length == 0) - { - return null; - } - if (MarkdownInlineContext.GetIsInLink(parser.Context) && match.Value[0] != '!') - { - return null; - } - if (IsEscape(match.Groups[1].Value) || IsEscape(match.Groups[2].Value)) - { - return null; - } - - var text = match.Groups[1].Value; - var title = match.Groups[4].Value; - var href = match.Groups[2].Value; - - var textMatch = EnvVarRegex.Match(text); - var titleMatch = EnvVarRegex.Match(title); - var hrefMatch = EnvVarRegex.Match(href); - - // Don't match unless we have a match for our EnvVar pattern in any part of the link - if (!textMatch.Success && !titleMatch.Success && !hrefMatch.Success) - return null; - - StringBuilder scratch = null; - - if (textMatch.Success || titleMatch.Success || hrefMatch.Success) - scratch = new StringBuilder(); - - if (textMatch.Success) - text = EnvironmentVariableUtil.ReplaceEnvironmentVariables(text, textMatch, scratch); - if (titleMatch.Success) - title = EnvironmentVariableUtil.ReplaceEnvironmentVariables(title, titleMatch, scratch); - if (hrefMatch.Success) - href = EnvironmentVariableUtil.ReplaceEnvironmentVariables(href, hrefMatch, scratch); - - var sourceInfo = context.Consume(match.Length); - return GenerateToken(parser, href, title, text, match.Value[0] == '!', sourceInfo, MarkdownLinkType.NormalLink, null); - } - - private bool IsEscape(string text) - { - for (int i = text.Length - 1; i >= 0; i--) - { - if (text[i] != '\\') - { - return (text.Length - i) % 2 == 0; - } - } - return text.Length % 2 == 1; - } - } -} diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs deleted file mode 100644 index 5085b3df7f..0000000000 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableInlineRule.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -namespace LuceneDocsPlugins -{ - /* - * 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. - */ - - public class EnvironmentVariableInlineRule : IMarkdownRule - { - // give it a name - public string Name => "EnvVarToken"; - - // process the match - public IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context) - { - // TODO: This does not process this token from within a code block like - - // ``` - // dotnet tool install lucene-cli -g --version [EnvVar: LuceneNetVersion] - // ``` - - //Console.Write(context.CurrentMarkdown); - //Console.WriteLine("------------------------------------------------------------------------------"); - - var match = EnvironmentVariableUtil.EnvVarRegex.Match(context.CurrentMarkdown); - - if (!match.Success) return null; - - var envVar = match.Groups[1].Value; - var text = Environment.GetEnvironmentVariable(envVar); - if (text == null) return null; - - // 'eat' the characters of the current markdown token so they anr - var sourceInfo = context.Consume(match.Length); - return new MarkdownTextToken(this, parser.Context, text, sourceInfo); - } - } -} diff --git a/src/docs/LuceneDocsPlugins/EnvironmentVariableRendererPart.cs b/src/docs/LuceneDocsPlugins/EnvironmentVariableRendererPart.cs deleted file mode 100644 index 9fa48b613b..0000000000 --- a/src/docs/LuceneDocsPlugins/EnvironmentVariableRendererPart.cs +++ /dev/null @@ -1,40 +0,0 @@ -//using Microsoft.DocAsCode.Dfm; -//using Microsoft.DocAsCode.MarkdownLite; - -//namespace LuceneDocsPlugins -//{ -// /* -// * 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. -// */ - -// // TODO: this is actually not needed since we are inserting our own inline rule, although the docs -// // claim we need it https://dotnet.github.io/docfx/tutorial/howto_customize_docfx_flavored_markdown.html -// // maybe that is only the case for block level items? I cannot quite figure it out looking at the docfx code - -// /// -// /// Used to replace environment variables tokens with their values -// /// -// public sealed class EnvironmentVariableRendererPart : DfmCustomizedRendererPartBase -// { -// public override string Name => "EnvironmentVariableRendererPart"; - -// public override bool Match(IMarkdownRenderer renderer, MarkdownTextToken token, MarkdownInlineContext context) -// => true; - -// public override StringBuffer Render(IMarkdownRenderer renderer, MarkdownTextToken token, MarkdownInlineContext context) -// => token.Content; -// } -//} \ No newline at end of file diff --git a/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs b/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs deleted file mode 100644 index 5c0b8a6175..0000000000 --- a/src/docs/LuceneDocsPlugins/LuceneDfmEngineCustomizer.cs +++ /dev/null @@ -1,69 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Collections.Immutable; -//using System.Composition; -//using Microsoft.DocAsCode.Dfm; -//using Microsoft.DocAsCode.MarkdownLite; - -//namespace LuceneDocsPlugins -//{ -// /* -// * 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. -// */ - -// /// -// /// Exports our custom markdown parser via MEF to DocFx -// /// -// [Export(typeof(IDfmEngineCustomizer))] -// public class LuceneDfmEngineCustomizer : IDfmEngineCustomizer -// { -// public void Customize(DfmEngineBuilder builder, IReadOnlyDictionary parameters) -// { -// // insert inline rule at the top -// builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInLinkInlineRule()); -// builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableInlineRule()); -// // LUCENENET TODO: The inline text replacement still isn't working. Not sure why. -// //builder.InlineRules = builder.InlineRules.Insert(0, new EnvironmentVariableDfmTextInlineRule()); - -// //// Find the MarkdownLinkInlineRule position, and insert rules to replace text within the link before it -// //var markdownLinkInlineRuleIndex = builder.InlineRules.FindIndex(r => r is MarkdownLinkInlineRule); -// //builder.InlineRules.Insert(markdownLinkInlineRuleIndex, new EnvironmentVariableInLinkInlineRule()); - -// //builder.InlineRules = Replace(builder.InlineRules); - -// // insert block rule above header rule. Why? I dunno, that's what the docs say: -// // https://dotnet.github.io/docfx/tutorial/intro_markdown_lite.html#select-token-kind -// var blockIndex = builder.BlockRules.FindIndex(r => r is MarkdownHeadingBlockRule); -// builder.BlockRules = builder.BlockRules.Insert(blockIndex, new LuceneNoteBlockRule()); - -// // LUCENENET TODO: The code replacement still isn't working (or even matching). Not sure why. -// //builder.BlockRules = Replace(builder.BlockRules); -// } - -// private static ImmutableList Replace(ImmutableList blockRules) -// where TSource : IMarkdownRule -// where TReplacement : IMarkdownRule, new() -// { -// var index = blockRules.FindIndex(item => item is TSource); -// if (index < 0) -// { -// throw new ArgumentException($"{typeof(TSource).Name} should exist!"); -// } -// blockRules = blockRules.Insert(index, new TReplacement()); -// return blockRules.RemoveAt(index + 1); -// } -// } -//} diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs b/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs deleted file mode 100644 index 15cb039c2f..0000000000 --- a/src/docs/LuceneDocsPlugins/LuceneNoteBlockRule.cs +++ /dev/null @@ -1,46 +0,0 @@ -//using System.Text.RegularExpressions; -//using Microsoft.DocAsCode.MarkdownLite; - -//namespace LuceneDocsPlugins -//{ -// /* -// * 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. -// */ - -// /// -// /// The regex rule to parse out the custom Lucene tokens -// /// -// public class LuceneNoteBlockRule : IMarkdownRule -// { -// // TODO: I think there's an issue with this regex and multi-line or something, for example see: DrillDownQuery class -// // since this isn't matching it's experimental tag (there's lots of others too) -// public virtual Regex LabelRegex { get; } = new Regex("^@lucene\\.(?(experimental|internal))", RegexOptions.Compiled); - -// public virtual IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context) -// { - -// var match = LabelRegex.Match(context.CurrentMarkdown); -// if (match.Length == 0) -// { -// return null; -// } -// var sourceInfo = context.Consume(match.Length); -// return new LuceneNoteBlockToken(this, parser.Context, match.Groups[1].Value, sourceInfo); -// } - -// public virtual string Name => "LuceneNote"; -// } -//} diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs b/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs deleted file mode 100644 index dffcfb6a6d..0000000000 --- a/src/docs/LuceneDocsPlugins/LuceneNoteBlockToken.cs +++ /dev/null @@ -1,44 +0,0 @@ -//using Microsoft.DocAsCode.MarkdownLite; - -//namespace LuceneDocsPlugins -//{ -// /* -// * 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. -// */ - -// /// -// /// A custom token class representing our custom Lucene tokens -// /// -// public class LuceneNoteBlockToken : IMarkdownToken -// { -// public LuceneNoteBlockToken(IMarkdownRule rule, IMarkdownContext context, string label, SourceInfo sourceInfo) -// { -// Rule = rule; -// Context = context; -// Label = label; -// SourceInfo = sourceInfo; -// } - -// public IMarkdownRule Rule { get; } - -// public IMarkdownContext Context { get; } - -// public string Label { get; } - -// public SourceInfo SourceInfo { get; } -// } - -//} diff --git a/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs b/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs deleted file mode 100644 index 95fb04dca2..0000000000 --- a/src/docs/LuceneDocsPlugins/LuceneNoteTokenRendererPart.cs +++ /dev/null @@ -1,52 +0,0 @@ -//using Microsoft.DocAsCode.Dfm; -//using Microsoft.DocAsCode.MarkdownLite; -//using System.Text; - -//namespace LuceneDocsPlugins -//{ -// /* -// * 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. -// */ - -// /// -// /// Used to replace custom Lucene tokens with custom HTML markup -// /// -// public sealed class LuceneNoteTokenRendererPart : DfmCustomizedRendererPartBase -// { -// private const string ExperimentalMessage = "This API is experimental and might change in incompatible ways in the next release."; -// private const string InternalMessage = "This API is for internal purposes only and might change in incompatible ways in the next release."; - -// private readonly StringBuilder builder = new StringBuilder(); - -// public override string Name => "LuceneTokenRendererPart"; - -// public override bool Match(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) -// => true; - -// public override StringBuffer Render(IMarkdownRenderer renderer, LuceneNoteBlockToken token, MarkdownBlockContext context) -// { -// string message = token.Label.ToUpperInvariant() == "INTERNAL" ? InternalMessage : ExperimentalMessage; - -// builder.Clear(); // Reuse string builder -// builder.AppendLine("
"); -// builder.AppendLine("
Note
"); -// builder.Append("

").Append(message).AppendLine("

"); -// builder.AppendLine("
"); -// return builder.ToString(); -// //return "
" + string.Format(Message, token.Label.ToUpper()) + "
"; -// } -// } -//} diff --git a/src/docs/LuceneDocsPlugins/RendererPartProvider.cs b/src/docs/LuceneDocsPlugins/RendererPartProvider.cs deleted file mode 100644 index aa778c54f7..0000000000 --- a/src/docs/LuceneDocsPlugins/RendererPartProvider.cs +++ /dev/null @@ -1,40 +0,0 @@ -//using System.Collections.Generic; -//using System.Composition; -//using Microsoft.DocAsCode.Dfm; - -//namespace LuceneDocsPlugins -//{ -// /* -// * 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. -// */ - -// /// -// /// Exports our custom renderer via MEF to DocFx -// /// -// [Export(typeof(IDfmCustomizedRendererPartProvider))] -// public class RendererPartProvider : IDfmCustomizedRendererPartProvider -// { -// private readonly LuceneNoteTokenRendererPart luceneNoteTokenRendererPart = new LuceneNoteTokenRendererPart(); - -// public IEnumerable CreateParts(IReadOnlyDictionary parameters) -// { -// yield return luceneNoteTokenRendererPart; -// //yield return new EnvironmentVariableRendererPart(); -// //yield return new EnvironmentVariableBlockRendererPart(); -// } -// } - -//} diff --git a/src/dotnet/tools/lucene-cli/docs/index.md b/src/dotnet/tools/lucene-cli/docs/index.md index 88da7a3a94..054f22a94f 100644 --- a/src/dotnet/tools/lucene-cli/docs/index.md +++ b/src/dotnet/tools/lucene-cli/docs/index.md @@ -11,7 +11,7 @@ The Lucene.NET command line interface (CLI) is a new cross-platform toolchain wi Perform a one-time install of the lucene-cli tool using the following dotnet CLI command: ```console -dotnet tool install lucene-cli -g --version 4.8.0-beta00016 +dotnet tool install lucene-cli -g --version EnvVar:LuceneNetVersion ``` > [!NOTE] diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 6f0642d18a..f360b42d1f 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -180,10 +180,6 @@ if ($? -and $DisableMetaData -eq $false) { } if ($? -and $DisableBuild -eq $false) { - # HACK: DocFx doesn't seem to work with fenced code blocks, so we update the lucene-cli index file manually. - # Note it works better this way anyway because we can store a real version number in the file in the repo. - (Get-Content -Path $CliIndexPath -Raw) -Replace '(?<=--version\s)\d+?\.\d+?\.\d+?(?:\.\d+?)?(?:-\w+)?', $LuceneNetVersion | Set-Content -Path $CliIndexPath - # Update our TOC to the latest LuceneNetVersion (Get-Content -Path $TocPath1 -Raw) -Replace '(?<=lucenenet\.apache\.org\/docs\/)\d+?\.\d+?\.\d+?(?:\.\d+?)?(?:-\w+)?', $LuceneNetVersion | Set-Content -Path $TocPath1 (Get-Content -Path $TocPath2 -Raw) -Replace '(?<=lucenenet\.apache\.org\/docs\/)\d+?\.\d+?\.\d+?(?:\.\d+?)?(?:-\w+)?', $LuceneNetVersion | Set-Content -Path $TocPath2 From fd191f94832d9377b885989ff991f257e3f9cc7a Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Tue, 17 Sep 2024 22:04:23 -0600 Subject: [PATCH 13/36] Fix toc.yml resolution --- websites/apidocs/docfx.analysis-common.json | 5 ++++- websites/apidocs/docfx.analysis-kuromoji.json | 5 ++++- websites/apidocs/docfx.analysis-morfologik.json | 5 ++++- websites/apidocs/docfx.analysis-opennlp.json | 5 ++++- websites/apidocs/docfx.analysis-phonetic.json | 5 ++++- websites/apidocs/docfx.analysis-smartcn.json | 5 ++++- websites/apidocs/docfx.analysis-stempel.json | 5 ++++- websites/apidocs/docfx.benchmark.json | 5 ++++- websites/apidocs/docfx.classification.json | 5 ++++- websites/apidocs/docfx.codecs.json | 5 ++++- websites/apidocs/docfx.core.json | 5 ++++- websites/apidocs/docfx.demo.json | 5 ++++- websites/apidocs/docfx.expressions.json | 5 ++++- websites/apidocs/docfx.facet.json | 5 ++++- websites/apidocs/docfx.grouping.json | 5 ++++- websites/apidocs/docfx.highlighter.json | 5 ++++- websites/apidocs/docfx.icu.json | 5 ++++- websites/apidocs/docfx.join.json | 5 ++++- websites/apidocs/docfx.json | 2 +- websites/apidocs/docfx.memory.json | 5 ++++- websites/apidocs/docfx.misc.json | 5 ++++- websites/apidocs/docfx.queries.json | 5 ++++- websites/apidocs/docfx.queryparser.json | 5 ++++- websites/apidocs/docfx.replicator.json | 5 ++++- websites/apidocs/docfx.sandbox.json | 5 ++++- websites/apidocs/docfx.site.json | 3 +-- websites/apidocs/docfx.spatial.json | 5 ++++- websites/apidocs/docfx.suggest.json | 5 ++++- websites/apidocs/docfx.test-framework.json | 5 ++++- 29 files changed, 110 insertions(+), 30 deletions(-) diff --git a/websites/apidocs/docfx.analysis-common.json b/websites/apidocs/docfx.analysis-common.json index 3660723bcd..e73cf49330 100644 --- a/websites/apidocs/docfx.analysis-common.json +++ b/websites/apidocs/docfx.analysis-common.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/analysis-common" }, { "files": [ - "./toc.yml", + "toc.yml", "analysis-common/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.analysis-kuromoji.json b/websites/apidocs/docfx.analysis-kuromoji.json index e1ec1383c1..65d82b8687 100644 --- a/websites/apidocs/docfx.analysis-kuromoji.json +++ b/websites/apidocs/docfx.analysis-kuromoji.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/analysis-kuromoji" }, { "files": [ - "./toc.yml", + "toc.yml", "analysis-kuromoji/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.analysis-morfologik.json b/websites/apidocs/docfx.analysis-morfologik.json index b1e4c2090f..aa9aab796e 100644 --- a/websites/apidocs/docfx.analysis-morfologik.json +++ b/websites/apidocs/docfx.analysis-morfologik.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/analysis-morfologik" }, { "files": [ - "./toc.yml", + "toc.yml", "analysis-morfologik/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.analysis-opennlp.json b/websites/apidocs/docfx.analysis-opennlp.json index 98abbc158d..6b89708bc5 100644 --- a/websites/apidocs/docfx.analysis-opennlp.json +++ b/websites/apidocs/docfx.analysis-opennlp.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/analysis-opennlp" }, { "files": [ - "./toc.yml", + "toc.yml", "analysis-opennlp/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.analysis-phonetic.json b/websites/apidocs/docfx.analysis-phonetic.json index c7fbb6afeb..8ba70561be 100644 --- a/websites/apidocs/docfx.analysis-phonetic.json +++ b/websites/apidocs/docfx.analysis-phonetic.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/analysis-phonetic" }, { "files": [ - "./toc.yml", + "toc.yml", "analysis-phonetic/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.analysis-smartcn.json b/websites/apidocs/docfx.analysis-smartcn.json index 09b08e6ffd..5e50f2fe5a 100644 --- a/websites/apidocs/docfx.analysis-smartcn.json +++ b/websites/apidocs/docfx.analysis-smartcn.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/analysis-smartcn" }, { "files": [ - "./toc.yml", + "toc.yml", "analysis-smartcn/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.analysis-stempel.json b/websites/apidocs/docfx.analysis-stempel.json index 969be28deb..53b019c202 100644 --- a/websites/apidocs/docfx.analysis-stempel.json +++ b/websites/apidocs/docfx.analysis-stempel.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/analysis-stempel" }, { "files": [ - "./toc.yml", + "toc.yml", "analysis-stempel/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.benchmark.json b/websites/apidocs/docfx.benchmark.json index f201370e2c..9ab3ab5c52 100644 --- a/websites/apidocs/docfx.benchmark.json +++ b/websites/apidocs/docfx.benchmark.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/benchmark" }, { "files": [ - "./toc.yml", + "toc.yml", "benchmark/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.classification.json b/websites/apidocs/docfx.classification.json index 770cb9ab85..9e7e94f897 100644 --- a/websites/apidocs/docfx.classification.json +++ b/websites/apidocs/docfx.classification.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/classification" }, { "files": [ - "./toc.yml", + "toc.yml", "classification/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.codecs.json b/websites/apidocs/docfx.codecs.json index 82c4bbc911..e7de71f605 100644 --- a/websites/apidocs/docfx.codecs.json +++ b/websites/apidocs/docfx.codecs.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/codecs" }, { "files": [ - "./toc.yml", + "toc.yml", "codecs/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.core.json b/websites/apidocs/docfx.core.json index de92ac9e1a..2a95da6fc0 100644 --- a/websites/apidocs/docfx.core.json +++ b/websites/apidocs/docfx.core.json @@ -33,11 +33,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/core" }, { "files": [ - "./toc.yml", + "toc.yml", "core/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.demo.json b/websites/apidocs/docfx.demo.json index fff0070518..a341e63fab 100644 --- a/websites/apidocs/docfx.demo.json +++ b/websites/apidocs/docfx.demo.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/demo" }, { "files": [ - "./toc.yml", + "toc.yml", "demo/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.expressions.json b/websites/apidocs/docfx.expressions.json index dd1d29b168..da28b2222c 100644 --- a/websites/apidocs/docfx.expressions.json +++ b/websites/apidocs/docfx.expressions.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/expressions" }, { "files": [ - "./toc.yml", + "toc.yml", "expressions/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.facet.json b/websites/apidocs/docfx.facet.json index 96404fdd40..26dee3514e 100644 --- a/websites/apidocs/docfx.facet.json +++ b/websites/apidocs/docfx.facet.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/facet" }, { "files": [ - "./toc.yml", + "toc.yml", "facet/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.grouping.json b/websites/apidocs/docfx.grouping.json index 4db6beedab..f3b7f0f607 100644 --- a/websites/apidocs/docfx.grouping.json +++ b/websites/apidocs/docfx.grouping.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/grouping" }, { "files": [ - "./toc.yml", + "toc.yml", "grouping/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.highlighter.json b/websites/apidocs/docfx.highlighter.json index ffbcbca1ee..9b8f46b1ad 100644 --- a/websites/apidocs/docfx.highlighter.json +++ b/websites/apidocs/docfx.highlighter.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/highlighter" }, { "files": [ - "./toc.yml", + "toc.yml", "highlighter/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.icu.json b/websites/apidocs/docfx.icu.json index 0787a690a3..9840ff41f9 100644 --- a/websites/apidocs/docfx.icu.json +++ b/websites/apidocs/docfx.icu.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/icu" }, { "files": [ - "./toc.yml", + "toc.yml", "icu/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.join.json b/websites/apidocs/docfx.join.json index ae239e816e..81b4b55a14 100644 --- a/websites/apidocs/docfx.join.json +++ b/websites/apidocs/docfx.join.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/join" }, { "files": [ - "./toc.yml", + "toc.yml", "join/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.json b/websites/apidocs/docfx.json index 65b6deedd6..dc6c94c254 100644 --- a/websites/apidocs/docfx.json +++ b/websites/apidocs/docfx.json @@ -559,7 +559,7 @@ }, { "files": [ - "./toc.yml", + "toc.yml", "*.md", "web.config" ] diff --git a/websites/apidocs/docfx.memory.json b/websites/apidocs/docfx.memory.json index 7e4d3fe131..48ca268e52 100644 --- a/websites/apidocs/docfx.memory.json +++ b/websites/apidocs/docfx.memory.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/memory" }, { "files": [ - "./toc.yml", + "toc.yml", "memory/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.misc.json b/websites/apidocs/docfx.misc.json index c9213c649f..f7cd8bd07b 100644 --- a/websites/apidocs/docfx.misc.json +++ b/websites/apidocs/docfx.misc.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/misc" }, { "files": [ - "./toc.yml", + "toc.yml", "misc/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.queries.json b/websites/apidocs/docfx.queries.json index 255d2221cd..3194fb1ee4 100644 --- a/websites/apidocs/docfx.queries.json +++ b/websites/apidocs/docfx.queries.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/queries" }, { "files": [ - "./toc.yml", + "toc.yml", "queries/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.queryparser.json b/websites/apidocs/docfx.queryparser.json index 8e11bbb1d8..063ad735fd 100644 --- a/websites/apidocs/docfx.queryparser.json +++ b/websites/apidocs/docfx.queryparser.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/queryparser" }, { "files": [ - "./toc.yml", + "toc.yml", "queryparser/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.replicator.json b/websites/apidocs/docfx.replicator.json index 839e1553e3..3d66dcb543 100644 --- a/websites/apidocs/docfx.replicator.json +++ b/websites/apidocs/docfx.replicator.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/replicator" }, { "files": [ - "./toc.yml", + "toc.yml", "replicator/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.sandbox.json b/websites/apidocs/docfx.sandbox.json index 41a0583436..ba4cc607e5 100644 --- a/websites/apidocs/docfx.sandbox.json +++ b/websites/apidocs/docfx.sandbox.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/sandbox" }, { "files": [ - "./toc.yml", + "toc.yml", "sandbox/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.site.json b/websites/apidocs/docfx.site.json index 0884d127eb..fd30bc01e1 100644 --- a/websites/apidocs/docfx.site.json +++ b/websites/apidocs/docfx.site.json @@ -3,7 +3,7 @@ "content": [ { "files": [ - "./toc.yml", + "toc.yml", "*.md" ] }, @@ -68,7 +68,6 @@ "postProcessors": [ "AggregatePostProcessor" ], - "markdownEngineName": "dfm", "noLangKeyword": false, "keepFileLink": false, "cleanupCacheHistory": false, diff --git a/websites/apidocs/docfx.spatial.json b/websites/apidocs/docfx.spatial.json index 72e0432dff..db537f3a87 100644 --- a/websites/apidocs/docfx.spatial.json +++ b/websites/apidocs/docfx.spatial.json @@ -26,11 +26,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/spatial" }, { "files": [ - "./toc.yml", + "toc.yml", "spatial/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.suggest.json b/websites/apidocs/docfx.suggest.json index 2f5d10344f..7877d67cfc 100644 --- a/websites/apidocs/docfx.suggest.json +++ b/websites/apidocs/docfx.suggest.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/suggest" }, { "files": [ - "./toc.yml", + "toc.yml", "suggest/toc.yml" ], "src": "toc" diff --git a/websites/apidocs/docfx.test-framework.json b/websites/apidocs/docfx.test-framework.json index bb52149a5c..0c5df15541 100644 --- a/websites/apidocs/docfx.test-framework.json +++ b/websites/apidocs/docfx.test-framework.json @@ -32,11 +32,14 @@ "**.yml", "**.md" ], + "exclude": [ + "toc.yml" + ], "src": "obj/docfx/api/test-framework" }, { "files": [ - "./toc.yml", + "toc.yml", "test-framework/toc.yml" ], "src": "toc" From f4250e9cddedec93b8693e6b06cab6f662110ce8 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Tue, 17 Sep 2024 22:26:35 -0600 Subject: [PATCH 14/36] Filter out Lucene.Net.RandomExtensions from test-framework for now to prevent incorrect links to core, add slash after _rel for search worker --- .../Templates/DefaultTemplateNoAssets/partials/_head.liquid | 2 +- .../DefaultTemplateNoAssets/partials/head.tmpl.partial | 2 +- websites/apidocs/docfx.test-framework.json | 1 + websites/apidocs/filterConfig.yml | 5 ++++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid index 96dc4c32e5..cc6b1e9e8a 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid @@ -30,7 +30,7 @@ {%- endif -%} {%- if _enableSearch -%} - + {%- endif -%} {%- if _enableNewTab -%} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial index 064de9db10..dbe0d780cd 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial @@ -15,6 +15,6 @@ {{#_noindex}}{{/_noindex}} - {{#_enableSearch}}{{/_enableSearch}} + {{#_enableSearch}}{{/_enableSearch}} {{#_enableNewTab}}{{/_enableNewTab}} diff --git a/websites/apidocs/docfx.test-framework.json b/websites/apidocs/docfx.test-framework.json index 0c5df15541..02288bb7c8 100644 --- a/websites/apidocs/docfx.test-framework.json +++ b/websites/apidocs/docfx.test-framework.json @@ -14,6 +14,7 @@ } ], "dest": "obj/docfx/api/test-framework", + "filter": "filterConfig.yml", "properties": { "TargetFramework": "net6.0" } diff --git a/websites/apidocs/filterConfig.yml b/websites/apidocs/filterConfig.yml index 4a7b065758..92f3472371 100644 --- a/websites/apidocs/filterConfig.yml +++ b/websites/apidocs/filterConfig.yml @@ -4,4 +4,7 @@ apiRules: type: Field - exclude: uidRegex: ^Lucene\.Net\.Test$ - type: Namespace \ No newline at end of file + type: Namespace +- exclude: + uidRegex: ^Lucene\.Net\.RandomExtensions$ + type: Class From 8d4abcd8346fa09ae1c2b3063c6e9d76b638763e Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 22 Sep 2024 11:08:02 -0600 Subject: [PATCH 15/36] Fix _rel path by introducing new _luceneNetRel global variable; add ExtractSearchIndex post-processor --- .../DefaultTemplateNoAssets/partials/_head.liquid | 12 ++++++------ .../DefaultTemplateNoAssets/partials/_logo.liquid | 6 +++--- .../DefaultTemplateNoAssets/partials/_scripts.liquid | 6 +++--- .../partials/head.tmpl.partial | 10 +++++----- .../partials/logo.tmpl.partial | 4 ++-- .../partials/scripts.tmpl.partial | 6 +++--- .../LuceneTemplate/partials/logo.tmpl.partial | 2 +- websites/apidocs/docfx.global.json | 5 +++-- websites/apidocs/docfx.global.subsite.json | 5 +++-- websites/apidocs/docfx.site.json | 1 + websites/apidocs/docs.ps1 | 1 + websites/apidocs/toc.yml | 3 ++- websites/apidocs/toc/toc.yml | 5 +++-- .../partials/head-content.tmpl.partial | 6 +++--- 14 files changed, 39 insertions(+), 33 deletions(-) diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid index cc6b1e9e8a..644653ba17 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_head.liquid @@ -17,20 +17,20 @@ {%- endif -%} {%- if _appFaviconPath -%} - + {%- else -%} - + {%- endif -%} - - - + + + {%- if _noindex -%} {%- endif -%} {%- if _enableSearch -%} - + {%- endif -%} {%- if _enableNewTab -%} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid index 85922ab504..b9b4c51f09 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_logo.liquid @@ -1,8 +1,8 @@ {% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} - + {%- if _appLogoPath -%} - + {%- else -%} - + {%- endif -%} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid index fa95fcd7b9..1b6c74ddc4 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/_scripts.liquid @@ -1,4 +1,4 @@ {% comment -%}Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.{% endcomment -%} - - - + + + diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial index dbe0d780cd..74a29d04e9 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/head.tmpl.partial @@ -8,13 +8,13 @@ {{#_description}}{{/_description}} - - - - + + + + {{#_noindex}}{{/_noindex}} - {{#_enableSearch}}{{/_enableSearch}} + {{#_enableSearch}}{{/_enableSearch}} {{#_enableNewTab}}{{/_enableNewTab}} diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial index 5cb694628a..ff19fdc116 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/logo.tmpl.partial @@ -1,5 +1,5 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - - + + diff --git a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial index 73dada5141..99d3fe9af2 100644 --- a/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial +++ b/websites/apidocs/Templates/DefaultTemplateNoAssets/partials/scripts.tmpl.partial @@ -1,5 +1,5 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - - - + + + diff --git a/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial b/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial index ee0b7d6415..38c3a82ad3 100644 --- a/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial +++ b/websites/apidocs/Templates/LuceneTemplate/partials/logo.tmpl.partial @@ -1,5 +1,5 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - + diff --git a/websites/apidocs/docfx.global.json b/websites/apidocs/docfx.global.json index 6bc0eda9ee..d27732fdab 100644 --- a/websites/apidocs/docfx.global.json +++ b/websites/apidocs/docfx.global.json @@ -1,9 +1,10 @@ { - "_appTitle": "Apache Lucene.NET 4.8.0-beta00016 Documentation", + "_appTitle": "Apache Lucene.NET 4.8.0-ci Documentation", "_disableContribution": false, "_appFaviconPath": "logo/favicon.ico", "_enableSearch": true, "_appLogoPath": "logo/lucene-net-color.png", "_appFooter": "Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
", - "_gitSource": "https://github.com/apache/lucenenet.git" + "_gitSource": "https://github.com/apache/lucenenet.git", + "_luceneNetRel": "http://localhost:8080/" } diff --git a/websites/apidocs/docfx.global.subsite.json b/websites/apidocs/docfx.global.subsite.json index f08744a58b..d578ee0233 100644 --- a/websites/apidocs/docfx.global.subsite.json +++ b/websites/apidocs/docfx.global.subsite.json @@ -1,4 +1,5 @@ { - "_rel": "https://lucenenet.apache.org/docs/4.8.0-beta00009", - "_api": "https://lucenenet.apache.org/docs/4.8.0-beta00016/" + "_api": "https://lucenenet.apache.org/docs/4.8.0-ci/" } + + diff --git a/websites/apidocs/docfx.site.json b/websites/apidocs/docfx.site.json index fd30bc01e1..a4fc34e6f1 100644 --- a/websites/apidocs/docfx.site.json +++ b/websites/apidocs/docfx.site.json @@ -66,6 +66,7 @@ "Templates/LuceneTemplateAssets" ], "postProcessors": [ + "ExtractSearchIndex", "AggregatePostProcessor" ], "noLangKeyword": false, diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index f360b42d1f..55cf9700fe 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -127,6 +127,7 @@ $DocFxJsonContent._appFooter = "Copyright © $((Get-Date).Year) The Apache S $DocFxJsonContent._appTitle = "Apache Lucene.NET $LuceneNetVersion Documentation" #$DocFxJsonContent._gitContribute.branch = "docs/$LuceneNetVersion" #$DocFxJsonContent._gitContribute.tag = "$VCSLabel" +$DocFxJsonContent._luceneNetRel = $BaseUrl + "/" $DocFxJsonContent | ConvertTo-Json -depth 100 | Set-Content $DocFxGlobalJson # update the docfx.json file diff --git a/websites/apidocs/toc.yml b/websites/apidocs/toc.yml index 69eedd7c4d..adb25fea57 100644 --- a/websites/apidocs/toc.yml +++ b/websites/apidocs/toc.yml @@ -1,5 +1,6 @@ +items: - name: Lucene.Net API - topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016/ + topicHref: https://lucenenet.apache.org/docs/4.8.0-ci/ - name: Lucene.Net CLI href: ../../src/dotnet/tools/lucene-cli/docs/ topicHref: ../../src/dotnet/tools/lucene-cli/docs/index.md diff --git a/websites/apidocs/toc/toc.yml b/websites/apidocs/toc/toc.yml index 20c51e9da4..15e75e80ac 100644 --- a/websites/apidocs/toc/toc.yml +++ b/websites/apidocs/toc/toc.yml @@ -1,7 +1,8 @@ +items: - name: Lucene.Net API - topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016 + topicHref: https://lucenenet.apache.org/docs/4.8.0-ci - name: Lucene.Net CLI - topicHref: https://lucenenet.apache.org/docs/4.8.0-beta00016/cli/index.html + topicHref: https://lucenenet.apache.org/docs/4.8.0-ci/cli/index.html - name: Lucene.Net Website topicHref: https://lucenenet.apache.org/ diff --git a/websites/site/lucenetemplate/partials/head-content.tmpl.partial b/websites/site/lucenetemplate/partials/head-content.tmpl.partial index e95c2d62bd..b207f9ea99 100644 --- a/websites/site/lucenetemplate/partials/head-content.tmpl.partial +++ b/websites/site/lucenetemplate/partials/head-content.tmpl.partial @@ -17,11 +17,11 @@ {{#_noindex}}{{/_noindex}} {{#_enableSearch}}{{/_enableSearch}} {{#_enableNewTab}}{{/_enableNewTab}} - + - + - \ No newline at end of file + From ef21a0f3e80f8afdf4d4493d0fca370cfa96a2d1 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 22 Sep 2024 11:15:09 -0600 Subject: [PATCH 16/36] Remove material theme file --- .../.idea/.idea.DocumentationTools/.idea/.gitignore | 4 +++- .../.idea/material_theme_project_new.xml | 13 ------------- 2 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore b/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore index 828f634208..44ad3a0e32 100644 --- a/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore +++ b/src/docs/.idea/.idea.DocumentationTools/.idea/.gitignore @@ -1,4 +1,4 @@ -# Default ignored files +# Default ignored files /shelf/ /workspace.xml # Rider ignored files @@ -11,3 +11,5 @@ # Datasource local storage ignored files /dataSources/ /dataSources.local.xml +/material_theme_project_new.xml + diff --git a/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml b/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml deleted file mode 100644 index d96f72ae34..0000000000 --- a/src/docs/.idea/.idea.DocumentationTools/.idea/material_theme_project_new.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file From e6c67422458de5cc3a737a23c3d2345567b6879d Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 22 Sep 2024 11:32:44 -0600 Subject: [PATCH 17/36] Remove SkipToolInstall flag since we now check the version; fix main site build and upgrade to latest docfx --- websites/apidocs/docs.ps1 | 35 ++++++++--------- websites/site/docfx.json | 3 +- .../partials/head-content.tmpl.partial | 2 +- .../lucenetemplate/partials/head.tmpl.partial | 2 +- websites/site/site.ps1 | 38 +++++++++++-------- 5 files changed, 42 insertions(+), 38 deletions(-) diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 55cf9700fe..627cac6c8c 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -23,7 +23,6 @@ param ( [string] $LuceneNetVersion, [switch] $ServeDocs = $false, [switch] $Clean = $false, - [switch] $SkipToolInstall = $false, # to speed up iteration if you already have the tool installed [switch] $DisableMetaData = $false, [switch] $DisableBuild = $false, [switch] $DisablePlugins = $false, @@ -65,27 +64,25 @@ $TocPath2 = Join-Path -Path $ApiDocsFolder -ChildPath "toc\toc.yml" $BreadcrumbPath = Join-Path -Path $ApiDocsFolder -ChildPath "docfx.global.subsite.json" # install docfx tool -if ($SkipToolInstall -eq $false) { - $InstallDocFx = $false - try { - $InstalledDocFxVersion = (& docfx --version).Trim().Split('+')[0] - - if ([version]$InstalledDocFxVersion -lt [version]$DocFxVersion) { - Write-Host "DocFx is installed, but the version is less than $DocFxVersion, will install it." - $InstallDocFx = $true - } - else { - Write-Host "DocFx is installed and the version is $InstalledDocFxVersion." - } - } catch { - Write-Host "DocFx is not installed or not in the PATH, will install it." +$InstallDocFx = $false +try { + $InstalledDocFxVersion = (& docfx --version).Trim().Split('+')[0] + + if ([version]$InstalledDocFxVersion -lt [version]$DocFxVersion) { + Write-Host "DocFx is installed, but the version is less than $DocFxVersion, will install it." $InstallDocFx = $true } - - if ($InstallDocFx -eq $true) { - Write-Host "Installing docfx global tool..." - dotnet tool install -g docfx --version $DocFxVersion + else { + Write-Host "DocFx is installed and the version is $InstalledDocFxVersion." } +} catch { + Write-Host "DocFx is not installed or not in the PATH, will install it." + $InstallDocFx = $true +} + +if ($InstallDocFx -eq $true) { + Write-Host "Installing docfx global tool..." + dotnet tool install -g docfx --version $DocFxVersion } # delete anything that already exists diff --git a/websites/site/docfx.json b/websites/site/docfx.json index 2fe7086826..6338c8d5a4 100644 --- a/websites/site/docfx.json +++ b/websites/site/docfx.json @@ -53,10 +53,9 @@ "lucenetemplate" ], "postProcessors": [], - "markdownEngineName": "markdig", "noLangKeyword": false, "keepFileLink": false, "cleanupCacheHistory": false, "disableGitFeatures": false } -} \ No newline at end of file +} diff --git a/websites/site/lucenetemplate/partials/head-content.tmpl.partial b/websites/site/lucenetemplate/partials/head-content.tmpl.partial index b207f9ea99..e63c0b4817 100644 --- a/websites/site/lucenetemplate/partials/head-content.tmpl.partial +++ b/websites/site/lucenetemplate/partials/head-content.tmpl.partial @@ -9,7 +9,7 @@ {{#_description}}{{/_description}} - + diff --git a/websites/site/lucenetemplate/partials/head.tmpl.partial b/websites/site/lucenetemplate/partials/head.tmpl.partial index 2a02a275dc..dfe3e4e724 100644 --- a/websites/site/lucenetemplate/partials/head.tmpl.partial +++ b/websites/site/lucenetemplate/partials/head.tmpl.partial @@ -9,7 +9,7 @@ {{#_description}}{{/_description}} - + diff --git a/websites/site/site.ps1 b/websites/site/site.ps1 index 241ebbb029..1e18cb6325 100644 --- a/websites/site/site.ps1 +++ b/websites/site/site.ps1 @@ -29,6 +29,8 @@ param ( $StagingPort = 8081 ) +$DocFxVersion = "2.77.0" # Required DocFx version + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName @@ -43,21 +45,27 @@ if ($Clean) { Remove-Item (Join-Path -Path $ToolsFolder "\*") -recurse -force -ErrorAction SilentlyContinue } -New-Item "$ToolsFolder\tmp" -type directory -force +# install docfx tool +$InstallDocFx = $false +try { + $InstalledDocFxVersion = (& docfx --version).Trim().Split('+')[0] -# Go get docfx.exe if we don't have it -New-Item "$ToolsFolder\docfx" -type directory -force -$DocFxExe = "$ToolsFolder\docfx\docfx.exe" -if (-not (test-path $DocFxExe)) -{ - Write-Host "Retrieving docfx..." - $DocFxZip = "$ToolsFolder\tmp\docfx.zip" - Invoke-WebRequest "https://github.com/dotnet/docfx/releases/download/v2.58/docfx.zip" -OutFile $DocFxZip -TimeoutSec 60 - #unzip - Expand-Archive $DocFxZip -DestinationPath (Join-Path -Path $ToolsFolder -ChildPath "docfx") + if ([version]$InstalledDocFxVersion -lt [version]$DocFxVersion) { + Write-Host "DocFx is installed, but the version is less than $DocFxVersion, will install it." + $InstallDocFx = $true + } + else { + Write-Host "DocFx is installed and the version is $InstalledDocFxVersion." + } +} catch { + Write-Host "DocFx is not installed or not in the PATH, will install it." + $InstallDocFx = $true } - Remove-Item -Recurse -Force "$ToolsFolder\tmp" +if ($InstallDocFx -eq $true) { + Write-Host "Installing docfx global tool..." + dotnet tool install -g docfx --version $DocFxVersion +} # delete anything that already exists if ($Clean) { @@ -75,11 +83,11 @@ if($?) { if ($ServeDocs -eq $false) { # build the output Write-Host "Building docs..." - & $DocFxExe build $DocFxJson -l "$DocFxLog" --loglevel $LogLevel + & docfx build $DocFxJson -l "$DocFxLog" --logLevel $LogLevel } else { # build + serve (for testing) Write-Host "starting website..." - & $DocFxExe $DocFxJson --serve --port $StagingPort + & docfx $DocFxJson --serve --port $StagingPort } -} \ No newline at end of file +} From b570a791ba6bc9fe60ce85fb4c9ec6fc381d4005 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 22 Sep 2024 13:49:39 -0600 Subject: [PATCH 18/36] Remove old excluded files; upgrade Docfx SDK to 2.77 --- .../LuceneDocsPlugins/LuceneDocsPlugins.csproj | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj index d1f47a2278..5e7db5f2f6 100644 --- a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj +++ b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj @@ -46,22 +46,9 @@ under the License. - - + + - - - - - - - - - - - - - From 6a09bc00b7dd4a29f7b65c3ec4f18a116549fee9 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 22 Sep 2024 13:50:32 -0600 Subject: [PATCH 19/36] Remove extra white space --- src/dotnet/tools/lucene-cli/docs/index.md | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/dotnet/tools/lucene-cli/docs/index.md b/src/dotnet/tools/lucene-cli/docs/index.md index 054f22a94f..22c22c6809 100644 --- a/src/dotnet/tools/lucene-cli/docs/index.md +++ b/src/dotnet/tools/lucene-cli/docs/index.md @@ -1,4 +1,4 @@ -# Lucene.NET command line interface (CLI) tools +# Lucene.NET command line interface (CLI) tools The Lucene.NET command line interface (CLI) is a new cross-platform toolchain with utilities for maintaining Lucene.NET and demos for learning basic Lucene.NET functionality. @@ -45,17 +45,3 @@ lucene index check C:\my-index --verbose lucene index fix C:\my-index ``` - - - - - - - - - - - - - - From 8d32220ddbe10a924cf8cbeeb80d7797dabe913e Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 22 Sep 2024 13:51:58 -0600 Subject: [PATCH 20/36] Make minimum .NET SDK version 8.0.100 --- websites/apidocs/docs.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 627cac6c8c..4037106b70 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -34,7 +34,7 @@ param ( [Parameter(Mandatory = $false)] [int] $StagingPort = 8080 ) -$MinimumSdkVersion = "8.0.204" # Minimum Required .NET SDK (must not be a pre-release) +$MinimumSdkVersion = "8.0.100" # Minimum Required .NET SDK (must not be a pre-release) $DocFxVersion = "2.77.0" # Required DocFx version $ErrorActionPreference = "Stop" From ab39281cc7c855ee1a36be93756f1fba83fe6d63 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 22 Sep 2024 14:02:18 -0600 Subject: [PATCH 21/36] Remove extra white space --- websites/apidocs/docfx.global.subsite.json | 3 +-- websites/apidocs/toc.yml | 16 +--------------- websites/apidocs/toc/toc.yml | 16 +--------------- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/websites/apidocs/docfx.global.subsite.json b/websites/apidocs/docfx.global.subsite.json index d578ee0233..89299bfa08 100644 --- a/websites/apidocs/docfx.global.subsite.json +++ b/websites/apidocs/docfx.global.subsite.json @@ -1,5 +1,4 @@ -{ +{ "_api": "https://lucenenet.apache.org/docs/4.8.0-ci/" } - diff --git a/websites/apidocs/toc.yml b/websites/apidocs/toc.yml index adb25fea57..557f9860db 100644 --- a/websites/apidocs/toc.yml +++ b/websites/apidocs/toc.yml @@ -1,4 +1,4 @@ -items: +items: - name: Lucene.Net API topicHref: https://lucenenet.apache.org/docs/4.8.0-ci/ - name: Lucene.Net CLI @@ -7,17 +7,3 @@ items: - name: Lucene.Net Website href: https://lucenenet.apache.org/ - - - - - - - - - - - - - - diff --git a/websites/apidocs/toc/toc.yml b/websites/apidocs/toc/toc.yml index 15e75e80ac..62a5be11fd 100644 --- a/websites/apidocs/toc/toc.yml +++ b/websites/apidocs/toc/toc.yml @@ -1,4 +1,4 @@ -items: +items: - name: Lucene.Net API topicHref: https://lucenenet.apache.org/docs/4.8.0-ci - name: Lucene.Net CLI @@ -6,17 +6,3 @@ items: - name: Lucene.Net Website topicHref: https://lucenenet.apache.org/ - - - - - - - - - - - - - - From cb9545fcde401dea9fdafabf3d99a3fb539f25e9 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 22 Sep 2024 14:48:42 -0600 Subject: [PATCH 22/36] Remove version from CLI docs install script --- src/dotnet/tools/lucene-cli/docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/tools/lucene-cli/docs/index.md b/src/dotnet/tools/lucene-cli/docs/index.md index 22c22c6809..b2faa976ae 100644 --- a/src/dotnet/tools/lucene-cli/docs/index.md +++ b/src/dotnet/tools/lucene-cli/docs/index.md @@ -11,7 +11,7 @@ The Lucene.NET command line interface (CLI) is a new cross-platform toolchain wi Perform a one-time install of the lucene-cli tool using the following dotnet CLI command: ```console -dotnet tool install lucene-cli -g --version EnvVar:LuceneNetVersion +dotnet tool install lucene-cli -g --prerelease ``` > [!NOTE] From 5cbdc1ce702fffea516b51a37d3635cf1d810be8 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 29 Sep 2024 18:09:03 -0600 Subject: [PATCH 23/36] Add version notes to CLI docs and restore version replacement, #911 --- src/dotnet/tools/lucene-cli/docs/index.md | 22 +++++++++++++++++++--- websites/apidocs/docs.ps1 | 14 ++++++-------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/dotnet/tools/lucene-cli/docs/index.md b/src/dotnet/tools/lucene-cli/docs/index.md index b2faa976ae..d7c6a1572f 100644 --- a/src/dotnet/tools/lucene-cli/docs/index.md +++ b/src/dotnet/tools/lucene-cli/docs/index.md @@ -8,14 +8,31 @@ The Lucene.NET command line interface (CLI) is a new cross-platform toolchain wi ## Installation -Perform a one-time install of the lucene-cli tool using the following dotnet CLI command: +Perform a one-time install of the lucene-cli tool using the [dotnet tool install](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install) command, +which will install the specified version: ```console -dotnet tool install lucene-cli -g --prerelease +dotnet tool install lucene-cli -g --version 4.8.0-beta00016 ``` + + > [!NOTE] > The version of the CLI you install should match the version of Lucene.NET you use. +> The version can be specified using the [`--version` option](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install#options) +> of the [`dotnet tool install`](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install) command. +> For a list of available versions, see the [versions tab of the lucene-cli NuGet package](https://www.nuget.org/packages/lucene-cli#versions-body-tab) +> or run the [dotnet tool list](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-list) +> command using the package id `lucene-cli`. You may then use the lucene-cli tool to analyze and update Lucene.NET indexes and use its demos. @@ -44,4 +61,3 @@ CLI command structure consists of the driver ("lucene"), the command, and possib lucene index check C:\my-index --verbose lucene index fix C:\my-index ``` - diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 4037106b70..769a5277af 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -122,17 +122,9 @@ $DocFxGlobalJson = Join-Path -Path $ApiDocsFolder "docfx.global.json" $DocFxJsonContent = Get-Content $DocFxGlobalJson | ConvertFrom-Json $DocFxJsonContent._appFooter = "Copyright © $((Get-Date).Year) The Apache Software Foundation, Licensed under the Apache License, Version 2.0
Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.
" $DocFxJsonContent._appTitle = "Apache Lucene.NET $LuceneNetVersion Documentation" -#$DocFxJsonContent._gitContribute.branch = "docs/$LuceneNetVersion" -#$DocFxJsonContent._gitContribute.tag = "$VCSLabel" $DocFxJsonContent._luceneNetRel = $BaseUrl + "/" $DocFxJsonContent | ConvertTo-Json -depth 100 | Set-Content $DocFxGlobalJson -# update the docfx.json file -#$DocFxJson = Join-Path -Path $ApiDocsFolder "docfx.json" -#$DocFxJsonContent = Get-Content $DocFxJson | ConvertFrom-Json -#$DocFxJsonContent.build.globalMetadata._gitContribute.branch = "docs/$LuceneNetVersion" -#$DocFxJsonContent.build.globalMetadata._gitContribute.tag = "$VCSLabel" - # NOTE: The order of these depends on if one of the projects requries the xref map of another, normally all require the core xref map $DocFxJsonMeta = @( "docfx.core.json", @@ -178,6 +170,12 @@ if ($? -and $DisableMetaData -eq $false) { } if ($? -and $DisableBuild -eq $false) { + # Update the lucene-cli docs `--version` argument to match the current version. + # This is to strike a balance between having the file have a real version number in source control + # and not having to remember to update the version in that file every time we release. + # Do not commit this change to the file unless you are doing a real version release. + (Get-Content -Path $CliIndexPath -Raw) -Replace '(?<=--version\s)\d+?\.\d+?\.\d+?(?:\.\d+?)?(?:-\w+)?', $LuceneNetVersion | Set-Content -Path $CliIndexPath + # Update our TOC to the latest LuceneNetVersion (Get-Content -Path $TocPath1 -Raw) -Replace '(?<=lucenenet\.apache\.org\/docs\/)\d+?\.\d+?\.\d+?(?:\.\d+?)?(?:-\w+)?', $LuceneNetVersion | Set-Content -Path $TocPath1 (Get-Content -Path $TocPath2 -Raw) -Replace '(?<=lucenenet\.apache\.org\/docs\/)\d+?\.\d+?\.\d+?(?:\.\d+?)?(?:-\w+)?', $LuceneNetVersion | Set-Content -Path $TocPath2 From c4ee56b93e35b836c513f6208dcf6701bd3e0ffe Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Tue, 8 Oct 2024 18:41:18 -0600 Subject: [PATCH 24/36] Use .NET 8 SDK in docs build pipeline --- .github/workflows/Lucene-Net-Documentation.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Lucene-Net-Documentation.yml b/.github/workflows/Lucene-Net-Documentation.yml index 2b8ad9feac..8097356521 100644 --- a/.github/workflows/Lucene-Net-Documentation.yml +++ b/.github/workflows/Lucene-Net-Documentation.yml @@ -121,7 +121,12 @@ jobs: - name: Setup .NET 6 SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: '6.0.101' + dotnet-version: '6.0.x' + + - name: Setup .NET 8 SDK + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' - name: Build docs run: ./main-repo/websites/apidocs/docs.ps1 -Clean -LuceneNetVersion ${{ env.RELEASE_VERSION }} From c98281a6a4fb81e6ed0aa32645250131d189f998 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Wed, 9 Oct 2024 20:29:14 -0600 Subject: [PATCH 25/36] Make docfx a local tool instead of global --- .config/dotnet-tools.json | 13 +++++++++++++ websites/apidocs/docs.ps1 | 33 ++++++++------------------------- 2 files changed, 21 insertions(+), 25 deletions(-) create mode 100644 .config/dotnet-tools.json diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000000..9fd034a4e1 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "docfx": { + "version": "2.77.0", + "commands": [ + "docfx" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 769a5277af..93fb25717e 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -35,7 +35,6 @@ param ( [int] $StagingPort = 8080 ) $MinimumSdkVersion = "8.0.100" # Minimum Required .NET SDK (must not be a pre-release) -$DocFxVersion = "2.77.0" # Required DocFx version $ErrorActionPreference = "Stop" @@ -64,26 +63,10 @@ $TocPath2 = Join-Path -Path $ApiDocsFolder -ChildPath "toc\toc.yml" $BreadcrumbPath = Join-Path -Path $ApiDocsFolder -ChildPath "docfx.global.subsite.json" # install docfx tool -$InstallDocFx = $false -try { - $InstalledDocFxVersion = (& docfx --version).Trim().Split('+')[0] - - if ([version]$InstalledDocFxVersion -lt [version]$DocFxVersion) { - Write-Host "DocFx is installed, but the version is less than $DocFxVersion, will install it." - $InstallDocFx = $true - } - else { - Write-Host "DocFx is installed and the version is $InstalledDocFxVersion." - } -} catch { - Write-Host "DocFx is not installed or not in the PATH, will install it." - $InstallDocFx = $true -} - -if ($InstallDocFx -eq $true) { - Write-Host "Installing docfx global tool..." - dotnet tool install -g docfx --version $DocFxVersion -} +$PreviousLocation = Get-Location +Set-Location $RepoRoot +dotnet tool restore +Set-Location $PreviousLocation # delete anything that already exists if ($Clean) { @@ -165,7 +148,7 @@ if ($? -and $DisableMetaData -eq $false) { # build the output Write-Host "Building api metadata for $projFile..." - & docfx metadata $projFile --log "$DocFxLog" --logLevel $LogLevel + & dotnet tool run docfx metadata $projFile --log "$DocFxLog" --logLevel $LogLevel } } @@ -193,7 +176,7 @@ if ($? -and $DisableBuild -eq $false) { # build the output Write-Host "Building site output for $projFile..." - & docfx build $projFile --log "$DocFxLog" --logLevel $LogLevel --debug --maxParallelism 1 + & dotnet tool run docfx build $projFile --log "$DocFxLog" --logLevel $LogLevel --debug --maxParallelism 1 # Add the baseUrl to the output xrefmap, see https://github.com/dotnet/docfx/issues/2346#issuecomment-356054027 $projFileJson = Get-Content $projFile | ConvertFrom-Json @@ -220,12 +203,12 @@ if ($?) { # build the output Write-Host "Building docs..." - & docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --debug + & dotnet tool run docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --debug } else { # build + serve (for testing) Write-Host "starting website..." - & docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --serve --port $StagingPort --debug + & dotnet tool run docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --serve --port $StagingPort --debug } } From 7d744644b3afb86030b8eacd3e0a2888cf822ba6 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Wed, 9 Oct 2024 20:40:34 -0600 Subject: [PATCH 26/36] Use dotnet local tool for docfx in site.ps1 --- websites/site/site.ps1 | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/websites/site/site.ps1 b/websites/site/site.ps1 index 1e18cb6325..749d5c53c8 100644 --- a/websites/site/site.ps1 +++ b/websites/site/site.ps1 @@ -29,8 +29,6 @@ param ( $StagingPort = 8081 ) -$DocFxVersion = "2.77.0" # Required DocFx version - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName @@ -46,26 +44,10 @@ if ($Clean) { } # install docfx tool -$InstallDocFx = $false -try { - $InstalledDocFxVersion = (& docfx --version).Trim().Split('+')[0] - - if ([version]$InstalledDocFxVersion -lt [version]$DocFxVersion) { - Write-Host "DocFx is installed, but the version is less than $DocFxVersion, will install it." - $InstallDocFx = $true - } - else { - Write-Host "DocFx is installed and the version is $InstalledDocFxVersion." - } -} catch { - Write-Host "DocFx is not installed or not in the PATH, will install it." - $InstallDocFx = $true -} - -if ($InstallDocFx -eq $true) { - Write-Host "Installing docfx global tool..." - dotnet tool install -g docfx --version $DocFxVersion -} +$PreviousLocation = Get-Location +Set-Location $RepoRoot +dotnet tool restore +Set-Location $PreviousLocation # delete anything that already exists if ($Clean) { @@ -83,11 +65,11 @@ if($?) { if ($ServeDocs -eq $false) { # build the output Write-Host "Building docs..." - & docfx build $DocFxJson -l "$DocFxLog" --logLevel $LogLevel + & dotnet tool run docfx build $DocFxJson -l "$DocFxLog" --logLevel $LogLevel } else { # build + serve (for testing) Write-Host "starting website..." - & docfx $DocFxJson --serve --port $StagingPort + & dotnet tool run docfx $DocFxJson --serve --port $StagingPort } } From 8cdfc8beb8597d87b913623d3b1eaadcd3022801 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Wed, 9 Oct 2024 20:47:09 -0600 Subject: [PATCH 27/36] Make hyperlink color match website style --- .../Templates/LuceneTemplateAssets/styles/main.css | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/websites/apidocs/Templates/LuceneTemplateAssets/styles/main.css b/websites/apidocs/Templates/LuceneTemplateAssets/styles/main.css index 595f3443df..b2a15d2648 100644 --- a/websites/apidocs/Templates/LuceneTemplateAssets/styles/main.css +++ b/websites/apidocs/Templates/LuceneTemplateAssets/styles/main.css @@ -41,15 +41,16 @@ } button, a { - color: #1764aa; - /* #0095eb */ + color: #0098ff; } button:hover, button:focus, a:hover, a:focus { - color: #143653; - text-decoration: none; + color: #0098ff; +} +a:hover { + text-decoration: underline; } nav.navbar { background-color: white; From dd9104ba1273a5d2ee637b44337ade579dee08a7 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Wed, 9 Oct 2024 20:57:11 -0600 Subject: [PATCH 28/36] Fix broken link on API docs homepage --- websites/apidocs/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/websites/apidocs/index.md b/websites/apidocs/index.md index d0ebe9e52d..9127903494 100644 --- a/websites/apidocs/index.md +++ b/websites/apidocs/index.md @@ -3,16 +3,16 @@ title: Lucene.Net Docs - The documentation website for Lucene.NET description: The documentation website for Lucene.NET --- -Apache Lucene.Net Documentation +Apache Lucene.Net EnvVar:LuceneNetVersion Documentation =============== --------------- -Lucene.NET is a _.NET full-text search engine_. Lucene.NET is not a complete application, +Lucene.NET is a _.NET 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. -This is the official API documentation for __Apache Lucene.NET __. +This is the official API documentation for __Apache Lucene.NET EnvVar:LuceneNetVersion__. ## Getting Started From 9e6a73c0cb63fb977be4139f0e5ee3baf61dbaa2 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Wed, 9 Oct 2024 21:56:39 -0600 Subject: [PATCH 29/36] Fix changes link formatting and URL --- websites/apidocs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/apidocs/index.md b/websites/apidocs/index.md index 9127903494..2b676b04c5 100644 --- a/websites/apidocs/index.md +++ b/websites/apidocs/index.md @@ -29,8 +29,8 @@ on some of the conceptual or inner details of Lucene: ## Reference Documents -- [Changes](https://github.com/apache/lucenenet/releases/tag/[EnvVar:LuceneNetReleaseTag]): List of changes in this release. +- [Changes](https://github.com/apache/lucenenet/releases/tag/EnvVar:LuceneNetReleaseTag): List of changes in this release. - [Migration Guide](xref:Lucene.Net.Migration.Guide): What changed in Lucene 4; how to migrate code from Lucene 3.x. - [Source Stepping](xref:source-stepping): How to use the Visual Studio debugger to step into Lucene.NET source code. - [File Formats](xref:Lucene.Net.Codecs.Lucene46): Guide to the supported index format used by Lucene. This can be customized by using [an alternate codec](xref:Lucene.Net.Codecs). From 8290f574f4978408e276404ac33324f329d30d7b Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Wed, 9 Oct 2024 22:18:45 -0600 Subject: [PATCH 30/36] Fix bold namespaces in sidenav --- .../apidocs/Templates/LuceneTemplateAssets/styles/main.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/websites/apidocs/Templates/LuceneTemplateAssets/styles/main.css b/websites/apidocs/Templates/LuceneTemplateAssets/styles/main.css index b2a15d2648..0f40e06fd1 100644 --- a/websites/apidocs/Templates/LuceneTemplateAssets/styles/main.css +++ b/websites/apidocs/Templates/LuceneTemplateAssets/styles/main.css @@ -52,6 +52,9 @@ a:focus { a:hover { text-decoration: underline; } +.expand-stub + a { + font-weight: normal; +} nav.navbar { background-color: white; min-height: 80px; From 189a2130c2e4e3a3c18a91c6052ea8f4a6c68501 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Wed, 9 Oct 2024 22:39:13 -0600 Subject: [PATCH 31/36] Fix multiple issues with links going to TestFramework instead of Core --- websites/apidocs/docfx.site.json | 1 - websites/apidocs/docs.ps1 | 9 ++------- websites/apidocs/index.md | 5 ++++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/websites/apidocs/docfx.site.json b/websites/apidocs/docfx.site.json index a4fc34e6f1..aea6662448 100644 --- a/websites/apidocs/docfx.site.json +++ b/websites/apidocs/docfx.site.json @@ -53,7 +53,6 @@ "_site/api/sandbox/xrefmap.yml", "_site/api/spatial/xrefmap.yml", "_site/api/suggest/xrefmap.yml", - "_site/api/test-framework/xrefmap.yml", "_site/api/demo/xrefmap.yml" ], "dest": "_site", diff --git a/websites/apidocs/docs.ps1 b/websites/apidocs/docs.ps1 index 93fb25717e..ebaf2f4fb2 100644 --- a/websites/apidocs/docs.ps1 +++ b/websites/apidocs/docs.ps1 @@ -192,23 +192,18 @@ if ($? -and $DisableBuild -eq $false) { } if ($?) { - - # Before we build the site we have to clear the frickin docfx cache! - # else the xref links don't work on the home page. That is crazy. - Remove-Item (Join-Path -Path $ApiDocsFolder "obj\.cache") -recurse -force -ErrorAction SilentlyContinue - $DocFxLog = Join-Path -Path $ApiDocsFolder "obj\docfx.site.json.log" if ($ServeDocs -eq $false) { # build the output Write-Host "Building docs..." - & dotnet tool run docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --debug + & dotnet tool run docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --debug --maxParallelism 1 } else { # build + serve (for testing) Write-Host "starting website..." - & dotnet tool run docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --serve --port $StagingPort --debug + & dotnet tool run docfx $DocFxJsonSite --log "$DocFxLog" --logLevel $LogLevel --serve --port $StagingPort --debug --maxParallelism 1 } } diff --git a/websites/apidocs/index.md b/websites/apidocs/index.md index 2b676b04c5..0bf649c3f9 100644 --- a/websites/apidocs/index.md +++ b/websites/apidocs/index.md @@ -40,6 +40,9 @@ on some of the conceptual or inner details of Lucene: ## Libraries + + - - Core library - - Analyzers for indexing content in different languages and domains - [Lucene.Net.Analysis.Kuromoji](xref:Lucene.Net.Analysis.Ja) - Japanese Morphological Analyzer @@ -65,7 +68,7 @@ on some of the conceptual or inner details of Lucene: - - Various third party contributions and new ideas - [Lucene.Net.Spatial](xref:Lucene.Net.Spatial) - Geospatial search - - Auto-suggest and Spell-checking support -- - Framework for testing Lucene-based applications +- [Lucene.Net.TestFramework](api/test-framework/overview.html) - Framework for testing Lucene-based applications ### Tools From 01044c7ac6aa8252d2540445ed1bcc62b12f3522 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Thu, 10 Oct 2024 17:11:57 -0600 Subject: [PATCH 32/36] Fix
 formatting in TFIDFSimilarity docs

---
 .../Search/Similarities/TFIDFSimilarity.cs    | 388 +++++++++---------
 1 file changed, 194 insertions(+), 194 deletions(-)

diff --git a/src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs b/src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs
index ddfced9e8b..36106a077e 100644
--- a/src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs
+++ b/src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs
@@ -95,7 +95,7 @@ namespace Lucene.Net.Search.Similarities
     ///     
     /// 
     /// 
-    /// 
+    ///
     ///
     /// Where V(q) · V(d) is the
     /// dot product
@@ -152,7 +152,7 @@ namespace Lucene.Net.Search.Similarities
     ///
     /// Under the simplifying assumption of a single field in the index,
     /// we get Lucene's Conceptual scoring formula:
-    /// 
+    ///
     /// 
     /// 
     ///     
@@ -280,198 +280,198 @@ namespace Lucene.Net.Search.Similarities
     ///
     ///  where
     /// 
-    ///    
-    ///      
-    ///      tf(t in d)
-    ///      correlates to the term's frequency,
-    ///      defined as the number of times term t appears in the currently scored document d.
-    ///      Documents that have more occurrences of a given term receive a higher score.
-    ///      Note that tf(t in q) is assumed to be 1 and therefore it does not appear in this equation,
-    ///      However if a query contains twice the same term, there will be
-    ///      two term-queries with that same term and hence the computation would still be correct (although
-    ///      not very efficient).
-    ///      The default computation for tf(t in d) in
-    ///      DefaultSimilarity () is:
-    ///
-    ///         
-    ///         
-    ///             
-    ///                 
-    ///                     tf(t in d)   =  
-    ///                 
-    ///                 
-    ///                     frequency½
-    ///                 
-    ///             
-    ///         
-    ///         
-    ///         
-    ///    
-    ///
-    ///    
-    ///      
-    ///      idf(t) stands for Inverse Document Frequency. this value
-    ///      correlates to the inverse of DocFreq
-    ///      (the number of documents in which the term t appears).
-    ///      this means rarer terms give higher contribution to the total score.
-    ///      idf(t) appears for t in both the query and the document,
-    ///      hence it is squared in the equation.
-    ///      The default computation for idf(t) in
-    ///      DefaultSimilarity () is:
-    ///
-    ///         
-    ///         
-    ///             
-    ///                 idf(t)   =  
-    ///                 1 + log (
-    ///                 
-    ///                     
-    ///                         NumDocs
-    ///                         –––––––––
-    ///                         DocFreq+1
-    ///                     
-    ///                 
-    ///                 )
-    ///             
-    ///         
-    ///         
-    /// 
-    ///    
-    ///
-    ///    
-    ///      
-    ///      coord(q,d)
-    ///      is a score factor based on how many of the query terms are found in the specified document.
-    ///      Typically, a document that contains more of the query's terms will receive a higher score
-    ///      than another document with fewer query terms.
-    ///      this is a search time factor computed in
-    ///      coord(q,d) ()
-    ///      by the Similarity in effect at search time.
-    ///      
-    ///    
-    ///
-    ///    
-    ///      
-    ///      queryNorm(q)
-    ///      
-    ///      is a normalizing factor used to make scores between queries comparable.
-    ///      this factor does not affect document ranking (since all ranked documents are multiplied by the same factor),
-    ///      but rather just attempts to make scores from different queries (or even different indexes) comparable.
-    ///      this is a search time factor computed by the Similarity in effect at search time.
-    ///
-    ///      The default computation in
-    ///      DefaultSimilarity ()
-    ///      produces a Euclidean norm:
-    ///      
-    ///      
-    ///      
-    ///         
-    ///             
-    ///                 queryNorm(q)    =  
-    ///                 queryNorm(sumOfSquaredWeights)
-    ///                   =  
-    ///             
-    ///             
-    ///                 
-    ///                     1
-    ///                     ––––––––––––––
-    ///                     sumOfSquaredWeights½
-    ///                 
-    ///             
-    ///         
-    ///      
-    ///      
-    ///
-    ///      The sum of squared weights (of the query terms) is
-    ///      computed by the query  object.
-    ///      For example, a 
-    ///      computes this value as:
-    ///      
-    ///      
-    ///      
-    ///         
-    ///             
-    ///                 sumOfSquaredWeights   =  
-    ///                 q.Boost 2
-    ///                  · 
-    ///              
-    ///             
-    ///             
-    ///                 (
-    ///                 idf(t)  · 
-    ///                 t.Boost
-    ///                 ) 2 
-    ///             
-    ///         
-    ///         
-    ///             
-    ///             t in q
-    ///             
-    ///         
-    ///      
-    ///      where sumOfSquaredWeights is  and
-    ///      q.Boost is 
-    ///      
-    ///    
-    ///
-    ///    
-    ///      
-    ///      t.Boost
-    ///      is a search time boost of term t in the query q as
-    ///      specified in the query text
-    ///      (see query syntax),
-    ///      or as set by application calls to
-    ///      .
-    ///      Notice that there is really no direct API for accessing a boost of one term in a multi term query,
-    ///      but rather multi terms are represented in a query as multi
-    ///       objects,
-    ///      and so the boost of a term in the query is accessible by calling the sub-query
-    ///      .
-    ///      
-    ///    
-    ///
-    ///    
-    ///      
-    ///      norm(t,d) encapsulates a few (indexing time) boost and length factors:
-    ///
-    ///      
-    ///        Field boost - set
-    ///        
-    ///        before adding the field to a document.
-    ///        
-    ///        lengthNorm - computed
-    ///        when the document is added to the index in accordance with the number of tokens
-    ///        of this field in the document, so that shorter fields contribute more to the score.
-    ///        LengthNorm is computed by the  class in effect at indexing.
-    ///        
-    ///      
-    ///      The  method is responsible for
-    ///      combining all of these factors into a single .
-    ///
-    ///      
-    ///      When a document is added to the index, all the above factors are multiplied.
-    ///      If the document has multiple fields with the same name, all their boosts are multiplied together:
-    ///      
-    ///      
-    ///      
-    ///         
-    ///             
-    ///                 norm(t,d)   =  
-    ///                 lengthNorm
-    ///                  · 
-    ///             
-    ///             
-    ///             
-    ///         
-    ///         
-    ///             
-    ///             field f in d named as t
-    ///             
-    ///         
-    ///      
-    ///      Note that search time is too late to modify this norm part of scoring,
-    ///      e.g. by using a different  for search.
-    ///    
+    /// 
+    /// 
+    /// tf(t in d)
+    /// correlates to the term's frequency,
+    /// defined as the number of times term t appears in the currently scored document d.
+    /// Documents that have more occurrences of a given term receive a higher score.
+    /// Note that tf(t in q) is assumed to be 1 and therefore it does not appear in this equation,
+    /// However if a query contains twice the same term, there will be
+    /// two term-queries with that same term and hence the computation would still be correct (although
+    /// not very efficient).
+    /// The default computation for tf(t in d) in
+    /// DefaultSimilarity () is:
+    ///
+    /// 
+    /// 
+    ///     
+    ///         
+    ///             tf(t in d)   =  
+    ///         
+    ///         
+    ///             frequency½
+    ///         
+    ///     
+    /// 
+    /// 
+    ///
+    /// 
+    ///
+    /// 
+    /// 
+    /// idf(t) stands for Inverse Document Frequency. this value
+    /// correlates to the inverse of DocFreq
+    /// (the number of documents in which the term t appears).
+    /// this means rarer terms give higher contribution to the total score.
+    /// idf(t) appears for t in both the query and the document,
+    /// hence it is squared in the equation.
+    /// The default computation for idf(t) in
+    /// DefaultSimilarity () is:
+    ///
+    /// 
+    /// 
+    ///     
+    ///         idf(t)   =  
+    ///         1 + log (
+    ///         
+    ///             
+    ///                 NumDocs
+    ///                 –––––––––
+    ///                 DocFreq+1
+    ///             
+    ///         
+    ///         )
+    ///     
+    /// 
+    /// 
+    ///
+    /// 
+    ///
+    /// 
+    ///   
+    ///   coord(q,d)
+    ///   is a score factor based on how many of the query terms are found in the specified document.
+    ///   Typically, a document that contains more of the query's terms will receive a higher score
+    ///   than another document with fewer query terms.
+    ///   this is a search time factor computed in
+    ///   coord(q,d) ()
+    ///   by the Similarity in effect at search time.
+    ///   
+    /// 
+    ///
+    /// 
+    /// 
+    /// queryNorm(q)
+    /// 
+    /// is a normalizing factor used to make scores between queries comparable.
+    /// this factor does not affect document ranking (since all ranked documents are multiplied by the same factor),
+    /// but rather just attempts to make scores from different queries (or even different indexes) comparable.
+    /// this is a search time factor computed by the Similarity in effect at search time.
+    ///
+    /// The default computation in
+    /// DefaultSimilarity ()
+    /// produces a Euclidean norm:
+    ///
+    /// 
+    /// 
+    ///    
+    ///        
+    ///            queryNorm(q)    =  
+    ///            queryNorm(sumOfSquaredWeights)
+    ///              =  
+    ///        
+    ///        
+    ///            
+    ///                1
+    ///                ––––––––––––––
+    ///                sumOfSquaredWeights½
+    ///            
+    ///        
+    ///    
+    /// 
+    /// 
+    ///
+    /// The sum of squared weights (of the query terms) is
+    /// computed by the query  object.
+    /// For example, a 
+    /// computes this value as:
+    ///
+    /// 
+    /// 
+    ///    
+    ///        
+    ///            sumOfSquaredWeights   =  
+    ///            q.Boost 2
+    ///             · 
+    ///        
+    ///        
+    ///        
+    ///            (
+    ///            idf(t)  · 
+    ///            t.Boost
+    ///            ) 2 
+    ///        
+    ///    
+    ///    
+    ///        
+    ///        t in q
+    ///        
+    ///    
+    /// 
+    /// where sumOfSquaredWeights is  and
+    /// q.Boost is 
+    /// 
+    /// 
+    ///
+    /// 
+    ///   
+    ///   t.Boost
+    ///   is a search time boost of term t in the query q as
+    ///   specified in the query text
+    ///   (see query syntax),
+    ///   or as set by application calls to
+    ///   .
+    ///   Notice that there is really no direct API for accessing a boost of one term in a multi term query,
+    ///   but rather multi terms are represented in a query as multi
+    ///    objects,
+    ///   and so the boost of a term in the query is accessible by calling the sub-query
+    ///   .
+    ///   
+    /// 
+    ///
+    /// 
+    ///   
+    ///   norm(t,d) encapsulates a few (indexing time) boost and length factors:
+    ///
+    ///   
+    ///     Field boost - set
+    ///     
+    ///     before adding the field to a document.
+    ///     
+    ///     lengthNorm - computed
+    ///     when the document is added to the index in accordance with the number of tokens
+    ///     of this field in the document, so that shorter fields contribute more to the score.
+    ///     LengthNorm is computed by the  class in effect at indexing.
+    ///     
+    ///   
+    ///   The  method is responsible for
+    ///   combining all of these factors into a single .
+    ///
+    ///   
+    ///   When a document is added to the index, all the above factors are multiplied.
+    ///   If the document has multiple fields with the same name, all their boosts are multiplied together:
+    ///
+    ///   
+    ///   
+    ///      
+    ///          
+    ///              norm(t,d)   =  
+    ///              lengthNorm
+    ///               · 
+    ///          
+    ///          
+    ///          
+    ///      
+    ///      
+    ///          
+    ///          field f in d named as t
+    ///          
+    ///      
+    ///   
+    ///   Note that search time is too late to modify this norm part of scoring,
+    ///   e.g. by using a different  for search.
+    /// 
     /// 
     /// 
     /// 

From 1695ac05f0c6364503a936c384fb67305215bc35 Mon Sep 17 00:00:00 2001
From: Paul Irwin 
Date: Fri, 11 Oct 2024 17:14:39 -0600
Subject: [PATCH 33/36] Add back RandomExtensions to TestFramework docs, Fix
 note formatting on OpenNLP docs

---
 src/Lucene.Net.Analysis.OpenNLP/overview.md | 3 ++-
 websites/apidocs/filterConfig.yml           | 3 ---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/Lucene.Net.Analysis.OpenNLP/overview.md b/src/Lucene.Net.Analysis.OpenNLP/overview.md
index 1667c7f52e..44c2c352f2 100644
--- a/src/Lucene.Net.Analysis.OpenNLP/overview.md
+++ b/src/Lucene.Net.Analysis.OpenNLP/overview.md
@@ -46,7 +46,8 @@ When a `` is included for this NuGet package in your SDK-style
 
 The `` item group operates similar to a dependency in Maven. All transitive dependencies are collected and resolved, and then the final output is produced. However, unlike `PackageReference`s, `MavenReference`s are collected by the final output project, and reassessed. That is, each dependent Project within your .NET SDK-style solution contributes its `MavenReference`s to project(s) which include it, and each project makes its own dependency graph. Projects do not contribute their final built assemblies up. They only contribute their dependencies. Allowing each project in a complicated solution to make its own local conflict resolution attempt.
 
-> **NOTE** `` is only supported on SDK-style MSBuild projects.
+> [!NOTE]
+> `` is only supported on SDK-style MSBuild projects.
 
 ## MavenReference Example
 
diff --git a/websites/apidocs/filterConfig.yml b/websites/apidocs/filterConfig.yml
index 92f3472371..02b8657ab1 100644
--- a/websites/apidocs/filterConfig.yml
+++ b/websites/apidocs/filterConfig.yml
@@ -5,6 +5,3 @@ apiRules:
 - exclude:
     uidRegex: ^Lucene\.Net\.Test$
     type: Namespace
-- exclude:
-    uidRegex: ^Lucene\.Net\.RandomExtensions$
-    type: Class

From 1eb06384f377eeb17d2b9fe14b85e1eadec683ce Mon Sep 17 00:00:00 2001
From: Paul Irwin 
Date: Fri, 11 Oct 2024 18:17:11 -0600
Subject: [PATCH 34/36] Fix several xref map issues in docs

---
 src/Lucene.Net.Analysis.OpenNLP/overview.md  |  2 +-
 src/Lucene.Net.Replicator/package.md         | 22 ++++++++++----------
 websites/apidocs/docfx.analysis-opennlp.json |  3 ++-
 websites/apidocs/docfx.analysis-smartcn.json |  3 ++-
 websites/apidocs/docfx.core.json             |  1 +
 websites/apidocs/docfx.demo.json             |  4 +++-
 websites/apidocs/docfx.highlighter.json      |  3 ++-
 websites/apidocs/docfx.icu.json              |  3 ++-
 websites/apidocs/docs.ps1                    | 11 +++++++---
 9 files changed, 32 insertions(+), 20 deletions(-)

diff --git a/src/Lucene.Net.Analysis.OpenNLP/overview.md b/src/Lucene.Net.Analysis.OpenNLP/overview.md
index 44c2c352f2..05aa4ca15c 100644
--- a/src/Lucene.Net.Analysis.OpenNLP/overview.md
+++ b/src/Lucene.Net.Analysis.OpenNLP/overview.md
@@ -27,7 +27,7 @@ This module exposes functionality from Apache OpenNLP to Apache Lucene.NET. The
 
 For an introduction to Lucene's analysis API, see the [Lucene.Net.Analysis](../core/Lucene.Net.Analysis.html) namespace documentation.
 
-The OpenNLP Tokenizer behavior is similar to the  but is smart about inter-word punctuation. The term stream looks very much like the way you parse words and punctuation while reading. The major difference between this tokenizer and most other tokenizers shipped with Lucene is that punctuation is tokenized. This is required for the following taggers to operate properly.
+The OpenNLP Tokenizer behavior is similar to the  but is smart about inter-word punctuation. The term stream looks very much like the way you parse words and punctuation while reading. The major difference between this tokenizer and most other tokenizers shipped with Lucene is that punctuation is tokenized. This is required for the following taggers to operate properly.
 
 The OpenNLP taggers annotate terms using the .
 
diff --git a/src/Lucene.Net.Replicator/package.md b/src/Lucene.Net.Replicator/package.md
index 6db5ab5019..2b7399a147 100644
--- a/src/Lucene.Net.Replicator/package.md
+++ b/src/Lucene.Net.Replicator/package.md
@@ -25,7 +25,7 @@ application should publish an [IndexAndTaxonomyRevision](xref:Lucene.Net.Replica
 When the replication client detects that there is a newer revision available, it copies the files of the revision and
 then invokes the handler to complete the operation (e.g. copy the files to the index directory, sync them, reopen an
 index reader etc.). By default, only files that do not exist in the handler's
-[current revision files](xref:Lucene.Net.Replicator.IReplicationHandler.html#Lucene_Net_Replicator_IReplicationHandler_CurrentRevisionFiles) are copied,
+[current revision files](xref:Lucene.Net.Replicator.IReplicationHandler#Lucene_Net_Replicator_IReplicationHandler_CurrentRevisionFiles) are copied,
 however this can be overridden by extending the client.