/usr/portage

Build queries for Lucene/Solr indexes in PHP 2

We use Solr a lot at InterNations. Beside usual full text searches, we use it every time we need to receive documents nearly free of charge. It is fast, it is stable and, after some wrestling, our data import works very well as well.

For more than a year we added more and more functionality to a component for building Solr/Lucene queries programmatically. We provide two different ways to create queries: for complex queries we use an expression builder, for simpler ones we have a string based class. A huge advantage of a programmatic API is security: while Lucene’s query language is read-only and therefore non-destructive, query injections can lead to serious data breaches, which both components help to avoid by escaping input strings.

We now feel they are mature and stable enough to be released to the public: say hello to internations/solr-query-component.

Filed on 23-03-2013, 21:09 under , , , , & two comments & no trackbacks

Trackbacks

Trackback specific URI for this entry

No Trackbacks

Comments

  1. gaetano giunta says:
    published on March 24th 2013, 08:32:22 am *

    What are the differences compared to other solr frameworks such as e.g. the Zeta Components one?

    Reply

  2. Lars Strojny replys:
    published on March 24th 2013, 11:05:41 am *

    I don’t know Zeta Components Search very well, but from a first glimpse, it looks just too limited in what you can achieve. Besides that, escaping is completely missing as well as it is coupled to a specific client, which we particular didn’t want. You can read more about that in the "integration docs":https://github.com/InterNations/SolrQueryComponent/blob/master/docs/03-integration.md.

    Reply

Add a Comment & let me know what you think