Where to put the stopwords.txt and wordforms.txt on heroku?

lephyrius's Avatar


11 Jan, 2012 07:35 AM

I want to use both stopwords and wordforms on my heroku app.
My config looks like this:
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?

  1. Support Staff 1 Posted by Pat Allan on 11 Jan, 2012 07:39 AM

    Pat Allan's Avatar

    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.yml file, you'll set wordforms: config/sphinx/wordforms.txt, etc.

  2. 2 Posted by lephyrius on 11 Jan, 2012 08:43 AM

    lephyrius's Avatar

    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).

  3. Support Staff 3 Posted by Pat Allan on 11 Jan, 2012 08:48 AM

    Pat Allan's Avatar

    What's your app's name? I'll see what's coming through to the server.

  4. 4 Posted by lephyrius on 11 Jan, 2012 09:00 AM

    lephyrius's Avatar

    On Heroku its: igdbcom-production

  5. Support Staff 5 Posted by Pat Allan on 11 Jan, 2012 09:41 AM

    Pat Allan's Avatar

    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).

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac