Papipo / locomotivecms-search

Content search for LocomotiveCMS
MIT License
12 stars 8 forks source link

'No such command: text' on seach #23

Open kt32291 opened 9 years ago

kt32291 commented 9 years ago

I followed the documentation on the LocomotiveCMS site for implementing search but I can't seem to get past this error (this is what it spits out if I display search)

{"error"=>true, "message"=>"The operation: #\"active_search_mongoid_indices\", \"search\"=>\"about\", \"language\"=>\"english\", \"filter\"=>{\"stored.site_id\"=>\"5583398157837251f5000002\", \"locale\"=>\"en\"}}\n @fields=nil>\nfailed with error 59: \"no such command: text\"\n\nSee https://github.com/mongodb/mongo/blob/master/docs/errors.md\nfor details about this error."}

I know that mongo removed the text command, but I can't figure out where it's being used, or if I maybe I just have the wrong version of one of the dependencies or something?

neversion commented 9 years ago

I have got the same error.

ziedbargaoui commented 9 years ago

Same here ... Where to fix this?

Papipo commented 9 years ago

@did what's the status of this? I guess it's recommended to just use MongoDB >= 2.4 enabling full text search, or just a separate search engine, right?

did commented 9 years ago

hi all!

This gem won’t be part of Locomotive anymore in v3. I’m going to rewrite it completely and embed this functionality in the core of Steam. No idea about how I’ll do this but I’ll figure something out for sure :-) All suggestions are more than welcome ;-)

On Oct 1, 2015, at 2:39 PM, Rodrigo Alvarez notifications@github.com wrote:

@did https://github.com/did what's the status of this? I guess it's recommended to just use MongoDB >= 2.4 enabling full text search, or just a separate search engine, right?

— Reply to this email directly or view it on GitHub https://github.com/Papipo/locomotivecms-search/issues/23#issuecomment-144825643.

Papipo commented 9 years ago

Just remember that mongodb 2.4 has fulltext search option and 2.6 has it enabled by default. Things should be a lot easier (and better) with that.

Although the recommended usage should be with ElasticSearch, Solr or something like that. I don't know if v3 will have some specific mechanism to hook async persistent tasks, if using rails 4 there are some interesting ActiveJob backends. That would ease third party search engines integration.

did commented 9 years ago

thanks @Papipo for the information about MongoDB.

On an architecture standpoint, the search feature should be embedded in Steam (storage agnostic). Each application would then use a special adapter. Wagon, since it deals with content from the filesystem would have a minimal adapter (we can imagine this adapter would return the content of YAML file). On the other side, Engine would use a more complex adapter with async tasks when a new content is added or simply modified.