Skip to content

Utilities for indexing text files from Emacs using Sphinx

Notifications You must be signed in to change notification settings

wvxvw/sphinx-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

Set up the super-user password first:

sudo mysqladmin -u root password some-password

Add emacs user account:

create database emacs_user;
grant all on emacs_user.* to emacs@localhost identified by 'emacs';
use emacs_user;
create table documents (id int not null auto_increment primary key,
       document varchar(256) not null unique);
create table org_kinds (id int not null auto_increment primary key,
       kind varchar(32) not null unique);
insert into org_kinds (kind)
       values ('babel-call'),
              ('center-block'),
              ('clock'),
              ('comment'),
              ('comment-block'),
              ('diary-sexp'),
              ('drawer'),
              ('dynamic-block'),
              ('example-block'),
              ('export-block'),
              ('fixed-width'),
              ('footnote-definition'),
              ('headline'),
              ('horizontal-rule'),
              ('inlinetask'),
              ('item'),
              ('keyword'),
              ('latex-environment'),
              ('node-property'),
              ('paragraph'),
              ('plain-list'),
              ('planning'),
              ('property-drawer'),
              ('quote-block'),
              ('section'),
              ('special-block'),
              ('src-block'),
              ('table'),
              ('table-row'),
              ('verse-block');
create table org (id int not null auto_increment primary key,
           file varchar(256) not null,
           kind int not null,
           pos int not null,
           parent int,
           contents text,
           foreign key (kind) references org_kinds(id),
           foreign key (parent) references org(id));

Create necessary Sphinx directories and start the daemon:

mkdir -p ~/.emacs.d/sphinx/var/{log,data}
mkdir -p ~/.emacs.d/sphinx/etc
indexer -c ~/.emacs.d/sphinx/etc/sphinx.conf --all --rotate
searchd -c ~/.emacs.d/sphinx/etc/sphinx.conf

Connect to Sphinx

mysql -P9306 --protocol=tcp -u emacs -p

About

Utilities for indexing text files from Emacs using Sphinx

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published