Re: New PHP API for Solr (Logic Solr API)

2011-03-30 Thread Lukas Kahwe Smith

On 27.03.2011, at 01:05, Israel Ekpo wrote:

 Lukas,
 
 How do you think it should have been designed?
 
 Most libraries are not going to have all the features that you need and while 
 there may be features about the library that you do not like others may 
 really appreciate them being there.
 
 As I said earlier in an earlier email a couple of months ago, the 
 SolrQuery:set(), get() and add() methods do exist for you to use if you 
 prefer not to use the feature specific methods in the SolrQuery class, thats 
 the beauty of it.
 
 The PECL extension was something I designed to use on a personal project and 
 it was really helpful in managing faceted search and other features that solr 
 has to offer. I decided to share it with the PHP community because I felt 
 others might need similar functionality. So it is possible that they may have 
 been use cases that applied to my project that may not be applicable to yours
 
 I initially used the SolrJ API to access Solr via Java and then when I had a 
 PHP project I decided to use something similar to SolrJ but at the time there 
 was nothing similar in the PHP realm
 
 http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/package-summary.html
 
 A review of the SolrJ API will offer more explanations on some of the 
 features present in the PECL API
  
 I will really love to get feedback from others about the design of the PECL 
 library about any other missing or extraneous features

Sorry for taking so long to get back.
I think to a large extend of course documentation would help, because right now 
there is just the list of methods with a short description. Of course I 
realize that its great that you released this to begin with and that I totally 
get why you are not spending hours to write descriptions and examples. Hey this 
is something where we the users should help.

Aside from this, it might be worthwhile to separate the list of methods 
somehow, maybe through inheritance, to ensure that users arent in the end 
searching through the long list of methods, where really all they want to do is 
convert an existing Solr query into your API (which imho works just fine with 
the generalized set/get/add methods). These specialized sugar syntax methods 
in the beginning let me to believe they were somehow necessary causing me to 
spend quite a bit of time searching for the right one.

And like I said one key feature I needed was deconstructing user supplied 
queries and constructing new queries out of that [1]. But I acknowledge this 
might be fairly advanced, though even in my simple projects I pretty much 
always ended up needing a quote method.

Hmm actually thinking about this some more, I guess I also ended up preferring 
pure PHP implementations because they simple integrate better with my IDE, that 
of course has no knowledge of the PECL Solr API. This to some extend circles 
back to the documentation argument, but of course goes a bit further. Its just 
more convenient to explore and learn the API via tab completion, which is of 
course not so easy to offer via a C extension API :-/

regards,
Lukas Kahwe Smith
m...@pooteeweet.org

[1] http://pooteeweet.org/blog/1796



Re: New PHP API for Solr (Logic Solr API)

2011-03-26 Thread Israel Ekpo
Lukas,

How do you think it should have been designed?

Most libraries are not going to have all the features that you need and
while there may be features about the library that you do not like others
may really appreciate them being there.

As I said earlier in an earlier email a couple of months ago, the
SolrQuery:set(), get() and add() methods do exist for you to use if you
prefer not to use the feature specific methods in the SolrQuery class, thats
the beauty of it.

The PECL extension was something I designed to use on a personal project and
it was really helpful in managing faceted search and other features that
solr has to offer. I decided to share it with the PHP community because I
felt others might need similar functionality. So it is possible that they
may have been use cases that applied to my project that may not be
applicable to yours

I initially used the SolrJ API to access Solr via Java and then when I had a
PHP project I decided to use something similar to SolrJ but at the time
there was nothing similar in the PHP realm

http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/package-summary.html

A review of the SolrJ API will offer more explanations on some of the
features present in the PECL API

I will really love to get feedback from others about the design of the PECL
library about any other missing or extraneous features

Thanks.

On Mon, Mar 7, 2011 at 4:04 AM, Lukas Kahwe Smith m...@pooteeweet.orgwrote:


 On 07.03.2011, at 09:43, Stefan Matheis wrote:

  Burak,
 
  what's wrong with the existing PHP-Extension
  (http://php.net/manual/en/book.solr.php)?


 the main issue i see with it is that the API isn't designed much. aka it
 just exposes lots of features with dedicated methods, but doesnt focus on
 keeping the API easy to overview (aka keep simple things simple and make
 complex stuff possible). at the same time fundamental stuff like quoting are
 not covered.

 that being said, i do not think we really need a proliferation of solr
 API's for PHP, even if this one is based on PHP 5.3 (namespaces etc). btw
 there is already another PHP 5.3 based API, though it tries to also unify
 other Lucene based API's as much as possible:
 https://github.com/dstendardi/Ariadne

 regards,
 Lukas Kahwe Smith
 m...@pooteeweet.org






-- 
°O°
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/


Re: New PHP API for Solr (Logic Solr API)

2011-03-10 Thread Liam O'Boyle
How about the Solr PHP Client (http://code.google.com/p/solr-php-client/)?
 We use this and have been quite happy with it, and it seems that it
addresses all of the concerns you expressed.

What advantages does yours offer?

Liam

On 8 March 2011 17:02, Burak burak...@gmail.com wrote:

 On 03/07/2011 12:43 AM, Stefan Matheis wrote:

 Burak,

 what's wrong with the existing PHP-Extension
 (http://php.net/manual/en/book.solr.php)?

 I think wrong is not the appropriate word here. But if I had to summarize
 why I wrote this API:

 * Not everybody is enthusiastic about adding another item to an already
 long list of server dependencies. I just wanted a pure PHP option.
 * I am not a C programmer either so the ability to understand the source
 code and modify it according to my needs is another advantage.
 * Yes, a PECL package would be faster. However, in 99% of the cases, after
 everything is said, coded, and byte-code cached, my biggest bottlenecks end
 up being the database and network.
 * Last of all, choice is what open source means to me.

 Burak











-- 
Liam O'Boyle

IntelligenceBank Pty Ltd
Level 1, 31 Coventry Street Southbank, Victoria 3006, Australia
P:   +613 8618 7810   F:   +613 8618 7899   M: +61 403 88 66 44

*Awarded 2010 Best New Business and Business of the Year - Business3000
Awards*

This email and any attachments are confidential and may contain legally
privileged information or copyright material. If you are not an intended
recipient, please contact us at once by return email and then delete both
messages. We do not accept liability in connection with transmission of
information using the internet.


Re: New PHP API for Solr (Logic Solr API)

2011-03-07 Thread Stefan Matheis
Burak,

what's wrong with the existing PHP-Extension
(http://php.net/manual/en/book.solr.php)?

Regards
Stefan

On Sun, Mar 6, 2011 at 11:31 PM, Burak burak...@gmail.com wrote:
 Hello,

 I have recently finished writing a PHP API for Solr and have released it
 under the Apache License. The project is called Logic Solr API and is
 located at https://github.com/buraks78/Logic-Solr-API/wiki. It has good unit
 test coverage (over 90%) but is still in alpha. So I am primarily interested
 in some feedback and help for testing if anybody is interested as my test
 setup is pretty limited in regards to the Solr version (1.4.1), PHP version
 (5.3.5), and Solr setup (data required for testing certain features fully is
 missing). The documentation is located at
 https://github.com/buraks78/Logic-Solr-API/wiki. Although it is pretty weak
 at this point, I believe it can get you started. I also have phpdocs under
 docs/api folder in the package if needed.

 Burak





Re: New PHP API for Solr (Logic Solr API)

2011-03-07 Thread Lukas Kahwe Smith

On 07.03.2011, at 09:43, Stefan Matheis wrote:

 Burak,
 
 what's wrong with the existing PHP-Extension
 (http://php.net/manual/en/book.solr.php)?


the main issue i see with it is that the API isn't designed much. aka it just 
exposes lots of features with dedicated methods, but doesnt focus on keeping 
the API easy to overview (aka keep simple things simple and make complex stuff 
possible). at the same time fundamental stuff like quoting are not covered.

that being said, i do not think we really need a proliferation of solr API's 
for PHP, even if this one is based on PHP 5.3 (namespaces etc). btw there is 
already another PHP 5.3 based API, though it tries to also unify other Lucene 
based API's as much as possible:
https://github.com/dstendardi/Ariadne

regards,
Lukas Kahwe Smith
m...@pooteeweet.org





Re: New PHP API for Solr (Logic Solr API)

2011-03-07 Thread dan whelan

When are you going to complete the Texis Search API?



On 3/6/11 2:31 PM, Burak wrote:

Hello,

I have recently finished writing a PHP API for Solr and have released 
it under the Apache License. The project is called Logic Solr API 
and is located at https://github.com/buraks78/Logic-Solr-API/wiki. It 
has good unit test coverage (over 90%) but is still in alpha. So I am 
primarily interested in some feedback and help for testing if anybody 
is interested as my test setup is pretty limited in regards to the 
Solr version (1.4.1), PHP version (5.3.5), and Solr setup (data 
required for testing certain features fully is missing). The 
documentation is located at 
https://github.com/buraks78/Logic-Solr-API/wiki. Although it is pretty 
weak at this point, I believe it can get you started. I also have 
phpdocs under docs/api folder in the package if needed.


Burak






Re: New PHP API for Solr (Logic Solr API)

2011-03-07 Thread Burak

On 03/07/2011 12:43 AM, Stefan Matheis wrote:

Burak,

what's wrong with the existing PHP-Extension
(http://php.net/manual/en/book.solr.php)?
I think wrong is not the appropriate word here. But if I had to 
summarize why I wrote this API:


* Not everybody is enthusiastic about adding another item to an already 
long list of server dependencies. I just wanted a pure PHP option.
* I am not a C programmer either so the ability to understand the source 
code and modify it according to my needs is another advantage.
* Yes, a PECL package would be faster. However, in 99% of the cases, 
after everything is said, coded, and byte-code cached, my biggest 
bottlenecks end up being the database and network.

* Last of all, choice is what open source means to me.

Burak