Differences between sunspots and tires

I am currently using sphinx thinking for search. Now I'm considering using sunspot or tire because they automatically index new content.

Are there any performance differences between the two? Is there anything else I should worry about?

+4
source share
1 answer

Obviously, the first difference is that you want to decide which search engine you think is best for your purposes: SOLR or Elasticsearch. We are using SOLR through Sunspot right now, but we are seriously thinking about switching to Elasticsearch because it seems like the best match with the features of the web application we want. It was incredibly simple to configure Tire, install the attachment plugin and get a search that works with data in both the database and PDF attachments, with highlighting (now works thanks to a different answer here on SO). In addition, in terms of development / debugging, you can use curl to test queries and see the results just fine.

In terms of coding in the Rails application, you are correct that both Sunspot and Tire are very similar. They both use the idea of ​​a search / match block, which determines which fields to index and how, and then perform a search, are pretty similar. In terms of performance, I could give Tire a little edge, partly because the way it is paginated and indexed in bulk is pretty slippery (using the rake: import task). The bus's ability to control indexing content via to_json is also very flexible.

Ultimately, I think Sunspot and Tire are probably close enough that choosing between SOLR vs Elasticsearch is where you really make your decision.

+1
source

Source: https://habr.com/ru/post/1387529/


All Articles