Re: How to write a own parser for full text search

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to write a own parser for full text search
Date: 2011-11-21 15:39:57
Message-ID: 4ECA70CD.2000004@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/21/11 1:51 AM, Antonio Franzoso wrote:
>
> I have installed PostgreSQL server on a Windows Server 2008 server and
> I need to write a more complex parser than the default one in
> PostgreSQL. Searching on internet i found this example:
> http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/HOWTO-parser-tsearch2.html
>
> where the parser is written in C language. I would know if can I write
> the parser in another language (Java, I'm very poor in C)? And, if I
> can, what kind of file would contain the functions of the parser (a
> dll file, a class file).
> The last question is: in that example are used some functions
> (PG_GETARG_POINTER, PG_GETARG_INT32, and so on) that seem PostgreSQL
> specific functions; which functions can I use in java?
>

you'd better learn C if you want to do this. those functions are part
of the tsearch parser API, which is a machine level API interface, Java
would be a huge uphill battle of fighting JNI stuff to get working, and
then you'd be attaching the whole huge bloated JVM to the side of
postgresql to implement this.

--
john r pierce N 37, W 122
santa cruz ca mid-left coast

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2011-11-21 16:07:41 Re: 9.1.1 build failure : postgres link fails
Previous Message Adrian Klaver 2011-11-21 14:55:47 Re: how could duplicate pkey exist in psql?