HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Replace the default `sphinxapi.php` file ?

AnonymooseAnonymoose ✭✭
edited June 2014 in Feedback
  1. Download the latest Sphinx Search build and install it from binary on windows or distro on linux
  2. Download the SphinxSearchPlugin from Vanilla Forums's Plugin portal
  3. Extract the zip file to your webserver's plugin folder
  4. Replace the default sphinxapi.php file in the SphinxSearch plugin folder with the one from the downloaded archive in step

There was no sphinxapi.php file downloaded in Step 1.

Comments

  • peregrineperegrine MVP
    edited June 2014

    it will always be in the tarball if you unzip the source.

    Source tarball (tar.gz)

    http://sphinxsearch.com/downloads/release/

    despite what other distro you downloaded

    also here, depending on what version you want.

    https://code.google.com/p/sphinxsearch/source/browse/#svn/branches/rel21/api

    or here

    https://code.google.com/p/sphinxsearch/source/browse/#svn/trunk/api

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • AnonymooseAnonymoose ✭✭
    edited June 2014

    Thanks. Found it in two places.

    1. api/sphinxapi.php
    2. api/ruby/spec/fixtures/sphinxapi.php

    The ruby one is different that the one in the top api directory.

    Perhaps the location of api/sphinxapi.php should be noted in the install docs.

  • AnonymooseAnonymoose ✭✭
    edited June 2014

    Now onto step 2 of the SphinxSearch Install Wizard.

    Full Text of existing contents of sphinx.conf

    Where is this sphinx.conf to be found? Doesn't exist. Need to use sphinx.conf.dist
    Need to change this in the install instructions as well.

    Next Problem. Running the indexer gives an error.

    indexing index 'vss_main'...
    FATAL: failed to open /var/data/vss_main.spl: No such file or directory, will not index. Try --rotate option.

    Why? No /var/data/ directory existed. Creating it.

  • peregrineperegrine MVP
    edited June 2014

    Where is this sphinx.conf to be found? Only the default sphinx.conf.dist file exists in /usr/local/etc/ after running the SphinxSearch Install Wizard.

    you really need to test and read the sphinxsearch documentation. it explains everything.

    You will have optimum results if you run the tests and demos associated with

    http://sphinxsearch.com/docs/current.html#quick-tour

    you can poke thousands of holes in documentation, it makes assumption, one of which you looked at
    http://sphinxsearch.com/about/sphinx/ and

    http://sphinxsearch.com/docs/.

    the plugin is a way to ease into using sphinxsearch, but it doesn't document every single step, nor should it. see the sphinxsearch documentation as it will always be related to shinxsearch itself. Once you follow that. the plugin takes over and does what it needs to do to integrate with vanilla.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • AnonymooseAnonymoose ✭✭
    edited June 2014

    I've got it running. But the instructions on the plugin page leave much to be desired.

    It doesn't document every step, but it should be clear about what to do with the Wizard.

    There's also the issue of it suggesting wrong paths for things. Why? If it is a Wizard, it should figure out the correct paths of both sphinx.conf and the indexer. If a directory doesn't exist, create it. And so on. That's the job of a Wizard.

    A Wizard shouldn't make a quest of how to get a riddle out of the Sphinx.

  • peregrineperegrine MVP
    edited June 2014

    @Anonymoose said:
    I've got it running. But the instructions on the plugin page leave much to be desired.

    It doesn't document every step, but it should be clear about what to do with the Wizard.

    There's also the issue of it suggesting wrong paths for things. Why? If it is a Wizard, it should figure out the correct paths of both sphinx.conf and the indexer.

    as a person who installs it - you should know where you install it. depending on os it could be in any number of places. you can also configure and make things sphinxsearch to install anywhere you want.

    A Wizard shouldn't make a quest of how to get a riddle out of the Sphinx.

    you can solve the Sphinx riddle as Oedipus did in Sophocles, send your improvements to @mcu_hq.

    riddle is this: http://www.pitt.edu/~edfloyd/Class1130/sphinx.html

    as usual write up what you perceive as proper documentation - send it to mcu_hq, post it on his github.
    and post screenshots of what you perceive as wrong.

    and submit a tutorial for mcu_hq to review..

    lots of people gripe and carp about things that volunteers develop that is free-of-charge. Concomitantly few end-users take the time to improve documentation (assuming one know's what they are doing and don't provide misinformation), write up great instructions, and tutorials to aid the developer. (assuming one know's what they are doing and don't provide misinformation)

    personally instead of griping , a thank you is in order to mcu_hq for one heck of a good plugin (that probably took many, many months to write) for creating something that you probably could not do on your own, and a donation if you like the plugin and find it helpful for your forum,
    and provide him the documentation changes you believe he should include and any code changes to improve things across all OS's and iterations.

    @Anonymoose - you are off to a promising start. if you are interested in improving user experience, with your improved documentation and tutorial when you get it done, it may help others.

    hope to see your new improvements soon!

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • mcu_hqmcu_hq ✭✭✭

    Thanks @peregrine once again for the discussion and your points are right on.

    @Anonymoose As you may have noticed, the instructions could probably be clearer. Please issue a pull request on the github page or post an issue so it could be tracked. As the official sphinx page matures, some of the steps in my instructions will become outdated.

    There's also the issue of it suggesting wrong paths for things. Why? If it is a Wizard, it should figure out the correct paths of both sphinx.conf and the indexer

    The wizard was much much smarter in previous versions, but due to system privileges and other server settings, it made it difficult for everyone to have the plugin work as intended. Because of this, the wizard requires manual interaction. A lot of the first few questions dealt with getting the wizard to work correctly. It was too advanced and caused problems, so it was slimmed down and now the plugin has little to do with actually installing sphinx.

    If a directory doesn't exist, create it. And so on. That's the job of a Wizard.

    Sphinx should create the directories by itself so that the correct permissions are assigned. When the PHP script runs, it runs under a different user. In short, it is best to let sphinx do its thing.

  • AnonymooseAnonymoose ✭✭
    edited June 2014

    @mcu_hq said:
    Sphinx should create the directories by itself so that the correct permissions are assigned. When the PHP script runs, it runs under a different user. In short, it is best to let sphinx do its thing.

    I just installed sphinx from scratch on a debian setup, and the missing directories had to be created manually. I suspect this is in part to do with the fact that there is no default config file being installed when sphinx is installed. You have to create one. Sphinx won't run without a config, obviously, but the directories won't be there until it runs once. But we can't get there without going through the steps of the Wizard.

  • mcu_hqmcu_hq ✭✭✭

    After you install sphinx using your distro, it creates a sphinx.conf.dist file that has the default settings and other custom settings such as the location of your indexer and searchd paths. After installing, try to run sphinx using the default dist config file after you rename it to sphinx.conf. It is probably best to get sphinx working before trying to get the plugin working by following the steps in section 2.7.

    Please post your exact steps for future reference so others using a debian setup can have an easier time - thanks.

  • @mcu_hq said to Anonymouse:

    Please post your exact steps for future reference so others using a debian setup can have an easier time - thanks.

    agreed it would help others.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Just FYI - as of August 2015, the sphinxsearch plugin for vanilla doesn't work with sphinxsearch 2.3.1beta, so don't try. Also, make sure that your replacement sphinxapi.php file comes from the exact same version of sphinxsearch that you've deployed to avoid issues

  • mcu_hqmcu_hq ✭✭✭

    @rosscampbell What version of vanilla are you running? Have you tried with a lower version of sphinx?

  • @mcu_hq - yes. worked fine with version 2.0.4 in Ubuntu repositories. I just wrote up a howto for Ubuntu 14.04 based on my experiences. Thanks!

Sign In or Register to comment.