fixed a sphinx query bug

This commit is contained in:
SJ 2013-08-25 21:57:04 +02:00
parent ce394f527d
commit d977dfcf89
2 changed files with 19 additions and 1 deletions

View File

@ -45,3 +45,21 @@ create table if not exists `online` (
unique(`username`,`ipaddr`)
) Engine=InnoDB;
create table if not exists `import` (
`id` int not null auto_increment primary key,
`type` varchar(255) not null,
`username` varchar(255) not null,
`password` varchar(255) not null,
`server` varchar(255) not null,
`created` int default 0,
`started` int default 0,
`finished` int default 0,
`updated` int default 0,
`status` int default 0,
`total` int default 0,
`imported` int default 0,
`duplicate` int default 0,
`error` int default 0,
`cleared` int default 0
) Engine=InnoDB;

View File

@ -269,7 +269,7 @@ class ModelSearchSearch extends Model {
$data['any'] = $this->fixup_sphinx_operators($data['any']);
$data['any'] = $this->fix_email_address_for_sphinx($data['any']);
$fields = '';
if($match) { $match = "($match) & "; } $match .= "(@subject " . $data['any'] . " | @body " . $data['any'] . ") ";
if($match) { $match = "($match) & "; } $match .= "(@(subject,body) " . $data['any'] . ") ";
}