lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Israel Ekpo <israele...@gmail.com>
Subject Re: Newbie tips: migrating from mysql fulltext search / PHP integration
Date Mon, 16 Nov 2009 06:30:22 GMT
On Mon, Nov 16, 2009 at 12:34 AM, Mattmann, Chris A (388J) <
chris.a.mattmann@jpl.nasa.gov> wrote:

> WOW, +1!! Great job, PHP!
>
> Cheers,
> Chris
>
>
>
> On 11/15/09 10:13 PM, "Otis Gospodnetic" <otis_gospodnetic@yahoo.com>
> wrote:
>
> Hi,
>
> I'm not sure if you have a specific question there.
> But regarding "PHP integration" part, I just learned PHP now has native
> Solr (1.3 and 1.4) support:
>
>  http://twitter.com/otisg/status/5757184282
>
>
> Otis
> --
> Sematext is hiring -- http://sematext.com/about/jobs.html?mls
> Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR
>
>
>
> ----- Original Message ----
> > From: mbneto <mbneto@gmail.com>
> > To: solr-user@lucene.apache.org
> > Sent: Sun, November 15, 2009 4:56:15 PM
> > Subject: Newbie tips: migrating from mysql fulltext search / PHP
> integration
> >
> > Hi,
> >
> > I am looking for alternatives to MySQL fulltext searches.  The combo
> > Lucene/Solr is one of my options and I'd like to gather as much
> information
> > I can before choosing and even build a prototype.
> >
> > My current need does not seem to be different.
> >
> > - fast response time (currently some searches can take more than 11sec)
> > - API to add/update/delete documents to the collection
> > - way to add synonymous or similar words for misspelled ones (ex. Sony =
> > Soni)
> > - way to define relevance of results (ex. If I search for LCD return
> > products that belong to the LCD category, contains LCD in the product
> > definition or ara marked as special offer)
> >
> > I know that I may have to add external code, for example, to take the
> > results and apply some business logic to resort the results but I'd like
> to
> > know, besides the wiki and the solr 1.4 Enterprise Seacrh Server book
> (which
> > I am considering to buy) the tips for solr usage.
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Chris Mattmann, Ph.D.
> Senior Computer Scientist
> NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
> Office: 171-266B, Mailstop: 171-246
> Email: Chris.Mattmann@jpl.nasa.gov
> WWW:   http://sunset.usc.edu/~mattmann/<http://sunset.usc.edu/%7Emattmann/>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Adjunct Assistant Professor, Computer Science Department
> University of Southern California, Los Angeles, CA 90089 USA
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>

Hi,

There is native support for Solr in PHP but currently you have to build it
as a PECL extension.

It is currently not bundled with the PHP source yet but it is down loadable
from the PECL project homepage

http://pecl.php.net/package/solr

If you currently have pecl support built into your php installation you can
install it by running the following command

pecl install solr-beta

Some usage examples are available here

http://us3.php.net/manual/en/solr.examples.php

More details are available here

http://www.php.net/manual/en/book.solr.php

I use Solr with PHP 5.2

- In PHP, the SolrClient class has methods to add, update, delete and
rollback changes to the index made since the last commit.
- There are also built-in tools in Solr that allow you to analyze and modify
the data before indexing it and when searching for it.
- with Solr you can define synonyms (check the wiki for more details)
- Solr also allows you to sort by score (relevance)
- You can specify the fields that you want either as (optional, required or
prohibited)

My last two points could take care of your last requirement.

Solr is awesome and most of the search I perform return sub-second response
times.

Its several hundred folds easier and more efficient than MySQL fulltext.
believe me.
-- 
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message