[Xapian-discuss] Problems with xapian php bindings in osx

Jim jim at fayettedigital.com
Wed Nov 28 15:42:41 GMT 2007


Frank Claycomb wrote:
> Well what I want to do is search basically an entire mysql database 
> (making a quick search).  People in #php on freenode suggested xapian 
> to me.  Is xapian really what I want to use for this?  I used to think 
> it was but now I am not so sure.  I am finding conflicting definitions 
> of what xapian is and does.  Also I read that php documentation that 
> you pointed me to, it does not really tell me anything pertinent to 
> programming, just how to get it to work.  I am having some problems 
> finding the documentation that explains now to code for xapian (such 
> as the api in the php bindings).
>
> thanks for all of your help so far,
>
> -Frank
>

I currently support one client that has given up on his CMS search as 
being way too slow and asked me for a solution.  My solution was to 
extract the textual data from the database on a regular basis (daily in 
his case) and write it to a file and index that file.  The organization 
of the data was such that the was a node number associated with each 
record and the CMS worked by node number.  So I was able to index all 
the records, using the node number as a reference and when I did the 
search I was able to point the user to the data via a url including the 
node number.  For instance, http://somehost.com?node=9882

But we need to know a bit more about your situation.  Once you've 
indexed the data from the database someone is going to run a search 
query on it and generate some hits.  What exactly do you want to do at 
that point?  Is this web based, or a local application?  The data that 
is returned should probably include a reference to something that would 
allow you to retrieve the record that contained the data too.

Xapian cannot really be used to do real time queries on mysql databases 
or any other live database for that matter).  If that is an absolute 
requirement, then you should use the search mechanisms in the database.  
But if you can live with data that isn't 100% up to the minute, xapian 
will be significantly faster.

Jim.



More information about the Xapian-discuss mailing list