Re: [GENERAL] Full Text Index Scanning

2014-02-07 Thread Robin Coe
I was looking for an answer to the same problem posted a while back (sorry, not sure how to join that thread): Thanks. pg_trgm looks interesting, but after installing the pg_trgm.sql, I get error messages when following the documentation. sggeeorg=> create index test_idx on test using gist(column

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Matt Warner
Thanks. pg_trgm looks interesting, but after installing the pg_trgm.sql, I get error messages when following the documentation. sggeeorg=> create index test_idx on test using gist(columnname gist_trgm_ops); ERROR: operator class "gist_trgm_ops" does not exist for access method "gist" STATEMENT:

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Tom Lane
Matt Warner writes: > If I understand this, it looks like this approach allows me to match the > beginnings and endings of words, but not the middle sections. Yeah, probably. You might consider using contrib/pg_trgm instead if you need arbitrary substrings. regards, tom

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Matt Warner
If I understand this, it looks like this approach allows me to match the beginnings and endings of words, but not the middle sections. Is that correct? That is, if I search for "jag" I will find "jaeger" but not "lobenjager". Or am I (again) not understanding how this works? TIA, Matt On Sun, J

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Matt Warner
Aha! Thanks for pointing that out. It's indexing now. Thanks! Matt On Sun, Jan 30, 2011 at 9:12 AM, Tom Lane wrote: > Matt Warner writes: > > Doesn't seem to work either. Maybe something changed in 9.1? > > create index test_idx on testtable using gin(to_tsvector(wordcolumn||' > > '||reverse(

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Tom Lane
Matt Warner writes: > Doesn't seem to work either. Maybe something changed in 9.1? > create index test_idx on testtable using gin(to_tsvector(wordcolumn||' > '||reverse(wordcolumn))); > ERROR: functions in index expression must be marked IMMUTABLE That's not the same case he tested. The single-

Re: [GENERAL] Full Text Index Scanning

2011-01-30 Thread Matt Warner
Doesn't seem to work either. Maybe something changed in 9.1? create index test_idx on testtable using gin(to_tsvector(wordcolumn||' '||reverse(wordcolumn))); ERROR: functions in index expression must be marked IMMUTABLE On Sun, Jan 30, 2011 at 3:28 AM, Oleg Bartunov wrote: > I used 9.1dev, bu

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Matt Warner
9.0.2 On Sat, Jan 29, 2011 at 9:35 AM, Oleg Bartunov wrote: > What version of Pg you run ? Try latest version. > > Oleg > > > On Sat, 29 Jan 2011, Matt Warner wrote: > > Reverse isn't a built-in Postgres function, so I found one and installed >> it. >> However, attempting to use it in creating

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Oleg Bartunov
What version of Pg you run ? Try latest version. Oleg On Sat, 29 Jan 2011, Matt Warner wrote: Reverse isn't a built-in Postgres function, so I found one and installed it. However, attempting to use it in creating an index gets me the message "ERROR: functions in index expression must be marke

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Matt Warner
Reverse isn't a built-in Postgres function, so I found one and installed it. However, attempting to use it in creating an index gets me the message "ERROR: functions in index expression must be marked IMMUTABLE", even though the function declaration already has the immutable argument. Is there a

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Matt Warner
Thanks Oleg. I'm going to have to experiment with this so that I understand it better. Matt On Fri, Jan 28, 2011 at 1:12 PM, Oleg Bartunov wrote: > Matt, I'd try to use prefix search on original string concatenated with > reverse string: > > Just tried on some spare table > > knn=# \d spot_toul

Re: [GENERAL] Full Text Index Scanning

2011-01-28 Thread Oleg Bartunov
Matt, I'd try to use prefix search on original string concatenated with reverse string: Just tried on some spare table knn=# \d spot_toulouse Table "public.spot_toulouse" Column| Type| Modifiers -+---+--- cl

[GENERAL] Full Text Index Scanning

2011-01-28 Thread Matt Warner
I'm in the process of migrating a project from Oracle to Postgres and have run into a feature question. I know that Postgres has a full-text search feature, but it does not allow scanning the index (as opposed to the data). Specifically, in Oracle you can do "select * from table where contains(coln