mirror of
				https://bitbucket.org/jsuto/piler.git
				synced 2025-11-01 00:32:27 +01:00 
			
		
		
		
	| @@ -31,8 +31,8 @@ all: | |||||||
|  |  | ||||||
| install: | install: | ||||||
| 	$(INSTALL) -m 0640 -g $(RUNNING_GROUP) $(srcdir)/piler.conf $(DESTDIR)$(sysconfdir)/piler/piler.conf.dist | 	$(INSTALL) -m 0640 -g $(RUNNING_GROUP) $(srcdir)/piler.conf $(DESTDIR)$(sysconfdir)/piler/piler.conf.dist | ||||||
| 	sed -e 's%LOCALSTATEDIR%$(localstatedir)%g' $(srcdir)/sphinx.conf.in > sphinx.conf.dist | 	sed -e 's%@LOCALSTATEDIR@%$(localstatedir)%g' $(srcdir)/sphinx.conf.in > sphinx.conf.dist | ||||||
| 	$(INSTALL) -m 0644 -g $(RUNNING_GROUP) $(srcdir)/sphinx.conf.dist $(DESTDIR)$(sysconfdir)/piler/sphinx.conf.dist | 	$(INSTALL) -m 0755 -g $(RUNNING_GROUP) $(srcdir)/sphinx.conf.dist $(DESTDIR)$(sysconfdir)/piler/sphinx.conf.dist | ||||||
| 	$(INSTALL) -m 0644 -g $(RUNNING_GROUP) $(srcdir)/config-site.dist.php $(DESTDIR)$(sysconfdir)/piler/config-site.dist.php | 	$(INSTALL) -m 0644 -g $(RUNNING_GROUP) $(srcdir)/config-site.dist.php $(DESTDIR)$(sysconfdir)/piler/config-site.dist.php | ||||||
| 	$(INSTALL) -m 0644 -g $(RUNNING_GROUP) $(srcdir)/cron.jobs.in $(DESTDIR)$(datarootdir)/piler/piler.cron | 	$(INSTALL) -m 0644 -g $(RUNNING_GROUP) $(srcdir)/cron.jobs.in $(DESTDIR)$(datarootdir)/piler/piler.cron | ||||||
| 	sed -i -e 's%LOCALSTATEDIR%$(localstatedir)%g' $(DESTDIR)$(datarootdir)/piler/piler.cron | 	sed -i -e 's%LOCALSTATEDIR%$(localstatedir)%g' $(DESTDIR)$(datarootdir)/piler/piler.cron | ||||||
|   | |||||||
| @@ -1,3 +1,12 @@ | |||||||
|  | #!/usr/bin/php | ||||||
|  | <?php | ||||||
|  |  | ||||||
|  | define('SPHINX_VERSION', 220); // If you have sphinx-3.1.1, then set SPHINX_VERSION to 311 | ||||||
|  | define('LOCALSTATEDIR', '@LOCALSTATEDIR@'); | ||||||
|  | define('NGRAM_CONFIG', "        #ngram_len               = 1\n        #ngram_chars             = U+3000..U+2FA1F\n"); | ||||||
|  |  | ||||||
|  | ?> | ||||||
|  |  | ||||||
| # | # | ||||||
| # minimal sphinx configuration suited to piler | # minimal sphinx configuration suited to piler | ||||||
| # | # | ||||||
| @@ -76,126 +85,114 @@ source note : base | |||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
| source att : base |  | ||||||
| { |  | ||||||
|  |  | ||||||
|    sql_query_pre = SET NAMES utf8mb4 |  | ||||||
|    sql_query  =  select a.id as aid, m.id as mid, a.name AS aname, a.size, REPLACE(REPLACE(m.`from`, '@', 'X'), '.', 'X') as `from`, REPLACE(REPLACE((select group_concat(rcpt.`to` ORDER BY `to` ASC SEPARATOR ' ') from rcpt where rcpt.id=mid group by rcpt.id), '@', 'X'), '.', 'X') as `to` from attachment a, metadata m where m.piler_id=a.piler_id |  | ||||||
|  |  | ||||||
|    sql_attr_uint = size |  | ||||||
|    sql_attr_uint = mid |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| index main1 | index main1 | ||||||
| { | { | ||||||
| 	source			= main1 | 	source			= main1 | ||||||
| 	path			= LOCALSTATEDIR/piler/sphinx/main1 | 	path			= <?php print LOCALSTATEDIR; ?>/piler/sphinx/main1 | ||||||
|  | <?php if(SPHINX_VERSION < 300) { ?> | ||||||
| 	docinfo			= extern | 	docinfo			= extern | ||||||
| 	dict			= keywords | 	dict			= keywords | ||||||
|  | <?php } ?> | ||||||
|         min_prefix_len          = 5 |         min_prefix_len          = 5 | ||||||
|         min_word_len            = 1 |         min_word_len            = 1 | ||||||
|         #ngram_len               = 1 | <?php print NGRAM_CONFIG; ?> | ||||||
|         #ngram_chars             = U+3000..U+2FA1F |  | ||||||
| } | } | ||||||
|  |  | ||||||
| index main2 | index main2 | ||||||
| { | { | ||||||
|         source                  = main2 |         source                  = main2 | ||||||
|         path                    = LOCALSTATEDIR/piler/sphinx/main2 |         path                    = <?php print LOCALSTATEDIR; ?>/piler/sphinx/main2 | ||||||
|  | <?php if(SPHINX_VERSION < 300) { ?> | ||||||
|         docinfo                 = extern |         docinfo                 = extern | ||||||
| 	dict			= keywords | 	dict			= keywords | ||||||
|  | <?php } ?> | ||||||
|         min_prefix_len          = 5 |         min_prefix_len          = 5 | ||||||
|         min_word_len            = 1 |         min_word_len            = 1 | ||||||
|         #ngram_len               = 1 | <?php print NGRAM_CONFIG; ?> | ||||||
|         #ngram_chars             = U+3000..U+2FA1F |  | ||||||
| } | } | ||||||
|  |  | ||||||
| index main3 | index main3 | ||||||
| { | { | ||||||
|         source                  = main3 |         source                  = main3 | ||||||
|         path                    = LOCALSTATEDIR/piler/sphinx/main3 |         path                    = <?php print LOCALSTATEDIR; ?>/piler/sphinx/main3 | ||||||
|  | <?php if(SPHINX_VERSION < 300) { ?> | ||||||
|         docinfo                 = extern |         docinfo                 = extern | ||||||
| 	dict			= keywords | 	dict			= keywords | ||||||
|  | <?php } ?> | ||||||
|         min_prefix_len          = 5 |         min_prefix_len          = 5 | ||||||
|         min_word_len            = 1 |         min_word_len            = 1 | ||||||
|         #ngram_len               = 1 | <?php print NGRAM_CONFIG; ?> | ||||||
|         #ngram_chars             = U+3000..U+2FA1F |  | ||||||
| } | } | ||||||
|  |  | ||||||
| index main4 | index main4 | ||||||
| { | { | ||||||
|         source                  = main4 |         source                  = main4 | ||||||
|         path                    = LOCALSTATEDIR/piler/sphinx/main4 |         path                    = <?php print LOCALSTATEDIR; ?>/piler/sphinx/main4 | ||||||
|  | <?php if(SPHINX_VERSION < 300) { ?> | ||||||
|         docinfo                 = extern |         docinfo                 = extern | ||||||
| 	dict			= keywords | 	dict			= keywords | ||||||
|  | <?php } ?> | ||||||
|         min_prefix_len          = 5 |         min_prefix_len          = 5 | ||||||
|         min_word_len            = 1 |         min_word_len            = 1 | ||||||
|         #ngram_len               = 1 | <?php print NGRAM_CONFIG; ?> | ||||||
|         #ngram_chars             = U+3000..U+2FA1F |  | ||||||
| } | } | ||||||
|  |  | ||||||
| index dailydelta1 | index dailydelta1 | ||||||
| { | { | ||||||
|         source                  = dailydelta |         source                  = dailydelta | ||||||
|         path                    = LOCALSTATEDIR/piler/sphinx/dailydelta1 |         path                    = <?php print LOCALSTATEDIR; ?>/piler/sphinx/dailydelta1 | ||||||
|  | <?php if(SPHINX_VERSION < 300) { ?> | ||||||
|         docinfo                 = extern |         docinfo                 = extern | ||||||
| 	dict			= keywords | 	dict			= keywords | ||||||
|  | <?php } ?> | ||||||
|         min_prefix_len          = 5 |         min_prefix_len          = 5 | ||||||
|         min_word_len            = 1 |         min_word_len            = 1 | ||||||
|         #ngram_len               = 1 | <?php print NGRAM_CONFIG; ?> | ||||||
|         #ngram_chars             = U+3000..U+2FA1F |  | ||||||
| } | } | ||||||
|  |  | ||||||
| index delta1 | index delta1 | ||||||
| { | { | ||||||
|         source                  = delta |         source                  = delta | ||||||
|         path                    = LOCALSTATEDIR/piler/sphinx/delta1 |         path                    = <?php print LOCALSTATEDIR; ?>/piler/sphinx/delta1 | ||||||
|  | <?php if(SPHINX_VERSION < 300) { ?> | ||||||
|         docinfo                 = extern |         docinfo                 = extern | ||||||
| 	dict			= keywords | 	dict			= keywords | ||||||
|  | <?php } ?> | ||||||
|         min_prefix_len          = 5 |         min_prefix_len          = 5 | ||||||
|         min_word_len            = 1 |         min_word_len            = 1 | ||||||
|         #ngram_len               = 1 | <?php print NGRAM_CONFIG; ?> | ||||||
|         #ngram_chars             = U+3000..U+2FA1F | <?php if(SPHINX_VERSION >= 310) { ?> | ||||||
|  |         kbatch = main1, main2, main3, main4, dailydelta1 | ||||||
|  | <?php } ?> | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| index tag1 | index tag1 | ||||||
| { | { | ||||||
|         source                  = tag |         source                  = tag | ||||||
|         path                    = LOCALSTATEDIR/piler/sphinx/tag1 |         path                    = <?php print LOCALSTATEDIR; ?>/piler/sphinx/tag1 | ||||||
|  | <?php if(SPHINX_VERSION < 300) { ?> | ||||||
|         docinfo                 = extern |         docinfo                 = extern | ||||||
| 	dict			= keywords | 	dict			= keywords | ||||||
|  | <?php } ?> | ||||||
|         min_prefix_len          = 5 |         min_prefix_len          = 5 | ||||||
|         min_word_len            = 1 |         min_word_len            = 1 | ||||||
|         #ngram_len               = 1 | <?php print NGRAM_CONFIG; ?> | ||||||
|         #ngram_chars             = U+3000..U+2FA1F |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| index note1 | index note1 | ||||||
| { | { | ||||||
|         source                  = note |         source                  = note | ||||||
|         path                    = LOCALSTATEDIR/piler/sphinx/note1 |         path                    = <?php print LOCALSTATEDIR; ?>/piler/sphinx/note1 | ||||||
|  | <?php if(SPHINX_VERSION < 300) { ?> | ||||||
|         docinfo                 = extern |         docinfo                 = extern | ||||||
| 	dict			= keywords | 	dict			= keywords | ||||||
|  | <?php } ?> | ||||||
|         min_prefix_len          = 5 |         min_prefix_len          = 5 | ||||||
|         min_word_len            = 1 |         min_word_len            = 1 | ||||||
|         #ngram_len               = 1 | <?php print NGRAM_CONFIG; ?> | ||||||
|         #ngram_chars             = U+3000..U+2FA1F |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| index att1 |  | ||||||
| { |  | ||||||
|         source                  = att |  | ||||||
|         path                    = /var/piler/sphinx/att1 |  | ||||||
|         docinfo                 = extern |  | ||||||
|         dict                    = keywords |  | ||||||
|         min_prefix_len          = 6 |  | ||||||
|         min_word_len            = 1 |  | ||||||
|         ngram_len               = 1 |  | ||||||
|         ngram_chars             = U+1100..U+2FA1F |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user