Download the PHP package gitzaai/cnsearch without Composer

On this page you can find all versions of the php package gitzaai/cnsearch. 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 cnsearch

CN Search for Flarum 2.0

gitzaai/cnsearch is a Flarum 2 extension that uses Meilisearch as the discussion search backend. It indexes discussion titles and visible comment content, then plugs into Flarum's built-in discussion search flow.

Screenshots

Admin Settings

Search Results

Features

Installation

For Flarum 2.0 beta 8 and newer, run php flarum assets:publish after installing or updating the extension to make sure frontend assets match the current extension code.

Configuration

The extension does not ship with a preset Meilisearch host or API key. Configure them in the admin panel, or use the bundled command:

If your Meilisearch instance requires authentication, provide your own key:

You can also write the settings directly:

If your Flarum database tables use a prefix, replace settings with the prefixed table name.

Queue

CN Search pushes every index update onto Flarum's queue (SyncDiscussionJob, ReindexJob). With Flarum's default sync driver each job still runs in the same request, but using a real queue driver (e.g. database) is strongly recommended on busy forums so post creation never blocks on Meilisearch. Configure a queue driver and run php flarum queue:work to process jobs in the background.

Verification

Rebuild the index:

If Flarum reports There are no commands defined in the "cnsearch" namespace., enable CN Search in the admin panel first, then run the command again.

Check status:

Documents is the number of indexed Meilisearch documents, which normally matches the number of visible discussions. Source posts is the number of visible comment posts included in the index, and can be larger than Documents.

Test a search term directly:

After updating the extension, these commands are useful:

API

Search:

Status checks and reindexing require an admin session:

Links


All versions of cnsearch with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
flarum/core Version ^2.0
meilisearch/meilisearch-php Version ^1.0 || >=2.0.0-beta.1 <3.0
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 gitzaai/cnsearch contains the following files

Loading the files please wait ...