Skip to content

A Sqlite3-based simple search plugin for the Lithium PHP Framework. Includes a crawler, stemmer, and basic relevance ranking.

Notifications You must be signed in to change notification settings

raisinbread/li3_simplesearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
    Introduction
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/

SimpleSearch is a learning experiment of mine to try to solve the problem of not having offline searches for documentation. This plugin for the Lithium PHP Framework has the following (rough) features:

1. URL crawling/fetching
2. Content stemming for better fulltext-like search results
3. Pre-processing for simple ranked results

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
    Installation
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/

1. Download this plugin and install at app/libraries/li3_simplesearch

2. Add this to app/config/bootstrap/libraries.php:

     Libraries::add('li3_simplesearch');

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
    Basic Usage
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/

Crawl your site:

li3 crawl --url=http://lithify.me

Make sure you've got data:

li3 search

Perform a query:

li3 search query terms go here

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
    TODOs
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/

1. Optimize crawling process to use many fetches in parallel

2. Fix ranking algorithm. Placeholder logic right now adds term weights rather than multiplies them. No native aggregate product function in Sqlite3 right now. 

3. Better model interface for searching in a real app.

4. Better custom query support in Term model for response objects rather than arrays.

5. General performance improvements and elegance refactors.

About

A Sqlite3-based simple search plugin for the Lithium PHP Framework. Includes a crawler, stemmer, and basic relevance ranking.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages