-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
49 lines (30 loc) · 1.64 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
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.