Custom Sharepoint 2007 search and it's results - c#

Sorry if I will ask the question that already exists or just has easy solution, i'm just a new comer to Sharepoint.
The question relates to Sharepoint 2007 search engine.
I have a few crawled properties and correspond managed properties. I need to crawling all these properties, but without one property!
I have own xsl and I use own presentation of search results, but it so similar to native SP presentation. And there i use "Description" SP property (isn't mine), which show me all my properties (it's values), and it's ok, but i need to exclude only one property from the "Description" property in the search results.
Could you give me explanation of how to do this by the code (.NET) or maybe good advices and references?
Thanks in advance!

I already found out the solution. In the SP UI we can uncheck "Include values for this property in the search index" checkbox of crawl properties. And these properties will removed from search results in SP "Description" property. And it isn't hard to found out the way how to do this programmatically.
Thanks to all anyway.

Related

C# Get excel macros name

How to get list of macros names that's displayed in tab "Developer" by button "macros"? I found some solution (https://social.msdn.microsoft.com/Forums/vstudio/en-US/ef1de29a-81c7-424a-b7ab-f85286a1d8de/how-to-retrieve-a-list-of-macros-in-an-excel-workbook?forum=vsto), but it's work with button "Visual basic" in same tab. Maybe we can extract macros names from there?
"Maybe we can extract macros names from there?"
Obviously no, you can't.
And the answer in your link already said this "As far as I know, there is no a property which can be used to get the names of macros.".
So there is no built-in way to extract them.
The only way I can imagine is parsing all the code and looking for Function and Sub to collect their names. But this can be cumbersome.
Maybe studying the source code of the Rubberduck AddIn at GitHub can help. I know that such a parsing is implemented there (in C# aswell) as they need it to generate a list of functions/procedures too, so maybe this can help you getting an idea how to implement this.

Sitecore lucene search/ field boosting

I'm trying to do a global search on the website (I'm using Sitecore 8.1) using Lucene and field boosting. The idea is that I want to search in the content that is on the pages, and not all the pages have the same template. So I cannot know what fields I should be searching for to see if those contain the content I'm looking for.
Here I also want to integrate the field boosting, for which I haven't found yet any example.
Does anyone know if the way I'm trying to do it it is a good idea, and point me into some direction?
Whan I'm trying to find out is how I should create my query and how to access the field boosting to sort my results?
You can boost the importance of specific fields.
For example, you may want to boost the value of specific fields, such as title or abstract.Set the boost attribute of the relevant /configuration/sitecore/contentSearch/configuration/DefaultIndexConfiguration/fieldMap/fieldNames/fieldName
element in the Web.config file, typically specified in the /App_Config/Include/Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config
Web.config include file. All indexes share this configuration by default.
And also you can boost field inside content editor on Indexing Section.
Field boosting applies at indexing time
More information you can find here:
http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2013/04/sitecore-7-six-types-of-search-boosting.aspx
After you set the boost value and are indexing your content use Luke to check the rank are your fields. My suggestion is to not use boost on fields because are not really relevant for the end user if the text they are searching is on Title or Abstract field.

DNN How to create a complex module with multiple controls

My goal are to create a module that holds a listview with entries of xml files. The xml files are just serialized arrays of some object. Country{Code,Name,URL} as an example.
When an entry is clicked another control should show all the items in some kind of item control with styling based on the type(The idea are from WPF). I assume its possible to create some kind of style/rules for possible item types, in above case Country. (any ideas/advises on how to achieve this is welcome).
Now in the list of styled items, one should be able to select wanted items, and export this to a new XML file based on a new type SelectedContries{Code,Name,Url, Params}. The user will then need to add in the extra params in the new list and export(serialize).
My question is now, to do such module what would be the proper way. One module with 3 controls. I am new to module development so please explain deeply. Do i create Asxc files within the module as my controls?
Based on my explained goal above, any links to guides that might be good for exactly this would be nice and any general advises are also welcome. Thanks.
if I got you right, that you want to have a grid on your module showing all your country entries read out from a xml file.
The user can edit or add some detail information to those entries and export (serialize) it again into xml.
I would use the implemented Telerik Grid RadGrid (DNN wrapper is called "dnnGrid") to show all xml items in a grid on your module.
Then I would enhance the grid for your special needs adding some new columns or edit the existing (dont know exactly what you want to edit in this grid).
The last step is to serialize the entries again this should be done with a extra button calling the serialize method.
These are rly basic ideas from me. Iam a dnn module developer I think I could help you better if you explain it to me a lil detailed, show me a bit of the xml file and so on.
best regards, noone

Windows Desktop Search not returning QueryFocusedSummary

When searching through files indexed using Windows Desktop Search,
it would be nice if I could see a snippet of the text within the
document that is related to the search text. However when I try to
retrieve "System.Search.QueryFocusedSummary" or
"System.Search.QueryFocusedSummaryWithFallback " I get a
"column name not found" error.
(The code that I am using to query this is shown in this question:
Microsoft Desktop Search - CONTAINS not returning results on windows server 2008 )
This is confusing because when you do a search within explorer,
you get the snippet of text in your results. So it's possible somehow.
According to this documentation http://msdn.microsoft.com/en-us/library/windows/desktop/bb760171%28v=vs.85%29.aspx
it should be retrievable, the same that AutoSummary is.
This question has already been asked on MSDN here:
http://social.msdn.microsoft.com/Forums/en-US/windowsdesktopsearchdevelopment/thread/dcfb40ea-b250-4294-80d0-727c7365745e/
but I'm hoping that the clever stackoverflow people can help me.
As a side note, I'm quite confused as to why this doesn't work, don't lots of
people need to index and search documents? Does everyone use Lucene and/or Solr
or Windows Search Server instead?
A colleague of mine ran into this problem recently. QueryFocusedSummary and QueryFocusedSummaryWithFallback are indeed not accessible via OLEDB. They are, however, accessible via Shell.
In the Windows SDK, there is a sample, $WIN_SDK/Samples/winui/shell/appplatform/ExplorerBrowserSearch, which will get you set up on using Shell functions to perform a search. From here, it should be trivial to add support for QueryFocusedSummary and QueryFocusedSummaryWithFallback via the Shell Property Keys PKEY_Search_QueryFocusedSummary and PKEY_Search_QueryFocusedSummaryWithFallback respectively.
Since you didn't post any code I have to speculate a bit...
I assume you are using OleDB/SQL to execute a query...
Neither QueryFocusedSummary nor QueryFocusedSummaryWithFallback are real columns and thus NOT available via OleDB/SQL !
The only columns available this way are AFAIK
AutoSummary
Contents
EntryID
GatherTime
Rank
Store
QueryFocusedSummary and QueryFocusedSummaryWithFallback are IIRC properties accessiable via COM or a Shell interface .

Sharepoint: Removing description text from search result for just one library

I need to be able to remove the description text within search results which displays a portion of an indexed document, however I only want this to affect a single library's documents (or sub-site). Is it possible to localize something like this in such a way? Through XSLT, or the sp object model, or custom trimming or anything.. maybe somehow intercept the index query results, strip out the relevant text, then pass it along.
One idea that almost worked was to wrap the srch-description div in the core web part's XSLT in an if statement that checks if the item's url contains my library's name, however this xslt change would have to go into any site that searches on my library and that's not possible. I wonder if there's anything more I can do to remove srch-description or decouple it from my items..
Disclaimer: this is a suggestion - I have not tried this!
I suggest populating (and if necessary creating) a Description field in your document library. This field might contain some innocuous description text. Next, create a new SharePoint search content source pointing to the document library. Map the metadata crawled properties (Description -> ows_Description) and check the "Include values for this property in the search index" checkbox. You may also need to add a crawl rule to the original source to exclude your "special" document library.

Categories