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 3273010
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:53:13+00:00 2026-05-17T18:53:13+00:00

I just got a list of requirements for a new search function for our

  • 0

I just got a list of requirements for a new search function for our websites. They’re book publisher’s websites, so that’s the basic field we’re operating in here. The data is stored in a Microsoft SQL 2005 database server (SP3) with fulltext enabled.

Now, the requirements state that the search can be done in three areas: book title, author names, and book texts. That in itself is easy enough to do with three separate queries. However, there’s more. The requirements state that search results should return in roughly the following order:

  • Full title matches
  • Full author name matches
  • Partial title matches
  • Full author lastname matches
  • Partial author lastname matches
  • Partial author fullname matches
  • Book text matches

Furthermore, there’s secondary requirements:

  • Titles from the publisher itself should be ordered higher than that of a neighboring publisher (there’s books from a dozen or so publishers in the same database)
  • When a full match for a title is found, other books from the same author should be displayed (with again the titles from the same publisher getting precedence over the other – an author can publish with multiple publishers)

Lots of rules like that.

So, say you have a book Johnson, written by an author Pete Johnson (or whatever). The search query ‘john’ should then return the following (ish):

  • Johnson (book) (partial title match)
  • Pete Johnson (partial lastname match)

And the search query ‘Johnson’:

  • Johnson (book) (full title match)
  • Johnson (book) (partial title match) (omitted, already in the results)
  • Pete Johnson (author) (full author lastname match)
  • Pete Johnson (author) (partial author lastname match) (omitted)
  • Pete Johnson (author) (partial author fullname match) (omitted)
  • Johnson (book) (book text match) (omitted)

…Anyways. That’s basically the requirements, and I just wanted to type that out. Now, for a few questions:

  • Are there any books or articles about this particular subject you could point me to?
  • How would this best be implemented? Can this be done in a set of basic queries (separate queries for each search requirement, post-processing to remove duplicates and merge the results), or can it be done in a single query?
  • Or do I need to write an application that indexes the table and creates its own indexes and the like, which the search queries in turn?

I’m kinda grasping for ideas and suggestions here.

  • 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-05-17T18:53:13+00:00Added an answer on May 17, 2026 at 6:53 pm

    There’re CONTAINSTABLE and FREETEXTTABLE functions – they return RANK column that is is “relevance ranking”. Probably these functions plus some complex ordering by non-text columns will do the job.

    If you decide to implement FTS in your app, have a look at third-party solutions. Lucene (or Lucene.NET) is probably good to start with.

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

Sidebar

Related Questions

i just got a call from Hosting company, they claimed that my application creates
I'm getting on quite well with Django & Python, just got a search function
Im really new to C and just got Codeblocks to compile/run any code that
Ok, I've got a list like this (just a sample of data): data =
Just got the new iPad, and when I touch the microphone and say a
We just got our first major Perl CGI assignment in my CS class. Our
I've got a handler (list.ashx for example) that has a method that retrieves a
I just got a new Mac (with Lion) and am setting everything up, but
I just got to support a new Sharepoint Site. I created a new Site
I just got a new job working for a website and I am trying

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.