To edit pages or tickets please login with username/password: aaf/aaf

Ticket #41 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Paging offset ignored for multi_search query

Reported by: Tom Assigned to: somebody
Priority: major Milestone:
Component: 0plugin Version:
Keywords: Cc:

Description

When doing a multi_search the :offset parameter seems to be ignored and I only ever get the first page of results. All models use a shared index.

@results = Page.multi_search(
                    search_query,
                    [],
                    {:offset => (params[:page] - 1) * @results_per_page, 
                     :limit => @results_per_page}
                    )

No matter what the :offset value I always get the same first set of results. If I use the single model version I can page through the results for that model fine:

@results = Page.find_by_contents(
                    search_query,
                    {:offset => (params[:page] - 1) * @results_per_page, 
                     :limit => @results_per_page}
                      )

I am using the latest SVN version and ferret v0.10.4 Thanks

Change History

09/12/06 14:17:28 changed by Tom

I found the problem:

line 27 multi_index.rb should be:

  searcher.search_each(query, options, &block)

rather than:

  searcher.search_each(query, options={}, &block)

09/12/06 19:17:58 changed by jk@jkraemer.net

you're right, but here that doesn't solve the problem. could be a ferret bug, I'll look into this.

09/12/06 19:35:32 changed by jk@jkraemer.net

  • status changed from new to closed.
  • resolution set to fixed.

in fact that was the only problem, and my stupidity ;-)

fixed in trunk now.

02/14/07 04:10:30 changed by anonymous

  • type changed from defect to enhancement.

[

----


[[BR]]
'''''
== [] ==
'''''

]

To edit pages or tickets please login with username/password: aaf/aaf