{"issue":{"created_at":"2011-12-01T16:21:46Z","state":"closed","updated_at":"2011-12-02T15:04:13Z","comments":3,"user":{"gravatar_id":"83304c087b2b1b08865493d25281db89","id":793546,"url":"https://api.github.com/users/hyperrjas","avatar_url":"https://secure.gravatar.com/avatar/83304c087b2b1b08865493d25281db89?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"hyperrjas"},"body":"Hey Balexand, I have a new problem with sunspot_mongo with new sunspot-1.3.0 and rsolr-1.0.6. When I try \r\n\r\nrake sunspot:mongo:reindex\r\n\r\nreindexing Model\r\nrake aborted!\r\nRSolr::Error::Http - 500 Internal Server Error\r\nError: no segments* file found in org.apache.lucene.store.NIOFSDirectory@/home/ubuntu/Desktop/Project/solr/data/development/index: files: lucene-c43d1f7f8a62a2ff6fed0bddcce1a574-write.lock\r\n\r\njava.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.NIOFSDirectory@/home/ubuntu/Desktop/Project/solr/data/development/index: files: lucene-c43d1f7f8a62a2ff6fed0bddcce1a574-write.lock\r\n\tat org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:655)\r\n\tat org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:538)\r\n\tat org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:306)\r\n\tat org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1577)\r\n\tat org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1402)\r\n\tat org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:190)\r\n\tat org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:98)\r\n\tat org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:173)\r\n\r\nRequest Data: \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><add><doc><field name=\\\"id\\\">House 4ed795731d41c818d1000031</field><field name=\\\"type\\\">House</field><field name=\\\"class_name\\\">House</field><field name=\\\"content_text\\\">This is a new house check</field></doc></add>\"\r\n\r\nBacktrace: /home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/rsolr-1.0.6/lib/rsolr/client.rb:227:in `adapt_response'\r\n/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/rsolr-1.0.6/lib/rsolr/client.rb:164:in `execute'\r\n/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/rsolr-1.0.6/lib/rsolr/client.rb:158:in `send_and_receive'\r\n(eval):2:in `post'\r\n/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/rsolr-1.0.6/lib/rsolr/client.rb:67:in `update'\r\n/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/rsolr-1.0.6/lib/rsolr/client.rb:87:in `add'\r\n/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/sunspot-1.3.0/lib/sunspot/indexer.rb:101:in `add_documents'\r\n/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/sunspot-1.3.0/lib/sunspot/indexer.rb:26:in `add'\r\n/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/sunspot-1.3.0/lib/sunspot/session.rb:91:in `index'\r\n/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/sunspot-1.3.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `index'\r\n/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/sunspot-1.3.0/lib/sunspot.rb:184:in `index'\r\n\r\nTasks: TOP => sunspot:mongo:reindex\r\n(See full trace by running task with --trace)\r\n\r\nThank you!","assignee":null,"id":2416420,"number":3,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"rake aborted! RSolr::Error::Http - 500 Internal Server Error","closed_at":"2011-12-02T10:29:12Z","html_url":"https://github.com/balexand/sunspot_mongo/issues/3","url":"https://api.github.com/repos/balexand/sunspot_mongo/issues/3","milestone":null},"action":"created","comment":{"created_at":"2011-12-02T15:04:13Z","updated_at":"2011-12-02T15:04:13Z","user":{"gravatar_id":"6180d7335815945eda8651e080be4b98","id":181187,"url":"https://api.github.com/users/balexand","avatar_url":"https://secure.gravatar.com/avatar/6180d7335815945eda8651e080be4b98?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"balexand"},"body":"Both Solr and ElasticSearch a excellent, but I prefer ElasticSearch for the reasons that I mentioned in the README. Here's [a discussion comparing search engines](http://stackoverflow.com/questions/2271600/elasticsearch-sphinx-lucene-solr-xapian-which-fits-for-which-usage) in case you're interested. Or better yet, try it out yourself and decide what you prefer.\r\n\r\nTire's ActiveModel integration works with Mongoid (although I'm personally using MongoMapper). Make sure you explicitly define your mapping using `tire.mapping` and use the `Article.tire.search` notation instead of `Article.search` since there are some [naming conflicts with Mongoid](https://github.com/karmi/tire/issues/7). This is all covered in the [Tire README](https://github.com/karmi/tire) under the heading \"ActiveModel Integration\".\r\n\r\nHere's an example model.\r\n\r\n    class Article\r\n      include Mongoid::Document\r\n      include Tire::Model::Search\r\n      include Tire::Model::Callbacks\r\n\r\n      field :name, :type => String\r\n      field :content, :type => String\r\n\r\n      tire.mapping do\r\n        indexes :id,           :type => 'string',  :index    => :not_analyzed\r\n        indexes :title,        :type => 'string',  :analyzer => 'snowball', :boost => 100\r\n        indexes :content,      :type => 'string',  :analyzer => 'snowball'\r\n      end\r\n    end\r\n","id":2990990,"url":"https://api.github.com/repos/balexand/sunspot_mongo/issues/comments/2990990"}}