Skip to content

A simple Pragma module which can help to index and search text in Pragma Framework

License

Notifications You must be signed in to change notification settings

pragma-framework/search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pragma Search

A simple Pragma module which can help to index and search text in Pragma Framework.

Installation

In composer.json add:

require {"pragma-framework/search": "dev-master"}

Config

Pragma\Search use a stemmer (wamania/php-stemmer) in order to extends the search to other words with the same root.

To handle your language, you can specify the lang of your text:

define('STEMMER_LANGUAGE', 'French');

By default, the stemmer works with "English"

And define:

define('PRAGMA_MODULES','core,search');

For CLI indexation.

Define your own min length for words the system should index

By default, the min length is 3 characters. But you can define a custom constant named PRAGMA_SEARCH_MIN_WORD_LENGTH in order to change this behavior.

Skip the contexts during the indexation

If you don't aim to display the context of a result coming from the search, you can skip the contexts during the indexation by setting PRAGMA_SEARCH_SKIP_CONTEXT to true.

CLI exec

php public/index.php indexer:run

or

php public/index.php indexer:rebuild

About

A simple Pragma module which can help to index and search text in Pragma Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages