Not found indexed word

Started by Melek JARRAYAover 7 years ago6 messagesbugs
Jump to latest
#1Melek JARRAYA
MJARRAYA@cfirst.fr

Hello,

We are working on a projet in java 8 and we use the PostgreSQL 9.6
technology. Part of this project contains indexing and search, for that we
user tsvector.
During the test we found that for a spécific word "Pepiniere" the result of
the search is null, while the word is indexed in the data base.

If i search with the word Metz or Strasbourg, the word "Pepiniere" goes
back well in the results.
Do you ahave an idea about this problèm ?

Cordialement,
JARRAYA Melek
Tel: 03 88 06 64 34

Attachments:

2A757690.gifimage/gif; name=2A757690.gifDownload
#2Jeff Janes
jeff.janes@gmail.com
In reply to: Melek JARRAYA (#1)
Re: Not found indexed word

On Mon, Aug 20, 2018 at 5:55 AM, Melek JARRAYA <MJARRAYA@cfirst.fr> wrote:

Hello,

We are working on a projet in java 8 and we use the PostgreSQL 9.6
technology. Part of this project contains indexing and search, for that we
user tsvector.
During the test we found that for a spécific word "Pepiniere" the result
of the search is null, while the word is indexed in the data base.

If i search with the word Metz or Strasbourg, the word "Pepiniere" goes
back well in the results.

"Pepiniere" has an 'e' at the end, and "Pepinier" does not. It is possible
one is supposed to converted to the other by the stemmer, but without
seeing the exact query you ran, it is hard to know.

Cheers,

Jeff

Attachments:

2A757690.gifimage/gif; name=2A757690.gifDownload
#3Melek JARRAYA
MJARRAYA@cfirst.fr
In reply to: Jeff Janes (#2)
Re: Not found indexed word

Here is in screenshot the query executed for the search for the word
"Pepinier".
The search result is always null.
QueryWords contains the search word.

Cordialement,
JARRAYA Melek
Tel: 03 88 06 64 34

De : Jeff Janes <jeff.janes@gmail.com>
A : Melek JARRAYA <MJARRAYA@cfirst.fr>
Cc : Pg Bugs <pgsql-bugs@postgresql.org>
Date : 21/08/2018 05:39
Objet : Re: Not found indexed word

On Mon, Aug 20, 2018 at 5:55 AM, Melek JARRAYA <MJARRAYA@cfirst.fr> wrote:

Hello,

We are working on a projet in java 8 and we use the PostgreSQL 9.6
technology. Part of this project contains indexing and search, for
that we user tsvector.
During the test we found that for a spécific word "Pepiniere" the
result of the search is null, while the word is indexed in the data
base.

If i search with the word Metz or Strasbourg, the word "Pepiniere"
goes back well in the results.

"Pepiniere" has an 'e' at the end, and "Pepinier" does not.  It is possible
one is supposed to converted to the other by the stemmer, but without
seeing the exact query you ran, it is hard to know.

Cheers,

Jeff

Attachments:

1C544792.gifimage/gif; name=1C544792.gifDownload+1-1
graycol.gifimage/gif; name=graycol.gifDownload
1C958626.gifimage/gif; name=1C958626.gifDownload
#4Jeff Janes
jeff.janes@gmail.com
In reply to: Melek JARRAYA (#3)
Re: Not found indexed word

On Tue, Aug 21, 2018 at 10:59 AM, Melek JARRAYA <MJARRAYA@cfirst.fr> wrote:

Here is in screenshot the query executed for the search for the word
"Pepinier".
The search result is always null.
QueryWords contains the search word.

Cordialement,
JARRAYA Melek

What is default_text_search_config set to? Could you show the query text
after all the substitutions were done?

Cheers,

Jeff

Attachments:

1C544792.gifimage/gif; name=1C544792.gifDownload+1-1
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Melek JARRAYA (#3)
Re: Not found indexed word

"Melek JARRAYA" <MJARRAYA@cfirst.fr> writes:

Here is in screenshot the query executed for the search for the word
"Pepinier".
The search result is always null.
QueryWords contains the search word.

You seem to be using the single-argument form of to_tsquery, which
means that the way it stems the word is going to depend on the
setting of default_text_search_config. It looks like the stored
word was stemmed using the "french" setting, but maybe that's not
what prevails for your running application. I'd try executing
just "SELECT to_tsquery('Pepiniere')" from your application and
see what you get.

In some quick experiments here, I get 'pepinier' in French or
Spanish, but just 'pepini' in English or German. So that'd be
enough to prevent a match to a stored 'pepinier'.

regards, tom lane

#6Melek JARRAYA
MJARRAYA@cfirst.fr
In reply to: Tom Lane (#5)
Re: Not found indexed word

Hello,

By Défault the application is in French, but also i have the opportunity to
change in English or German.Can this cause the problem ?
If yes you must have serval words that do not go back in the search but in
this case there is just the set of words (pepinier , pepini, pepini, pepin,
pepi , pep), that does not go back.

Best regards,
Cordialement,
JARRAYA Melek
Tel: 03 88 06 64 34

De : Tom Lane <tgl@sss.pgh.pa.us>
A : "Melek JARRAYA" <MJARRAYA@cfirst.fr>
Cc : Jeff Janes <jeff.janes@gmail.com>, Pg Bugs
<pgsql-bugs@postgresql.org>
Date : 23/08/2018 16:43
Objet : Re: Not found indexed word

"Melek JARRAYA" <MJARRAYA@cfirst.fr> writes:

Here is in screenshot the query executed for the search for the word
"Pepinier".
The search result is always null.
QueryWords contains the search word.

You seem to be using the single-argument form of to_tsquery, which
means that the way it stems the word is going to depend on the
setting of default_text_search_config. It looks like the stored
word was stemmed using the "french" setting, but maybe that's not
what prevails for your running application. I'd try executing
just "SELECT to_tsquery('Pepiniere')" from your application and
see what you get.

In some quick experiments here, I get 'pepinier' in French or
Spanish, but just 'pepini' in English or German. So that'd be
enough to prevent a match to a stored 'pepinier'.

regards, tom lane

Attachments:

graycol.gifimage/gif; name=graycol.gifDownload