Hi Pat
Just came home and edited the configs, and the 2 environments on the remote
server.
>
> production: &production
> adapter: mysql2
> host: xxx
> database: xxx
> username: xxx
> password: xxx
> encoding: utf8
> development: &production
> adapter: mysql2
> host: xxx
> database: xxx
> username: xxx
> password: xxx
> encoding: utf8
> project_data:
> adapter: mysql2
> host: xxx
> database: xxxx
> username: xxx
> password: xxx
The search URL is: /search?utf8=✓&search=brøndby
It still works fine locally, all though I've also changed the 2
environments there.
The deploy output:
** [out :: domain.dk]
>> ********************************************************************************
>
> ** [out :: domain.dk] {:adapter=>"mysql2", :host=>"host",
>> :database=>"db", :username=>"user", :password=>"pass", :encoding=>"utf8"}
>
> ** [out :: domain.dk]
>> ********************************************************************************
>
> ** [out :: domain.dk] Generating configuration to
>> /home/dir/app/releases/20140408144244/config/production.sphinx.conf
>
> ** [out :: domain.dk] Sphinx 2.0.4-release (r3135)
>
> ** [out :: domain.dk] Copyright (c) 2001-2012, Andrew Aksyonoff
>
> ** [out :: domain.dk] Copyright (c) 2008-2012, Sphinx Technologies Inc
>> (http://sphinxsearch.com)
>
> ** [out :: domain.dk]
>
> ** [out :: domain.dk] using config file
>> '/home/dir/app/releases/20140408144244/config/production.sphinx.conf'...
>
> ** [out :: domain.dk] indexing index 'refinery_wayfinders_club_core'...
>
> ** [out :: domain.dk] WARNING: collect_hits: mem_limit=0 kb too low,
>> increasing to 13824 kb
>
> ** [out :: domain.dk] collected 75 docs, 0.0 MB
>
> ** [out :: domain.dk] sorted 0.0 Mhits, 100.0% done
>
> ** [out :: domain.dk] total 75 docs, 1835 bytes
>
> ** [out :: domain.dk] total 0.039 sec, 46892 bytes/sec, 1916.59 docs/sec
>
> ** [out :: domain.dk] indexing index 'refinery_page_core'...
>
> ** [out :: domain.dk] WARNING: collect_hits: mem_limit=0 kb too low,
>> increasing to 13568 kb
>
> ** [out :: domain.dk] collected 10 docs, 0.0 MB
>
> ** [out :: domain.dk] sorted 0.0 Mhits, 100.0% done
>
> ** [out :: domain.dk] total 10 docs, 205 bytes
>
> ** [out :: domain.dk] total 0.021 sec, 9720 bytes/sec, 474.18 docs/sec
>
> ** [out :: domain.dk] indexing index 'refinery_wayfinders_project_core'...
>
> ** [out :: domain.dk] WARNING: collect_hits: mem_limit=0 kb too low,
>> increasing to 14080 kb
>
> ** [out :: domain.dk] collected 189 docs, 0.0 MB
>
> ** [out :: domain.dk] sorted 0.0 Mhits, 100.0% done
>
> ** [out :: domain.dk] total 189 docs, 16227 bytes
>
> ** [out :: domain.dk] total 0.393 sec, 41230 bytes/sec, 480.22 docs/sec
>
> ** [out :: domain.dk] skipping non-plain index
>> 'refinery_wayfinders_club'...
>
> ** [out :: domain.dk] skipping non-plain index 'refinery_page'...
>
> ** [out :: domain.dk] skipping non-plain index
>> 'refinery_wayfinders_project'...
>
> ** [out :: domain.dk] total 9 reads, 0.000 sec, 2.7 kb/call avg, 0.0
>> msec/call avg
>
> ** [out :: domain.dk] total 27 writes, 0.001 sec, 2.4 kb/call avg, 0.0
>> msec/call avg
>
> ** [out :: domain.dk] rotating indices: succesfully sent SIGHUP to
>> searchd (pid=13727).
>
>
>
So, what to do...
Den tirsdag den 8. april 2014 09.04.15 UTC+2 skrev Pat Allan:
>
> Yup, worth setting the encoding setting for both environments.
>
> On 8 Apr 2014, at 5:02 pm, Daniel Gottschalck <[email protected]<javascript:>>
> wrote:
>
> Heya
>
> Thanks alot, sorry, misread before :-) I will check when I'm off work, I
> only have access from home. I assume they are both the latest, 2.1.4.
>
> - There is no encoding set in either database environment in database.yml
> - should I set it?
>
> - I will change my deploy and cron(rake task) aswell
>
> Thanks
>
>
> Den tirsdag den 8. april 2014 08.56.58 UTC+2 skrev Pat Allan:
>>
>> Hi Daniel
>>
>> Thanks for those details - all useful, but one more bit of detail may be
>> helpful: what version of *Sphinx* (not Thinking Sphinx) is installed in
>> each environment? Best to make sure they’re the same (and, ideally, 2.1.4
>> or newer on both machines).
>>
>> However, my thinking is as follows:
>> * You likely have encoding set to utf8 in your config/database.yml file
>> for your development environment. You’ll want to set this for your
>> production environment as well.
>> * You only need to run the ts:rebuild task when your index structure
>> changes (it’s the equivalent of db:migrate) - and ts:rebuild stops and
>> starts your Sphinx daemon, which is likely why you’ve seen some ‘no enabled
>> local indexes’ errors. Change your cron task to just the ts:index instead,
>> which will avoid restarting the daemon.
>>
>> Cheers
>>
>> —
>> Pat
>>
>> On 8 Apr 2014, at 4:39 pm, Daniel Gottschalck <[email protected]> wrote:
>>
>> Hi Pat
>>
>> Thanks for your response.
>>
>> Both environments are using latest Thinking Sphinx gem '3.1.0' - along
>> with MySQL - and mysql2 gem (latest)
>>
>> I have a whenever cron task, to run ts:rebuild at 12pm every day.
>>
>> Den tirsdag den 8. april 2014 00.46.26 UTC+2 skrev Pat Allan:
>>>
>>> What database and what version of Sphinx are you using locally? And what
>>> about on production?
>>>
>>> Also: do you have any cron tasks set up that involve Sphinx/Thinking
>>> Sphinx?
>>>
>>> On 8 Apr 2014, at 5:16 am, Daniel Gottschalck <[email protected]> wrote:
>>>
>>> Hi
>>>
>>>
>>> Ive implemented Thinking Sphinx on a site.
>>>
>>> The search functionality works fine in development on my MacBook Pro OSX
>>> 10.9.2.
>>>
>>> I can do search with æ,ø,å letters and results will show just fine. The
>>> search I do is with city names "Århus, Værløse, Allerød".
>>>
>>>
>>> But when I try with the same letters on the remote server which is
>>> Ubuntu 12.04, Apache/Passenger setup, it wont return any results at all.
>>>
>>>
>>> I can search with any other english letter: a-y
>>>
>>>
>>> I received this error sometime aswell:
>>>
>>> ThinkingSphinx::SphinxError: no enabled local indexes to
>>> search *search#index*
>>>
>>>
>>> rake ts:rebuild etc works just fine:
>>>
>>> indexing index 'refinery_wayfinders_club_core'...
>>>>
>>>> WARNING: collect_hits: mem_limit=0 kb too low, increasing to 13824 kb
>>>>
>>>> collected 75 docs, 0.0 MB
>>>>
>>>> sorted 0.0 Mhits, 100.0% done
>>>>
>>>> total 75 docs, 1781 bytes
>>>>
>>>> total 0.052 sec, 33804 bytes/sec, 1423.52 docs/sec
>>>>
>>>> indexing index 'refinery_page_core'...
>>>>
>>>> WARNING: collect_hits: mem_limit=0 kb too low, increasing to 13568 kb
>>>>
>>>> collected 10 docs, 0.0 MB
>>>>
>>>> sorted 0.0 Mhits, 100.0% done
>>>>
>>>> total 10 docs, 205 bytes
>>>>
>>>> total 0.030 sec, 6629 bytes/sec, 323.40 docs/sec
>>>>
>>>> indexing index 'refinery_wayfinders_project_core'...
>>>>
>>>> WARNING: collect_hits: mem_limit=0 kb too low, increasing to 14368 kb
>>>>
>>>> collected 189 docs, 0.0 MB
>>>>
>>>> collected 928 attr values
>>>>
>>>> sorted 0.0 Mvalues, 100.0% done
>>>>
>>>> sorted 0.0 Mhits, 100.0% done
>>>>
>>>> total 189 docs, 15852 bytes
>>>>
>>>> total 0.404 sec, 39155 bytes/sec, 466.83 docs/sec
>>>>
>>>> skipping non-plain index 'refinery_wayfinders_club'...
>>>>
>>>> skipping non-plain index 'refinery_page'...
>>>>
>>>> skipping non-plain index 'refinery_wayfinders_project'...
>>>>
>>>> total 1310 reads, 0.010 sec, 0.0 kb/call avg, 0.0 msec/call avg
>>>>
>>>> total 29 writes, 0.002 sec, 3.4 kb/call avg, 0.0 msec/call avg
>>>>
>>>> Started searchd successfully (pid: 21517).
>>>>
>>>
>>>
>>> I tried adding a thinking_sphinx.yml config file with a charset_table
>>> with all the neccessary unicodes, then it wouldn't reindex at all.
>>>
>>> So, any suggestions?
>>>
>>> How can I get the production environment to allow the "æ,ø,å" characters
>>> so the search will work?
>>>
>>>
>>> Thanks in advance
>>>
>>>
>>> Regards
>>>
>>> --
>>> 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
>>> thinkin...@googlegroups.<http://googlegroups.com/>
>>> com <http://googlegroups.com/>.
>>> 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 thinking-sphinx+
>> <javascript:>[email protected]<javascript:>
>> .
>> 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] <javascript:>.
> To post to this group, send email to [email protected]<javascript:>
> .
> 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.