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