I set up a test table with one row in it to try and simplify things (as well as eliminate the effects of pt-archiver, which was use to archive the records). After indexing the table I ran Sphinx's indextool on the word worried and got the following:
indextool --config ~/Applications/doctvadm/config/development.sphinx.conf --dumphitlist contact_test_core worried Sphinx 2.0.9-release (rel20-r4115) Copyright (c) 2001-2013, Andrew Aksyonoff Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/home/stan/Applications/doctvadm/config/development.sphinx.conf'... dumping hitlist for index 'contact_test_core' keyword 'worried'... keyword=worried, tok=worried, wordid=443981280 doc=12, hit=0x02000014 One hit -- exactly correct, so the index was built properly (using rake ts:index). When I tried to search for worried, however: search --config ~/Applications/doctvadm/config/development.sphinx.conf --index contact_test_core worried Sphinx 2.0.9-release (rel20-r4115) Copyright (c) 2001-2013, Andrew Aksyonoff Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/home/stan/Applications/doctvadm/config/development.sphinx.conf'... index 'contact_test_core': search error: . I got a search error. The error message ('.') was kinda useless. But I'm not sure that this search was meaningful because if I run the same search on the table that is working in the console I still get the error: search --config ~/Applications/doctvadm/config/development.sphinx.conf --index contact_info_core worried Sphinx 2.0.9-release (rel20-r4115) Copyright (c) 2001-2013, Andrew Aksyonoff Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/home/stan/Applications/doctvadm/config/development.sphinx.conf'... index 'contact_info_core': search error: . In fact I get the same error if I don't specify any index at all (forcing a search on all indexes): search --config ~/Applications/doctvadm/config/development.sphinx.conf worriedSphinx 2.0.9-release (rel20-r4115) Copyright (c) 2001-2013, Andrew Aksyonoff Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/home/stan/Applications/doctvadm/config/development.sphinx.conf'... index 'ce_forum_core': search error: . Which leads to two questions: - Am I constructing the sphinx search command incorrectly? - Is the version of sphinx that I'm using (2.0.9) incompatible with Thinking Sphinx 1.5.0? I'm sorry that I cannot set up a stripped-down example for you but there are client-related restrictions that would make that extremely difficult. I am absolutely mystified by these problems. It seems that since I upgraded Sphinx and Thinking Sphinx only tables whose indexes were defined before the upgrades can be re-indexed. I know that make no sense as I have been deleted the configuration file and recreating it from scratch but it also make no sense that for three table with identical setups (contact_infos, contact_archives and contact_test) only the original can be searched (although clearly all 3 are getting indexed). Thanks again for all your help. On Mon, Oct 14, 2013 at 7:38 PM, Pat Allan <[email protected]> wrote: > I don't think so - but 1.4.10 was released a *long* time ago, so it's hard > to be certain. I'm pretty sure the latest versions of dependencies will > work with 1.5.0 though. > > On 15/10/2013, at 2:24 AM, Stan Shore <[email protected]> wrote: > > Are there any limitations on the version of Riddle for 2.3? Any of the > other gem dependencies? > > > > On Fri, Oct 11, 2013 at 7:57 PM, Pat Allan <[email protected]>wrote: > >> Hi Stan >> >> Is there any chance you could create a basic test app that reproduces the >> issue? I can't see any reason why the behaviour would be different, and >> it's a bit hard to debug any further without access to either your app or a >> test app that has the same problem. >> >> With regards to gem versions, you can't use anything that's 2.x or 3.x - >> so, the latest that's friendly for Rails 2.3 is 1.5.0. >> >> -- >> Pat >> >> On 12/10/2013, at 3:41 AM, Stan Shore <[email protected]> wrote: >> >> I wanted to give you a little more info. I recreated this archived table >> on my test server (I was originally working on my development machine) and >> encountered the same results! The Thinking Sphinx version was the same, >> the Sphinx version was different (2.0.9 on my dev machine, 0.9.9 on the >> test server). I don't know that this info helps, but I just wanted you to >> know. >> >> Regards, >> >> Stan >> >> >> On Fri, Oct 11, 2013 at 12:09 PM, Stan Shore <[email protected]> wrote: >> >>> It doesn't get any simpler. The index definitions are identical: >>> >>> define_index do >>> indexes :first_name, :sortable => true >>> indexes :last_name, :sortable => true >>> indexes :message >>> >>> has created_at >>> has dist90038 >>> >>> where "type in >>> ('ContactShow','DoctorContact','ProcedureRequest','TellUs')" >>> >>> end >>> >>> By the way, I tried removing the has statements and the where statement >>> and reconfiguring and reindexing with the same results. Even if I try the >>> simplest search: >>> >>> ContactInfo.search('worried') >>> ContactArchive.search('worried') >>> >>> The first one works, the second one doesn't. >>> >>> Seems crazy but there it is. >>> >>> I'm wondering about versions. What gem version for Thinking Sphinx and >>> Riddle should I be using for Rails 2.3.15? >>> >>> Regards, >>> >>> Stan >>> >>> >>> >>> On Wed, Oct 9, 2013 at 11:39 PM, Pat Allan <[email protected]>wrote: >>> >>>> Can you show us the index definitions for both models, and the queries >>>> you're running? >>>> >>>> On 09/10/2013, at 4:28 AM, stasch <[email protected]> wrote: >>>> >>>> I've got two tables in the same database that are identical in >>>> structure - columns, indexes, permissions (one is an archive of the >>>> other). The model files are not identical but the associations and index >>>> declarations are. The archive model contains a subset of the functionality >>>> of the original, but I have already gone so far as to reduce the model file >>>> for the archive to just the associations and index declarations. When I >>>> rebuild the indexes after deleting all files in the index directory both >>>> models are processed without complaint. The index files are created with >>>> identical permissions. But when I do a simple search (for the word >>>> 'worried') on each the original file returns many results, the archive file >>>> returns no results. When I use the error method to check for errors on the >>>> result set it returns nil. When I look in the query log it shows that the >>>> query was successfully executed and returned 0 results. But when I do a >>>> sql query on the indexed field in the archive file it returns over 3000 >>>> results (select count(*) from contact_archive where message like '% worried >>>> %'). >>>> >>>> My environment is Ruby 1.8.7, Rails 2.3.15 and Thinking Sphinx 1.4.10. >>>> Any help would be greatly appreciated. >>>> >>>> -- >>>> 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/groups/opt_out. >>>> >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "Thinking Sphinx" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/thinking-sphinx/tVmRxNDkM3M/unsubscribe >>>> . >>>> To unsubscribe from this group and all its topics, 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/groups/opt_out. >>>> >>> >>> >> >> -- >> 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/groups/opt_out. >> >> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Thinking Sphinx" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/thinking-sphinx/tVmRxNDkM3M/unsubscribe >> . >> To unsubscribe from this group and all its topics, 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/groups/opt_out. >> > > > -- > 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/groups/opt_out. > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Thinking Sphinx" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/thinking-sphinx/tVmRxNDkM3M/unsubscribe. > To unsubscribe from this group and all its topics, 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/groups/opt_out. > -- 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/groups/opt_out.
