How to make my search box work faster?

Discussion in 'HTML & Website Design' started by whiteshadow18, Aug 16, 2010.

  1. #1
    Hi i have a blog with 170 k posts and when i want to search somthing it takes more then 40 secs to find it, and it is not accurate. My site's search box looks like this:
    <form id="searchform" method="get" action="http://blogspotmedia.net/" >
    <input type="text" value="search" onfocus="if (this.value == 'search') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}" size="30" maxlength="65" name="s" id="s"/></form>
    </td>
    Code (markup):

     
    whiteshadow18, Aug 16, 2010 IP
  2. sakib25

    sakib25 Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    how can i add a search box in my website?
     
    sakib25, Aug 16, 2010 IP
  3. karter4

    karter4 Greenhorn

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    I think the problem is the action link. It looks like you are searching all of blogspotmedia and that is the reason it takes so long and is inaccurate. Google search box works much faster and can target only your site. You need an AdSense account to get the search box, but... it works so much faster.

    Hope this helps

    Tim
     
    karter4, Aug 16, 2010 IP
  4. Thorlax402

    Thorlax402 Member

    Messages:
    194
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    40
    #4
    It would all depend on the query being run to search the site. 170k posts is a lot to search through, but 40 seconds seems way too long even for that. Assuming that php is what is being used to actually perform the search, I would recommend posting the whole search code into the php forums and asking for help debugging it.
     
    Thorlax402, Aug 16, 2010 IP
  5. whiteshadow18

    whiteshadow18 Peon

    Messages:
    378
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I can't have an adsense account because i have been banned. I think it was because i used autosurf programs AND

    Thorlax 402

    what is the whole search code? i thought that is the whole search code
     
    whiteshadow18, Aug 17, 2010 IP
  6. Thorlax402

    Thorlax402 Member

    Messages:
    194
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    40
    #6
    Nope, that's just the form that is used to get the string you want to search for. There has to be some sort of code to perform the actual search. That form will send you to the url of the form "action" attribute which in this case is http://blogspotmedia.net/. It will also pass the variable "s" which contains the value of the input box.

    There is most definitely a script on the index of http://blogspotmedia.net/ that will parse this variable and output the results.
     
    Thorlax402, Aug 17, 2010 IP
  7. herri

    herri Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    use free third-party service like google custom search or lijit
     
    herri, Aug 18, 2010 IP