Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to use SearchHelper
BenGreene
#1 Posted : Friday, July 22, 2011 1:06:45 AM(UTC)
Rank: Member
Groups: Registered

Joined: 5/24/2011(UTC)
Posts: 21
Location: Melbourne, Australia
I've started looking at the new search functionality for our site, but I can't get it to work. I'm using this code in a view:

Code:
var currentRepository = Kooboo.CMS.Content.Models.Repository.Current;
var results = Kooboo.CMS.Search.SearchHelper.Search(currentRepository, "INTERSECTION", 0, 15, new String[] { "Software~INTERSECTION" });


Software/Intersection is the path to a folder which has items which contain the search term, and both the parent folder (Software) and Intersection folder have been added in Search Settings.

Am I using SearchHelper in the wrong way, or is there some other problem with my configuration?
I'm using the latest release from codeplex, but I have been through a lot of upgrade versions during development.

Thanks

Edit:
I looked at the sample site and got a bit closer. I added some content in the parent directory (Software) and changed my code to simplify it a bit:

Code:
var results = Repository.Current.Search("intersection", 1, 15);


I get the result from Software fine, but I'm still not getting anything from the child folder.
jifeng
#2 Posted : Tuesday, July 26, 2011 3:58:18 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
HI BenGreene

Yes, the content in the full text index have not include the relation contents, categories and child contents.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
BenGreene
#3 Posted : Tuesday, July 26, 2011 5:59:28 AM(UTC)
Rank: Member
Groups: Registered

Joined: 5/24/2011(UTC)
Posts: 21
Location: Melbourne, Australia
Is it possible to search these subfolders? As it's possible to add them to the Search Settings page I assumed that they were searchable but the search settings doesn't seem to control what is searchable.

Thanks for your help
jifeng
#4 Posted : Tuesday, July 26, 2011 6:41:04 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
It is very complicated to include the relations contents into a content index. Because the relation contents have any changed, have to trigger the main content update its index. It is too heavy work to do. Anyway, the requirement is reasonable, we will think of it.

The html content in the page, will improve it.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
1 user thanked jifeng for this useful post.
BenGreene on 7/26/2011(UTC)
BenGreene
#5 Posted : Wednesday, July 27, 2011 12:08:37 AM(UTC)
Rank: Member
Groups: Registered

Joined: 5/24/2011(UTC)
Posts: 21
Location: Melbourne, Australia
I just stepped through the search code using Reflector to try to see how it works, and realized that content items are only added to the index on creation if the rule for them already exists in Search Settings.

It all seems to be working for me now. Thanks.
Users browsing this topic
Guest
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.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.071 seconds.