Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Apr 15, 2022. It is now read-only.

example for using TNT in a simple queries

NotificationsYou must be signed in to change notification settings

the94air/TNT-search-demo

Repository files navigation

A simple demo for TNTSearch full text search engine.


###usage

  1. install TNTSearch dependence by adding this to the Terminal from the root of the demo folder
composer update
  1. Import database structure to you database insearch.sql file
  2. add your database Configurationstart.php file
$tnt->loadConfig(['driver'    =>'mysql','host'      =>'localhost','database'  =>'search','username'  =>'username','password'  =>'password','storage'   =>'C:/xampp/htdocs/tntsearch',// Folder to save indexes into.'charset' =>'utf8','collation' =>'utf8_general_ci']);
  1. To create new index add this code after the$tnt->loadConfig in thestart.php file. And then reload the page in your browser.
$indexer =$tnt->createIndex('articles.index');$indexer->query('SELECT id, title, article, slug FROM articles;');//$indexer->setLanguage('german'); // Select language OR disable language $indexer->setLanguage('no');$indexer->run();exit();//you should use this code only once for creating the index file. After that you should delete the code

###you will find the rest of documentation inTNTSearch Readme.md

About

example for using TNT in a simple queries

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp