Download the PHP package andydefer/php-search without Composer

On this page you can find all versions of the php package andydefer/php-search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-search

PHP Search - Documentation

📦 Présentation

PHP Search est une bibliothèque PHP moderne pour la recherche floue dans des fichiers JSONL. Elle offre une solution complète avec indexation persistante, cache des résultats et support multi-index.

Caractéristiques principales

🚀 Installation

🎯 Utilisation rapide

En ligne de commande

En PHP

📚 Architecture

Moteurs de recherche

Moteur Description Usage
SearchEngine Moteur principal avec indexation persistante Production, gros volumes
JsonlSearchEngine Recherche directe sans index Petits volumes, tests

Composants principaux

📝 API principale

SearchEngine

Méthode Description
index(string $source): int Indexe une source (dossier/fichier)
search(string $query, int $limit = 5, ?string $source = null): array Recherche dans l'index
hasIndex(?string $source = null): bool Vérifie l'existence d'un index
getIndexStats(?string $source = null): array Statistiques de l'index
deleteIndex(?string $source = null): void Supprime un index
clearCache(?string $source = null, ?string $query = null): void Vide le cache
listIndexes(): array Liste tous les index

JsonlSearchEngine

Méthode Description
searchInDirectory(string $directory, array $fields, string $query, int $limit = 5): array Recherche dans un dossier
searchInFile(string $filePath, array $fields, string $query, int $limit = 5): array Recherche dans un fichier
searchInStream($stream, array $fields, string $query, int $limit = 5): array Recherche dans un stream
searchInIterable(iterable $iterable, array $fields, string $query, int $limit = 5): array Recherche dans un itérable
searchInIndex(string $indexPath, string $query, int $limit = 5): array Recherche dans un index

💡 Cas d'utilisation

1. Indexation de logs JSONL

2. Cache de résultats de recherche

3. Multi-index pour différents domaines

4. Recherche directe sans index

🔧 CLI - Commandes complètes

📊 Performance

Opération Complexité Notes
Indexation O(n × m) n = lignes, m = champs
Recherche (cache hit) O(1) Lecture fichier cache
Recherche (cache miss) O(i) i = items dans l'index
Recherche directe O(f × l) f = fichiers, l = lignes

🔗 Dépendances

📜 License

MIT License

👨‍💻 Auteur

Andy Kani - [email protected]

🙏 Contributions

Les contributions sont les bienvenues !


📖 Résumé rapide



All versions of php-search with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
andydefer/php-jsonl Version ^0.11.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package andydefer/php-search contains the following files

Loading the files please wait ...