GithubHelp home page GithubHelp logo

bauerjj / sphinxsearch Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 10.0 6.1 MB

Sphinx Search Plugin for Vanilla Forums. Includes an advanced search along with multiple widgets.

Home Page: https://open.vanillaforums.com/addon/sphinxsearch-plugin

License: GNU General Public License v2.0

PHP 92.24% CSS 3.22% JavaScript 0.91% Smarty 3.63%

sphinxsearch's People

Contributors

bauerjj avatar gillingham avatar hgtonight avatar jamesinc avatar kenston avatar yhdleung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sphinxsearch's Issues

Security Issue

analyticsstick.json exposes information that should not be!

Searches only phrases starting with Roman characters

Hi,

I installed Vanilla and SphinxSearch (on OS X 10.8, with PHP 5.3) and they both work great. For the most part.

The problem is that it appears that SphinxSearch erroneously dismisses searches that don't start with roman characters.

I run a Persian forum, and naturally almost everything is in Persian. I've added Arabic and Persian character mappings (http://sphinxsearch.com/wiki/doku.php?id=charset_tables#arabic) to Sphinx's charset_table (in assets/sphinx.conf.tpl) and all Persian conversations have been indexed (I can verify it by running python api/test.py اپل and seeing the results).

But, when I search for a Persian phrase, or anything that doesn't start with [a-zA-Z0-9_+], the SphinxSearch plugin ignores the search.

Here's the /var/query.log when I search for "mac", "اپل" (it's "Apple" in Persian"), "mac اپل" and "اپل mac". Notice that for the second and fourth queries (that don't start with Roman characters), it only updates the "vss_stats" index, and doesn't do the actual searching. My guess (and I'll be shocked if it's not true!) is that somewhere in your giant PHP codebase (7884 lines of code!) you try to validate the searched phrase, but do it incorrectly and reject some searches.

I looked for it in your code, and the offending validator must be in class.searchmodel.php, but I couldn't find anything.

[Wed Aug 22 22:59:23.745 2012] 0.002 sec [ext2/0/rel 2354 (0,30)] [vanilla] [MainSearch]   @(title,body) mac
[Wed Aug 22 22:59:23.745 2012] 0.000 sec [ext2/0/rel 131 (0,20)] [vanilla] [RelatedMainThreads] @(title) mac
[Wed Aug 22 22:59:23.746 2012] 0.000 sec [ext2/1/rel 1 (1,20) @keywords_crc] [vss_stats] [Related Searches] @(keywords) mac


[Wed Aug 22 22:59:28.269 2012] 0.000 sec [ext2/1/rel 0 (1,20) @keywords_crc] [vss_stats] [Related Searches] @(keywords) اپل


[Wed Aug 22 22:59:39.341 2012] 0.003 sec [ext2/0/rel 6550 (0,30)] [vanilla] [MainSearch]   @(title,body) اپل | mac
[Wed Aug 22 22:59:39.342 2012] 0.000 sec [ext2/0/rel 212 (0,20)] [vanilla] [RelatedMainThreads] @(title) اپل | mac
[Wed Aug 22 22:59:39.343 2012] 0.000 sec [ext2/1/rel 0 (1,20) @keywords_crc] [vss_stats] [Related Searches] @(keywords) اپل | mac


[Wed Aug 22 23:24:44.116 2012] 0.000 sec [ext2/1/rel 0 (1,20) @keywords_crc] [vss_stats] [Related Searches] @(keywords) mac | اپل

I've posted it on vanillaforums.org as well, so people can follow the issue there as well: http://vanillaforums.org/discussion/21270/searches-only-phrases-starting-with-roman-characters

Generated Sphinx configuration is invalid

using config file '/etc/sphinxsearch/sphinx.conf'...
WARNING: key 'charset_type' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'enable_star' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'ondisk_dict' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'charset_type' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'enable_star' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: 3 more warnings skipped.
ERROR: unknown key name 'compat_sphinxql_magics' in /etc/sphinxsearch/sphinx.conf line 272 col 27.
FATAL: failed to parse config file '/etc/sphinxsearch/sphinx.conf'

Cron job generation fails

When running through the wizard, I enter the details for cron, and it gives me a blank screen with this in the logs:

PHP Fatal error:  Call to protected method Gdn_Validation::AddValidationField() from context 'SphinxSearchPlugin' in /var/www/xyz/vanilla/plugins/SphinxSearch/class.sphinxsearch.plugin.php on line 350

According to this:
https://vanillaforums.org/discussion/30699/howto-install-sphinx-search-on-ubuntu-14-04
it should be putting them in a non-writeable directory (which seems problematic), but even making it writeable doesn't help.

Unable enable plugin Vanilla 2.5 with PHP 7.1

GDN_sph_stats.keywords_full is not populated

In my new installation of the plugin (20190101), the DB structure for GDN_sph_stats is:

Field Type Null Key Default Extra
id int(11) NO PRI auto_increment
mode int(11) NO
keywords varchar(255) NO MUL
keywords_full varchar(255) NO
date_added datetime NO

However, whenever I conduct a search, I'm encountering the following error:

PHP message: PHP Fatal error:  Field 'keywords_full' doesn't have a default value|Gdn_Database|Query|insert `GDN_sph_stats` 
(`keywords`, `mode`, `date_added`) 

My current workaround is to alter the DB structure to allow keywords_full to have NULL values.

It seems that in class.widgets.stats.php, keywords_full isn't included:

        foreach ($Words as $Word => $Info) {
            $Query.=$Word . ' ';
            Gdn::SQL()
                    ->Insert('sph_stats', array('keywords' => $Word, 'mode' => 1, 'date_added' => Gdn_Format::ToDateTime())); //mode == 1 means plain word
        }
        Gdn::SQL()
                ->Insert('sph_stats', array('keywords' => $Query, 'mode' => 2, 'date_added' => Gdn_Format::ToDateTime())); //mode == 2 means hwole query
    }

Installer wizard discards sphinx conf, new conf blank

I'm trying to set up Sphinx search for my Vanilla forums. Right now I'm setting up a test instance of everything, and I've got Vanilla and MariaDB running in Docker containers. I have a Sphinx container too, but I want to set up the configuration as part of creating the Docker image.

I used the Installation Wizard, and I pasted my sphinx.conf file in there and pressed Save and Continue, and both the old and new conf are empty, except for "Paste Your Text Here" in both. I don't see any errors in the UI.

I've checked my config file, and it doesn't have the conf, although it does seem to be writeable as I can modify the settings of other Vanilla plugins without a problem (and enable the Sphinx Search plugin too).

Any ideas?

I tried finding the config in your repository, but I'm not a PHP developer, so I can't seem to figure out where it is, or what it should be.

Vanilla Forum Sphinx install problem

I'm following the guide, i'm stuck on step 8 (https://open.vanillaforums.com/addon/sphinxsearch-plugin)
I have downloaded the .deb package not the Source tarball (tar.gz)
I'm on ubuntu 16.04 x64

Do you know whats the problem?

I have the following error:


root@vps****:~# /usr/bin/indexer --all --config /etc/sphinxsearch/sphinx.conf
Sphinx 2.2.11-id64-release (95ae9a6)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'test1'...
ERROR: index 'test1': sql_query: Table 'vanilla5.documents' doesn't exist (DSN=mysql://root:***@localhost:3306/vanilla5).
total 0 docs, 0 bytes
total 0.002 sec, 0 bytes/sec, 0.00 docs/sec
indexing index 'test1stemmed'...
ERROR: index 'test1stemmed': sql_query: Table 'vanilla5.documents' doesn't exist (DSN=mysql://root:***@localhost:3306/vanilla5).
total 0 docs, 0 bytes
total 0.000 sec, 0 bytes/sec, 0.00 docs/sec
skipping non-plain index 'dist1'...
skipping non-plain index 'rt'...
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

ignore

Forgot to rewrite the file after upgrading to master, derp

Adavanced search by Member not working with 2.1b2

The "Posted by Member" field in the advanced search function seems to be totally ignored by the plugin. When I enter a member's user name, it has no bearing on the search results. I've tried all three search types (any, all, and extended) with no luck. If I search in extended mode using the operator @user it works perfectly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.