473,516 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Search Engine Logic?

139 New Member
Hi All,

I am doing search engine in my home page. It will search all products details for a specified pattren/search keyword in all categories. It should display the first product as the most character match of key words which the user has entered for the Products. Any idea plz......................

My logic is prod_name like '%mobile%'

Thanks.
Jun 2 '08 #1
2 1010
Plater
7,872 Recognized Expert Expert
Well I'm not sure what a search engine has to do with it, your %string% seems like a workable enough solution. Just find a way to format the results into something that looks nice?
Jun 3 '08 #2
r035198x
13,262 MVP
Suppose you are searching for two words " scripts byte" from a column in a table which has two rows with
Expand|Select|Wrap|Line Numbers
  1. row1 "the scripts byte"
  2. row2 "the byte"
If you take the search string entered and break it up into an array and then do
Expand|Select|Wrap|Line Numbers
  1.  for(int i=0;i < array.Length;i++) {
  2.                     select rowID from tableName where
  3.                      upper(colName) like upper('%array[i]%')
  4.                      add rowID to an ArrayList called IDs here
  5. }
After all this the IDs ArrayList can easily tell you which row had the most hits.


Note:
  • This technique is a brute force one and is probably the slowest.
  • Getting results from a database inside a for loop requires motherly care.
Jun 4 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
10528
by: JP SIngh | last post by:
Hi There I am creating a search page and need help writing the code to build the sql string. I have 3 fields on the main page which a user can choose to enter search terms in any of the 3 fields. My question is how do I write the logic so it only includes the fields in the search criteria where the user has entered anything.
5
2955
by: George | last post by:
Hi, Anyone has the background for explaining? I have made a search on my name and I have got a link to another search engine. The link's title was the search phrase for the other search engine (a wicked phrase). Some but not all of the words of that phrase exist in my website. I reported it and they removed the link but did not give...
8
2044
by: Craig Cockburn | last post by:
Hi I'm aware of the use of robots.txt and the use of <META NAME="ROBOTS" CONTENT="index,follow"> However, what would be more useful is to be able to control within a page which elements of the page should be indexed and seen by robots and which elements are simply page furniture and it is safe to ignore or not cache (e.g. adverts).
3
4190
by: Alastair | last post by:
Hello guys, I've been building a search facility for an intranet site I'm part of developing and we've been building a search engine using Index Server. It mostly works, however there have been a few niggling problems and fixing it seems to be a case of patching errors as we find them so I'm thinking that it might be worth starting the...
0
2037
by: DNKMCA | last post by:
Hi, i was building a internet based search engine and heard of fuzzy search algorithms. Can anybody give fuzzy logic search algorithm for string search -dnk
4
1945
by: moondaddy | last post by:
I've made the decision to use search engine friendly URLs in my site which means translating stripping all parameters our of the URL and converting it to a hierarchical URL like this: Change: /mysite/default.aspx?MenuID=contactus To: /mysite/ContactUs.aspx? The problem I'm having is that its really slowed things up by at least 0.5...
7
1481
by: ABC | last post by:
Hi, All Is there any search engine source code for reference? Thanks
0
1191
by: Al Fatykhov | last post by:
Using MABLE logic engine with existing .NET applications. MABLE web services provide an interface to MABLE business objects and logic. Let us review some technical details of the MABLE web services. · MABLE utilizes SOAP 1.2 protocol. · MABLE uses AXIS 1.4 as a web service transport. · MABLE support state-full conversations by...
12
2312
by: iahamed | last post by:
Hi Everyone, I got two parts of my advance search to work, I am running out of Logic to connect the third. My mind is in swing! Pleaseeeeeeeee Help me. I have 3 Fiels to search, the First two works, thats: 1. Category to search from the (Drop down name: ASPDBCatSearch) is working with the Input Text Box Field (name: keyword), based on...
0
7182
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7408
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7581
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7548
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5714
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4773
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
1624
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
825
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.