from local_deep_research.web_search_engines.search_engine_factory import (
    create_search_engine,
)

# Create the engine
engine = create_search_engine("searxng")

# Check if available
if engine and hasattr(engine, "is_available") and engine.is_available:
    print(f"SearXNG configured with instance: {engine.instance_url}")

    # Test a simple search
    results = engine.run("test query")
    print(f"Found {len(results)} results")
else:
    print("SearXNG is not properly configured or is disabled")
