5aa0709d8900b567fb47252050a9bab0744110e9
[phinde.git] / README.rst
1 **********************************
2 phinde - generic web search engine
3 **********************************
4 Self-hosted search engine you can use for your static blog or about
5 any other website you want search functionality for.
6
7 My live instance is at http://search.cweiske.de/ and indexes my
8 website, blog and all linked URLs.
9
10
11 ========
12 Features
13 ========
14 - Crawler and indexer with the ability to run many in parallel
15 - Shows and highlights text that contains search words
16 - Boolean search queries:
17
18   - ``foo bar`` searches for ``foo AND bar``
19   - ``foo OR bar``
20   - ``title:foo`` searches for ``foo`` only in the page title
21 - Facets for tag, domain, language and type
22 - Date search:
23
24   - ``before:2016-08-30`` - modification date before that day
25   - ``after:2016-08-30`` - modified after that day
26   - ``date::2016-08-30`` - exact modification day match
27 - Site search
28
29   - Query: ``foo bar site:example.org/dir/``
30   - or use the ``site`` GET parameter:
31     ``/?q=foo&site=example.org/dir``
32 - OpenSearch support with HTML and Atom result lists
33 * Instant indexing with WebSub (formerly PubSubHubbub)
34
35
36 ============
37 Dependencies
38 ============
39 - PHP 5.5+
40 - elasticsearch 2.0
41 - gearman
42 - Console_CommandLine
43 - Net_URL2
44
45
46 =====
47 Setup
48 =====
49 FIXME: This section is incomplete.
50
51
52 System service
53 ==============
54 When using systemd, you can let it run multiple worker instances when
55 the system boots up:
56
57 #. Copy files ``data/systemd/phinde*.service`` into ``/etc/systemd/system/``
58 #. Adjust user and group names, and the work directories
59 #. Enable three worker processes::
60
61      $ systemctl daemon-reload
62      $ systemctl enable phinde@1
63      $ systemctl enable phinde@2
64      $ systemctl enable phinde@3
65      $ systemctl enable phinde
66      $ systemctl start phinde
67 #. Now three workers are running. Restarting the ``phinde`` service also
68    restarts the workers.
69
70
71
72 Cron job
73 ========
74 Run ``bin/renew-subscriptions.php`` once a day with cron.
75
76
77 =====
78 Howto
79 =====
80
81 Delete index data from one domain::
82
83     $ curl -iv -XDELETE -H 'Content-Type: application/json' -d '{"query":{"term":{"domain":"example.org"}}}' http://127.0.0.1:9200/phinde/_query
84
85 That's delete-by-query 2.0, see
86 https://www.elastic.co/guide/en/elasticsearch/plugins/2.0/delete-by-query-usage.html
87
88
89 ============
90 About phinde
91 ============
92
93 Source code
94 ===========
95 phinde's source code is available from http://git.cweiske.de/phinde.git
96 or the `mirror on github`__.
97
98 __ https://github.com/cweiske/phinde
99
100
101 License
102 =======
103 phinde is licensed under the `AGPL v3 or later`__.
104
105 __ http://www.gnu.org/licenses/agpl.html
106
107
108 Author
109 ======
110 phinde was written by `Christian Weiske`__.
111
112 __ http://cweiske.de/