Hi Pat, Thanks. I tried this with each slice being 16 as there are more indexes than only those geoblocking codes and the total limit seems to be 32 fields.
Now I get another error when indexing: ERROR: index 'fund_document_core': attribute count mismatch (me=fund_document_core_1, in=fund_document_core_0, myattrs=44, inattrs=5). I originally used attributes for this but had to implement this as indexes as the search conditions are subject to being able to use OR as outlined in detail in my thread here: http://groups.google.com/group/thinking-sphinx/browse_thread/thread/8ea5c74ae842c151/2e8685d1f421a3c7 I'm using TS version 1.3.20, do you think a newer version would have relevance to this? Any idea about the error above? Best regards, Robert On Sep 5, 11:07 pm, Pat Allan <[email protected]> wrote: > I've no idea how that impacts Sphinx - is this something you've taken from > the Sphinx forum or elsewhere? > > Could you try this instead? > > define_index do > ALLOWED_FOR_GEOBLOCKING.each_slice(32) do |countries| > define_source do > countries.each do |country| > indexes > live_product("geoblock_disabled_for_#{country.downcase}".to_sym), > :as => "geoblock_disabled_for_#{country.downcase}".to_sym > end > end > end > end > > Although, now that I look at your search query, wouldn't it be better to have > these fields as attributes instead? Are they boolean values? And that way, > you can probably put them inside a single source/index. > > -- > Pat > > On 05/09/2011, at 10:40 PM, rbjarnason wrote: > > > > > > > > > Hi Pat, > > > I'm changing: > > #define SPH_MAX_FIELDS 32 > > to 42 or 64 in sphinx.h in the sphinx-0.9.9/src > > > Here is how I set up the dynamic geoblocking in the model file: > > > define_index do > > ... > > ALLOWED_FOR_GEOBLOCKING.each do |country| > > eval "indexes > > live_product.geoblock_disabled_for_#{country.downcase}, > > :as=>:geoblock_disabled_for_#{country.downcase}" > > end > > ... > > end > > > Here is a simplified query: > > @facets = ThinkingSphinx.facets "#{params[:search]} & > > @geoblock_disabled_for_#{@country_code.downcase} 1)", common_options > > > Thanks for you help. > > > Best regards, > > Robert > > > On Sep 2, 12:00 am, Pat Allan <[email protected]> wrote: > >> Hi Robert > > >> How are you setting SPH_MAX_FIELDS? And what are the search queries you're > >> running? > > >> A work-around could be to use multiple sources: > > >> define_index do > >> define_source do > >> # ... > >> end > > >> define_source do > >> # ... > >> end > >> end > > >> You can also use multiple indices in a model - provided you give each > >> index a name: > > >> define_index 'foo' do > >> # > >> end > > >> Pat > > >> On 01/09/2011, at 3:42 AM, rbjarnason wrote: > > >>> Hi, > > >>> Is there a way to user more than 32 indexes fields with Sphinx 0.9.9? > >>> This is used for a rather complex geoblocking feature where each of > >>> those fields has a string defining all sort of accesses. > > >>> I've raised the SPH_MAX_FIELDS parameters to 42, also tried 64 - > >>> everything seems to index smoothly but searches result in no searches. > >>> Are there any limitations in Thinking Sphinx client side for this? I'm > >>> using version 1.3.20. > > >>> Best regards, > >>> Robert > > >>> -- > >>> 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 > >>> athttp://groups.google.com/group/thinking-sphinx?hl=en. > > > -- > > 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 > > athttp://groups.google.com/group/thinking-sphinx?hl=en. -- 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.
