Hello, I indexed my site using the CGI Output Method and it works fine, except for The Match Options (Match: any search words ,all search words) . They both return the same results. This does not happen when I use the ASP.NET output method but when I use that method I run into issues when trying to apply a masterpage. I have pasted my search.aspx below. Can someone please tell me what I need to do to get this working? Thanks.
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Diagnostics" %>
<%@ Page Language="VB" %>
<%
Dim paramStr As String = ""
Dim parampos As Integer = Request.RawUrl.IndexOf("?")
If (parampos >= 0) Then
paramStr = Request.RawUrl.Substring((parampos + 1))
End If
Dim psi As ProcessStartInfo = New ProcessStartInfo
psi.FileName = Server.MapPath("search.cgi")
psi.EnvironmentVariables("REQUEST_METHOD") = "GET"
psi.EnvironmentVariables("QUERY_STRING") = paramStr
psi.EnvironmentVariables("REMOTE_ADDR") = Request.ServerVariables("REMOTE_ADDR")
psi.RedirectStandardInput = false
psi.RedirectStandardOutput = true
psi.UseShellExecute = false
Dim proc As Process = Process.Start(psi)
proc.StandardOutput.ReadLine
Dim zoom_results As String = proc.StandardOutput.ReadToEnd
' read from stdout
proc.WaitForExit
' Print the output
Response.Write(zoom_results)
%>
We can't reproduce the problem.
Did you try using the CGI directly? That is, enter in your browser the URL to the CGI, such as: http://www.mysite.com/cgi-bin/search.cgi
See if the "match all search words" feature works when used that way.
Is the search page live and accessible online? If so, can you give us the URL and we will take a look.
Ok, That was part of my issue. I was unable to access the CGI page so I went back through the instructions and set it up per the instructions. I can now access search.cgi. When I enter a search term on the search.cgi page(using the generated advanced form) all works well, it redirects me to my search.aspx file and displays the results. However I cannot enter any search terms in my search.aspx file. It simply refreshes the page with no results.
I would actually prefer to use my own form as I at least get results when i do so and I eventually want to use an image for my submit button. Here is the code that I am using for my own form. It creates results on the search.aspx page but the "results per page" dropdown as well as the "Match" options are not working for me. Can you tell me how to fix the form below? I have taken out the <form> tags because this is an aspx site and I couldnt get it to work with the form tags included.
<input type="text" value="search thee-online.com" name="zoom_query" onfocus="if(this.value == 'search thee-online.com') {this.value=''}" onblur="if(this.value == ''){this.value ='search thee-online.com'}" size="20" onKeyPress="if (event.keyCode==13) { window.location='/search/search.aspx?zoom_query=' + this.form.zoom_query.value; return false; }">
<input type="button" value="Search" onClick="top.location='/search/search.aspx?zoom_query=' + this.form.zoom_query.value" >
<span class="zoom_results_per_page">Results per page:
<select name="zoom_per_page">
<option selected="selected">10</option>
<option>20</option>
<option>50</option>
<option>100</option>
</select><br /><br /></span>
<span class="zoom_match">Match:
<input type="radio" name="zoom_and" value="0" />any search words
<input type="radio" name="zoom_and" value="1" checked="checked" />all search words
<br /><br /></span>