dbTalk Databases Forums  

Lucene & Postgres?

comp.databases.postgresql comp.databases.postgresql


Discuss Lucene & Postgres? in the comp.databases.postgresql forum.



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

Default Lucene & Postgres? - 02-10-2010 , 04:51 PM






Does anybody here has any experience with that? Any remarks, praises or
words of caution? Postgres search engine seems to be unable to cope with
phrases and since that is an absolute must, I must look elsewhere.



--
http://mgogala.freehostia.com

Reply With Quote
  #2  
Old   
Marco Mariani
 
Posts: n/a

Default Re: Lucene & Postgres? - 02-11-2010 , 06:57 AM






On 02/10/2010 11:51 PM, Mladen Gogala wrote:

Quote:
Does anybody here has any experience with that? Any remarks, praises or
words of caution? Postgres search engine seems to be unable to cope with
phrases and since that is an absolute must, I must look elsewhere.
Somewhere else, like this?

http://www.postgresql.org/docs/8.3/s...extsearch.html

Reply With Quote
  #3  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Lucene & Postgres? - 02-11-2010 , 07:59 AM



On Thu, 11 Feb 2010 13:57:14 +0100, Marco Mariani wrote:

Quote:
On 02/10/2010 11:51 PM, Mladen Gogala wrote:

Does anybody here has any experience with that? Any remarks, praises or
words of caution? Postgres search engine seems to be unable to cope
with phrases and since that is an absolute must, I must look elsewhere.

Somewhere else, like this?

http://www.postgresql.org/docs/8.3/s...extsearch.html
I don't understand. Can you, please, clarify?



--
http://mgogala.freehostia.com

Reply With Quote
  #4  
Old   
Marco Mariani
 
Posts: n/a

Default Re: Lucene & Postgres? - 02-11-2010 , 08:49 AM



On 02/11/2010 02:59 PM, Mladen Gogala wrote:

Quote:
http://www.postgresql.org/docs/8.3/s...extsearch.html

I don't understand. Can you, please, clarify?
Weren't you looking for a way to perform full-text searches in postgres?

If the link above does not satisfy you I cannot help, but I thought you
might have overlooked, or been using a previous release of postgres,
where the feature was available only as an extension to be installed
separately.

Reply With Quote
  #5  
Old   
Marco Mariani
 
Posts: n/a

Default Re: Lucene & Postgres? - 02-11-2010 , 08:51 AM



On 02/11/2010 02:59 PM, Mladen Gogala wrote:

Quote:
http://www.postgresql.org/docs/8.3/s...extsearch.html

I don't understand. Can you, please, clarify?
I didn't turn on the brain before hitting reply.

Reply With Quote
  #6  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Lucene & Postgres? - 02-11-2010 , 11:47 AM



On Thu, 11 Feb 2010 15:49:39 +0100, Marco Mariani wrote:

Quote:
On 02/11/2010 02:59 PM, Mladen Gogala wrote:

http://www.postgresql.org/docs/8.3/s...extsearch.html

I don't understand. Can you, please, clarify?

Weren't you looking for a way to perform full-text searches in postgres?

If the link above does not satisfy you I cannot help, but I thought you
might have overlooked, or been using a previous release of postgres,
where the feature was available only as an extension to be installed
separately.
Actually, I did read the documentation. Postgres text search does not do
phrase search. Here is the problem:

news_archive=# select plainto_tsquery('''chicken salad''');
plainto_tsquery
---------------------
'chicken' & 'salad'
(1 row)

Time: 30.586 ms
n other words, tsearch2, the default FTS engine for PostgreSQL 8.3.9,
will break the phrase "chicken salad" into searchable single words
terms "chicken" and "salad" and will return the items containing them,
regardless of the words between or the sequence of those words in the
text. This is exactly the unwanted behavior:

news_archive=# select to_tsvector('english','fried chicken with potato
salad') @@ to_tsquery('english','''chicken salad''');
?column?
----------
t
(1 row)

As you can see, the text matches. The problem is in the text search
engine which does a dictionary search only and does not store enough
information into its text indexes in order to match a phrase. My question
was whether tsearch2 is planning to add phrase matching capabilities
anytime soon or should I go to some other text search engine.
Also, there are other documents stating explicitly that tsearch2 doesn't
do phrase search:

http://tinyurl.com/yek78rc
http://www.digitalstratum.com/oss/fts_parser
http://area51.phpbb.com/phpBB/viewto...28707&start=10


Does anyone know whether the full phrase search will be supported in the
near future? Possibly with version 9? Is anybody looking into it?




--
http://mgogala.byethost5.com

Reply With Quote
  #7  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Lucene & Postgres? - 02-12-2010 , 03:39 AM



Mladen Gogala wrote:
Quote:
Does anyone know whether the full phrase search will be supported in the
near future? Possibly with version 9? Is anybody looking into it?
I don't think so.

You'd have to lobby on the -hackers list, optimally with a good concept
as to how it should work syntax- and/or implementation-wise.

Yours,
Laurenz Albe

Reply With Quote
  #8  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Lucene & Postgres? - 02-12-2010 , 07:46 AM



On Fri, 12 Feb 2010 10:39:48 +0100, Laurenz Albe wrote:

Quote:
Mladen Gogala wrote:
Does anyone know whether the full phrase search will be supported in
the near future? Possibly with version 9? Is anybody looking into it?

I don't think so.

You'd have to lobby on the -hackers list, optimally with a good concept
as to how it should work syntax- and/or implementation-wise.

Yours,
Laurenz Albe
Actually, the phrase search already is on the todo list:

http://www.sai.msu.su/~megera/wiki/FTS_Todo

Full text search in 8.4 can do prefix search and wildcard searches:

http://www.sai.msu.su/~megera/wiki/Tsearch_84

Phrase search is still on the todo list. The problem is in the word
location. Postgres FTS is just a word indexer and does not support
phrases or operators like NEAR. Unfortunately, the phrase search is a
business requirement for me, which means that I cannot use Postgres full
text search.

--
http://mgogala.freehostia.com

Reply With Quote
  #9  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Lucene & Postgres? - 02-12-2010 , 08:55 AM



Mladen Gogala wrote:
Quote:
Actually, the phrase search already is on the todo list:

http://www.sai.msu.su/~megera/wiki/FTS_Todo

Full text search in 8.4 can do prefix search and wildcard searches:

http://www.sai.msu.su/~megera/wiki/Tsearch_84

Phrase search is still on the todo list. The problem is in the word
location. Postgres FTS is just a word indexer and does not support
phrases or operators like NEAR. Unfortunately, the phrase search is a
business requirement for me, which means that I cannot use Postgres full
text search.
Well, that's Oleg's TODO list.
Now you know where to lobby :^)

If you/your company can invest some money, that might help.

It is certainly too late for 9.0 by now, though.

Yours,
Laurenz Albe

Reply With Quote
  #10  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Lucene & Postgres? - 02-12-2010 , 04:12 PM



On Fri, 12 Feb 2010 15:55:40 +0100, Laurenz Albe wrote:

Quote:
Mladen Gogala wrote:
Actually, the phrase search already is on the todo list:

http://www.sai.msu.su/~megera/wiki/FTS_Todo

Full text search in 8.4 can do prefix search and wildcard searches:

http://www.sai.msu.su/~megera/wiki/Tsearch_84

Phrase search is still on the todo list. The problem is in the word
location. Postgres FTS is just a word indexer and does not support
phrases or operators like NEAR. Unfortunately, the phrase search is a
business requirement for me, which means that I cannot use Postgres
full text search.

Well, that's Oleg's TODO list.
Now you know where to lobby :^)

If you/your company can invest some money, that might help.

It is certainly too late for 9.0 by now, though.

Yours,
Laurenz Albe
Maybe it isn't too late for PostgreSQL 9i?



--
http://mgogala.byethost5.com

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.