pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
i added Arabic Dictionary but how I know i'm using it
3+ messages / 2 participants
[nested] [flat]

* i added Arabic Dictionary but how I know i'm using it
@ 2022-08-17 11:33  Mohammed falih <moh.falih98@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Mohammed falih @ 2022-08-17 11:33 UTC (permalink / raw)
  To: pgsql-general

Greetings Dear

I hope you are fine and doing well.

I have a created a dictionary in postgres successfully

but how may I know that I'm using it?

because I'm doing now queries and the results are the same  before I
created the dictionary

I downloaded an rar folder that I supposed its a dictionary

i copied a files called th_ar.dat and ar.aff and pasted them in tsearch
folder in postgres folder and renamed them as the_ar.dict and th_ar.affix

as the documentation in postgres told me


https://www.postgresql.org/docs/current/textsearch-dictionaries.html#TEXTSEARCH-ISPELL-DICTIONARY


I created the dictionary by this query

CREATE TEXT SEARCH DICTIONARY arabic_dict (

    TEMPLATE = ispell,

   DictFile = th_ar,

    AffFile = th_ar,

    Stopwords = arabic);

and as you know the purpose in dictionary is like when you're searching for
an example a "house" the results will also retrieve a records with "home"
because it's a synonymous but  when I run queries nothing happens

so my questions are

1)is there anything I should do before do the query to use the dictionary?

2) is there any chance that I'm doing something wrong ? please mention them?

3) how i know that the dictionary I'm using is correct ?

thank you for your efforts

my best regards

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: i added Arabic Dictionary but how I know i'm using it
@ 2022-08-17 15:59  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Mohammed falih <moh.falih98@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Laurenz Albe @ 2022-08-17 15:59 UTC (permalink / raw)
  To: Mohammed falih <moh.falih98@gmail.com>; pgsql-general

On Wed, 2022-08-17 at 14:33 +0300, Mohammed falih wrote:
> I created the dictionary by this query 
> CREATE TEXT SEARCH DICTIONARY arabic_dict (
>     TEMPLATE = ispell,
>    DictFile = th_ar,
>     AffFile = th_ar,
>     Stopwords = arabic);
> and as you know the purpose in dictionary is like when you're searching for an
> example a "house" the results will also retrieve a records with "home" because
> it's a synonymous but  when I run queries nothing happens

That would be a "synonym dictionary":
https://www.postgresql.org/docs/current/textsearch-dictionaries.html#TEXTSEARCH-SYNONYM-DICTIONARY
An Ispell dictionary normalizes words, for example by removing suffixes for
plural and case.


You'd have to create a synonym file yourself.

Yours,
Laurenz Albe





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: i added Arabic Dictionary but how I know i'm using it
@ 2022-09-23 20:34  Mohammed falih <moh.falih98@gmail.com>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 3+ messages in thread

From: Mohammed falih @ 2022-09-23 20:34 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: pgsql-general

Hello Dear
sorry for the late reply
your response helped me to finish the feature successfully
thank you for your efforts
my best regards

On Wed, 17 Aug 2022, 6:59 pm Laurenz Albe, <laurenz.albe@cybertec.at> wrote:

> On Wed, 2022-08-17 at 14:33 +0300, Mohammed falih wrote:
> > I created the dictionary by this query
> > CREATE TEXT SEARCH DICTIONARY arabic_dict (
> >     TEMPLATE = ispell,
> >    DictFile = th_ar,
> >     AffFile = th_ar,
> >     Stopwords = arabic);
> > and as you know the purpose in dictionary is like when you're searching
> for an
> > example a "house" the results will also retrieve a records with "home"
> because
> > it's a synonymous but  when I run queries nothing happens
>
> That would be a "synonym dictionary":
>
> https://www.postgresql.org/docs/current/textsearch-dictionaries.html#TEXTSEARCH-SYNONYM-DICTIONARY
> An Ispell dictionary normalizes words, for example by removing suffixes for
> plural and case.
>
>
> You'd have to create a synonym file yourself.
>
> Yours,
> Laurenz Albe
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-09-23 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-08-17 11:33 i added Arabic Dictionary but how I know i'm using it Mohammed falih <moh.falih98@gmail.com>
2022-08-17 15:59 ` Laurenz Albe <laurenz.albe@cybertec.at>
2022-09-23 20:34   ` Mohammed falih <moh.falih98@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox