Thread: Not found indexed word

Not found indexed word

From
"Melek JARRAYA"
Date:

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

Attachment

Re: Not found indexed word

From
Jeff Janes
Date:
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
Attachment

Re: Not found indexed word

From
"Melek JARRAYA"
Date:

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

Inactive hide details for Jeff Janes ---21/08/2018 05:39:39---On Mon, Aug 20, 2018 at 5:55 AM, Melek JARRAYA <MJARRAYA@cfirst.fJeff Janes ---21/08/2018 05:39:39---On Mon, Aug 20, 2018 at 5:55 AM, Melek JARRAYA <MJARRAYA@cfirst.fr> wrote: > Hello,

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
Attachment

Re: Not found indexed word

From
Jeff Janes
Date:
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
Attachment

Re: Not found indexed word

From
Tom Lane
Date:
"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


Re: Not found indexed word

From
"Melek JARRAYA"
Date:

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

Inactive hide details for Tom Lane ---23/08/2018 16:43:32---Tom Lane ---23/08/2018 16:43:32---"Melek JARRAYA" <MJARRAYA@cfirst.fr> writes: > Here is in screenshot the query executed for the sear

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

Attachment