|
 |
|
|
I used these controls on my site. They worked perfect
After that I extended my site for an extranet zone.
The problem is that the PATH property still returns the original site URL and not the extended site URL. How can I get the extranet site URL in PATH property? Is there any other property which I can use to get the file path.
Urgent help will be highly appreciated.
regards Bilal Ahmad
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I will submit a fix to codeproject later today. You should be able to download the fix a few days after that.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I add my control in master page and I tried to update its properties through sharepoint designer but it did not work. I will really appreciate if you can give some details about that part too.
Thanks Bharat
Bharat Chopra
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Hi Stephen,
Please help me out in solving this problem. I have a problem with hithighlightingsummary. Iam not getting proper description in the hithighlightingsummary. Is there any way that i can make the search term bold in my content without depending on the hithighlightingsummary. Is there any way to do that. i have to display 150 characters which contains search term bold and displays proper content. Or else i need to know form where will we get the hithighlighted summary. Is it from the desription. Can i add my own content to the desciption.
Please let me know.
Thanks a lot
Regards
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Hi Stephen,
I have a problem. Please provide me with some suggestion in that.
Iam trying to create a scope in my Search so that all the contents(.aspx) pages from a specific folder will be crawled and the results will be displayed.
For that i created a scope "XYZ" and created a property rule for that.
I created a "ManagedProperty" with name "FolderName". I mapped it to a crawled property called "ows_name(Text)" from "Sharepoint" category. Checked the check box allow it to be used in scopes. Now in my Property rule i gave "FolderName" = "XYZ". Applied a full crawl.
I gave this because i thought that ows_name(Text) will contain the name of the folder which eill be ther in my Pages document Library.
But the Item Count is 0 in that scope even though the pages in the Folder "XYZ" exist in the Crawl Log.
Any help is very much appreciated.
Thanks!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi,
When iam trying to add a label in the searchresults.ascx file. Code is not getting generated in searchresults.ascx.designer.cs file. If iam trying to modify it manually the changes are getting vanished. Iam not able to understand what is the problem.
Can you plse suggest me the possible solution for the problem.
thanks in Advance
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi ,
I wrote this function to create scopes and calling on the page load of SearchBox.ascx. Am i doing the correct thing. By doing this will i be able to hook up the custom scope or is it required tio activate it thru feature. Iam not able to open my page of site if i include this function in the dll. I dont know what went wrong. Please help me
protected void CreateSearchScopes() {
serverctx = ServerContext.GetContext("SharedServicesDevNew"); searchctx = SearchContext.GetContext(SPContext.Current.Site); Scopes scopes = new Scopes(searchctx); Scope newScope = null;
//Scope Array for Scope Identification string[] ScopeArray = { "Diseases/Conditions", "Services", "Doctors", "News", "Events/Classes", "Healthy Living", "Education", "Research", "Publications" };
//Folder Array for Rules Creation string[] folder = { "disorders", "services", "physicians", "news", "events", "classes", "healthy_living", "education", "research", "publications", "newsletters" }; for (int Scope_Index = 0, Rule_Index = 0; Scope_Index < ScopeArray.Length; Scope_Index++, Rule_Index++) { //Create a New Scope newScope = scopes.AllScopes.Create(ScopeArray[Scope_Index], string.Empty, null, true, "http://dev/Pages/SearchTest.aspx", ScopeCompilationType.AlwaysCompile);
//For The Created Scope Create a New Rule Based on Folder(Rule) Array Data //Check Whether the Index is in the Limit Before Accessing the Array. Otherwise it Asserts. if (Rule_Index < folder.Length) { newScope.Rules.CreateUrlRule(ScopeRuleFilterBehavior.Include, UrlScopeRuleType.Folder, folder[Rule_Index]); }
//If Scope is Events/Classes or Publication we have to add two Rules. if ((Scope_Index == 4) || (Scope_Index == 8)) { //So Increment the Rule Array Index by One //So Folder Array Points to Classes if Scope is Events/Classes or newsletters if Scope is Publications Rule_Index++; //Check Whether the Index is in the Limit Before Accessing the Array. Otherwise it Asserts. if (Rule_Index < folder.Length) { //Access the Next Array Element and Create the Rule newScope.Rules.CreateUrlRule(ScopeRuleFilterBehavior.Include, UrlScopeRuleType.Folder, folder[Rule_Index]); }
}
//It will compile all the scopes and updates them scopes.StartCompilation(); ScopeDisplayGroup group = scopes.GetDisplayGroup( (new Uri(SPContext.Current.Site.Url)), "search dropdown"); group.Add(newScope); group.Update(); } } } }
Regards Paddy
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi Stephen,
Can you provide me sample code to specify scope and the rules if you have any. Because iam not able to get to the exact point. Its not working for me. It would be of gr8 help if u can provide with some code to proceed further. Iam badly in need of it.
Thanks for the help
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Hi Stephen,
I want to capture the click event of the link clicked in order to form the URL based on the link clicked. But since it is not possible to do that with Hyperlink iam using LinkButton. And to navigate to the URL i am using LinkButtonL1.PostBackUrl = "URL";. Will this work fine. Or is there anything wrong in this approach. This is for the pagination part which i have mentioned earlier. Sorry troubling u a lot. But i am badly in need of it.
Thanks in Advance
Paddy
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi,
Thanx regarding scope read the Blog. My requirement is to search for a keyword in a folder and the URL should be %/FolferName/%. I think my search Query should be something like Search where ARTICLE like '%KeyWord% AND URL like '%FOLDERNAME%'. I assume that we have to take URL Scope rule. Can you just comment on my understanding.
One more thing iam not able to make my PictureThumbNailURL work. How can i acheive that.
Thanks
Paddy
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
I see that you are getting an url with your search key in querystring using the utility class, this is fine if i have a keyword search. In my case I have many search parameters(Document column values) that i need to pass along with a keyword and scope. Have you tried this before?
Appreciate your comments.
Thanks.
vee
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
If you have many search parameters, you could use form post to pass information, like what MOSS does with Advanced Search.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Yes, I went through the advancesearchbox dll and they are using the form variables to submit info to coreresults web part.
Thanks for the reply.
vee
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi,
I have different scopes in my DropDownList. Each Scope item in the DropDownList is like a different Page or set of pages in a folder. Each item has a different URL. i.e for Authors URL islike%/Authors/%. Do i need to add any Scope Rules so that the search will be done in that folder. Iam still not clear about the scope. Can you tell me something about this so that i can proceed.
Thanks in Advance
Paddy
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Hi Stephen, Thanks for the Great Article. have you tried doing the Custom Advance search web part?
I'm trying to create a custom advance search web part. This web part has many search criteria and hence i cannot use the out of the box Advanced search box. Wondering if I could have my custom search web part pass search results or search parameters/query to the out of the box Search core results web part. Any thoughts on this?
Appreciate your help.
Thanks
vee
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
i am creating a webpart for custom search using keyword query class.the code below is working but it is searching from entire site collection. I want to restrich my search to a particular document library. For search i need to use Keyword query class only .can any one help.
code:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls;
using Microsoft.SharePoint; using Microsoft.Office.Server; using Microsoft.Office.Server.Search.Query; using Microsoft.Office.Server.Search.Administration;
public partial class SearchCtrl1 : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) {
} protected void Button1_Click(object sender, EventArgs e) { //SPSite site = new SPSite("http://pc00221:7771/SB/default.aspx"); //SPSite site = new SPSite("http://pc00221:7771/Slidebuilder/SB/Forms/AllItems.aspx"); //SPWeb web = site.OpenWeb(); //SPServiceInstance si = site.SearchServiceInstance; //ServerContext context = ServerContext.GetContext(site);//.GetContext("SharedServices1"); ServerContext context = ServerContext.GetContext("SharedServices1"); SearchContext sc = SearchContext.GetContext(context); KeywordQuery qry = new KeywordQuery(context); //qry.ResultTypes = ResultType.RelevantResults; qry.ResultTypes = ResultType.RelevantResults;//.HighConfidenceResults; //qry.EnableStemming = true; qry.QueryText = TextBox1.Text; //"reservation";// TextBox1.Text; ResultTableCollection rtc = qry.Execute(); Label1.Text = rtc.Count.ToString(); Label1.Text += ""; ResultTable rt = rtc[ResultType.RelevantResults];//.RelevantResults]; Label1.Text += "tr " + rt.TotalRows.ToString() + ""; Label1.Text += "rct" + rt.RowCount.ToString() + ""; Label1.Text += "dep" + rt.Depth.ToString() + ""; DataTable tbl = new DataTable(); tbl.Load(rt, LoadOption.OverwriteChanges); GridView1.DataSource = tbl; GridView1.DataBind();
qry.Dispose(); // web.Close(); } }
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi, Can you please explain me in bit detail as to how can i display the URL of my result page along with the description. Can this be used to show all the pages in my site which meet the search criteria. Can the code be modified so that i can obtain pagination as in Goole i.e, 1 2 3 4 Next>> Please answer me as iam finding it bit tough and have to implement search in my project
Thanks in Advance
Paddy
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
In SearchResults.ascx, Eval("Path") gives you the url and Eval("Description") gives you the description.
To show pagination style 1 2 3, you can do some custom coding using the total number of matches, number of matches to show per page and starting record number which are all available in SearchResults.ascx.cs. Or you can bind the ResultTable returned to a GridView and uses the default pagination, I think.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi,
I have registered both the SearchBox and SearchResults user control in my Home.aspx but iam able to c only SearchBox user control and not the Search Results usercontrol. When i tried to debug it the PageLoad event for SearchResults user control is not called and my results are not getting diplayed. Can you just tell me what can be the problem.
Thanks Paddy
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Lets us suppose my project has many web pages in pages folder which contain the term MD. I have entered the MD term in my Seach text box. The URL wich is getting returned is http://moss-dev/Pages/default.aspx?k=MD&s=&start=0 and is getting redirected to that page. but my results are not getting displayed. I want all the pages which contain the term MD to be displayed as results along with the URL.
Paddy
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Try adding debug=true to the url and see if there are any error messages, like http://moss-dev/Pages/default.aspx?k=MD&s=&start=0&debug=true.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |