[Xapian-discuss] php bindings

Olly Betts olly at survex.com
Thu Mar 9 01:11:05 GMT 2006


On Tue, Mar 07, 2006 at 07:02:35PM +0530, durga bidaye wrote:
> i m not concerned with readin input frm a form actually. wat i dnt
> understand in that example is that, nowhere are they "connectin" to a
> database. i mean no commands fr connectin to the quartz DB( like we have
> mysql_connect () to connect to a mysql DB).

MySQL requires you to run a daemon which you then need to connect to.
Xapian doesn't use such a daemon.

> Is it because quartz is not a proper kinda DB?

Depends what you mean by "a proper kinda DB" - Xapian's not a relational
database and doesn't work in SQL (it's designed to index and search
free text and neither being relational nor speaking SQL really makes
much sense for that).  I suspect many would view a "proper database" as
"a relational database which speaks SQL".

Incidentally, neither being relational nor implementing SQL requires a
daemon - SQLite is a daemon-less implementation of such a system.

The reason we chose a daemon-less design is that running a daemon adds
admin hassle - you need to make sure the daemon gets started and stays
running, and somehow authenticate connections and decide what they're
allowed to do.  A daemon potentially removes a small amount of overhead
in opening a database, but quartz databases are designed not to be
expensive to open and the communication with the daemon and any
authentication required also adds overhead.

> Anyways does the absence of such a connecting statement
> mean that there is no need to explicitly connect to the quartz DB thru the
> server?

Yes, since there is no server.

> and does it mean i cant just tweak the code a bit( for collectin
> data frm form input fields) n use it fr searchin(simplesearch.php) right
> away?

Well, simplesearch.php contains all the code needed to open and search a
Xapian database, so you just need to make the changes required to handle
input from a CGI form submission.

Cheers,
    Olly



More information about the Xapian-discuss mailing list