473,490 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Tsearch2 - list of words or phrase with count

hello,

I have table with text attribute and fulltext index...

is it possible to do query with result:

word or phrase, count

for example:
SELECT word, my_count(word) FROM table WHERE expression.

word | my_count
----------|------------
'hello' | 3
'bye' | 4
'yellow' | 1
'blue' | 5

thanx, hlavki

--

[ miso hlavac ][ hl****@medium13.sk ][ http://hlavki.sk ]
[ icq:94900232 ][ callto://hlavki ]

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #1
1 1952
Michal,

check stat() function.
http://www.sai.msu.su/~megera/oddmus...earch_V2_Notes

apod=# select * from stat('select ti from apod') order by ndoc desc, nentry\
apod=# desc,word limit 10;
word | ndoc | nentry
--------+------+--------
year | 1283 | 2064
star | 1273 | 3908
imag | 1267 | 1967
light | 1232 | 2206
pictur | 1177 | 1442
earth | 1059 | 1798
visibl | 992 | 1259
bright | 936 | 1335
ËÏÔÏÒ | 903 | 1441
ÜÔ | 879 | 1397

Oleg
On Thu, 22 Jul 2004, Michal Hlavac wrote:
hello,

I have table with text attribute and fulltext index...

is it possible to do query with result:

word or phrase, count

for example:
SELECT word, my_count(word) FROM table WHERE expression.

word | my_count
----------|------------
'hello' | 3
'bye' | 4
'yellow' | 1
'blue' | 5

thanx, hlavki


Regards,
Oleg
__________________________________________________ ___________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: ol**@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2627
by: Alexander Rüegg | last post by:
Hi, Is it possible to get all the positions of a lexeme in a result-set of a query? For example, we have the table TEXT TEXT_IDX 'TSearch2 is...
1
1570
by: Markus Wollny | last post by:
Hello! I'm currently testing deployment of tsearch2 on our forum table. The table is huge in itself - some 2GB of data without the indexes. I have got PostgreSQL 7.4RC2 running on a test...
9
1980
by: Pavel Stehule | last post by:
Hello I try tsearch2 within czech environment. It is works fine, but I have two questions. 1. I have words "se", "ve" in my czech stop words. But I get this words in result. Why? Have I...
32
5889
by: Clunixchit | last post by:
How can i read lines of a file and place each line read in an array? for exemple; array=line1 array=line2 ...
16
1828
by: Ben | last post by:
I'm trying to make myself a dictionary for tsearch2 that converts numbers to their english word equivalents. This seems to be working great, except that I can't figure out how to make my lexize...
0
2067
by: Markus Wollny | last post by:
Hi! Sorry to bother you, but I just don't know how to get tsearch2 configured correctly for my setup. I've got a 7.4.3 database-cluster initdb'ed with de_DE@euro as locale, the database is with...
3
4578
by: Marcel Boscher | last post by:
Hello everybody, i tried to "J.U.S.T" install the FullTextSearchTool tsearch2 under the guidiance of : http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/...
7
5432
by: Timo Haberkern | last post by:
Hi there, i have some troubles with my TSearch2 Installation. I have done this installation as described in http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_compound_words...
23
9454
by: comp.lang.tcl | last post by:
I have a TCL proc that needs to convert what might be a list into a string to read consider this: ]; # OUTPUTS Hello World which is fine for PHP ]; # OUTPUT {{-Hello}} World, which PHP...
0
7112
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6974
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7146
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7356
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5448
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.