Hey Pat,

after getting the latest version of TS back working here I tried
explicitly setting the bin_path et voila..delta indexing also works
perfectly fine in dev mode :)

Hooray!

And thanks once more! :)
-J


On Dec 28, 10:09 am, Pat Allan <[email protected]> wrote:
> It could be a PATH issue... when invoking via console, the PATH (for  
> the indexer binary) is fine, but doesn't seem to be the case via  
> script/server. Try setting bin_path explicitly in your config/
> sphinx.yml file?
>
> --
> Pat
>
> On 27/12/2008, at 10:38 PM, Jörg Battermann wrote:
>
>
>
>
>
> > Pat,
>
> > nope.. I kept tail -f'ing the searchd.log while doing updates and only
> > in console mode the
>
> > [Sat Dec 27 03:47:16.200 2008] [18328] rotating indices (seamless=1)
> > [Sat Dec 27 03:47:16.203 2008] [18328] rotating index
> > 'question_delta': success
> > [Sat Dec 27 03:47:16.203 2008] [18328] rotating finished
>
> > entries appeared. Doing the other way mentioned above it did not
> > rotate the indices and only set the delta = true flat.. nothing more
> > happened on the sphinx/searchd side of things...
>
> > Version wise I have 'Sphinx 0.9.8-release (r1371)' on my machine...
>
> > -J
>
> > On Dec 27, 8:52 am, Pat Allan <[email protected]> wrote:
> >> Hmm, need to think through this still, but one question that I've
> >> thought of now:
> >> Are you seeing output from the Sphinx indexer tool when you make
> >> changes that should fire the delta index?
>
> >> --
> >> Pat
>
> >> On 26/12/2008, at 11:34 PM, Jörg Battermann wrote:
>
> >>> Pat,
>
> >>> yep I saw that this group is moderated AFTER I tried a couple  
> >>> times ;)
> >>> Sorry about that.
>
> >>> regarding the problem: well I've narrowed it down to this strange
> >>> situation:
>
> >>> Whenever I update a model by hand in the console, do a model.save  
> >>> the
> >>> delta attribute gets set to true and I immediately see the sphinx
> >>> output regarding the inclusion in the delta index and the model does
> >>> show up entirely perfectly in each search-results thereafter.
>
> >>> Now doing the same through the controller/view perspective.. it does
> >>> not work and I really don't know why. Basically I have 2 models and
> >>> corresponding controllers which I update by e.g.
> >>> @user.update_attributes(params[:user]) (mass-assigning is bad I  
> >>> know,
> >>> but I'll change to proper per attribute updates once the attribute
> >>> changes have settled).... and then the .delta attribute -does- get  
> >>> set
> >>> to true, but in searches this instance does no longer appear at  
> >>> all...
> >>> only after the next complete re-index it does.
>
> >>> I've tried explicitly .save 'ing after the update_attributes  
> >>> above...
> >>> didn't change. Tried fiddling with manual delta-indexing calling the
> >>> TS.methods for that directly.. no change. I stopped sphinx, deleted
> >>> the index, re-configured, indexed, started... no change in that
> >>> behaviour.
>
> >>> It can't really be development-mode related, right? Or any sort of
> >>> dirty objects/attributes related that ts doesn't pick it up? I am
> >>> using passenger locally.. with the dev env.. are there maybe any
> >>> quirks known with that? Hrm.. besides that it's really nothing out  
> >>> of
> >>> the ordinary... tried uncommenting all other before/after_save/
> >>> validate callbacks just to make sure there aren't any weird things
> >>> going on.. but no change either.
>
> >>> Is there anything else I can do to narrow this down? Should these
> >>> sphinx-delta-index messages that appear in the console after
> >>> instance.save also appear in the dev-log when doing via the
> >>> controller/
> >>> view way?
>
> >>> Rails is 2.2.2, ruby 1.8.7, ts via normal git submodules... just
> >>> checked.. have the latest version.
>
> >>> I am kind of lost here :)
>
> >>> Cheers,
> >>> -J
>
> >>> On Dec 26, 3:55 pm, Pat Allan <[email protected]> wrote:
> >>>> Hi Jörg
>
> >>>> The reason your post didn't appear straight away is because there's
> >>>> moderation for everyone's first posts here (to avoid spam). Sorry  
> >>>> for
> >>>> the delay in getting it approved.
>
> >>>> As for your delta issue - it doesn't look like you're doing  
> >>>> anything
> >>>> wrong. Can you confirm you've restarted Sphinx (and re-indexed
> >>>> inbetween stopping and starting) after adding the delta property?  
> >>>> I'm
> >>>> expecting you have though, which may mean the problem is how Sphinx
> >>>> treats separate indexes.
>
> >>>> If the latter is the case, I can't offer much in the way of
> >>>> solutions,
> >>>> except that I'm hoping to have a fix soon - Sphinx can merge  
> >>>> indexes,
> >>>> and so I want to get TS to a point where after running a delta  
> >>>> index
> >>>> it merges the results back into the core index (and so it gets
> >>>> treated
> >>>> all as a single dataset again).
>
> >>>> Unfortunately, I'm not sure when I can get a solution done though  
> >>>> (a
> >>>> common statement of mine on this list, sadly). Hoping to have more
> >>>> time to tackle TS improvements over the next month though.
>
> >>>> One other caveat - it takes Sphinx a second (maximum, although I
> >>>> guess
> >>>> that would depend on local index sizes, etc) to catch up with the  
> >>>> new
> >>>> values in delta indexes - but I'm guessing there's a slight delay
> >>>> between making your new instance and testing the search, so I doubt
> >>>> that's the problem.
>
> >>>> Cheers
>
> >>>> --
> >>>> Pat
>
> >>>> On 26/12/2008, at 1:31 AM, Jörg Battermann wrote:
>
> >>>>> Hey there,
>
> >>>>> I am pretty sure I am doing something wrong, but for some reason  
> >>>>> new
> >>>>> entries/instances of a model which has the delta-index declaration
> >>>>> included do not show up in a generic, empty ("") search on that
> >>>>> model...
>
> >>>>> The ts declaration is like that:
>
> >>>>> define_index do
> >>>>>   indexes title, :sortable => true
> >>>>>   indexes cached_plaintext_question, :as => :question
> >>>>>   indexes answers.cached_plaintext_body, :as => :answers
> >>>>>   indexes cached_tag_list, :as => :tags
> >>>>>   indexes user.name, :as => :user
> >>>>>   indexes answered_by, user_id
>
> >>>>>   has created_at
> >>>>>   has answers(:id), :as => :answer_ids
> >>>>>   set_property :delta => true
> >>>>> end
>
> >>>>> Now after creating a new new question (that's the model that's  
> >>>>> being
> >>>>> indexed/searched), and going back to the controller's index, which
> >>>>> has
> >>>>> the following search code:
>
> >>>>>   @search_options = {
> >>>>>     :page   => (params[:page] || 1),
> >>>>>     :per_page => Question.per_page,
> >>>>>     :include => :user,
> >>>>>     :order  => "created_at DESC",
> >>>>>     :match_mode => :extended
> >>>>>   }
>
> >>>>> @questions = Question.search((params[:search] || ""),
> >>>>> @search_options)
>
> >>>>> .... @questions does not contain this new instance mentioned  
> >>>>> above,
> >>>>> but does after a full (re-)index.
>
> >>>>> Why's that?
>
> >>>>> Cheers, thanks & merry x-mas to everyone :)
> >>>>> -Jörg
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to