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: solr php client vs file_get_contents?
Date Tue, 15 Dec 2009 15:55:15 GMT
On Tue, Dec 15, 2009 at 8:49 AM, Faire Mii <faire.mii@gmail.com> wrote:

> i am using php to access solr and i wonder one thing.
>
> why should i use solr php client when i can use
>
> $serializedResult = file_get_contents('http://localhost:8983/solr/
> select?q=niklas&wt=phps');
>
> to get the result in arrays and then print them out?
>
> i dont really get the difference. is there any richer features with the php
> client?
>
>
> regards
>
> fayer



Hi Faire,

Have you actually used this library before? I think the library is pretty
well thought out.

>From a simple glance at the source code you can see that one can use it for
the following purposes:

1. Adding documents to the index (which you cannot just do with
file_get_contents alone). So that's one diff

2. Updating existing documents

3. Deleting existing documents.

4. Balancing requests across multiple backend servers

There are other operations with the Solr server that the library can also
perform.

Some example of what I am referring to is illustrated here

http://code.google.com/p/solr-php-client/wiki/FAQ

http://code.google.com/p/solr-php-client/wiki/ExampleUsage

IBM also has an interesting article illustrating how to add documents to the
Solr index and issue commit and optimize calls using this library.

http://www.ibm.com/developerworks/opensource/library/os-php-apachesolr/

The author of the library can probably give you more details on what the
library has to offer.

I think you should download the source code and spend some time looking at
all the features it has to offer.

In my opinion, it is not fair to compare a well thought out library like
that with a simple php function.
-- 
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.
http://www.israelekpo.com/

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