Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8798189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:01:36+00:00 2026-06-14T00:01:36+00:00

I am new to Postgres and came across full text search feature. I want

  • 0

I am new to Postgres and came across full text search feature. I want to achieve the following:

  • Specify some table and fields to search on.
  • When the user search for some text, it should be searched on above specified table fields.

e.g.

CREATE TABLE customer (name text)
CREATE TABLE address (city text)

Search for ‘Ram’ should find both name ‘Ram*’ and city ‘Ram*’ (may be max 10 records).

Open point: Ranking.

I understand it might not be straighfoward, but if you can provide example statements to achieve similar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:01:37+00:00Added an answer on June 14, 2026 at 12:01 am

    This is covered quite well in the PostgreSQL documentation on full-text search, which shows examples of searching multiple columns and weighting them.

    See in particular controlling full-text search and manipulating documents. Ranking is also right there, in ranking search results.

    You haven’t really provided enough information to say much more. For searching across multiple tables you usually want to JOIN the tables then query them, or, for best performance, create a trigger-maintained materialized view that you can index and then query that.

    If the tables are independent and unrelated it doesn’t make tons of sense to query them in a single query; you’d usually use multiple tsearch2 queries for this. I guess it’s possible that you could UNION ALL the query results then rank them, but there’s no guarantee the ranking would be consistent between the two tables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to conditional statements within postgres. I have the following statement SELECT IF
I am new to POSTGRES.I want to make a SELECT and list all the
I'm trying to register new server in pgadmin3 with following settings: Name: postgres Host:
I user JPA 2.0 with eclipselink with postgres DB. I want to presist new
I'm new to Postgres and SQL. I created the following script that draws a
I'm trying to create a new table in postgres but when I do it
i'm quite new to postgres. i want to create a function (like stored procedure)
I have the following table in postgres: CREATE TABLE test ( id serial NOT
I'm a little new to Postgres. I want to take a value (which is
For a new project I'm trying to run postgres locally. Mac Lion has Postgres

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.