elastro-client 1.3.24__tar.gz → 1.3.26__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {elastro_client-1.3.24/elastro_client.egg-info → elastro_client-1.3.26}/PKG-INFO +1 -1
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/__init__.py +1 -1
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/__init__.py +36 -6
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/index.py +44 -5
- elastro_client-1.3.24/elastro/gui/assets/index-DBI2CQ5E.js → elastro_client-1.3.26/elastro/gui/assets/index-CDM13vFi.js +11 -11
- elastro_client-1.3.24/elastro/gui/assets/index-S7zSZAvp.css → elastro_client-1.3.26/elastro/gui/assets/index-_TTaaZ3u.css +1 -1
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/gui/index.html +2 -2
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/server.py +69 -7
- {elastro_client-1.3.24 → elastro_client-1.3.26/elastro_client.egg-info}/PKG-INFO +1 -1
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro_client.egg-info/SOURCES.txt +2 -2
- {elastro_client-1.3.24 → elastro_client-1.3.26}/pyproject.toml +1 -1
- {elastro_client-1.3.24 → elastro_client-1.3.26}/.coveragerc +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/LICENSE +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/MANIFEST.in +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/README.md +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/docs/advanced_features.md +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/docs/api_reference.md +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/docs/cli_usage.md +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/docs/commands_reference.md +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/docs/getting_started.md +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/docs/roadmap.md +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/docs/troubleshooting.md +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/advanced/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/advanced/aggregations.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/advanced/query_builder.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/advanced/scroll.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/art.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/cli.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/cluster.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/config.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/datastream.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/document.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/gui.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/ilm.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/index_recipes.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/ingest.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/ml.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/painless_commands.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/script.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/security.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/snapshot.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/tasks.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/template.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/commands/utils.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/completion.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/cli/output.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/config/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/config/defaults.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/config/loader.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/client.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/datastream.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/document.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/document_bulk.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/errors.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/ilm.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/index.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/logger.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/query_builder.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/snapshot.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/core/validation.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/gui/elastro.svg +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/gui/favicon.ico +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/gui/vite.svg +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/py.typed +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/utils/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/utils/aliases.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/utils/health.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/utils/snapshots.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro/utils/templates.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro_client.egg-info/dependency_links.txt +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro_client.egg-info/entry_points.txt +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro_client.egg-info/requires.txt +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/elastro_client.egg-info/top_level.txt +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/examples/client.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/examples/config_usage.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/examples/datastreams.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/examples/debug_connection.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/examples/document_operations.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/examples/index_management.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/examples/search.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/pytest.ini +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/requirements.txt +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/setup.cfg +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/setup.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/conftest.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/fixtures/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/fixtures/datastream_fixtures.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/fixtures/document_fixtures.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/fixtures/index_fixtures.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/test_aggregations_integration.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/test_client_integration.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/test_datastream_integration.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/test_docs_quickstart.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/test_document_integration.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/test_index_integration.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/test_query_builder_integration.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/test_scroll_integration.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/integration/test_workflow_integration.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/manual/test_es.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/advanced/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/advanced/test_aggregations.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/advanced/test_query_builder.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/advanced/test_scroll.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/config/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/config/test_defaults.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/config/test_loader.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/core/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/core/test_client.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/core/test_datastream.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/core/test_document.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/core/test_document_bulk.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/core/test_errors.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/core/test_index.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/core/test_validation.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/utils/__init__.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/utils/test_aliases.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/utils/test_health.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/utils/test_snapshots.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/unit/utils/test_templates.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/verify_api_actions.py +0 -0
- {elastro_client-1.3.24 → elastro_client-1.3.26}/tests/verify_cli_e2e.py +0 -0
|
@@ -4,12 +4,42 @@ Command handlers for the CLI.
|
|
|
4
4
|
This module contains the implementations of the CLI commands.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
from elastro.cli.commands.index import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
from elastro.cli.commands.index import (
|
|
8
|
+
create_index,
|
|
9
|
+
get_index,
|
|
10
|
+
index_exists,
|
|
11
|
+
update_index,
|
|
12
|
+
delete_index,
|
|
13
|
+
open_index,
|
|
14
|
+
close_index,
|
|
15
|
+
list_indices,
|
|
16
|
+
find_indices,
|
|
17
|
+
index_wizard,
|
|
18
|
+
)
|
|
19
|
+
from elastro.cli.commands.document import (
|
|
20
|
+
index_document,
|
|
21
|
+
bulk_index,
|
|
22
|
+
get_document,
|
|
23
|
+
search_documents,
|
|
24
|
+
update_document,
|
|
25
|
+
delete_document,
|
|
26
|
+
bulk_delete,
|
|
27
|
+
)
|
|
28
|
+
from elastro.cli.commands.datastream import (
|
|
29
|
+
create_datastream,
|
|
30
|
+
list_datastreams,
|
|
31
|
+
get_datastream,
|
|
32
|
+
delete_datastream,
|
|
33
|
+
rollover_datastream,
|
|
34
|
+
)
|
|
35
|
+
from elastro.cli.commands.config import (
|
|
36
|
+
get_config_value,
|
|
37
|
+
set_config_value,
|
|
38
|
+
list_config,
|
|
39
|
+
init_config,
|
|
40
|
+
)
|
|
41
|
+
from elastro.cli.commands.utils import health, templates, aliases
|
|
42
|
+
from elastro.cli.commands.painless_commands import painless_group
|
|
13
43
|
|
|
14
44
|
__all__ = [
|
|
15
45
|
# Index commands
|
|
@@ -368,8 +368,9 @@ def find_indices(client: ElasticsearchClient, pattern: str) -> None:
|
|
|
368
368
|
# Duplicating minimal logic for clarity and specific 'Find' header if we wanted,
|
|
369
369
|
# but re-using the exact same function body is DRY.
|
|
370
370
|
# Let's just call the same logic.
|
|
371
|
-
ctx = click.get_current_context()
|
|
372
|
-
ctx
|
|
371
|
+
ctx = click.get_current_context(silent=True)
|
|
372
|
+
if ctx:
|
|
373
|
+
ctx.invoke(list_indices, pattern=pattern)
|
|
373
374
|
|
|
374
375
|
|
|
375
376
|
@click.command("wizard", no_args_is_help=False)
|
|
@@ -629,9 +630,47 @@ def fix_indices(client: ElasticsearchClient) -> None:
|
|
|
629
630
|
else:
|
|
630
631
|
console.print(" [dim]Skipped.[/]")
|
|
631
632
|
else:
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
633
|
+
routing_filter_fault = False
|
|
634
|
+
for node_decision in explain_result.get(
|
|
635
|
+
"node_allocation_decisions", []
|
|
636
|
+
):
|
|
637
|
+
for decider in node_decision.get("deciders", []):
|
|
638
|
+
if decider.get(
|
|
639
|
+
"decider"
|
|
640
|
+
) == "filter" and "index.routing.allocation" in decider.get(
|
|
641
|
+
"explanation", ""
|
|
642
|
+
):
|
|
643
|
+
routing_filter_fault = True
|
|
644
|
+
break
|
|
645
|
+
if routing_filter_fault:
|
|
646
|
+
break
|
|
647
|
+
|
|
648
|
+
if routing_filter_fault:
|
|
649
|
+
console.print(
|
|
650
|
+
" [bold cyan]Suggestion:[/] Explicit node routing filters are preventing shard allocation."
|
|
651
|
+
)
|
|
652
|
+
if Confirm.ask(
|
|
653
|
+
f" Clear all custom node routing allocation filters for '{name}'?",
|
|
654
|
+
default=True,
|
|
655
|
+
):
|
|
656
|
+
settings_payload = {
|
|
657
|
+
"routing.allocation.require._name": None,
|
|
658
|
+
"routing.allocation.include._name": None,
|
|
659
|
+
"routing.allocation.exclude._name": None,
|
|
660
|
+
"routing.allocation.require.*": None,
|
|
661
|
+
"routing.allocation.include.*": None,
|
|
662
|
+
"routing.allocation.exclude.*": None,
|
|
663
|
+
}
|
|
664
|
+
index_manager.update(name, {"index": settings_payload})
|
|
665
|
+
console.print(
|
|
666
|
+
f" [green]✓ Custom routing allocation filters cleared for {name}.[/]"
|
|
667
|
+
)
|
|
668
|
+
else:
|
|
669
|
+
console.print(" [dim]Skipped.[/]")
|
|
670
|
+
else:
|
|
671
|
+
console.print(
|
|
672
|
+
" [dim]No automated quick fix available for this specific constraint. Review explain JSON for details.[/]"
|
|
673
|
+
)
|
|
635
674
|
|
|
636
675
|
except Exception as explain_error:
|
|
637
676
|
console.print(
|