Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Making a Search Engine

, 3 May 2013
This article discusses the making of a search engine.
Public Structure Link
    Property url As String
    Property urlhash As String
    Property state As LinkState
    Property crawldate As String
    Property backlink As Integer
    Property priority As LinkPriority
    Property _Empty As Boolean
    Private _title As String
    Property title As String
        Get
            If _title Is Nothing Then
                Return ""
            Else
                Return _title
            End If
        End Get
        Set(ByVal value As String)
            _title = Trim(value)
        End Set
    End Property


    Public Sub inset_url_with_hash(ByVal _url As String)
        If _url.EndsWith("/") Then
            _url = _url.Substring(0, _url.LastIndexOf("/"))
        End If
        url = _url
        urlhash = GetMd5Hash(_url)
    End Sub

    Public Overrides Function Equals(ByVal obj As Object) As Boolean
        If GetType(Object) Is [GetType]() Then
            If CType(obj, Link).urlhash = urlhash Then
                Return True
            Else
                Return False
            End If
        Else
            Return False
        End If
    End Function

    Public Overrides Function ToString() As String
        Return url
    End Function

End Structure

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

kburman6
Student
India India
I just love coding. But due to my studies it became very tough for me to manage both.

| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 4 May 2013
Article Copyright 2013 by kburman6
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid