Carbon-Forum icon indicating copy to clipboard operation
Carbon-Forum copied to clipboard

Sphinx Server

Open robotrono opened this issue 8 years ago • 16 comments

Is it possible to provide a guide on how to install and configure the "Sphinx Server" with Carbon Forum?

robotrono avatar May 12 '16 09:05 robotrono

install and copy sphinx.conf to you sphinx installation path. @virteman

lincanbin avatar May 12 '16 09:05 lincanbin

http://www.sphinx-doc.org/en/stable/install.html

lincanbin avatar May 12 '16 09:05 lincanbin

I can help

ghost avatar May 12 '16 12:05 ghost

sql_user = sphinx_u sql_pass = search_perfect sql_db = knowledge

Here I put db data from the forum?

robotrono avatar May 12 '16 19:05 robotrono

right.

lincanbin avatar May 12 '16 19:05 lincanbin

I followed this:

Install: apt-get install sphinxsearch

Config: I upload the config with the db data from my carbon forum.

After, adding data to the Index

indexer --all

Start the daemon first I change the line:

nano /etc/default/sphinxsearch START=yes

And after:

service sphinxsearch start

Testing via console:

`search test Sphinx 2.0.4-id64-release (r3135) Copyright (c) 2001-2012, Andrew Aksyonoff Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'... index 'PostsIndexes': query 'test ': returned 10 matches of 10 total in 0.000 sec

displaying matches:

  1. document=17, weight=2475, topicid=2, istopic=1, posttime=Wed May 11 03:34:33 2016 ID=17 TopicID=2 IsTopic=1 UserID=1 UserName=akira Subject=Test Content=

    test

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462952073 IsDel=0
  2. document=2, weight=1482, topicid=1, istopic=0, posttime=Wed May 11 03:15:16 2016 ID=2 TopicID=1 IsTopic=0 UserID=1 UserName=akira Subject=Desu Desu Content=

    @aiondesu test

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462950916 IsDel=0
  3. document=3, weight=1482, topicid=1, istopic=0, posttime=Wed May 11 03:15:51 2016 ID=3 TopicID=1 IsTopic=0 UserID=2 UserName=aiondesu Subject=Desu Desu Content=

    @akira test 2

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462950951 IsDel=0
  4. document=4, weight=1482, topicid=1, istopic=0, posttime=Wed May 11 03:16:43 2016 ID=4 TopicID=1 IsTopic=0 UserID=2 UserName=aiondesu Subject=Desu Desu Content=

    Reply to #1 @akira :

    D: test 3

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462951003 IsDel=0
  5. document=9, weight=1482, topicid=1, istopic=0, posttime=Wed May 11 03:18:59 2016 ID=9 TopicID=1 IsTopic=0 UserID=1 UserName=akira Subject=Desu Desu Content=

    Test 5

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462951139 IsDel=0
  6. document=10, weight=1482, topicid=1, istopic=0, posttime=Wed May 11 03:19:11 2016 ID=10 TopicID=1 IsTopic=0 UserID=1 UserName=akira Subject=Desu Desu Content=

    test 3123123

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462951151 IsDel=0
  7. document=13, weight=1482, topicid=1, istopic=0, posttime=Wed May 11 03:19:31 2016 ID=13 TopicID=1 IsTopic=0 UserID=1 UserName=akira Subject=Desu Desu Content=

    #1 test

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462951171 IsDel=0
  8. document=7, weight=1475, topicid=1, istopic=0, posttime=Wed May 11 03:18:48 2016 ID=7 TopicID=1 IsTopic=0 UserID=1 UserName=akira Subject=Desu Desu Content=

    Test test

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462951128 IsDel=0
  9. document=12, weight=1475, topicid=1, istopic=0, posttime=Wed May 11 03:19:25 2016 ID=12 TopicID=1 IsTopic=0 UserID=2 UserName=aiondesu Subject=Desu Desu Content=

    TEST TEST DESY TESTO DESU

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462951165 IsDel=0
  10. document=16, weight=1472, topicid=1, istopic=0, posttime=Wed May 11 03:21:55 2016 ID=16 TopicID=1 IsTopic=0 UserID=1 UserName=akira Subject=Desu Desu Content=

    Test

    #6 @akira :

    Test test

    PostIP=xxxxxxxxxxxxxxxx PostTime=1462951315 IsDel=0

words:

  1. 'test': 10 documents, 15 hits`

Works fine, now I edit config.php:

//Sphinx Server define('SearchServer', 'localhost'); define('SearchPort', '9312');

And don't work :(

http://i.imgur.com/bfCBqkN.png

robotrono avatar May 12 '16 22:05 robotrono

Well, I edit the SearchClient.class.php and I add this:

require_once('sphinxapi.php');

And this works fine, http://i.imgur.com/OrR05vX.png

Now I have a problem, this dont show me the posts here: http://i.imgur.com/aH63PyF.png

http://i.imgur.com/zQxnHif.png

It should be like thist: http://i.imgur.com/cQE6pmW.png

robotrono avatar May 12 '16 23:05 robotrono

You need dictionary. https://www.94cb.com/upload/file/20141109/1415523029263289.gz ↑↑↑SQL file of dictionary.

lincanbin avatar May 13 '16 01:05 lincanbin

How works this?

robotrono avatar May 13 '16 01:05 robotrono

Extract and execute it in MySQL.

lincanbin avatar May 13 '16 01:05 lincanbin

So I need to fill the dictionary with keywords?

robotrono avatar May 13 '16 01:05 robotrono

Yes, and the tag you created will be used as a dictionary.

lincanbin avatar May 13 '16 01:05 lincanbin

@lincanbin Is there any way to automate this?

robotrono avatar May 13 '16 01:05 robotrono

Currently not.

lincanbin avatar May 13 '16 01:05 lincanbin

Oh well, thanks so much for the help, I cant wait for the 6.0 update.

robotrono avatar May 13 '16 01:05 robotrono

It is too complex, I want it but too difficult to do it.

hoogw avatar May 25 '17 21:05 hoogw