Sphinx Setup

johnny
Posts: 18
Joined: Sat May 10, 2014 5:51 pm

Sphinx Setup

Post 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?
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Sphinx Setup

Post 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
Don't forget to run script update
johnny
Posts: 18
Joined: Sat May 10, 2014 5:51 pm

Re: Sphinx Setup

Post 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
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Sphinx Setup

Post by admin »

does /scj/tube/?search=... work ?
Don't forget to run script update
johnny
Posts: 18
Joined: Sat May 10, 2014 5:51 pm

Re: Sphinx Setup

Post by johnny »

No I tried that already - scj/tube/?search=anal 0 videos there is about 420 anal videos in the DB.
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Sphinx Setup

Post by admin »

Check the same query from ssh for this index
Don't forget to run script update
johnny
Posts: 18
Joined: Sat May 10, 2014 5:51 pm

Re: Sphinx Setup

Post by johnny »

What query from SSH am I checking?
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Sphinx Setup

Post by admin »

search -i ...
Don't forget to run script update
johnny
Posts: 18
Joined: Sat May 10, 2014 5:51 pm

Re: Sphinx Setup

Post by johnny »

My admin told me that I have to pass more than search -i ..
johnny
Posts: 18
Joined: Sat May 10, 2014 5:51 pm

Re: Sphinx Setup

Post by johnny »

I figured out the query and sent you the result on PM. Thanks!
Post Reply