reset password
Author Message
zhasan76
Posts: 17
Posted 19:35 Nov 24, 2010 |

select to_tsvector(content) from files;

If I run this query  on the content created from  .txt  I get output .

But if  run this query on the content created from pdf  ,output is null.

Also "Select setweight(to_tsvector(name), 'A') || setweight(to_tsvector(content), 'D') from files;" gives me null output

 

This is the content  I created from a pdf file :

" SUBJNumber SECTN UNITSFull Time Faculty ROOM DAYS TIME_START TIME_END
Fall 2010
CS 101 01 2 Pamula,Raj S A210 M 11:40:00 AM 1:20:00 PM
CS 120 01 2 Guo,Huiping A220 T 9:50:00 AM 11:30:00 AM
CS 120 02 1 Guo,Huiping A220 R 9:00:00 AM 11:30:00 AM
CS 122 01 2 Guo,Huiping A210 T 1:30:00 PM 3:10:00 PM
CS 122 02 1 Guo,Huiping A210 R 1:30:00 PM 4:00:00 PM
CS 160 01 2 C255D M 6:10:00 PM 7:50:00 PM
CS 160 02 1 C255D M 7:50:00 PM 10:20:00 PM
CS 201 01 4 Parviz,Behzad A309 T,R 4:20:00 PM 6:00:00 PM
CS 201 02 1 Parviz,Behzad A309 T,R 3:00:00 PM 4:15:00 PM
CS 201 03 4 A220 M,W 4:20:00 PM 6:00:00 PM
CS 201 04 1 A220 M,W 6:00:00 PM 7:15:00 PM
CS 202 01 1 Kang,Eun-Young A210 T,R 4:20:00 PM 6:00:00 PM
CS 202 02 4 Kang,Eun-Young A210 T,R 6:00:00 PM 7:15:00 PM
CS 203 01 1 A220 T,R 6:10:00 PM 7:50:00 PM
CS 203 02 4 Crespi,Valentino A220 T,R 8:00:00 PM 9:15:00 PM
CS 242 01 4 A309 W 6:10:00 PM 10:00:00 PM
CS 245 01 2 Guo,Jiang A220 M 9:50:00 AM 11:30:00 AM
CS 245 02 1 Guo,Jiang A220 W 9:00:00 AM 11:30:00 AM
CS 312 01 4 Crespi,Valentino A309 M,W 4:20:00 PM 6:00:00 PM
CS 320 01 2 Sun,Chengyu A210 M 6:10:00 PM 7:50:00 PM
CS 320 02 2 Sun,Chengyu A210 M 8:00:00 PM 10:30:00 PM
CS 320 03 2 A309 S 1:10:00 PM 2:30:00 PM
CS 320 04 2 A309 S 2:30:00 PM 5:00:00 PM
CS 332F 01 1 Abbott,Russell J A210 R 9:50:00 AM 10:40:00 AM
CS 332F 02 1 Abbott,Russell J A210 R 10:40:00 AM 1:10:00 PM
CS 337 01 2 Guo,Jiang A309 W 11:30:00 AM 2:00:00 PM
CS 337 02 1 Guo,Jiang A309 M 11:40:00 AM 1:20:00 PM
CS 370 01 4 Pamula,Raj S A309 M,W 9:50:00 AM 11:30:00 AM
CS 386 01 4 Akis,Vladimir N A220 TR 1:30:00 PM 3:10:00 PM
CS 422 01 4 Sun,Chengyu A332 T 6:10:00 PM 10:00:00 PM
CS 447 01 4 Guo,Huiping A210 W 6:10:00 PM 10:00:00 PM
CS 450 01 4 Kang,Eun-Young A309 T,R 9:50:00 AM 11:30:00 AM
CS 450 02 1 Kang,Eun-Young A309 T,R 8:30:00 AM 9:45:00 AM
CS 454 01 4 Pamula,Raj S A210 M,W 1:30:00 PM 3:10:00 PM
CS 460 01 4 Abbott,Russell J A210 S 9:10:00 AM 1:00:00 PM
CS 496A 01 2 Abbott,Russell J A331 F 10:00:00 AM 3:00:00 PM
CS 520 01 4 Sun,Chengyu A210 M,W 4:20:00 PM 6:00:00 PM
CS 537 01 4 Guo,Jiang A309 T 6:10:00 PM 10:00:00 PM
CS 540 01 4 Parviz,Behzad A309 R 6:10:00 PM 10:00:00 PM
CS 588 01 4 A309 M 6:10:00 PM 10:00:00 PM
CS 594 01 4 Crespi,Valentino A210 M,W 9:50:00 AM 11:30:00 AM
Winter 2011
CS 101 01 2 Pamula,Raj S A309 M 11:40:00 AM 1:20:00 PM
CS 120 01 2 Abbott,Russell J A220 T 9:50:00 AM 11:30:00 AM
CS 120 02 1 Abbott,Russell J A220 R 9:00:00 AM 11:30:00 AM
CS 122 01 2 Sun,Chengyu A210 M 1:30:00 PM 3:10:00 PM
CS 122 02 1 Sun,Chengyu A210 W 1:30:00 PM 4:00:00 PM
CS 190 01 1
CS 190 02 1
CS 201 01 4 Parviz,Behzad A309 T,R 6:10:00 PM 7:50:00 PM
CS 201 02 1 Parviz,Behzad A309 T,R 8:00:00 PM 10:30:00 PM
CS 202 01 4 Crespi,Valentino A210 M,W 6:10:00 PM 7:50:00 PM
CS 202 02 1 Crespi,Valentino A210 M,W 8:00:00 PM 9:15:00 PM
CS 203 01 4 Crespi,Valentino A309 M,W 6:10:00 PM 7:50:00 PM
CS 203 02 1 Crespi,Valentino A309 M,W 8:00:00 PM 9:15:00 PM
CS 290 01 1
CS 290 02 1
CS 301 01 1 Abbott,Russell J A309 F 7:30:00 AM 10:00:00 AM
CS 332C 01 1 Kang,Eun-Young A309 W 11:40:00 AM 12:30:00 PM
CS 332C 02 1 Kang,Eun-Young A309 W 12:30:00 PM 3:00:00 PM
CS 340 01 4 Akis,Vladimir N A309 T,R 9:50:00 AM 11:30:00 AM
CS 342 01 4
CS 345 01 4 Sun,Chengyu A309 S 9:10:00 AM 1:00:00 PM
CS 437 01 4 Guo,Jiang A220 T 6:10:00 PM 10:00:00 PM
CS 437 02 1 Guo,Jiang A220 R 6:10:00 PM 8:40:00 PM
CS 440 01 4 Parviz,Behzad A309 TR 4:20:00 PM 6:00:00 PM
CS 454 01 4 Kang,Eun-Young A210 TR 1:30:00 PM 3:10:00 PM
CS 470 01 4 Guo,Huiping A210 MW 9:50:00 AM 11:30:00 AM
CS 486 01 4 Crespi,Valentino A220 W 6:10:00 PM 10:00:00 PM
CS 496B 01 2 Abbott,Russell J A309 F 10:00:00 AM 3:00:00 PM
CS 512 01 4 Akis,Vladimir N A309 T,R 11:40:00 AM 1:20:00 PM
CS 522 01 4 Guo,Huiping A210 T,R 9:50:00 AM 11:30:00 AM
CS 560 01 4 Kang,Eun-Young A210 T,R 4:20:00 PM 6:00:00 PM
CS 575 01 4 Abbott,Russell J A210 S 1:10:00 PM 5:00:00 PM
CS 581 01 4 Guo,Huiping A210 T 6:10:00 PM 10:00:00 PM
CS 586 01 4 Crespi,Valentino CANCEL
CS 590 01 4 Guo,Jiang A210 S 9:10:00 AM 1:00:00 PM
CS 594 01 4 Sun,Chengyu A210 M,W 11:40:00 AM 1:20:00 PM
Spring 2011
CS 101 01 2 Pamula,Raj S
CS 120 01 2
CS 120 02 1
CS 122 01 2 Guo,Huiping
CS 122 02 1 Guo,Huiping
CS 160 01 2
CS 160 02 1
CS 190 01 1
CS 190 02 1
CS 201 01 4 Kang,Eun-Young
CS 201 02 1 Kang,Eun-Young
CS 202 01 4
CS 202 02 1
CS 203 01 4
CS 203 02 1
CS 242 01 4 Guo,Jiang
CS 245 01 2 Parviz,Behzad
CS 245 02 1 Parviz,Behzad
CS 290 01 1
CS 290 02 1
CS 312 01 4 Akis,Vladimir N
CS 320 01 2 Sun,Chengyu
CS 320 02 2 Sun,Chengyu
CS 332L 01 1 Abbott,Russell J
CS 332L 02 1 Abbott,Russell J
CS 337 01 2 Guo,Jiang
CS 337 02 1 Guo,Jiang
CS 386 01 4 Crespi,Valentino
CS 422 01 4 Sun,Chengyu
CS 451 01 4 Kang,Eun-Young
CS 454 01 4
CS 461 01 4 Abbott,Russell J
CS 480 01 4 Guo,Huiping
CS 488 01 4
CS 490 01 2 Guo,Jiang
CS 496C 01 2 Abbott,Russell J
CS 512 01 4 Akis,Vladimir N
CS 520 01 4 Sun,Chengyu
CS 537 01 4 Guo,Jiang
CS 550 01 4 Kang,Eun-Young
CS 570 01 4 Guo,Huiping
CS 594 01 4 Crespi,Valentino
"

Attachments:
Last edited by zhasan76 at 19:39 Nov 24, 2010.
kknaur
Posts: 540
Posted 19:41 Nov 24, 2010 |

in your to_tsvector() i think you need to specify a language...like this is how all my to_tsvectors() look:

to_tsvector('pg_catalog.english', column_name)

maybe this will help?

zhasan76
Posts: 17
Posted 20:06 Nov 24, 2010 |

I  run  this  :

Select setweight(to_tsvector('pg_catalog.english', coalesce(content,'')), 'A')  from files;

But No output .

 

Thanks

ashasabeer
Posts: 55
Posted 21:54 Nov 24, 2010 |
Try Putting "A' instead of D

"Select setweight(to_tsvector(name), 'A') || setweight(to_tsvector(content), 'A') from files;" gives me null output

 
zhasan76 wrote:

select to_tsvector(content) from files;

If I run this query  on the content created from  .txt  I get output .

But if  run this query on the content created from pdf  ,output is null.

Also "Select setweight(to_tsvector(name), 'A') || setweight(to_tsvector(content), 'D') from files;" gives me null output

 

This is the content  I created from a pdf file :

" SUBJNumber SECTN UNITSFull Time Faculty ROOM DAYS TIME_START TIME_END
Fall 2010
CS 101 01 2 Pamula,Raj S A210 M 11:40:00 AM 1:20:00 PM
CS 120 01 2 Guo,Huiping A220 T 9:50:00 AM 11:30:00 AM
CS 120 02 1 Guo,Huiping A220 R 9:00:00 AM 11:30:00 AM
CS 122 01 2 Guo,Huiping A210 T 1:30:00 PM 3:10:00 PM
CS 122 02 1 Guo,Huiping A210 R 1:30:00 PM 4:00:00 PM
CS 160 01 2 C255D M 6:10:00 PM 7:50:00 PM
CS 160 02 1 C255D M 7:50:00 PM 10:20:00 PM
CS 201 01 4 Parviz,Behzad A309 T,R 4:20:00 PM 6:00:00 PM
CS 201 02 1 Parviz,Behzad A309 T,R 3:00:00 PM 4:15:00 PM
CS 201 03 4 A220 M,W 4:20:00 PM 6:00:00 PM
CS 201 04 1 A220 M,W 6:00:00 PM 7:15:00 PM
CS 202 01 1 Kang,Eun-Young A210 T,R 4:20:00 PM 6:00:00 PM
CS 202 02 4 Kang,Eun-Young A210 T,R 6:00:00 PM 7:15:00 PM
CS 203 01 1 A220 T,R 6:10:00 PM 7:50:00 PM
CS 203 02 4 Crespi,Valentino A220 T,R 8:00:00 PM 9:15:00 PM
CS 242 01 4 A309 W 6:10:00 PM 10:00:00 PM
CS 245 01 2 Guo,Jiang A220 M 9:50:00 AM 11:30:00 AM
CS 245 02 1 Guo,Jiang A220 W 9:00:00 AM 11:30:00 AM
CS 312 01 4 Crespi,Valentino A309 M,W 4:20:00 PM 6:00:00 PM
CS 320 01 2 Sun,Chengyu A210 M 6:10:00 PM 7:50:00 PM
CS 320 02 2 Sun,Chengyu A210 M 8:00:00 PM 10:30:00 PM
CS 320 03 2 A309 S 1:10:00 PM 2:30:00 PM
CS 320 04 2 A309 S 2:30:00 PM 5:00:00 PM
CS 332F 01 1 Abbott,Russell J A210 R 9:50:00 AM 10:40:00 AM
CS 332F 02 1 Abbott,Russell J A210 R 10:40:00 AM 1:10:00 PM
CS 337 01 2 Guo,Jiang A309 W 11:30:00 AM 2:00:00 PM
CS 337 02 1 Guo,Jiang A309 M 11:40:00 AM 1:20:00 PM
CS 370 01 4 Pamula,Raj S A309 M,W 9:50:00 AM 11:30:00 AM
CS 386 01 4 Akis,Vladimir N A220 TR 1:30:00 PM 3:10:00 PM
CS 422 01 4 Sun,Chengyu A332 T 6:10:00 PM 10:00:00 PM
CS 447 01 4 Guo,Huiping A210 W 6:10:00 PM 10:00:00 PM
CS 450 01 4 Kang,Eun-Young A309 T,R 9:50:00 AM 11:30:00 AM
CS 450 02 1 Kang,Eun-Young A309 T,R 8:30:00 AM 9:45:00 AM
CS 454 01 4 Pamula,Raj S A210 M,W 1:30:00 PM 3:10:00 PM
CS 460 01 4 Abbott,Russell J A210 S 9:10:00 AM 1:00:00 PM
CS 496A 01 2 Abbott,Russell J A331 F 10:00:00 AM 3:00:00 PM
CS 520 01 4 Sun,Chengyu A210 M,W 4:20:00 PM 6:00:00 PM
CS 537 01 4 Guo,Jiang A309 T 6:10:00 PM 10:00:00 PM
CS 540 01 4 Parviz,Behzad A309 R 6:10:00 PM 10:00:00 PM
CS 588 01 4 A309 M 6:10:00 PM 10:00:00 PM
CS 594 01 4 Crespi,Valentino A210 M,W 9:50:00 AM 11:30:00 AM
Winter 2011
CS 101 01 2 Pamula,Raj S A309 M 11:40:00 AM 1:20:00 PM
CS 120 01 2 Abbott,Russell J A220 T 9:50:00 AM 11:30:00 AM
CS 120 02 1 Abbott,Russell J A220 R 9:00:00 AM 11:30:00 AM
CS 122 01 2 Sun,Chengyu A210 M 1:30:00 PM 3:10:00 PM
CS 122 02 1 Sun,Chengyu A210 W 1:30:00 PM 4:00:00 PM
CS 190 01 1
CS 190 02 1
CS 201 01 4 Parviz,Behzad A309 T,R 6:10:00 PM 7:50:00 PM
CS 201 02 1 Parviz,Behzad A309 T,R 8:00:00 PM 10:30:00 PM
CS 202 01 4 Crespi,Valentino A210 M,W 6:10:00 PM 7:50:00 PM
CS 202 02 1 Crespi,Valentino A210 M,W 8:00:00 PM 9:15:00 PM
CS 203 01 4 Crespi,Valentino A309 M,W 6:10:00 PM 7:50:00 PM
CS 203 02 1 Crespi,Valentino A309 M,W 8:00:00 PM 9:15:00 PM
CS 290 01 1
CS 290 02 1
CS 301 01 1 Abbott,Russell J A309 F 7:30:00 AM 10:00:00 AM
CS 332C 01 1 Kang,Eun-Young A309 W 11:40:00 AM 12:30:00 PM
CS 332C 02 1 Kang,Eun-Young A309 W 12:30:00 PM 3:00:00 PM
CS 340 01 4 Akis,Vladimir N A309 T,R 9:50:00 AM 11:30:00 AM
CS 342 01 4
CS 345 01 4 Sun,Chengyu A309 S 9:10:00 AM 1:00:00 PM
CS 437 01 4 Guo,Jiang A220 T 6:10:00 PM 10:00:00 PM
CS 437 02 1 Guo,Jiang A220 R 6:10:00 PM 8:40:00 PM
CS 440 01 4 Parviz,Behzad A309 TR 4:20:00 PM 6:00:00 PM
CS 454 01 4 Kang,Eun-Young A210 TR 1:30:00 PM 3:10:00 PM
CS 470 01 4 Guo,Huiping A210 MW 9:50:00 AM 11:30:00 AM
CS 486 01 4 Crespi,Valentino A220 W 6:10:00 PM 10:00:00 PM
CS 496B 01 2 Abbott,Russell J A309 F 10:00:00 AM 3:00:00 PM
CS 512 01 4 Akis,Vladimir N A309 T,R 11:40:00 AM 1:20:00 PM
CS 522 01 4 Guo,Huiping A210 T,R 9:50:00 AM 11:30:00 AM
CS 560 01 4 Kang,Eun-Young A210 T,R 4:20:00 PM 6:00:00 PM
CS 575 01 4 Abbott,Russell J A210 S 1:10:00 PM 5:00:00 PM
CS 581 01 4 Guo,Huiping A210 T 6:10:00 PM 10:00:00 PM
CS 586 01 4 Crespi,Valentino CANCEL
CS 590 01 4 Guo,Jiang A210 S 9:10:00 AM 1:00:00 PM
CS 594 01 4 Sun,Chengyu A210 M,W 11:40:00 AM 1:20:00 PM
Spring 2011
CS 101 01 2 Pamula,Raj S
CS 120 01 2
CS 120 02 1
CS 122 01 2 Guo,Huiping
CS 122 02 1 Guo,Huiping
CS 160 01 2
CS 160 02 1
CS 190 01 1
CS 190 02 1
CS 201 01 4 Kang,Eun-Young
CS 201 02 1 Kang,Eun-Young
CS 202 01 4
CS 202 02 1
CS 203 01 4
CS 203 02 1
CS 242 01 4 Guo,Jiang
CS 245 01 2 Parviz,Behzad
CS 245 02 1 Parviz,Behzad
CS 290 01 1
CS 290 02 1
CS 312 01 4 Akis,Vladimir N
CS 320 01 2 Sun,Chengyu
CS 320 02 2 Sun,Chengyu
CS 332L 01 1 Abbott,Russell J
CS 332L 02 1 Abbott,Russell J
CS 337 01 2 Guo,Jiang
CS 337 02 1 Guo,Jiang
CS 386 01 4 Crespi,Valentino
CS 422 01 4 Sun,Chengyu
CS 451 01 4 Kang,Eun-Young
CS 454 01 4
CS 461 01 4 Abbott,Russell J
CS 480 01 4 Guo,Huiping
CS 488 01 4
CS 490 01 2 Guo,Jiang
CS 496C 01 2 Abbott,Russell J
CS 512 01 4 Akis,Vladimir N
CS 520 01 4 Sun,Chengyu
CS 537 01 4 Guo,Jiang
CS 550 01 4 Kang,Eun-Young
CS 570 01 4 Guo,Huiping
CS 594 01 4 Crespi,Valentino
"