From bc2b328eb7c53c6c8380a82a2ccbb29275e27b48 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 14 Dec 2015 23:09:14 -0500 Subject: documentation related to search, needs further review --- man/man1/sisu.1 | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 125 insertions(+), 10 deletions(-) (limited to 'man/man1') diff --git a/man/man1/sisu.1 b/man/man1/sisu.1 index ca46ef99..8f1b1d91 100644 --- a/man/man1/sisu.1 +++ b/man/man1/sisu.1 @@ -1,4 +1,4 @@ -.TH "sisu" "1" "2015-05-21" "7.1.3" "SiSU" +.TH "sisu" "1" "2014-02-05" "7.1.5" "SiSU" .br .SH NAME .br @@ -3417,12 +3417,6 @@ viral_spiral.david_bollier.sst .SH SISU SEARCH - INTRODUCTION -.BR - -.B SiSU -output can easily and conveniently be indexed by a number of standalone -indexing tools, such as Lucene, Hyperestraier. - .BR Because the document structure of sites created is clearly defined, and the text @@ -3440,15 +3434,98 @@ a document corpus searchable with that degree of granularity. Basically, your match criteria is met by these documents and at these locations within each document, which can be viewed within the database directly or in various output formats. + +.BR + +.B SiSU +can populate an sql database (sqlite3 or postgresql) with documents made up of +their objects. It also can generate a cgi search form that can be used to query +the database. + +.BR +In order to use the built in search functionality you would take the following +steps. + +.BR +* use sisu to populate an sql database with with a sisu markup content + +.BR + * sqlite3 should work out of the box + +.BR + * postgresql may require some initial database configuration + +.BR +* provide a way to query the database, which sisu can assist with by + +.BR + * generating a sample ruby cgi search form, required (sisu configuration + recommended) + +.BR + * adding a query field for this search form to be added to all html files + (sisu configuration required) .SH SQL -.SH POPULATING SQL TYPE DATABASES +.SH POPULATE THE DATABASE + + +.BR +TO populate the sql database, run sisu against a sisu markup file with one of +the following sets of flags +.nf +sisu --sqlite filename.sst +.fi + + +.BR +creates an sqlite3 database containing searchable content of just the sisu +markup document selected +.nf +sisu --sqlite --update filename.sst +.fi + + +.BR +creates an sqlite3 database containing searchable content of marked up +document(s) selected by the user from a common directory +.nf +sisu --pg --update filename.sst +.fi + + +.BR +fills a postgresql database with searchable content of marked up document(s) +selected by the user from a common directory + +.BR +For postgresql the first time the command is run in a given directory the user +will be prompted to create the requisite database, at the time of writing the +prompt sisu provides is as follows: +.nf +no connection with pg database established, you may need to run: + createdb "SiSU.7a.current" + after that don't forget to run: + sisu --pg --createall + before attempting to populate the database +.fi + + +.BR +The named database that sisu expects to find must exist and if necessary be +created using postgresql tools. If the database exist but the database tables +do not, sisu will attempt to create the tables it needs, the equivalent of the +requested sisu --pg --createall command. + +.BR +Once this is done, the sql database is populated and ready to be queried. +.SH SQL TYPE DATABASES .BR .B SiSU -feeds sisu markupd documents into sql type databases +feeds sisu markup documents into sql type databases .I PostgreSQL [^14] and/or .I SQLite @@ -3661,6 +3738,44 @@ updates file contents in database removes specified document from sqlite database. .SH CGI SEARCH FORM + +.BR +For the search form, which is a single search page + +.BR +* configure the search form + +.BR +* generate the sample search form with the sisu command, (this will be based on +the configuration settings and existing found sisu databases) + +.BR +For postgresql web content you may need to edit the search cgi script. Two +things to look out for are that the user is set as needed, and that the any +different databases that you wish to be able to query are listed. + +.BR +correctly, you may want www-data rather than your username. +.nf +@user='www-data' +.fi + + +.BR +* check the search form, copy it to the appropriate cgi directory and set the +correct permissions + +.BR +For a search form to appear on each html page, you need to: + +.BR +* rely on the above mentioned configuration of the search form + +.BR +* configure the html search form to be on + +.BR +* run the html command .SH SETUP SEARCH FORM @@ -3682,7 +3797,7 @@ You then need to create the database that sisu will use, for sisu manual in the directory manual/en for example, (when you try to populate a database that does not exist sisu prompts as to whether it exists): .nf -createdb SiSUv6a_manual +createdb SiSU.7a.manual .fi -- cgit v1.2.3