Page 1 of 2

Sphinx Setup

Posted: Thu May 22, 2014 4:00 pm
by johnny
I'm having problems with the Sphinx setup. This is what we have so far. Right now it's setup where the tags and search pull the same results.

http://www.domain.com/tag/latina/
http://www.domain.com/search/latina/

RewriteRule ^tag/(.*)/$ /scj/tube/index.php?tag=$1
RewriteRule ^search/(.*)/$ /scj/tube/index.php?tag=$1

Here is the output when indexer is ran:

using config file '/etc/sphinx/sphinx.conf'...
indexing index 'scj_index'...
collected 1708 docs, 0.3 MB
collected 4332 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1708 docs, 258314 bytes
total 2.631 sec, 98176 bytes/sec, 649.15 docs/sec
total 7750 reads, 0.006 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 11 writes, 0.000 sec, 54.1 kb/call avg, 0.0 msec/call avg
rotating indices: successfully sent SIGHUP to searchd (pid=13444).

from which you can see its working. I assume the app ties into sphinx through the scj/sphinx directory, which is being written to

What do you think the error could be?

Re: Sphinx Setup

Posted: Thu May 22, 2014 4:49 pm
by admin
RewriteRule ^tag/(.*)/$ /scj/tube/index.php?tag=$1
RewriteRule ^search/(.*)/$ /scj/tube/index.php?tag=$1

You have the same rewrite for both of them

Re: Sphinx Setup

Posted: Thu May 22, 2014 5:01 pm
by johnny
Yes that is because that's the only way I can get the search to work. I have removed that line and this is what I have right now. Right now the search doesn't work.

RewriteRule ^tag/(.*)/$ /scj/tube/index.php?tag=$1
RewriteRule ^search/(.*)/(.*)/(.*)/(.*)/$ /scj/tube/index.php?search_type=$1&search=$2&order=$3&page=$4

Re: Sphinx Setup

Posted: Thu May 22, 2014 5:03 pm
by admin
does /scj/tube/?search=... work ?

Re: Sphinx Setup

Posted: Thu May 22, 2014 5:17 pm
by johnny
No I tried that already - scj/tube/?search=anal 0 videos there is about 420 anal videos in the DB.

Re: Sphinx Setup

Posted: Thu May 22, 2014 5:20 pm
by admin
Check the same query from ssh for this index

Re: Sphinx Setup

Posted: Thu May 22, 2014 6:23 pm
by johnny
What query from SSH am I checking?

Re: Sphinx Setup

Posted: Thu May 22, 2014 6:26 pm
by admin
search -i ...

Re: Sphinx Setup

Posted: Thu May 22, 2014 6:29 pm
by johnny
My admin told me that I have to pass more than search -i ..

Re: Sphinx Setup

Posted: Thu May 22, 2014 6:33 pm
by johnny
I figured out the query and sent you the result on PM. Thanks!