Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tntsearch Laravel Package

teamtnt/tntsearch

TNTSearch is a pure-PHP full-text search engine with fuzzy search, “search as you type”, geo-search, stemming, custom tokenizers, BM25 ranking, boolean queries, highlighting, and dynamic index updates—fast to integrate and deploy via Packagist.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Buy – TNTSearch eliminates the need to build a custom full-text search solution from scratch, saving significant development time and resources. It’s a cost-effective alternative to dedicated search engines like Elasticsearch or Algolia, especially for PHP-based applications.
  • Feature Expansion: Enables advanced search capabilities (fuzzy search, geo-search, text classification, and stemming) without integrating third-party services, reducing API costs and latency.
  • Roadmap Prioritization: Accelerates development timelines for search-heavy features (e.g., e-commerce product search, location-based services, or content recommendation engines).
  • Use Cases:
    • Laravel Scout Integration: Seamlessly replaces default Scout drivers (e.g., Algolia, Meilisearch) for PHP applications, reducing vendor lock-in.
    • Legacy System Modernization: Adds modern search capabilities to older PHP applications without full-stack rewrites.
    • Geo-Localized Search: Powers location-aware features (e.g., "find restaurants near me") with minimal infrastructure changes.
    • Dynamic Content Platforms: Supports real-time indexing updates for CMS platforms, blogs, or SaaS applications with frequently changing content.

When to Consider This Package

Adopt TNTSearch If:

  • Your application is PHP/Laravel-based and requires full-text search without heavy infrastructure (e.g., no Elasticsearch/PostgreSQL FTS).
  • You need advanced search features (fuzzy matching, geo-search, text classification) but lack the budget/resources for dedicated search engines.
  • Your dataset is medium-sized (TNTSearch is optimized for performance with datasets that fit in memory; large-scale use may require Redis/SQLite tuning).
  • You prioritize self-hosted solutions to avoid API costs, latency, or vendor dependencies.
  • Your team has PHP expertise and can manage indexing/storage (e.g., SQLite/MySQL/Redis backends).

Look Elsewhere If:

  • You require horizontal scalability for billions of documents (consider Elasticsearch or OpenSearch).
  • Your application is not PHP-based (TNTSearch is PHP-only; alternatives like Meilisearch or Typesense may fit better).
  • You need real-time analytics or complex aggregations (dedicated search engines offer richer APIs).
  • Your team lacks DevOps resources to manage indexing/storage (cloud-based solutions like Algolia or Meilisearch reduce operational overhead).
  • You require multi-language support out of the box (TNTSearch supports stemming for select languages but may need customization for others like Chinese).

How to Pitch It (Stakeholders)

For Executives:

*"TNTSearch is a self-hosted, PHP-native full-text search engine that lets us deliver Elasticsearch-like capabilities without the complexity or cost. It’s ideal for [specific use case, e.g., ‘powering our e-commerce product search’ or ‘enabling geo-localized recommendations’]. By adopting this, we:

  • Reduce costs by eliminating third-party search API fees (e.g., Algolia, Elastic Cloud).
  • Accelerate development with built-in features like fuzzy search, geo-search, and real-time indexing—no need to build or integrate custom solutions.
  • Improve performance for medium-sized datasets with low-latency, self-hosted search.
  • Future-proof our stack by avoiding vendor lock-in while keeping our PHP/Laravel ecosystem intact.

This is a low-risk, high-reward investment: minimal upfront cost, rapid implementation, and scalable search for our core features."*


For Engineering Teams:

*"TNTSearch is a drop-in, Laravel-friendly full-text search engine that replaces or augments Scout drivers. Here’s why it’s a great fit:

  • Seamless Integration: Works with Laravel Scout (via the official driver) or standalone. Example:
    $tnt = new TNTSearch;
    $tnt->loadConfig(['driver' => 'mysql', 'storage' => '/path/to/indexes']);
    $index = $tnt->createIndex('products.index');
    $index->query('SELECT * FROM products')->run();
    
  • Advanced Features Out of the Box:
    • Fuzzy search (e.g., typos tolerated).
    • Geo-search (find nearby locations with findNearest()).
    • Text classification (categorize content automatically).
    • Dynamic indexing (no full reindexing needed for updates).
  • Performance: Optimized for SQLite/MySQL/Redis backends. For large datasets, Redis mode (v4.0+) improves scalability.
  • Customization: Extend with custom tokenizers, stemmers, or classifiers for niche use cases.
  • Cost Savings: No API costs or cloud infrastructure—just self-hosted PHP.

Trade-offs:

  • Not ideal for petabyte-scale data (consider Elasticsearch).
  • Requires PHP expertise to tune indexing/storage.
  • No built-in dashboards (unlike Elasticsearch Kibana), but works well with Laravel’s admin panels.

Next Steps:

  1. Pilot: Test with a non-critical dataset (e.g., blog posts or product catalog).
  2. Benchmark: Compare latency/throughput against current solutions (e.g., Scout + Algolia).
  3. Scale: For large datasets, evaluate Redis backend or sharding.

This is a force multiplier for search-heavy features—let’s prototype it in [X weeks] and measure impact."*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
yandex/translate-api
voku/simple_html_dom
league/flysystem-vfs
bkwld/upchuck
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php