Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8370833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:00:40+00:00 2026-06-09T14:00:40+00:00

How can I chain metasearchs’ search method ? @result = User.search(params[:search]).search(params[:filters]) We can call

  • 0

How can I chain metasearchs’ search method ?

@result = User.search(params[:search]).search(params[:filters])

We can call chain method on ActiveRecord like

User.active.male.where( age: 14..20)

its chaining is possible on meta search’s result ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:00:42+00:00Added an answer on June 9, 2026 at 2:00 pm

    I got it working.. If you had the same problem, you can try following.

    The search method of meta_search returns MetaSearch::Search::ModelName where ModelName is the name of your model. Meta_search provides a method relation for this object. You can call relation method to get an ActiveRecord::Relation object and then you can call the search method again on that object. See the code below to see what I am exactly talking about.

    @result = User.search(params[:search])
    @search = @result.relation.search(params[:filters])
    

    Here @result is the instance of MetaSearch::Search::User so we can call relation method to get an instance of ActiveRecord::Relation i.e

    @result.relation
    

    and then we can call search method again on this instance. i.e

    @result.relation.search(params[:filters])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example this chunk of code: new_log = ActivityLog(user=self.user, activity=activity) new_log.save() Can I chain
I know that you can't call a method using a filter because it does
I'd like to write a small JavaScript (framework) that can chain functions with all
I'm wondering is there a way we can chain a method using (&:method) For
In an RPG program (One of IBM's languages on the AS/400) I can chain
How can i create a chain of viewcontrollers and push them into navigation item
Can any one tell, how to get the result of LINQ query contains group
I have a query, which works fine: ModelName.where('true') I can chain this with other
On certain sites the certificate chain can not be built up to the trusted
I have a custom model fields, that can have 'chain' argument. from django.db import

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.