Re: [SQL] FW: indexing functions

From: "Gene Selkov Jr(dot)" <selkovjr(at)xnet(dot)com>
To: Bas Peters <bpeters(at)idc(dot)nl>, pgsql-general(at)postgresql(dot)org, selkovjr(at)xnet(dot)com
Subject: Re: [SQL] FW: indexing functions
Date: 1999-03-05 04:55:31
Message-ID: 199903050553.XAA25577@antares.mcs.anl.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Thanks for your answer. The only thing I would like to do is just index
> words with character entities. Searching munchen is a lot easier than
> searching m&uuml;nchen, therefore I would like to index entities like
> &uuml; as u. A friend of mine is a C programmer and is willing to help
> (I am only familiar with Perl).

I am not a c partisan myself, but we haven't got much choice :)

> Could you give some more information or
> an example of a simple c function, or a pointer to some examples? How do
> you pass the field data through the function?

Check out this one:

http://wit.mcs.anl.gov/~selkovjr/foldit.tgz

It may be incomplete for your task but it shows how to do it in
principle. You may want to add more character translations, and you
can do that without changing the code too much, by editing rules in
folditscan.l (at least, this is a lot easier than coding in c).

You won't have to touch the c code as long as the objects you want yylex()
to return will remain single characters. In case you want something bigger,
such as strings, the interface between yylex() and foldit() should be
changed

Further questions welcome,

--Gene

Browse pgsql-general by date

  From Date Subject
Next Message Adriaan Joubert 1999-03-05 06:33:25 Re: [GENERAL] I can't drop view?!
Previous Message Luis Dolz 1999-03-05 02:28:13 RV: Problems with Visual Fox