简体   繁体   中英

Multiple modeling in Searckick using elasticsearch

I am using searckick gem which is based on elasticsearch. I tried doing searching for one mmodel its working fine. But now I want to search across two models. I tried many thing like: Searchkick.search("thequery", [Model1, Model2, Model3], other_options) and this Model1.search("thequery", index_name: [Model1.index.name, Model2.index.name, Model3.index.name]) In first solution I am getting error in search keyword. Thanks in advance.

Error : NoMethodError: undefined method 'search' for Searchkick:Module

The gem is probably out of date.

Try to run bundle update --source searchkick . It will only update Searchkick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM