Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
<PackageVersion Include="Elastic.Aspire.Hosting.Elasticsearch" Version="9.3.0" />
<PackageVersion Include="Elastic.Clients.Elasticsearch" Version="9.3.0" />
<PackageVersion Include="FakeItEasy" Version="9.0.1" />
<PackageVersion Include="Elastic.Ingest.Elasticsearch" Version="0.17.1" />
<PackageVersion Include="Elastic.Ingest.Elasticsearch" Version="0.29.0" />
<PackageVersion Include="Elastic.Mapping" Version="0.29.0" />
<PackageVersion Include="InMemoryLogger" Version="1.0.66" />
<PackageVersion Include="MartinCostello.Logging.XUnit.v3" Version="0.7.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
Expand Down
194 changes: 0 additions & 194 deletions PLAN-rules-config.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/cli/assembler/assembler-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ docs-builder assembler index [options...] [-h|--help] [--version]
`--password` `<string>`
: Elasticsearch password (basic auth), alternatively set env DOCUMENTATION_ELASTIC_PASSWORD (optional)

`--no-semantic` `<bool?>`
: Index without semantic fields (optional)

`--search-num-threads` `<int?>`
: The number of search threads the inference endpoint should use. Defaults: 8 (optional)

Expand Down
3 changes: 0 additions & 3 deletions docs/cli/docset/index-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ docs-builder index [options...] [-h|--help] [--version]
`--password` `<string>`
: Elasticsearch password (basic auth), alternatively set env DOCUMENTATION_ELASTIC_PASSWORD (optional)

`--no-semantic` `<bool?>`
: Index without semantic fields (optional)

`--search-num-threads` `<int?>`
: The number of search threads the inference endpoint should use. Defaults: 8 (optional)

Expand Down
2 changes: 1 addition & 1 deletion src/Elastic.Codex/Building/CodexBuildService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public async Task<CodexBuildResult> BuildAll(
if (exporters is not null && buildContexts.Count > 0)
{
var firstContext = buildContexts[0].BuildContext;
sharedExporters = exporters.CreateMarkdownExporters(logFactory, firstContext, context.IndexNamespace).ToArray();
sharedExporters = exporters.CreateMarkdownExporters(logFactory, firstContext, "codex").ToArray();
var startTasks = sharedExporters.Select(async e => await e.StartAsync(ctx));
await Task.WhenAll(startTasks);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Elastic.Documentation.Configuration;
public class DocumentationEndpoints
{
public required ElasticsearchEndpoint Elasticsearch { get; init; }
public string Namespace { get; set; } = "dev";
}

public class ElasticsearchEndpoint
Expand All @@ -25,9 +26,6 @@ public class ElasticsearchEndpoint
public int IndexNumThreads { get; set; } = 4; // Reduced for Serverless rate limits
public bool NoElasticInferenceService { get; set; }

// index options
public string IndexNamePrefix { get; set; } = "semantic-docs";

// channel buffer options
public int BufferSize { get; set; } = 50; // Reduced for Serverless rate limits
public int MaxRetries { get; set; } = 5; // Increased for 429 retries
Expand All @@ -43,7 +41,6 @@ public class ElasticsearchEndpoint
public X509Certificate? Certificate { get; set; }
public bool CertificateIsNotRoot { get; set; }
public int? BootstrapTimeout { get; set; }
public bool NoSemantic { get; set; }
public bool ForceReindex { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ public record ElasticsearchIndexOptions
public string? Password { get; init; }

// inference options
public bool? NoSemantic { get; init; }
public bool? EnableAiEnrichment { get; init; }
public int? SearchNumThreads { get; init; }
public int? IndexNumThreads { get; init; }
public bool? NoEis { get; init; }
public int? BootstrapTimeout { get; init; }

// index options
public string? IndexNamePrefix { get; init; }
public bool? ForceReindex { get; init; }

// channel buffer options
Expand Down Expand Up @@ -85,8 +83,6 @@ public static async Task ApplyAsync(
cfg.IndexNumThreads = options.IndexNumThreads.Value;
if (options.NoEis.HasValue)
cfg.NoElasticInferenceService = options.NoEis.Value;
if (!string.IsNullOrEmpty(options.IndexNamePrefix))
cfg.IndexNamePrefix = options.IndexNamePrefix;
if (options.BufferSize.HasValue)
cfg.BufferSize = options.BufferSize.Value;
if (options.MaxRetries.HasValue)
Expand Down Expand Up @@ -117,8 +113,6 @@ public static async Task ApplyAsync(
if (options.BootstrapTimeout.HasValue)
cfg.BootstrapTimeout = options.BootstrapTimeout.Value;

if (options.NoSemantic.HasValue)
cfg.NoSemantic = options.NoSemantic.Value;
if (options.EnableAiEnrichment.HasValue)
cfg.EnableAiEnrichment = options.EnableAiEnrichment.Value;
if (options.ForceReindex.HasValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public static TBuilder AddDocumentationServiceDefaults<TBuilder>(this TBuilder b
_ = builder.Services.AddElasticDocumentationLogging(globalArgs.LogLevel, noConsole: globalArgs.IsMcp);
_ = services.AddSingleton(globalArgs);

var endpoints = ElasticsearchEndpointFactory.Create(builder.Configuration);
_ = services.AddSingleton(endpoints);

return builder.AddServiceDefaults();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<PackageReference Include="OpenTelemetry.Instrumentation.Http"/>
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime"/>
<PackageReference Include="Crayon"/>
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets"/>
<PackageReference Include="GitHub.Actions.Core" />
</ItemGroup>

Expand Down
Loading
Loading