473,385 Members | 1,693 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,385 software developers and data experts.

NoiseWords and Access DB searches

I've got a catalog (table) of products (records), which will
undoubtedly grow to over 5000 records in months. This is in an Access
2000 mdb file behind an ASP page, and the products have full text
descriptions. I want my customer to easily "search" the database
table with a simple SQL query. I guess I'll use a LIKE operator to
search the field with the product's long description.

Problem: Noise words. i.e. - and, but, it, its, or, the... will
return thousands of records and slow down browsing efficiency.

Has anyone got a good solution to easily eliminate noise words from
submitted text entered into the asp page "search" field?

I was able to find the file noise.enu from the Microsoft Index server
installation. It has about 50 words or so. Would I use a replace()
function to eliminate the words from my sql statement?

I'm sure someone else has come across this.

What would be the BEST and most logical way of using VBscript and ASP
to accept the query string typed and then condition it for
introduction into a "LIKE" statement in an ADO query?

Any better ideas?

Any response would be appreciated.
Jul 22 '05 #1
1 1222
On Thu, 12 May 2005 02:01:54 GMT, MnMs@. wrote:
I've got a catalog (table) of products (records), which will
undoubtedly grow to over 5000 records in months. This is in an Access
2000 mdb file behind an ASP page, and the products have full text
descriptions. I want my customer to easily "search" the database
table with a simple SQL query. I guess I'll use a LIKE operator to
search the field with the product's long description.

Problem: Noise words. i.e. - and, but, it, its, or, the... will
return thousands of records and slow down browsing efficiency.

Has anyone got a good solution to easily eliminate noise words from
submitted text entered into the asp page "search" field?

I was able to find the file noise.enu from the Microsoft Index server
installation. It has about 50 words or so. Would I use a replace()
function to eliminate the words from my sql statement?

I'm sure someone else has come across this.

What would be the BEST and most logical way of using VBscript and ASP
to accept the query string typed and then condition it for
introduction into a "LIKE" statement in an ADO query?

Any better ideas?

Any response would be appreciated.


Just for a reference, in case anyone else searches archives... I found
this ... seems to work!

' ################################################## ############
' ## ClearNoiseWords ##
' ## Author : Andy Sheel ##
' ## Date : 27/04/04 ##
' ## Licence: Free (GNU) ##
' ## ##
' ################################################## ############
Function ClearNoiseWords(SearchString)

Dim CleanedString ' String to hold cleaned search terms
Dim searchArray ' Array to hold Search Terms
Dim NoiseArray() ' Array to hold Noise Words
Dim objFSO ' FileSystemObject
Dim TS ' TextStreamObject
Dim strLine ' local variable to store Line
Dim strFileName ' local variable to store fileName
Dim ArrayPointer, i, j ' int's to hold array pointers
Dim CurRecords

Const ForReading = 1
Const Create = False
ArrayPointer = 0

' Noise Word File
' Change this to where your noise file is.
strFileName = Server.Mappath("\noise.txt")

' tokenise search string into array
searchArray = split(SearchString, " ")

' Open Noise Word File
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

' use Opentextfile Method to Open the text File
Set TS = objFSO.OpenTextFile(strFileName, ForReading, Create)
If Not TS.AtEndOfStream Then
ReDim NoiseArray(0)
Do While Not TS.AtendOfStream
strLine = TS.ReadLine

' Read words into an array
CurRecords = uBound(NoiseArray)
REDIM PRESERVE NoiseArray(CurRecords + 1)
NoiseArray(ArrayPointer) = Trim(strLine)

ArrayPointer = ArrayPointer + 1
Loop
End If

' for each search word, compare it with the noise list
' then delete any noise words
For i = 0 to UBound(searchArray)
For j = 0 to UBound(NoiseArray)
If lcase(searchArray(i)) =
lcase(NoiseArray(j)) Then
searchArray(i) = ""
End If
Next
Next

' make new string without noicse words
For i = 0 to UBound(searchArray)
CleanedString = CleanedString & searchArray(i) & " "
Next

' Return Clean String
ClearNoiseWords = Trim(CleanedString)
End Function
Jul 22 '05 #2

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

Similar topics

0
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics,...
1
by: Terry Carroll | last post by:
I have the need to run periodic searches on the US Patent and Trademark Office website, <http://www.uspto.gov/>. I need a Python module to do this. Before I reinvent the wheel, I thought I'd...
0
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics,...
39
by: Noticedtrends | last post by:
Can inference search-engines narrow-down the number of often irrelevant results, by using specific keywords; for the purpose of discerning emerging social & business trends? For example, if...
1
by: Light Speed | last post by:
Hi, We use Access 2000 forms to edit tables linked from an Oracle 8i database. When searching for records, unless we uncheck the option "Search Fields As Formatted" the searches are impossibly...
1
by: Steve T | last post by:
I have just contracted with a firm that is using a front-end web interface to access our sales data. They developed it with Microsoft Dotnet, and it uses Microsoft SQL as the database. When I...
8
by: DQ dont quit | last post by:
I'm currently working on a ASP.Net / C# / SQL 2000 project that involves the entering of keywords, that a web user enters, and then searching MSWord documents for those words. This information...
1
Run2Eat
by: Run2Eat | last post by:
i feel like this is a doofus question... but i've created an access form and added a find record button, but when i use the form, the find record button searches the form itself, not the table. all...
3
by: 9966 | last post by:
Well previously I've asked a lot of question regarding Travelling Salesman Problem and I got a lot of helpful feedback from here. Thanks again for helping me. Now I've completed the full code....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.