Note that there are some explanatory texts on larger screens.

plurals
  1. POrails 3 refined search
    primarykey
    data
    text
    <p>I have a rails app. Homepage searches the movies database and displays the results in the results page for the search query.</p> <p>Now, in the results page there are a list of movies (say 5) and the results page displays the attributes of the movies in the left side bar. </p> <p>For example,</p> <p>=================Movies results page================</p> <h2>Left-side-bar</h2> <h2>Genres</h2> <p>Comedy(link_to) Horror(link_to)</p> <h2>Languages</h2> <p>English(link_to) German(link_to)</p> <h2>Results set</h2> <p>1 Anger management 2 American pie 3 Evil dead 4 Grudge 5 Du riescht so gut</p> <p>=====================================================</p> <p>Now, after the first search, my search controller has a @movieid array which has those 5 movieids(mentioned above). And the left-side-bar has the filters to filter this further. Using the @movieid array i listed the movies in the results set.</p> <p>If i click on the link "comedy", I want the results page to show only "1. Anger management" and "2. american pie".</p> <p>If i click on the link "german". It should only display "5. Du riescht so gut". Thats it.</p> <p>Right now, Im confused of the following options, 1. Im thinking of passing the genre_id and @movieid array through the link_to as parameters. 2. Use cookie[:store] to save the @movieid array 3. Store the @movieids in database and retrieve. </p> <p>I dont know how to handle this. Remember my @movieid array can contain 100000 ids as well.</p> <p>Help me with the best practice and performance.</p> <p>Thanks! </p> <p>Edit:</p> <p>Can i use Mysql Views to store the result set? problem is what happens if a 100000 users are searching at the same time, that many views will be created?, is it ok?. What is the good practice?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload