try to better explain actions and changes
[MojoFacets.git] / README
1 Mojo Facets - server side facet browsing using Mojolicious and jQuery UI
2
3
4 Data sources:
5
6 Put JSON file from Simile Exhibit project in data/ with extension .js or .json
7
8 Alternative format is pipe (|) separated text files with extension .txt
9 First column is always header with field names
10 Multi-line values should be wrapped in ^multi-line-text^
11
12 If you save bounch of html files with table in directory with .html extension, they will
13 we all read as single data set, allowing easy analysys of search results, for example.
14
15
16 Start with:
17
18     LANG=hr_HR.utf8 ./script/mojo_facets daemon --reload
19
20
21 Data action and changes:
22
23 There are two kinds of audit log in MojoFacets:
24
25 1. actions stored in /tmp/actions are clicks on user interface with parameters,
26    they will probably be erased on next reboot since they are in /tmp
27
28 2. changes in data/database.changes are more structured, including old value
29    and unique identifiers for that row
30
31 Changes can be applied on any dataset currently in memory.
32
33 Whole idea of changes is to create audit log which is detailed enough to recostruct
34 current state of dataset from source file and list of changes. However, to speed
35 up operations, you can periodically save your in-memory data to /tmp/ in perl
36 storeable format using save link in interface.
37
38
39 Data replication:
40
41 Actions can be replicated to other hosts using MASTER enviroment variable
42 or config menu
43
44     # slave
45     MASTER=http://localhost:4444 ./script/mojo_facets daemon --reload
46
47
48 Code console to modify data using perl snippets:
49
50 Experimental REPL console supports perl snippets which get $row hash which is one
51 element from your dataset.
52
53 If you want to create or update values, you will have to use $update hash to set
54 new values.
55
56 All values are repetable, but if you create just a scalar, magic(tm) inside MojoFacets
57 will try to upgrade it to [ $scalar ] so you don't have to do it explicitly.
58
59 Code examples are stored in public/code
60
61 They use column1,column2.description.pl notatition so only snippets which have applicable
62 column will be shown.
63
64
65 Export data:
66
67 All exported data is stored in public/export/database/
68
69 There you can find saved filters and items generated with export checkbox
70
71     filter.column_name.optional_description
72         items.column1.column2.column3
73
74