#
# minimal sphinx configuration suited to piler
#
source base
{
type = mysql
sql_host = localhost
sql_db = piler
sql_user = piler
sql_pass = your_db_password
sql_attr_uint = size
sql_attr_uint = sent
sql_attr_uint = attachments
##
## From 0.1.25 these attributes are disabled for an optimized version
## If you have indexed data already, then don't exclude them otherwise
## you have to reindex all your emails
##
## sql_attr_uint = direction
## sql_attr_uint = arrived
## sql_attr_uint = folder
}
source delta : base
{
sql_query_pre = SET NAMES utf8
sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(id) FROM
sph_index
sql_query_post_index = DELETE FROM sph_index WHERE id<=(SELECT
max_doc_id FROM sph_counter WHERE counter_id=1)
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`,
`subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`,
`attachments`, `attachment_types` FROM sph_index \
WHERE id <= (SELECT max_doc_id FROM sph_counter WHERE counter_id=1)
sql_query_killlist = SELECT `id` FROM `metadata` WHERE `deleted`=1
}
source main1 : base
{
sql_query_pre = SET NAMES utf8
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`,
`subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`,
`attachments`, `attachment_types` FROM sph_index WHERE id=-1
}
source main2 : base
{
sql_query_pre = SET NAMES utf8
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`,
`subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`,
`attachments`, `attachment_types` FROM sph_index WHERE id=-1
}
source main3 : base
{
sql_query_pre = SET NAMES utf8
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`,
`subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`,
`attachments`, `attachment_types` FROM sph_index WHERE id=-1
}
source main4 : base
{
sql_query_pre = SET NAMES utf8
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`,
`subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`,
`attachments`, `attachment_types` FROM sph_index WHERE id=-1
}
source dailydelta : base
{
sql_query_pre = SET NAMES utf8
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`,
`subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`,
`attachments`, `attachment_types` FROM sph_index WHERE id=-1
}
source tag : base
{
sql_query_pre = SET NAMES utf8
sql_query = SELECT `_id`, `id`, `uid`, `tag` FROM `tag`
sql_attr_uint = id
sql_attr_uint = uid
}
source note : base
{
sql_query_pre = SET NAMES utf8
sql_query = SELECT `_id`, `id`, `uid`, `note` FROM `note`
sql_attr_uint = id
sql_attr_uint = uid
}
index main1
{
source = main1
path = /var/piler/sphinx/main1
docinfo = extern
charset_type = utf-8
enable_star = 1
min_prefix_len = 6
min_word_len = 1
}
index main2
{
source = main2
path = /var/piler/sphinx/main2
docinfo = extern
charset_type = utf-8
enable_star = 1
min_prefix_len = 6
min_word_len = 1
}
index main3
{
source = main3
path = /var/piler/sphinx/main3
docinfo = extern
charset_type = utf-8
enable_star = 1
min_prefix_len = 6
min_word_len = 1
}
index main4
{
source = main4
path = /var/piler/sphinx/main4
docinfo = extern
charset_type = utf-8
enable_star = 1
min_prefix_len = 6
min_word_len = 1
}
index dailydelta1
{
source = dailydelta
path = /var/piler/sphinx/dailydelta1
docinfo = extern
charset_type = utf-8
enable_star = 1
min_prefix_len = 6
min_word_len = 1
}
index delta1
{
source = delta
path = /var/piler/sphinx/delta1
docinfo = extern
charset_type = utf-8
enable_star = 1
min_prefix_len = 6
min_word_len = 1
}
index tag1
{
source = tag
path = /var/piler/sphinx/tag1
docinfo = extern
charset_type = utf-8
enable_star = 1
min_prefix_len = 6
min_word_len = 1
}
index note1
{
source = note
path = /var/piler/sphinx/note1
docinfo = extern
charset_type = utf-8
enable_star = 1
min_prefix_len = 6
min_word_len = 1
}
indexer
{
mem_limit = 256M
}
searchd
{
listen = 127.0.0.1:9312
listen = 127.0.0.1:9306:mysql41
log = /dev/null
binlog_path =
##query_log =
read_timeout = 5
max_children = 30
pid_file = /var/run/piler/searchd.pid
max_matches = 1000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
compat_sphinxql_magics = 0
}
--
Tercio Gaudencio Filho
On Tue, Jan 27, 2015 at 10:23 AM, [email protected] <
[email protected]> wrote:
>
> Could you please post the working Sphinx.conf
>
> Sent from my iPhone
>
> On 27 Jan 2015, at 2:16 PM, Tercio Gaudencio Filho <[email protected]>
wrote:
>
> Well, the problem was with .conf file. I was using a different
version(From the new installation). I copied the old one and it worked.
>
> Now I'm getting a warning:
>
> WARNING: IsEmpty != attribute size (32)
>
> From CRON /usr/local/libexec/piler/indexer.delta.sh.
>
> Any tips on that?
>
> Thanks!
>
> --
> Tercio Gaudencio Filho
>
> On Tue, Jan 27, 2015 at 7:04 AM, Janos SUTO <[email protected]> wrote:
>>
>>
>> Hello,
>>
>> On 2015-01-26 22:26, Tercio Gaudencio Filho wrote:
>>>
>>> I also received from Cron:
>>>
>>> Cron <piler@mailpiler> /usr/local/libexec/piler/indexer.delta.sh [1]:
>>>
>>> WARNING: IsEmpty != attribute size (32)
>>> FATAL: failed to merge index 'delta1' into index 'dailydelta1':
>>> dictionary types must be the same (dst dict=crc, src dict=keywords )
>>
>>
>> I assume the sphinx version and the used sphinx.conf don't match
perfectly.
>> I recommend you to drop current sphinx data, reindex a few emails, and
check
>> if you can search for them. If so, then reindex the rest of your emails.
>>
>> Janos
>>
>>
>>> --
>>> Tercio Gaudencio Filho
>>>
>>> On Mon, Jan 26, 2015 at 7:22 PM, Tercio Gaudencio Filho
>>> <[email protected]> wrote:
>>>
>>>> Hi!
>>>>
>>>> I have a installation of piler running OK.
>>>>
>>>> I have to migrate to a new server. I installed this new server and
>>>> installed piler from sources.
>>>>
>>>> I copied .conf, .key and .pem from the original server and also
>>>> /var/piler.
>>>>
>>>> The UI is running OK, but when I search no results are found.
>>>>
>>>> In my syslog I have:
>>>>
>>>> Jan 26 19:06:17 piler piler-webui[3441]: sphinx query: 'SELECT id
>>>> FROM main1,dailydelta1,delta1 WHERE MATCH('@(subject,body)
>>>> contract') ORDER BY `sent` DESC LIMIT 0,1000 OPTION
>>>> max_matches=1000' in 0.02 s, 0 hits, 121037 total found
>>>>
>>>> In the UI I got:
>>>>
>>>> "Empty search result. Try adding the wildcard character(*) after a
>>>> word snippet, eg. duplic* to find "duplicate", "duplicated", etc."
>>>>
>>>> How to debug this?
>>>>
>>>> Att.
>>>>
>>>> --
>>>> Tercio Gaudencio Filho
>>>
>>>
>>>
>>>
>>> Links:
>>> ------
>>> [1] http://indexer.delta.sh
>>
>>
>>
>