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

  • Home
  • SEARCH
  • 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 83185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:44:02+00:00 2026-05-10T21:44:02+00:00

Current, I’ve got a stored procedure that has a main goal of doing a

  • 0

Current, I’ve got a stored procedure that has a main goal of doing a full text search through a database table of films and tv shows. In order to get it to do partial-keyword searching, I added some code in SQL to split up the search query by spaces, and output a statement like the following:

'batman*' ~ 'be*'

The original string, ‘batman be’, for instance, could be generated from a textbox on the page as the user is typing and on each javascript keyup event, I send whatever is in that textbox to the stored proc for results to get results as I type (like autocomplete). In this case, the user may have been looking for ‘Batman Begins’, or ‘The Batman: Batgirl Begins’ (a TV show episode) and they both should show up as a result.

Below is a sample of my query. @partialKeywordString is, in the example above, 'batman*' ~ 'be*'.

SELECT f.title FROM Films f INNER JOIN     CONTAINSTABLE(Films, Title, @partialKeywordString) f_key ON f.filmid = f_key.[key] ORDER BY f_key.Rank DESC 

The problem I have with the query is that the ranking doesn’t seem to be exactly what I’d expect. If I were to just search for ‘batman’, one would believe that all movie titles, beginning with, or only containing the word ‘batman’ would appear first. But they don’t.
A sample result of what happens when one searches for just ‘batman’ is below:

‘Batman: The animated series – Episode 114’
‘Adventures of Batman and Robin – Episode 218’
‘Batman and Robin – Episode 101’
‘The Batman – Episode 101’
‘Batman and Robin – Episode 204’

Much further down the list is the movie I was searching for–‘Batman Begins’ or even just ‘Batman’.

I’m looking for advice on how to tweak this query–I’m definitely not a SQL expert, and I feel like I just man-handled the above code to get it to work. I have a feeling there’s a more elegant or powerful solution, and I just haven’t found it yet.

Thank you in advance

  • 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. 2026-05-10T21:44:03+00:00Added an answer on May 10, 2026 at 9:44 pm

    After some more researching, I’m going to try and use Lucene.Net for my movie-title search engine, and not rely on Full-Text Searching in SQL Server 2005. Early testing shows that the results have been better and more relevant with Lucene. A search for ‘batman’ returns the following partial result-set:

    • Batman
    • Batman Begins
    • Batman Returns
    • Batman and Robin: Batman Takes Over
    • Batman Beyond: A Touch of Curaré
    • Batman Beyond: Babel
    • The Batman: Season 02
    • The Batman: Topsy Turvy
    • Batman and Robin: Tunnel of Terror
    • Batman Beyond [Animated TV Series]
    • The New Adventures of Batman: Curses! Oiled Again!
    • The New Adventures of Batman: This Looks Like a Job for Bat-Mite!
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you running on OS 3.0? I saw the same… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer It looks like you need to register Apache::Session::Memcached with Apache::Session::Wrapper,… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Use DATENAME or DATEPART: SELECT DATENAME(dw,GETDATE()) -- Friday SELECT DATEPART(dw,GETDATE())… May 12, 2026 at 1:19 am

Related Questions

Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
Current, I've got a stored procedure that has a main goal of doing a
The current class library I am working on will have a base class (Field)
For my current project, I need to request XML data over a tcp/ip socket
For a current project I am working I need to return an aggregate report

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.