118 points · by friendlytuna · 14y ago · 48 comments
It's something I threw together in a couple hours, and figured I'd iterate and improve over the next couple days, so please bear with the mistakes.
I fixed the more glaring errors (copy field, dynamic fields , Django etc), and will continue to do so as comments come in.
Tire's docs are a bit lacking but it maps more-or-less 1:1 with ElasticSearch, so it's not too bad.
Very pleased with the performance ElasticSearch provides. The installation was a bit foreign for me personally (a java service container? openjdk 6 or 7?) but it's lightning quick and very flexible.
I chose to go the ElasticSearch route mainly due to my need for Geospatial indexing. Solr does it too, but Foursquare[1] uses ElasticSearch and so that got me interested in learning more. Geo queries are really fast. My last experience with Geo involved GeoDjango and all kinds of obnoxious hacks to PostgreSQL to make it work. With ElasticSearch you tell it to index a point and boom you're off to the races.
[0]: http://freshbsd.org/
It'd be great if their docs had versioning (like the Apache HTTP Server Project), but I suspect that isn't on anyone's roadmap.
That's because R-Trees don't scale well with random write loads.
R-tree insertion performance is extremely dependent on insertion order (search for "sort tile recursive"). They're best used for problems where the data can be bulk-loaded and left alone. If random writes are an important part of the problem (as they are for most web-based tools), R-Trees are a bad idea.
That said, they carry a lot of annoying edge cases when determining the adjacency of quadrants, so they're hardly a panacea to geospatial search. Lucene 3 and 4 make a lot of progress in spatial search, but there's still a fair bit of room for improvement.
I can't speak for ElasticSearch but there are a couple things in the Solr list that I'm not sure about.
"Multiple document types per schema" - You can use dynamic fields so that you don't even need to define your document schema
"Schema change requires restart" - I think in MultiCore it happens when you swap cores (which is a good way of running solr) [0]
[0] http://stackoverflow.com/questions/10417422/solr-schema-chan...
Personally, I'd like to see similar comparisons for other search engines, like Sphinx and Postgres Full-Text. When I talk to people about search engines, the first questions they ask me are to compare one against some other.
If, as was my case, the most complex search you've ever made before was a fulltext search on a database field then you'll be lost for a good couple days until you understand what's going on.
http://elasticsearch-users.115913.n3.nabble.com/Apply-dynami...
That means that as new documents arrive with fields that were never seen before, if those fields end in _ts, they will be properly indexed.
That feels like dynamic field support to me.
I'm skeptical about claims of different quality of relevancy results, since IndexTank/Searchify is also based on Lucene (looks like 3.0.1 in the canonical repo), and should share all the same fundamental relevancy and scoring functionality.
It's actually heavily tweaked (this is what the IndexTank team has told me), and apparently contains components of Solr