Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Testing Search Unit in Visual Studio - SearchUnit - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
RCDAwebmaster
#1 Posted : Thursday, April 30, 2015 2:59:51 PM
Rank: Advanced Member

Groups: Registered

Joined: 3/31/2015
Posts: 38
When I develop the search page in visual studio and ran it, I get 55 results for "papal blessing".

I then moved the code to the local machine's site 127.0.0.1 under the a search directory which is directly off the root. (http://127.0.0.1/search/search_results.aspx) I now get 0 results for "papal blessing". I do get results for papal and blessing as single word searches but not the phrase.

When I moved the code to the search directory, I had to copy the directories Keyoti_SearchEngine_Web_Common & KeyotiSearchAdministration to the root of my site and put the Keyoti_Search_Index directory inside Keyoti_SearchEngine_Web_Common in order to get the search running. I still needed Keyoti_SearchEngine_Web_Common under the search directory as well. I wish I could have kept all the directories under the search folder.

Anyways, I thought there might be a problem with the index so I indexed www.rcda.org. After waiting 4 hours for the index to be built, the results did not change. I get zero results using 127.0.0.1. I can still see the 55 results when I run the project from within in Visual studio using localhost:52600. I tried searching the index in the Index Management tool and got 25 results.

Any idea?

Mike
Jim
#2 Posted : Thursday, April 30, 2015 5:58:50 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Mike,

Quote:

When I moved the code to the search directory, I had to copy the directories Keyoti_SearchEngine_Web_Common & KeyotiSearchAdministration to the root of my site and put the Keyoti_Search_Index directory inside Keyoti_SearchEngine_Web_Common in order to get the search running. I still needed Keyoti_SearchEngine_Web_Common under the search directory as well. I wish I could have kept all the directories under the search folder.


Just for reference, you can have the folders under the 'search' folder, but you probably need to change the script import to "Keyoti_SearchEngine_Web_Common" instead of "/Keyoti_SearchEngine_Web_Common" - assuming that's what you had before.


Regarding the main question, I posted this in the other thread, but let me post again in case it got missed:

The thing about your code is you are doing this

window.location = 'search_results.aspx?query=' + inForm.query.value;

Couple of things not exactly right, firstly I believe it should be window.location.href =, whether there is any difference or any browser where it wouldn't work, I don't know.

Secondly, and this might have cause what you're seeing, since it's down to how the server handles the request, you really need to encode the inForm.query.value, eg.

window.location.href = 'search_results.aspx?query=' + encodeURIComponent(inForm.query.value);


otherwise your " and spaces are not going to be encoded at all and could be mishandled server side.

Please let me know if that helps

Thanks
Jim
-your feedback is helpful to other users, thank you!


RCDAwebmaster
#3 Posted : Thursday, April 30, 2015 7:38:26 PM
Rank: Advanced Member

Groups: Registered

Joined: 3/31/2015
Posts: 38
Thanks for the assistance. When running the code in IIS I was getting "query=papal+blessing" rather than query=papal%20blessing. That has been corrected and the results now appear as expected.


FWIW:

I tried renaming the folder Keyoti_SearchEngine_Web_Common which resides at the root of the site and get the following error:

Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070003
Config Error Cannot read configuration file
Config File \\?\C:\Users\itweb\Documents\RCDA-new\Keyoti_SearchEngine_Web_Common\web.config

How do I tell the code to look at
127.0.0.1/search/web.config
instead?

also I am using the following include statements:

<script src="Keyoti_SearchEngine_Web_Common/SearchUnit.js"></script>
<link href="Keyoti_SearchEngine_Web_Common/SearchUnit.css" rel="stylesheet" />

which point to the folder under the search directory.
Jim
#4 Posted : Friday, May 1, 2015 12:07:49 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
You're welcome. Btw you shouldn't need to rename Keyoti_SearchEngine_Web_Common, it could just sit inside /Search.

Regarding the web.config error, is there a web.config in that folder? There shouldn't be. Also, is Keyoti_SearchEngine_Web_Common setup as an Application in IIS, it shouldn't be - it should just sit inside your existing IIS application.

-your feedback is helpful to other users, thank you!


Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.