Gossamer Forum
Home : Products : Links 2.0 : Customization :

"Doc. contains no data" when choosing Search

Quote Reply
"Doc. contains no data" when choosing Search
Hi!

I've been testing Links for a while and now and then I experience a strange problem:

Now and then when I click "Search" I get message "Document contains no data", and nothing happens. The search page is not diplayed. If I try again everything works OK.

I've added the mod "Search Logger v1.02 for Links v2.0" at http://216.32.197.167/searchlog.html.

When this happends, the search log has logged one new search attempt with result "search failure".

Can anyone explain this?
Any remedy?

Can the problem be that the server is overloaded and not able to handle the request properly at the given moment?

Or is it another problem (File locking or something)?

Something I can do to track the reason, or provokate the error in order to track it?

Thank you for any suggestions.

Hugs
Nina
Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Here are a few suggestions:

1) Check your Perl Path in the search.cgi file.

2) Check all your HTML codes in your search templates.

3) Make sure that you have file flocking enabled on your server.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Thank you for your reply. The problem only occurs now and then, perhaps 1 of 15 times. The only reasonable explaination of the things you list, is 3), the way I understand it.

>> 1) Check your Perl Path in the search.cgi file.

Just checked Perl path. It's correct.

>> 2) Check all your HTML codes in your search templates.

Hmm. Checked output with HTML Validator. Looks OK. Can bad HTML cause the mentioned behaviour?

>>3) Make sure that you have file flocking enabled on your server.

A little unsure about what you want me to check. If you mean the $db_use_flock parameter in links.cfg, it's set to 1.
Was this what you meant I should check?

Thank you very much for your help so far. I really appreciate the time you spend to help others.

Any further advice?

Hugs
Nina

[This message has been edited by oktrg500 (edited December 11, 1999).]
Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Improperly formatted HTML and cgi files that do not have the content type defined can cause this problem.

If you can find a way to replicate the problem, then may be we can better identify what the problem is.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Replicate the problem... You said it. I wish I could. So far, I haven't got a clue about what's causing it. Only a gut feeling that it happends at times when the response from the server is slow.

Ahh, I hate problems like this. I like more the kind of problems that work - work not.

So I guess I just have to keep an eye on things and report back here if I find out more and I'm not able to solve myself.

Thank you again. Hmm, I never stop being surprised about how many people working on the net, even in the weekends. Local time here is 04:12 in the middle of the night...

Hugs
Nina
Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Well, I am on the net about an average of 15 hours a day. Although with the new research project I am working on, I think that time period will be dramatically compromised.

Oh well.

Please carefully keep track of what happens, so that we can assist you with finding a solution.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
It's very kind of you. :-)

Ahh, I must also mention one more thing:

After I got the interest for Links and Mods, I've spent many hours snooping all around Gossamer Threads, trying to find smart things to do with Links. Until yesterday, I thought I had seen all, but that was before I came up with the idea of checking the URL in your signature.

For you guys reading this: If you're looking for good implementations of Links, check out Eliot's site. Further comments unnecessary.

I'll keep you updated, but I'm afraid that this will be a hard nut to crack.

Hugs
Nina
Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Eliot, pherhaps the "No data" message isn't such a big problem as I thought? I just visited your page and started thinking about this. Occurrences of a "No data" message now and then is something that can be expected, right? High server load, bad connection and so on...

You see, I did some serious testing yesterday (Test tip: Found some java script that I modifyed to open 30 new windows with search.cgi each time I opened the test page). I opened search.cgi 300-400 times and could not provoke the "No data" message. Also tested many other variants doing searches. No "No data" message.

What fooled me into thinking this was a common, often seen error message, is the number of "Search Failed" in my keyword search log. The last time I got the "No data" message, I checked my keyword log and the number of "Search Failed" had incremented with one since last time I checked it. Then I thought that each time "Search failed" had been logged, a "No data" message had been displayed.

But today I visited your site and saw your keyword search log at http://www.anthrotech.com/resources/topsearch.shtml. I see you might have the same problem, if it is a problem.

If you check the number of "Search failed", I think the number is very high, if you compare to the number of other search terms logged. The only thing I can imagine causing "Search failed" to be logged, is if a visitor click "Search" without entering a search term. Right? Or are there other things causing "Search failed" to be logged too?

If the only thing is a blank search field, don't you agree with me that the number of "Search failed" is suspicious high? Any theory about this?

I see the same in my search log. I don't think the percent of visitors searching with a blank search field is that high. Something strange is going on. Pherhaps we have a bug somewhere that should be corrected?

I'll be looking more into this later today, but I'm curious to hear what you think about it.

Hugs
Nina
Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Uh...The Search Failed stands for a number of things, but mostly related to the following factor:

BLOCKING COMMON WORDS!

I have this mod installed, which causes the search to fail if the word is too common.

So, it is NOT a problem!

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Hi!

Ahh, forgot about the block common words mod. I guess this mod can cause lots of Search Failed messages.

I think I'll just keep an eye on the number of Search Failed messages logged. I don't use the block common words mod.

Just curious, you say the Search Failed stands for a number of things. Could you please list which things can cause Search Failed to be logged?

- Searching with blank search field
- Swearching for a word blocked with common mod
- And?

Hugs
Nina
Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
The last one that you did not mention is using the "and" connector and not having any of the words show up. Also, the Exact Word Search and Phrase Matches also affect the success rate of search results.

Wink

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Wopee! Problem solved! Your last comment pointed out several things that I did not think of.

Thank you for your comments. This problem (which isn't a problem after all) has caused me lots of headache the last days.

PS. I love your site at http://www.anthrotech.com
Hugs
Nina
Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Thanks, Nina.

Glad you solved the problem. Would you please post your solution so that others may learn from your experience.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Yes, and no. Meaning it's no point in telling what I thought I had found out at the point when I wrote my previous posting. After you told about the other variants that leads to a Search Failed, I was sure that this was the explaination for all Search Failed in my keyword log. So I thought problem was solved and posted my reply...

BUT. A couple of hours later I checked my keyword logging system. Something was not right. I had jumped in the air to early. Because I saw that my keyword search is set up to either log the information entered in the search field, or if search field is blank = Seach Failed. Then your explaination did not explain why I had so many Search Failed. If a user searches and get no match, this is NOT logged as a Search Failed with my system.

So the reason had to be something else. And this brings us to what I just found out after you asked me to tell about the solution (which after all was no solution...).

I came up with the idea of logging the HTTP_REFERER at the moment of Search Failed.
Then I thought I could see more about what's happening. The easisest way of doing this just for testing purposes a few hours (back up your keyword.log first), is inserting
$ENV{'HTTP_REFERER'} at the point in the search log mod where the search term is written to the log file. (If anyone is interested in more details about this, please write me at oktrg500@online.no and I'll try to explain.)

By doing this, I immediately saw what was causing the "problem". Some visitors keeps hammering the search system with all possible options entered in search form WITHOUT entering any search term. This I saw from the logged HTTP_REFERER. It told me search.cgi?query=&type=keyword&bool=and&mh=25. Since query= is blank, I knew that the visitor did not enter any search term, causing it to be logged as a search failure.

Strange, huh? Searching without searching for anything. Next step is to figure out how some people think that make them do this and write some search tips that avoids this.

Hugs
Nina

[This message has been edited by oktrg500 (edited December 15, 1999).]
Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
Here are some solutions to the blank search:

1) Add something like Enter Search Terms in the search box, with the following codes:

Code:
<input type="text" name="query" value="Enter Search Terms">

2) Add some search tips like you thought. Feel free to use my Search Tips page as a template:

www.anthrotech.com/resources/wwwvltips.shtml

3) Change the codes in the sub logsearch routine in your search.cgi file, like the following:

Code:
if (!$in{'query'}) {
$in{'query'} = "No Search Terms";
}

Hope this helps.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: "Doc. contains no data" when choosing Search In reply to
>> 1)
I'll think about it.

>> 2)
Thank you. I've already been there and snooped. :-)

>> 3)
I changed this the day I installed the mod. Except when query is null, I write "Search Failed" instead.

I've also been thinking a little about adding a default search value, if a search is performed with blank input field.

If a user hits Search! with a blank input field, then insert a suggestion to search for in the input field when the search failed error screen is returned. Of course this suggestion must be a keyword closely related to the theme of the site, to ensure that hits are found.

Thanks for your suggestions.

Hugs
Nina