vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Sphinx Indexer not working (https://vborg.vbsupport.ru/showthread.php?t=323971)

mgoetze 12-04-2016 03:15 AM

Sphinx Indexer not working
 
I'm about 90% through the install process with Sphinx on my Linux server running VB5. My vbulletin database name is vbdb. When I run the indexer --all command I get the following error:

[root@www sphinx]# indexer --all
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/sphinx/sphinx.conf'...
indexing index 'test1'...
ERROR: index 'test1': sql_query: Table 'vbdb.documents' doesn't exist (DSN=mysql://vbadmin:***@localhost:3306/vbdb).
total 0 docs, 0 bytes
total 0.002 sec, 0 bytes/sec, 0.00 docs/sec
skipping non-plain index 'testrt'...
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
[root@www sphinx]#

anyone have an idea what I am doing wrong? it appears to be looking for a table named documents, which we dont have in VB5..

Paul M 12-04-2016 04:24 PM

Looks like you are trying to use the [sphinx supplied] default config file, not the vbulletin config file.

mgoetze 12-04-2016 09:31 PM

Update
Ok I am 95% there with the help of Paul's note - thank you Paul. I was trying to follow the standard Sphinx install instructions AND the vbulletin specific instructions. The standard Sphinx instructions ask you to create a sphinx.conf file with database info and then run indexer --all. Basically you don't do any of that when using vbulletin. You simply install sphinx, make sure it is running, setup your vbulletin-sphinx.php file, run searchd --config /path to vbulletin-sphinx.php. (if gives an error about vbulletin_disk missing but the instructions say to ignore that)

NOW the next question is what is the proper way to index?? Here is what I found so far (the name of my database is "vbdb")
1. If I run the following command:
indexer -c /usr/local/sphinx/etc/vbulletin_sphinx.php --rotate --all
The indexer creates a bunch of vbdb_disk files in the /usr/local/sphinx/data/ directory, however, when you go to the forum and try to search there are no results.

2. If I go to Admin CP > Maintenance > General Update Tools > Rebuild Search Index, it creates a large binlog.001 file within the /usr/local/sphinx/data/ directory, AND searching on the forum does produce results.

It would appear #2 is the correct solution, however, when you start Sphinx it is clearly looking for the vbdb_disk index files, so I think somehow method #1 is correct. I even looked at our old server with a working VB5 install and sphinx and it had a binlog.001 file of only a few bytes and all the vbdb_disk files are much larger; and the search on that forum worked without issue. I'm sort of stuck at the moment and would appreciate any guidance from my fellow VB members.

Once I figure out the index issue, I also need to figure out how to keep the index up to date. Are we supposed to setup a cron job within crontab or within VB Admin CP. This doesnt appear to be covered in the document.

Thanks again,
Mark


All times are GMT. The time now is 09:19 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00989 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete