Giter Club home page Giter Club logo

rt-pgsql-fttrgm's Introduction

    Request Tracker with PostgreSQL database backend
	    and FullText based on trigrams
    ================================================

This is an experimental modification inspired by
http://kaiv.wordpress.com/2007/12/11/postgresql-substring-search/
I'm testing this with RT version 4.2.3.

The modification described further solves the need to be able to search
for substrings and not only whole words or other Pg FT parser tokens using
full-text PostgreSQL. For example if the ticket body contains

   The URL http://www.cisco.com/...
   ...code of the function  FooBarSample()...

and want to search the word "cisco" you need this. If you want search for
substring "foo" or "bar" etc you need this...

You need to proceed following steps:

 * Setup indexes on trigrams in the database. This can be achieved using the
   script rt-mysql2pg:

	rt-mysql2pg -v --dst-dsn dbi:Pg:dbname=rt4 --fulltext --vacuum

 * Patch the RT/Tickets.pm copy

	cd /opt/rt4	    # or where your RT instalation root is
	cp lib/RT/Tickets.pm local/lib/RT/Tickets.pm 
	patch -p1 < patch-to-patch/rt-pgsql-fttrgm.patch

 * Enable FullTextSearch in the RT_SiteConfig.pm
 
	Set(%FullTextSearch,
	    Enable     => 1,
	    Indexed    => 1,
	    Column     => 'trigrams',
	    Table      => 'Attachments',
	);

You are able to search for substrings (at least 3 characters long).

 -- Wed, 09 Apr 2014 22:57:24 +0200  Václav Ovsík <[email protected]>

rt-pgsql-fttrgm's People

Contributors

zito avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.