Lemmatize pathing issues?

Dave Fawcett's Avatar

Dave Fawcett

30 Mar, 2020 09:19 PM

Hey there, I'm running into a problem with morphology when deploying to Heroku, it seems to not be finding the dictionary so I must be not loading it properly for FlyingSphinx:

using config file '/mnt/local/flying-sphinx/379dafcbd5f9bc6a6/sphinx.conf'...
indexing index 'document_core'...
FATAL: index 'document_core': failed to open ./en.pak: No such file or directory

I've enabled common_sphinx_configuration, and set lemmatizer_base properly and can run this all locally just fine using ThinkingSphinx. Is there any additional steps or configurations required to make this work properly with FlyingSphinx? Or am I needing to shift things away from the yml config file and into the indice? Not sure how to set common configs via the indice..

My sphinx.yml is below:

development:
  address: 127.0.0.1
  mysql41: 9306
  morphology: lemmatize_en_all
  wordforms: <%= Rails.root.join("config", "sphinx", "wordforms", "en.txt") %>
  stopwords: <%= Rails.root.join("config", "sphinx", "stopwords", "stopwords-en.txt") %>
  common_sphinx_configuration: true
  lemmatizer_base: <%= Rails.root.join("config", "sphinx", "dicts") %>

production:
  address: 127.0.0.1
  mysql41: 9306
  morphology: lemmatize_en_all
  wordforms: <%= Rails.root.join("config", "sphinx", "wordforms", "en.txt") %>
  stopwords: <%= Rails.root.join("config", "sphinx", "stopwords", "stopwords-en.txt") %>
  common_sphinx_configuration: true
  lemmatizer_base: <%= Rails.root.join("config", "sphinx", "dicts") %>

  1. Support Staff 1 Posted by Pat Allan on 31 Mar, 2020 10:39 AM

    Pat Allan's Avatar

    Hi Dave,

    I think the issue here is that the flying-sphinx gem doesn’t currently support sending through dictionary files in the lemmatizer_base directory to the Flying Sphinx servers. I’ll need to work through that - probably a couple of days away I’m afraid, but will aim for something as soon as possible.

    Just from the perspective of you being able to use this change as soon as possible: are you using the latest thinking-sphinx and flying-sphinx releases?

    Will keep you posted on this change.

    Cheers,


    Pat

  2. 2 Posted by David on 31 Mar, 2020 02:42 PM

    David's Avatar

    That would be amazing Pat, thanks so much. I'm using flying-sphinx (2.1.4) as well as thinking-sphinx (4.4.1)

    If you'd like to see anything else just let me know!
    ________________________________

  3. Support Staff 3 Posted by Pat Allan on 04 Apr, 2020 11:37 AM

    Pat Allan's Avatar

    Hi Dave,

    I’ve just rolled out the changes for this - you’ll need to update flying-sphinx to v2.2.0 (beyond this fix, the only other change in the release is the dropping of support for Ruby 2.2.x), and then the dictionary files should be uploaded as part of running the configure/index/rebuild tasks. Certainly, it worked with my testing, but keen to hear if it all goes smoothly for you too!

    Cheers,


    Pat

  4. 4 Posted by Dave Fawcett on 12 May, 2020 04:33 PM

    Dave Fawcett's Avatar

    Thanks much Pat, it looks to be working for me now! I have another question, but will open a new discussion for it.

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

Generic

? 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