dbTalk Databases Forums  

Full Text Search Signed/unsigned int and Delimiters

comp.databases.postgresql comp.databases.postgresql


Discuss Full Text Search Signed/unsigned int and Delimiters in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Willy
 
Posts: n/a

Default Full Text Search Signed/unsigned int and Delimiters - 11-18-2010 , 08:32 PM






Hi:

I am setting up a full text search in postgresql and I expect some
data to look like 8746-4756 or like 876.3456.

This is what the ts vectors look like for the first sting:

SELECT to_tsvector('0594-4532');
Results: '-4532':2 '0594':

So postgresql treats this character string like a unsigned and signed
int:

In the second case, postgresql does not recognize the dot as a
delimiter...

SELECT to_tsvector('876.3456');
Results: '876.3456':1

I would really like to treat both the dot and the dash as delimiters.

Can this be configured...Any ideas??

Thanks in advance
kwill

Reply With Quote
  #2  
Old   
Willy
 
Posts: n/a

Default Re: Full Text Search Signed/unsigned int and Delimiters - 11-20-2010 , 12:33 AM






Hi:

I sort of answered my own question...

Guess the real solution would be to customize the ts_vector function
to my liking...although for the time being I am going to trigger the
numeric data into a separate column with my delimiters before deriving
the ts_vector column for the full text index.

I guess I was still in a mssql state of mind when I asked the
question...postgresql is great!!!

Thanks, Willy

On Nov 18, 9:32*pm, Willy <kwillrichard... (AT) gmail (DOT) com> wrote:
Quote:
Hi:

I am setting up a full text search in postgresql and I expect some
data to look like 8746-4756 or like 876.3456.

This is what the ts vectors look like for the first sting:

SELECT to_tsvector('0594-4532');
Results: '-4532':2 '0594':

So postgresql treats this character string like a unsigned and signed
int:

In the second case, postgresql does not recognize the dot as a
delimiter...

SELECT to_tsvector('876.3456');
Results: '876.3456':1

I would really like to treat both the dot and the dash as delimiters.

Can this be configured...Any ideas??

Thanks in advance
kwill

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.