Thread: FTS

FTS

From
Jonatan Malaver
Date:

Hello,

 

     I’m trying to use full-text-search to make it easier on my users to search for things. One problem that I have is that my users are entering units (e.g. amps, volts, etc…) is there a way to point those units to a certain table? Or may be create a custom data type that would mean those units? (similar to money data type).

 

   I appreciate all your suggestions.

 

Thanks,

 

Jon

Re: FTS

From
David G Johnston
Date:
Jonatan Malaver wrote
> Hello,
>
>      I'm trying to use full-text-search to make it easier on my users to
> search for things. One problem that I have is that my users are entering
> units (e.g. amps, volts, etc...) is there a way to point those units to a
> certain table? Or may be create a custom data type that would mean those
> units? (similar to money data type).
>
>    I appreciate all your suggestions.
>
> Thanks,
>
> Jon

Sure, though I doubt you will use the FTS capabilities to accomplish such.
As the name implies everything you store in a FTS column is plain text.

You might want to give some specifics as to what data you are storing, and
how, and what queries look like.

Basically you probably need to pre-analyze the string for units, set the
appropriate route pointers, the pass the remainder of the string (or the
whole thing, depending) onto the next stage of processing.  It might be
possible to use CASE instead of procedural logic but again you provide too
little information.

David J.





--
View this message in context: http://postgresql.1045698.n5.nabble.com/FTS-tp5802454p5802460.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


Fwd: FTS

From
David Johnston
Date:
Please reply to the list.  Also, it is proper etiquette on this list to bottom-post - just like my original reply.

Original response below.

---------- Forwarded message ----------
From: David Johnston <david.g.johnston@gmail.com>
Date: Mon, May 5, 2014 at 11:12 AM
Subject: Re: [NOVICE] FTS
To: Jonatan Malaver <jon.malaver@shrewsburyma.gov>


   "kva" thoughs the FTS query off. If I remove kva then it works. I'm looking for suggestions. Should I look for those keywords on the search string and remove them? Or is there a way to make postgres ignore it?


​Create a custom dictionary configuration that defines the abbreviations as "stop words" ​and use it to parse the input query.

12.3.2. Parsing Queries
to_tsquery([ config regconfig, ] querytext text) returns tsquery

The documentation is hopefully sufficiently helpful for describing how to create a custom configuration and make use of it.

David J.


Re: FTS

From
Jonatan Malaver
Date:

Thanks! I’ll give that a try

 

 

From: David Johnston [mailto:david.g.johnston@gmail.com]
Sent: Monday, May 05, 2014 11:13 AM
To: Jonatan Malaver
Subject: Re: [NOVICE] FTS

 

   "kva" thoughs the FTS query off. If I remove kva then it works. I'm looking for suggestions. Should I look for those keywords on the search string and remove them? Or is there a way to make postgres ignore it?

 

​Create a custom dictionary configuration that defines the abbreviations as "stop words" ​and use it to parse the input query.

 

12.3.2. Parsing Queries

to_tsquery([ config regconfig, ] querytext text) returns tsquery

 

The documentation is hopefully sufficiently helpful for describing how to create a custom configuration and make use of it.

 

David J.

 

Re: FTS

From
Jack Kaufman
Date:
Hello, Postgres,

I am terminating my employment as of the end of this month.  I have appreciated the PL/pgSQL support I have received from this email group.  However, I will not be needing it any longer; besides, this email address will be retired when I leave.

How do I un-subscribe to "pgsql-novice"?

Thank you,

Jack
CONFIDENTIALITY
This e-mail message and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail message, you are hereby notified that any dissemination, distribution or copying of this e-mail message, and any attachments thereto, is strictly prohibited.  If you have received this e-mail message in error, please immediately notify the sender and permanently delete the original and any copies of this email and any prints thereof.
ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL IS NOT INTENDED AS A SUBSTITUTE FOR A WRITING.  Notwithstanding the Uniform Electronic Transactions Act or the applicability of any other law of similar substance and effect, absent an express statement to the contrary hereinabove, this e-mail message its contents, and any attachments hereto are not intended to represent an offer or acceptance to enter into a contract and are not otherwise intended to bind the sender, Sanmina Corporation (or any of its subsidiaries), or any other person or entity.

Re: FTS

From
Jonatan Malaver
Date:

I’m sorry. Outlook sucks! It doesn’t let me bottom-post.

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of David Johnston
Sent: Monday, May 05, 2014 11:15 AM
To: pgsql-novice@postgresql.org
Subject: Fwd: [NOVICE] FTS

 

Please reply to the list.  Also, it is proper etiquette on this list to bottom-post - just like my original reply.

 

Original response below.

 

---------- Forwarded message ----------
From: David Johnston <david.g.johnston@gmail.com>
Date: Mon, May 5, 2014 at 11:12 AM
Subject: Re: [NOVICE] FTS
To: Jonatan Malaver <jon.malaver@shrewsburyma.gov>

   "kva" thoughs the FTS query off. If I remove kva then it works. I'm looking for suggestions. Should I look for those keywords on the search string and remove them? Or is there a way to make postgres ignore it?

 

​Create a custom dictionary configuration that defines the abbreviations as "stop words" ​and use it to parse the input query.

 

12.3.2. Parsing Queries

to_tsquery([ config regconfig, ] querytext text) returns tsquery

 

The documentation is hopefully sufficiently helpful for describing how to create a custom configuration and make use of it.

 

David J.

 

 

Re: FTS

From
David G Johnston
Date:
Not easily anyway...been there, done that, moved to Google :)

(though I use Nabble for most of my posting nowadays) 

If you plan to post frequently you might want to figure out some means to make it work (text replies, not rich-text formatted, seem to make it easier) but for a handful of posts it isn't going to be a big issue - unless the thread gets really long in which case at least trim some of the auto-copy-reply body.

David J.

On Mon, May 5, 2014 at 11:35 AM, Jonatan Malaver [via PostgreSQL] <[hidden email]> wrote:

I’m sorry. Outlook sucks! It doesn’t let me bottom-post.




View this message in context: Re: FTS
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

Re: FTS

From
Daniel Staal
Date:
--As of May 5, 2014 11:27:37 AM -0400, Jack Kaufman is alleged to have said:

>
>
> Hello, Postgres,
>
>
> I am terminating my employment as of the end of this month.  I have
> appreciated the PL/pgSQL support I have received from this email group.
>  However, I will not be needing it any longer; besides, this email
> address will be retired when I leave.
>
>
> How do I un-subscribe to "pgsql-novice"?

From the headers (most lists have something similar, and a few good email
clients will do something with them automatically):

List-Unsubscribe:
<mailto:majordomo@postgresql.org?body=unsub%20pgsql-novice>

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


Re: FTS

From
Jack Kaufman
Date:
Thank you.


On Mon, May 5, 2014 at 3:02 PM, Daniel Staal <DStaal@usa.net> wrote:
--As of May 5, 2014 11:27:37 AM -0400, Jack Kaufman is alleged to have said:



Hello, Postgres,


I am terminating my employment as of the end of this month.  I have
appreciated the PL/pgSQL support I have received from this email group.
 However, I will not be needing it any longer; besides, this email
address will be retired when I leave.


How do I un-subscribe to "pgsql-novice"?

From the headers (most lists have something similar, and a few good email
clients will do something with them automatically):

List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-novice>

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------



--
Jack Kaufman
MDS Application Devl (US)
Sanmina-SCI Corporation - Owego site
Email: jack.kaufman@sanmina.com
Skype: jack_kaufman_sanm
607-723-0507

CONFIDENTIALITY
This e-mail message and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail message, you are hereby notified that any dissemination, distribution or copying of this e-mail message, and any attachments thereto, is strictly prohibited.  If you have received this e-mail message in error, please immediately notify the sender and permanently delete the original and any copies of this email and any prints thereof.
ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL IS NOT INTENDED AS A SUBSTITUTE FOR A WRITING.  Notwithstanding the Uniform Electronic Transactions Act or the applicability of any other law of similar substance and effect, absent an express statement to the contrary hereinabove, this e-mail message its contents, and any attachments hereto are not intended to represent an offer or acceptance to enter into a contract and are not otherwise intended to bind the sender, Sanmina Corporation (or any of its subsidiaries), or any other person or entity.