Note to self: I didn't mistake "src" for "source" in my actual ruby code. Sorry for the confusion.
On 17 Aug., 17:04, Christian Aust <[email protected]> wrote: > Hi all, > > my model Project features an attribute "source" which contains only a > small number of possible string entries. I won't do text-searching > based on that property, so I figured an attribute would be well in > order. > > has :source, :facet=> true > > Based in the docs, I tried to search like this: > > Project.search 'some text', :with=> { :src => "someSource" } > > to find all projects containing "some text" that would have a source > attribute of "someSource". The search returned nothing. I checked the > sphinx result by using the command-line search client and found that > my attribute "src" contained some integer value instead of a string. > > Then I changed the code in define_index, and added my src field using > "indexes". Now it worked. > > When and for what would I use an attribute, and when would I need a > field? Any help is greatly appreciated. Regards, > > Christian --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
