Jump to content

SphinxSE


The Little Guy

Recommended Posts

I am trying to learn SphinxSE, and I am not sure how to get started.

 

First I did this (according to the manual):

CREATE TABLE t1
(
    id          INTEGER UNSIGNED NOT NULL,
    weight      INTEGER NOT NULL,
    query       VARCHAR(3072) NOT NULL,
    group_id    INTEGER,
    INDEX(query)
) ENGINE=SPHINX CONNECTION="sphinx://localhost:9312/test";

SELECT * FROM t1 WHERE query='test it;mode=any';

 

but when I run it I get this error:

#1430 - There was a problem processing the query on the foreign data source. Data source error: searchd error: no enabled local indexes to search

 

First, how do I fix that?

Second, is that the table I add all my data into?

Third could I get some extra info?

Link to comment
https://forums.phpfreaks.com/topic/226429-sphinxse/
Share on other sites

here is what happens when I run this: indexer.exe --all

using config file './sphinx.conf'...
indexing index 'www'...
ERROR: duplicate attribute name:
ERROR: index 'www': failed to configure some of the sources, will not index.
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

 

here is my 'sphinx.conf'

source src1
{
type			= mysql
sql_host		= localhost
sql_user		= root
sql_pass		=
sql_db			= nebala
sql_port		= 3306	# optional, default is 3306
sql_query		= SELECT url, page from www
sql_attr_uint		= 
sql_attr_timestamp	= 
sql_query_info		= SELECT * FROM www WHERE id=$id
}
index www
{
source			= src1
path			= C:/xampp/sphinx/data/nebala/www1
docinfo			= extern
charset_type	= sbcs
}
indexer
{
mem_limit		= 32M
}
searchd
{
port			= 9312
log				= C:/xampp/sphinx/log/searchd.log
query_log		= C:/xampp/sphinx/log/query.log
read_timeout	= 5
max_children	= 30
pid_file		= C:/xampp/sphinx/log/searchd.pid
max_matches		= 1000
seamless_rotate	= 1
preopen_indexes	= 0
unlink_old		= 1
}

 

here are my MySQL tables:

CREATE TABLE IF NOT EXISTS `sphinx` (
  `id` int(10) unsigned NOT NULL,
  `weight` int(11) NOT NULL,
  `query` varchar(3072) NOT NULL,
  `group_id` int(11) DEFAULT NULL,
  KEY `query` (`query`)
) ENGINE=SPHINX DEFAULT CHARSET=latin1 CONNECTION='sphinx://localhost:9312/www';

-- --------------------------------------------------------

--
-- Table structure for table `www`
--

CREATE TABLE IF NOT EXISTS `www` (
  `site_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `url` varchar(255) NOT NULL,
  `page` text NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`site_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

 

So why can't my indexer index? I can not figure it out.

Link to comment
https://forums.phpfreaks.com/topic/226429-sphinxse/#findComment-1169707
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.