The symbol trick is for *Ruby* reserved keywords, but this is Sphinx - hence the suggestion to rename the attribute.
Also: the symbol trick shouldn’t ever be necessary with TS v3, due to how the index definitions are processed (via BasicObject instead of Object, thus avoiding almost all shared methods - and anything else shouldn’t really be used as a column name anyway). — Pat > On 30 Dec 2014, at 1:25 pm, Walter Lee Davis <[email protected]> wrote: > > The symbol trick made no difference. I may experiment with removing it, can't > recall why I needed it. > > Walter > > On Dec 29, 2014, at 9:24 PM, Walter Lee Davis <[email protected]> wrote: > >> Which, now that I look at it, does have set in there. I am trying converting >> that to a symbol and see if the index process complains less. >> >> Walter >> >> On Dec 29, 2014, at 9:23 PM, Walter Lee Davis <[email protected]> wrote: >> >>> ThinkingSphinx::Index.define :title, :with => :active_record do >>> set_property :group_concat_max_len => 10.megabytes >>> >>> indexes :title, :sortable => true >>> indexes teaser >>> indexes content.plain, :as => :plain_text >>> indexes author_name, :sortable => true >>> has roles(:person_id), :as => :people_ids >>> has :id, :as => :title_id >>> has author_id, set, created_at, updated_at >>> where sanitize_sql(["publish", true]) >>> end >>> >>> >>> On Dec 29, 2014, at 9:22 PM, Pat Allan <[email protected]> wrote: >>> >>>> Can you share the index definition for your Title model? >>>> >>>>> On 30 Dec 2014, at 1:21 pm, Walter Lee Davis <[email protected]> wrote: >>>>> >>>>> Thanks, I will try that. As to the set thing, I have a boolean attribute >>>>> on my titles table called 'set' (whether the title is a part of a set or >>>>> not) but it's not one of the attributes defined in the index. When I run >>>>> the indexing process, I get this error in the console: >>>>> >>>>> indexing index 'title_core'... >>>>> ERROR: index 'title_core': set is not a valid attribute name. >>>>> >>>>> >>>>> Not sure if it means anything. >>>>> >>>>> Walter >>>>> >>>>> On Dec 29, 2014, at 9:17 PM, Pat Allan <[email protected]> wrote: >>>>> >>>>>> Hi Walter >>>>>> >>>>>> You’ll want to add the excepts pane *before* doing anything that >>>>>> involves using the search results. So, you should set the pane then get >>>>>> the hits, not the other way around. Also, the syntax in the docs was >>>>>> slightly wrong - here’s an updated version (and just fixed the docs too): >>>>>> >>>>>> @results.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane >>>>>> @hits = @results.total_entries rescue 0 >>>>>> >>>>>> If you were taking the other approach of constructing an Excerpter >>>>>> yourself, you can use it across different indices - it’s just for >>>>>> picking up index settings: Sphinx requires that context. So, if you’re >>>>>> using the same infix/prefix/wordforms/charset_table/etc settings in all >>>>>> indices, just pick the name of one, use that, should be fine. >>>>>> >>>>>> Also: the error about the word ‘set’ - can you provide some more detail >>>>>> of that? >>>>>> >>>>>> Cheers >>>>>> >>>>>> — >>>>>> Pat >>>>>> >>>>>>> On 30 Dec 2014, at 1:10 pm, Walter Lee Davis <[email protected]> wrote: >>>>>>> >>>>>>> And I already fixed this to be :excerpts instead, which seems to be >>>>>>> what the new version requires. This did not change anything about the >>>>>>> results, though. >>>>>>> >>>>>>> Thanks in advance for any help, >>>>>>> >>>>>>> Walter >>>>>>> >>>>>>> On Dec 29, 2014, at 8:49 PM, Walter Lee Davis <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> :excerpt_options => { >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Thinking Sphinx" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>>>> an email to [email protected]. >>>>>>> To post to this group, send email to [email protected]. >>>>>>> Visit this group at http://groups.google.com/group/thinking-sphinx. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Thinking Sphinx" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>>> an email to [email protected]. >>>>>> To post to this group, send email to [email protected]. >>>>>> Visit this group at http://groups.google.com/group/thinking-sphinx. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google Groups >>>>> "Thinking Sphinx" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send an >>>>> email to [email protected]. >>>>> To post to this group, send email to [email protected]. >>>>> Visit this group at http://groups.google.com/group/thinking-sphinx. >>>>> For more options, visit https://groups.google.com/d/optout. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Thinking Sphinx" group. >>>> To unsubscribe from this group and stop receiving emails from it, send an >>>> email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at http://groups.google.com/group/thinking-sphinx. >>>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Thinking Sphinx" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/thinking-sphinx. >>> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Thinking Sphinx" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/thinking-sphinx. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/thinking-sphinx. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/thinking-sphinx. For more options, visit https://groups.google.com/d/optout.
