Pat, I tried this on a set of a couple hundred records and it works well. Thanks !
Are you going to summarize all the recent changes sometime? It looks like there may have been some changes to work with MVA facets better too ? -Eric On May 8, 2009, at 11:21 AM, Pat Allan wrote: > > Hi guys > > I've been pairing with Martin Emde today at RailsConf, and I think > we've made some changes that should get large facet sets working (ie: > using :limit and :max_matches, only for the #facets call, not #for). > > If someone with a large dataset could give the latest code a shot and > confirm things are working nicely, that'd be great. > > Cheers > > -- > Pat > > On 27/04/2009, at 3:12 PM, Eric Obershaw wrote: > >> >>> Anyway, I feel it is unintuitive for pagination settings to >>> interfere >>> with facet information. If I do a search, and there are 500 results, >>> the facet information should reflect the total result set >> >>> I would like to find out how others have dealt with the faceted >> search >>> issues I'm having. >> >> I completely agree. I just struggled with the same thing and ended >> up >> just writing my own pagination. >> >> >> On Apr 27, 2009, at 11:38 AM, Thuva Tharma wrote: >> >>> >>> Hello Sanjay, >>> >>> Thank you for your reply. Your suggestion works. Suppose I have 1000 >>> restaurants. Then the following returns the correct facet >>> information: >>> >>> facets = Restaurant.facets(:limit => 1000, :max_matches => 1000) >>> >>> By the way, I'm not sure why I need to specify both :limit >>> and :max_matches. >>> >>> Now, I have a different problem. The pagination no longer works. >>> If I >>> do, facets.for, then all the restaurants are loaded at once. How >>> do I >>> implement pagination? >>> >>> Anyway, I feel it is unintuitive for pagination settings to >>> interfere >>> with facet information. If I do a search, and there are 500 results, >>> the facet information should reflect the total result set >>> (containing >>> 500 records). Currently, the facet information seems to reflect the >>> result set in the current page. >>> >>> I would like to find out how others have dealt with the faceted >>> search >>> issues I'm having. >>> >>> P.S. If I put a configuration entry in sphinx.conf file for >>> max_matches and run rake ts:index, then the entry disappears. >>> Running >>> rake:start and rake:stop doesn't behave that way. >>> >>> Thank you in advance. >>> >>> -- Thuva Tharma >>> >>> On Apr 26, 11:34 am, Sanjay <[email protected]> wrote: >>>> I think this might be due to the pagination settings on your >>>> request. >>>> To increase the number of results on a specific request, try the >>>> request with the following parameters: >>>> >>>> Restaurant.facets(:limit => 50, :max_matches => 50) >>>> >>>> Set your limit based on the number of results you want. Also note >>>> that max_matches can not be greater than the value in your sphinx >>>> configuration file. >>>> >>>> On Apr 24, 2:59 pm, Thuva Tharma <[email protected]> wrote: >>>> >>>>> I'm having problems with the facets functionality offered by >>>>> Thinking >>>>> Sphinx. I have a restaurant model configured as shown in this >>>>> pastie:http://gist.github.com/101305 >>>> >>>>> When I do Restaurant.facets, the returned hash doesn't reflect the >>>>> records in the database. A sample hash that was returned can be >>>>> seen >>>>> in this pastie:http://gist.github.com/101308 >>>> >>>>> The facet information for region_id is completely correct. >>>> >>>>> However, the facet information for cuisine_ids and >>>>> neighbourhood_id is >>>>> is wrong. The cuisine_ids and neighbourhood_id hashes are missing >>>>> many >>>>> ids that should be there. >>>> >>>>> For example, there are 43 restaurants in the neighbourhood given >>>>> by id >>>>> 238. Also, there are 407 restaurants with the cuisine given by id >>>>> 11. >>>>> As you can see from the pastie above, those ids are not in the >>>>> hash. >>>> >>>>> I couldn't figure out the issue. Reindexing didn't work. I also >>>>> tried >>>>> deleting the files in db/sphinx and indexing. That didn't work as >>>>> well. >>>> >>>>> By the way, I'm using 0.9.8-release (r1371). >>>> >>>>> Thank you in advance. >>>> >>>>> -- Thuva Tharma >>>> >> >> >>> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en -~----------~----~----~----~------~----~------~--~---
