Where to put the stopwords.txt and wordforms.txt on heroku?
I want to use both stopwords and wordforms on my heroku app.
My config looks like this:
production:
version: '2.1.0' min_prefix_len: 1 min_infix_len: 1 wordforms:
'wordforms.txt' stopwords: 'stopwords.txt' And I get error
Stopping Sphinx...
Stopped Sphinx
Starting Index Request
rake aborted!
No such file or directory - stopwords.txt
When I try to run: heroku run rake fs:rebuild
So where do I put stopwords.txt and wordforms.txt?
Support Staff 2 Posted by Pat Allan on 11 Jan, 2012 07:39 AM
I'm fairly certain paths in sphinx.yml will be considered relative to the root of your Rails application. So, in your current example, you'll want to put wordforms.txt and stopwords.txt in the root of your project. I would suggest putting them under config instead - perhaps in
config/sphinx.And then, in your
config/sphinx.ymlfile, you'll setwordforms: config/sphinx/wordforms.txt, etc.3 Posted by lephyrius on 11 Jan, 2012 08:43 AM
At least it doesn't say it doesn't exists anymore.
But my wordforms/stopwords isn't working and min_prefix_len: 1 min_infix_len: 1 isn't working. After I ran heroku run rake fs:rebuild. I also had to change back to version: '1.10-beta' but that is another discussion: 2.1.0 gave me: (undefined method `constantize' for nil:NilClass).
Support Staff 4 Posted by Pat Allan on 11 Jan, 2012 08:48 AM
What's your app's name? I'll see what's coming through to the server.
5 Posted by lephyrius on 11 Jan, 2012 09:00 AM
On Heroku its: igdbcom-production
Support Staff 6 Posted by Pat Allan on 11 Jan, 2012 09:41 AM
Ah, you can only have infixes or prefixes - not both. Try removing one of those settings (infixes includes both, so removing the prefix option is probably the way to go).