473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Noise words in full text search....

I am developing a search page. If the users enter, words like "and",
"an" etc, it gives an error. I read something abt noise words. I want
to display a friendly error message to the users if they enter noise
words.
I am storing all the noise words in an array, and string comparing the
keyword the user entered with each element of the array, else
redirecting them to a searchresults page. But when I am doing this, it
is redirecting to the searchresults page anyway...with an error abt the
noise words.
How can I do error handling so that, when the error is about noise
words, it displays an alert box, or something like that and asks the
user to redefine their search.
Any suggestions?

Nov 19 '05 #1
1 1749
Hi there,

One way you can show message on client-side is like this:

Add a lablebox, lblMessage, in search page.
Then
if(findNoiseWords()){
lblMessage.Text = "<script>alert('" + strMessage + "')
</script>";
}else{
Response.Redirect(searchresults.aspx);
}

Hope it helps,

Elton Wang
el********@hotmail.com
-----Original Message-----
I am developing a search page. If the users enter, words like "and","an" etc, it gives an error. I read something abt noise words. I wantto display a friendly error message to the users if they enter noisewords.
I am storing all the noise words in an array, and string comparing thekeyword the user entered with each element of the array, elseredirecting them to a searchresults page. But when I am doing this, itis redirecting to the searchresults page anyway...with an error abt thenoise words.
How can I do error handling so that, when the error is about noisewords, it displays an alert box, or something like that and asks theuser to redefine their search.
Any suggestions?

.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mr_burns | last post by:
Hi there, I have a text box that I will use to search a database. I would like to use it so that it will not use a whole string (ie. 'red striped top') but instead break it up into individual...
0
by: Tracey | last post by:
Hi there, I want to search Japanese characters with Full Text search function. I created a table (tbSearch) for Full-text search on SQL 2000, English Win2k Server. The table contains 4 fields,...
2
by: Paul Bramscher | last post by:
What are the mechanisms to make words like a/an/the in text and varchar character fields ignored when performing SELECT and utilizing ORDER BY in SQL queries? I've done some hunting around into...
1
by: Peter Strøiman | last post by:
Hi. I have an Sql server 2005 beta2 problem with the full-text index functionality. I have a table with a full text index. In the definition of the full-text index, I have specified the...
1
by: Liu, Mingyi | last post by:
Sorry if this question has been asked before. I tried to search in postgres mailing lists at http://archives.postgresql.org/pgsql-general/ just now and it gave me error "An error occured! Can not...
0
by: metaperl | last post by:
Does anyone see any noise words in this full-text searc query being executing on MS SQL 2005? SELECT t.Title, t.Organisation, t.ID, t.OnlineStatus FROM Abstracts t WHERE t.StatusID=3 AND...
1
by: Rathorevivek | last post by:
Hi All, I have been using full text search in my application for search purpose. But on certain words i.e Noise Words such as And,After,About etc. I am receiving the following error: ...
0
by: FredSovenix | last post by:
Can anybody provide instruction or examples on how to access the noise words file using T-SQL? I want to be able to adjust the users' search string by eliminating the noise words, but if the...
8
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.