I didn't change the permissions so it should be. Also I deleted all of them so, unless ts is creating the index files as another user... which is unlikely, unless it has hijacked my system! D: Anyway, I just checked and, I have permissions to read an write all the files, though the .spl can't be read by others:
-rw-r--r-- 1 zequez zequez 700 2011-10-11 03:03 cimg_core.spa -rw-r--r-- 1 zequez zequez 1191 2011-10-11 03:03 cimg_core.spd -rw-r--r-- 1 zequez zequez 393 2011-10-11 03:03 cimg_core.sph -rw-r--r-- 1 zequez zequez 1106 2011-10-11 03:03 cimg_core.spi -rw-r--r-- 1 zequez zequez 0 2011-10-11 03:03 cimg_core.spk -rw------- 1 zequez zequez 0 2011-10-11 03:03 cimg_core.spl -rw-r--r-- 1 zequez zequez 0 2011-10-11 03:03 cimg_core.spm -rw-r--r-- 1 zequez zequez 1203 2011-10-11 03:03 cimg_core.spp -rw-r--r-- 1 zequez zequez 0 2011-10-11 03:03 cimg_delta.spa -rw-r--r-- 1 zequez zequez 1 2011-10-11 03:03 cimg_delta.spd -rw-r--r-- 1 zequez zequez 393 2011-10-11 03:03 cimg_delta.sph -rw-r--r-- 1 zequez zequez 1 2011-10-11 03:03 cimg_delta.spi -rw-r--r-- 1 zequez zequez 0 2011-10-11 03:03 cimg_delta.spk -rw------- 1 zequez zequez 0 2011-10-11 03:03 cimg_delta.spl -rw-r--r-- 1 zequez zequez 0 2011-10-11 03:03 cimg_delta.spm -rw-r--r-- 1 zequez zequez 1 2011-10-11 03:03 cimg_delta.spp On Tue, Oct 11, 2011 at 3:02 AM, Pat Allan <[email protected]> wrote: > I know you covered this at the beginning, but just to double-check - it's > the same user owning *all* of the index files? > > On 11/10/2011, at 4:58 PM, Ezequiel Adrián Zequez Schwartzman wrote: > > Still no luck, I managed to delete the file, but as soon as I save > something or call index_delta the error is printed again. > I'm starting to think is something with the filesystem. > I'll better try in another disk before I start smashing my head against the > wall. > > On Tue, Oct 11, 2011 at 2:11 AM, Pat Allan <[email protected]>wrote: > >> Hmm, okay - seems index files have gotten a little confused. >> >> Try the following: >> >> rake ts:stop >> rm -r db/sphinx/development >> rake ts:rebuild >> >> Then see how the deltas go in script/console. >> >> -- >> Pat >> >> On 11/10/2011, at 3:29 PM, Ezequiel Adrián Zequez Schwartzman wrote: >> >> Oh sorry I missed that, I can't believe I missed that output -.- >> >> Sphinx 0.9.9-release (r2117) >> Copyright (c) 2001-2009, Andrew Aksyonoff >> >> using config file >> '/home/zequez/projects/ruby/hameme3/config/development.sphinx.conf'... >> indexing index 'cimg_delta'... >> collected 15 docs, 0.0 MB >> sorted 0.0 Mhits, 100.0% done >> ERROR: index 'cimg_delta': rename >> /home/zequez/projects/ruby/app2/db/sphinx/development/cimg_delta.tmp.spl to >> /home/zequez/projects/ruby/app2/db/sphinx/development/cimg_delta.new.spl >> failed: Text file busy. >> total 15 docs, 711 bytes >> total 0.096 sec, 7385 bytes/sec, 155.81 docs/sec >> total 2 reads, 0.000 sec, 0.4 kb/call avg, 0.4 msec/call avg >> total 7 writes, 0.004 sec, 0.3 kb/call avg, 0.6 msec/call avg >> >> So I checked lsof and found that the file is not being used, the ones >> opened by Sphinx are cimg_core.spl and cimg_delta.spl >> Also there is no file named cimg_delta.tmp.spl in that directory, just >> the following: >> >> cimg_core.spa >> cimg_core.spd >> cimg_core.sph >> cimg_core.spi >> cimg_core.spk >> cimg_core.spl >> cimg_core.spm >> cimg_core.spp >> cimg_core.tmp.spa >> cimg_core.tmp.spd >> cimg_core.tmp.sph >> cimg_core.tmp.spi >> cimg_core.tmp.spk >> cimg_core.tmp.spm >> cimg_core.tmp.spp >> cimg_delta.spa >> cimg_delta.spd >> cimg_delta.sph >> cimg_delta.spi >> cimg_delta.spk >> cimg_delta.spl >> cimg_delta.spm >> cimg_delta.spp >> cimg_delta.tmp.spa >> cimg_delta.tmp.spd >> cimg_delta.tmp.sph >> cimg_delta.tmp.spi >> cimg_delta.tmp.spk >> cimg_delta.tmp.spm >> cimg_delta.tmp.spp >> >> >> >> On Tue, Oct 11, 2011 at 12:17 AM, Pat Allan <[email protected]>wrote: >> >>> Sorry, that probably was still a little vague if you're not sure what to >>> look for - here's an example from a project I'm working on: >>> >>> ruby-1.9.2-p290 :001 > Story.define_indexes >>> => true >>> ruby-1.9.2-p290 :002 > Story.index_delta >>> Sphinx 2.0.2-dev (r2815) >>> Copyright (c) 2001-2011, Andrew Aksyonoff >>> Copyright (c) 2008-2011, Sphinx Technologies Inc ( >>> http://sphinxsearch.com) >>> >>> using config file >>> '/Users/pat/Code/anecdote/zahmoo/config/development.sphinx.conf'... >>> indexing index 'story_delta'... >>> WARNING: collect_hits: mem_limit=0 kb too low, increasing to 15392 kb >>> collected 0 docs, 0.0 MB >>> collected 0 attr values >>> sorted 0.0 Mvalues, 100.0% done >>> total 0 docs, 0 bytes >>> total 0.016 sec, 0 bytes/sec, 0.00 docs/sec >>> total 1 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg >>> total 5 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg >>> rotating indices: succesfully sent SIGHUP to searchd (pid=19926). >>> => [#<ThinkingSphinx::Deltas::DefaultDelta:0x000001070de460 ... >>> >>> On 11/10/2011, at 12:57 PM, Pat Allan wrote: >>> >>> What does the second of those two commands output (eg, via a puts call) >>> before the return value? >>> >>> -- >>> Pat >>> >>> >>> On 11/10/2011, at 11:26 AM, Ezequiel Adrián Zequez Schwartzman < >>> [email protected]> wrote: >>> >>> Cimg.define_indexes returns true >>> Cimg.index_delta returns this: <http://pastebin.com/HJHrbvFx> >>> http://pastebin.com/HJHrbvFx (I did what I could to increase a little >>> readability) >>> I don't know what I'm supposed to be looking for though >>> >>> On Mon, Oct 10, 2011 at 8:08 PM, Pat Allan < <[email protected]> >>> [email protected]> wrote: >>> >>>> What happens when you run the following commands in console: >>>> >>>> Cimg.define_indexes >>>> Cimg.index_delta >>>> >>>> The command we care about is the second one - it should print out the >>>> output from Sphinx's indexer, and then return a delta object (which will >>>> likely be quite big and complex). The indexer output is likely going to be >>>> more interesting/helpful for debugging this. >>>> >>>> -- >>>> Pat >>>> >>>> On 10/10/2011, at 2:38 AM, Zequez wrote: >>>> >>>> > Sorry, it also does not work neither in console or the browser. >>>> > >>>> > On Oct 7, 6:18 am, Pat Allan <[email protected]> wrote: >>>> >> Is this happening in production? Development? Both? Does it work in >>>> console but not through a browser? Or fails in both? >>>> >> >>>> >> -- >>>> >> Pat >>>> >> >>>> >> On 06/10/2011, at 10:56 AM, Zequez wrote: >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >>> Well, I've read a LOT about Delta Index not working in production >>>> >>> because of permissions errors, but my problem is not that (I think). >>>> >>> Here are the facts: >>>> >> >>>> >>> This was the migration: >>>> >> >>>> >>> class AddDeltaIndexToCimgs < ActiveRecord::Migration >>>> >>> def change >>>> >>> add_column :cimgs, :delta, :boolean, default: true, null: false >>>> >>> end >>>> >>> end >>>> >> >>>> >>> This is the define_index: >>>> >> >>>> >>> define_index do >>>> >>> indexes search_cache >>>> >>> has :approved >>>> >>> set_property delta: true >>>> >>> end >>>> >> >>>> >>> Then I run rake:stop, rake:reindex, and rake:start >>>> >> >>>> >>> Then I search for something already in the database with: >>>> >> >>>> >>> Cimg.search query, with: {approved: true} >>>> >> >>>> >>> And it works as expected... >>>> >> >>>> >>> But when I create new records, I can't find them. >>>> >>> I checked the database and the delta column for those records is set >>>> >>> to true (also the approved column, though anyway I tested without >>>> it) >>>> >>> In the development.log it says the following after creating a new >>>> >>> record: >>>> >> >>>> >>> (41.1ms) COMMIT >>>> >>> Sphinx Query (14.5ms) >>>> >>> Sphinx Found 0 results >>>> >> >>>> >>> Here is the generated configuration file:<http://pastebin.com/z0fHr43k> >>>> http://pastebin.com/z0fHr43k >>>> >>> I checked the db/sphinx folder and a lot of files with the name >>>> >>> cimg_delta are created. >>>> >> >>>> >>> Im using: >>>> >>> Sphinx version: 2.0.7 >>>> >>> Thinking Sphinx version: 2.0.5 >>>> >>> Rails version: 3.1.0.rc8 >>>> >>> Ruby version: 1.9.2p290 >>>> >> >>>> >>> I don't know what else to say, that's all what I know so far. >>>> >>> I don't know if the problem is that the records are not indexed or >>>> are >>>> >>> not being searched, but I don't know how to dump the delta index =/ >>>> >>> I tried to submit the index_delta manually calling it in a record, >>>> but >>>> >>> that didn't worked either. >>>> >> >>>> >>> -- >>>> >>> 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]>[email protected]. >>>> >>> To unsubscribe from this group, send email to >>>> <thinking-sphinx%[email protected]> >>>> [email protected]. >>>> >>> For more options, visit this group >>>> >>> athttp://<http://groups.google.com/group/thinking-sphinx?hl=en> >>>> 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]>[email protected]. >>>> > To unsubscribe from this group, send email to >>>> <thinking-sphinx%[email protected]> >>>> [email protected]. >>>> > For more options, visit this group at >>>> <http://groups.google.com/group/thinking-sphinx?hl=en> >>>> http://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]> >>>> [email protected]. >>>> To unsubscribe from this group, send email to >>>> <thinking-sphinx%[email protected]> >>>> [email protected]. >>>> For more options, visit this group at >>>> <http://groups.google.com/group/thinking-sphinx?hl=en> >>>> http://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. >>> >>> >>> -- >>> 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. >>> >>> >>> >>> -- >>> 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. >>> >> >> >> -- >> 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. >> >> >> >> -- >> 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. >> > > > -- > 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. > > > -- > 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. > -- 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.
