Closed Thread Icon

Topic awaiting preservation: google highlight and asp (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12836" title="Pages that link to Topic awaiting preservation: google highlight and asp (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: google highlight and asp <span class="small">(Page 1 of 1)</span>\

 
taal_dancer
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jul 2003

posted posted 07-28-2003 04:17

in the google search engine they highlight the words and give u, wat is that code in asp? how do i do this?

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 07-28-2003 04:59

taal_dancer: I'd forgotten I'd made this FAQ:

:FAQ: How do I highlight terms on my page like Google?

Sometimes I suprise even myself!!

[edit: And both these threads need to be inserver-side scripting not DHTML so over they go woooooooshhhhhhhhhhhhhhhhh]

___________________
Emps

FAQs: Emperor

trib
Paranoid (IV) Inmate

From: Den Haag, Netherlands
Insane since: Sep 2002

posted posted 07-28-2003 19:39

It's all about the way the wordex is maintained. I worked at Verity for a couple of years, and most search engines work the same way as theirs ... They build a huge inverted file with the format :-
word docid,ofset docid,offset docid,offset
word2 docid,offset docid,offset

etc ...

Then to find relevant docs the search for word, and there are the docs and the offset to the beginning of the word for each ocurrence in the document The offset is primarily used to check proximity between words in multi-word queries, provide relevance ranking for scoring the search results etc. but one of the eye-candy spin-offs is that it provides the offset in bytes to the point where you can put a <span class=something tag ... and then find the next space, and put a </span> tag ...

Simple if you actually write your own search engines ...

Oh ... I forgot to mention ... docid is a unique key pointing to records in a metadata database containing such things as the doc description, last update, last spidered, summary, url, system location, language etc. etc. etc. ...

Go to thunderstone - http://www.thunderstone.com and get yourself their free version of webinator - it does everything "out-of-the-box" and the freebee will handle 10,000 documents.


Bug-free software only exisits in two places
A programmer's mind and a salesman's lips

[This message has been edited by trib (edited 07-28-2003).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 07-29-2003 04:17

<whisper>trib: I think you have answered the question from this thread:
www.ozoneasylum.com/Forum12/HTML/001499.html

as this thread is about the highlighting </whisper>

___________________
Emps

FAQs: Emperor

trib
Paranoid (IV) Inmate

From: Den Haag, Netherlands
Insane since: Sep 2002

posted posted 07-29-2003 09:36
quote:
but one of the eye-candy spin-offs is that it provides the offset in bytes to the point where you can put a <span class=something tag ... and then find the next space, and put a </span> tag ...

... and the span tag's class does the colour/emphasis highlighting of the search term ...

I think I answered both of them in one go


Bug-free software only exisits in two places
A programmer's mind and a salesman's lips

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 07-29-2003 14:15

trib: LOL and so you did - now that is efficiency for you

Hmmmmm I have a 'How do I make my own search engine?' tutorial feeling

___________________
Emps

FAQs: Emperor

« BackwardsOnwards »

Show Forum Drop Down Menu