![]() Topic awaiting preservation: How does Google highlight the search terms? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Willaimsport, PA, US of A the hole in the Ozone |
![]() How does Google highlight their search terms? |
Bipolar (III) Inmate From: Cold Sweden |
![]() Slime made a script a while ago, if that's what you want. |
Paranoid (IV) Inmate From: Den Haag, Netherlands |
![]() It's built in with the Google core software. All v\commercial search engines have it. We had it at Verity too ... the word search index stores the document url and the byte offset for every occurrence of each word in that particular document. After that it's pretty east to cread the document as a bytestream and add a span class= ..... at the correct byte offset, and then (in the case of crude systems) highlight the search term precicely then add the /span tag ... or in the case of ore sophisticated systems (with stemming, soundex, typexetc, and/or theaurus, glossary etc.) to highlight the whole of the word which reflects the search term. |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Here's how I do it in PHP: code: if (isset($highlight)){
|
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
![]() Started FAQ: |
Paranoid (IV) Inmate From: Willaimsport, PA, US of A the hole in the Ozone |
![]() Alright! Thanks guys! That's what I wanted to know. |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() My mistake... |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
![]() wow, pugz... in the past I had neglected to realize how your name could be extremely funny... |