Hi Pat, Any feedback on this issue? It's quite important that I solve the problem soon.
Thanks! Graham On Sep 8, 1:42 am, Graham Glass <[email protected]> wrote: > Hi Pat, > > Thanks for your response! > The search doesn't work at all; here's an example: > > results = ThinkingSphinx::Search.search 'donkey', :conditions => > {:language_id => 1}, :classes => [WebResource, Book] > > output: > > matches = [[], {:attribute_names=>[], :error=>"index > book_core,district_core,group_core,klass_core,message_core,posting_core,sch > ool_core,web_resource_core: > query error: no field 'language_id' found in > schema", :status=>1, :fields=>[], :matches=>[], :attributes=> > {}, :words=>{}}] > > On WebResource and Book I have the following: > > define_index do > # fields > indexes name, :sortable => true > > # attribute > has metadata.language_id > end > > where metadata is an object associated with the Material. None of the > other classes that I've indexed have a language_id attribute. The rake > task for indexing works fine; it's only searching for a selection of > classes that fails. > > Cheers, > Graham > > On Sep 8, 1:32 am, Pat Allan <[email protected]> wrote: > > > > > Hi Graham > > > Firstly, does the search work, even with the warning? (I would expect > > it to) > > > If it doesn't, then I'm happy to try and fix things (and if it's via > > consulting, let's discuss offlist) - the only issue I'm not sure about > > is whether we can limit searches to multiple indexes. I can definitely > > investigate that, though. > > > -- > > Pat > > > On 08/09/2009, at 8:01 AM, Graham Glass wrote: > > > > Hi everyone, > > > > I've posted a few times in the past about the following problem, but I > > > think the only way to address it is to add at least one new feature to > > > Thinking Sphinx. If there is someone who can add it on a consulting > > > basis, I'm happy to contribute the resulting code back to the open > > > source community! > > > > Here's the issue: > > > > I have many Ruby classes that are being indexed. It's an education > > > domain, so I have classes like "School" and "Class". I also have a > > > bunch of resource types that have a common abstract base class > > > "Material". The concrete subclasses are things like "Book" and > > > "Curriculum". Each subclass is stored in its own table which is why > > > the base class is abstract. > > > > I need to be able to do a search over one or more classes that extend > > > "Material". In other words, I'd like to be able to so this: > > > > ThinkingSphinx.search "phrase", :conditions => 'format = > > > "pdf"', :classes => [Book, Curriculum] > > > > The trouble is, Sphinx gives me an error saying it can't find the > > > 'format' attribute in the schema for "School" and "Class" (which seems > > > odd since I'm not searching over them). > > > > So I need Sphinx to be improved so I can search over a list of classes > > > without it blowing up because other classes that I'm not searching > > > over don't have the specified attributes. > > > > Can anyone help? If not, I'll try to figure how to hack Sphinx myself, > > > but it's not an effective use of my time and I'd rather pay someone > > > else to do a nice job of it so it can be reused by the community. > > > > Thanks! > > > Graham --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
