Hi Pete
I'm going to start with the simple questions, so I apologise if you've already
done this: but have you re-indexed and restarted Sphinx on the production
server? If you've not done both since adding the fields or attributes in
question, then the query won't work.
Also: what versions of Sphinx, Rails and Thinking Sphinx are you using? And
what is the actual query you're running?
Cheers
--
Pat
On 20/10/2010, at 4:14 AM, Pete Campbell wrote:
> Our dev server works perfectly on our dev server not on production. If
> any conditions are applied on production, there are no results
> returned. If I remove the CONDITIONS parameter, the rest of the search
> parameters are applied correctly.
>
> We have the same versions of TS, Sphinx & MySQL on both. The deploy
> strategy is different (Capistrano for dev, a script we created for
> prod). Unfortunately we're not getting any logfiles on prod either
> (not sure why yet). TS is vendored. Dev runs in the 'test' environment
> (orig developer didn't understand what 'test' meant). Aside from
> this, I can't figure out whats different between the two. Sphinx seems
> to have the same data & return the appropriate results (shown at
> bottom of this email).
>
> Any thoughts on where we should look for the cause of this discrepancy
> in behavior?
>
> Thanks!
>
> Pete
>
>
> search statement:
> ==========================
> all_books = Book.search(@search_text,
> :limit => MAX_SEARCH_RESULTS,
> :order => "promote DESC,
> #{SORTABLE_COLUMNS[rand(SORTABLE_COLUMNS.length)]}",
> :include => :books_category,
> :conditions => conditions,
> :with_all => with_all,
> :without => without)
>
> Index
> ==========================
> define_index do
> indexes title, :sortable => :true
> indexes promote, :sortable => :true
> indexes mod_datetime, :sortable => :true
> indexes publisher_id, :sortable => :true
> indexes description
> indexes bynames
> indexes approved
> indexes fiction_type
> indexes book_type
> indexes quizcreator_id
> has quizcreator_id
> has books_category.category_id , :as => :category_id
> where "(book_type IN ('#{Book::TYPE_READABLE}',
> '#{Book::TYPE_FREE}', '#{Book::TYPE_READ_ALOUD}'))"
> end
>
>
> Sphinx results:
> ==========================
>
> search -c config/<env>.sphinx.conf 'betty'
>
> displaying matches:
> 1. document=32, weight=2, quizcreator_id=65, sphinx_internal_id=16,
> class_crc=1809255439, subclass_crcs=(1809255439), sphinx_deleted=0,
> title_sort=402, promote_sort=1837, mod_datetime_sort=3383,
> publisher_id_sort=3475, quizcreator_id=3563,
> category_id=(3,7,11,22,28,38,69,78,97,110)
> id=16
> title=Betty to the Rescue
> description=More than anything else, Betty likes to be helpful -- but
> somehow the helping always seems to go wrong. In this story Betty
> tries to rescue a poor little monkey who's stuck in a tree.
> book_type=R
> bynames=Michaela Morgan (author), Moira Kemp (illustrator)
> purchase_url=http://www.amazon.com/gp/redirect.html?
> ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct
> %2F1842481487%253ftag%3Damazonaffiliatedummyid%2526link%5Fcode
> %3Dxm2%2526camp%3D2025%2526dev-t
> %3D0PWN83K3NNF20R94Q6G2&tag=bigunivcom-20&linkCode=ur2&camp=178
> publisher_id=1
> mod_datetime=2010-10-04 01:28:36
> width=930
> height=639
> approved=Y
> author_id=(NULL)
> promote=0
> fiction_type=F
> quizcreator_id=091112184449
> images_count=14
> images_total_size=1780659
>
> ......
>
> --
> 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.