agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Campbell, Lance <lance@illinois.edu>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Text searching HTML
Date: Mon, 03 Nov 2014 15:09:01 -0500
Message-ID: <25577.1415045341@sss.pgh.pa.us> (raw)
In-Reply-To: <B75CD08C73BD3543B97E4EF3964B7D701FC741C9@CITESMBX1.ad.uillinois.edu>
References: <B75CD08C73BD3543B97E4EF3964B7D701FC741C9@CITESMBX1.ad.uillinois.edu>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

"Campbell, Lance" <lance@illinois.edu> writes:
> Is there a preferred way to search text within an HTML document?  I have been reading up on searching via to_tsvector.  You can pass the to_tsvector two parameters.  The first appears to be a dictionary and the second text.  Is there by chance an English HTML dictionary?  That way html tags or html attributes would be ignored.

I believe all the built-in text search configurations ignore HTML tags by
default, since they have no mapping for the "tag" token type that the
built-in parser reports those as.  You could of course make a custom
configuration that acts differently.

			regards, tom lane


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (2+ messages)

Message-ID: <25577.1415045341@sss.pgh.pa.us>
Permalink:  ../25577.1415045341@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25577.1415045341@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, lance@illinois.edu
  Subject: Re: Text searching HTML
  In-Reply-To: <25577.1415045341@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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