NEW! Web Part for Wildcard Search in Enterprise Search

Posted Monday, June 9, 2008 8:28 AM by CoreyRoth

I have had countless people tell me that they want to be able to do wildcard search in MOSS Enterprise Search using the existing Search Center site templates.  The Search Center site template uses keyword query syntax which does not support wildcards.  To get wildcards you need to use a full text SQL query.  Until now the only solutions to getting wildcard search was either use Ontolica's Wildcard Search or write your own search page.  Neither option has ever been appealing to me.  Ontolica replaces the entire search center and provides an extra layer of abstraction to your managed properties.  I didn't want to write my own search page because the search center already produces great looking results and it would be a lot of effort to reinvent everything on the search page.  The reason why you would have had to write your own search page is that you could not get access via conventional means to the objects to change the query.

This is why I finally decided to take matters into my own hand.  I really just wanted to just inherit from CoreResultsWebPart, change out the keyword query with a FullTextSqlQuery and call it good.  Anyone who may have looked at this before knows it is not that simple.  The class that does all the work SearchResultsHiddenObject is marked internal.   Right now this seems an impossible task unless you bend the rules a little.  That's right.  I decided I am going to break OO rules and use reflection to get to the properties I needed.  Some people say you should never do this and that its a hack.  I agree to some extent, but when you are programming against an API and the provider of said API doesn't give you the tools you need to do your job, sometimes you have to bend the rules.  Let's face it.  Microsoft should have given us this support out of the box and at the minimum should have allowed us to change the query that the CoreResultsWebPart executes through the API.  They did neither so here we are.

So how does the code work?  Well, CoreResultsWebPart happens to be the one class in all of the Enterprise Search controls that isn't marked sealed.  That is good news.  Through the use of Reflector, I discovered the method I need to inherit from is SetPropertiesOnHiddenObject.  Microsoft was even nice enough to mark this method as virtual for me.  I then got access to the type and then used the base type to get a FieldInfo object for the private field srho (which is the SearchResultsHiddenObject). 

// get the type of the current object

Type coreResultsWebPartType = this.GetType();

 

// get the private field containing the searchResultsHiddenObject

FieldInfo searchResultsHiddenObjectField = coreResultsWebPartType.BaseType.GetField("srho", BindingFlags.NonPublic | BindingFlags.Instance);

Once, I got access to the hidden object, I read the value of the KeywordQuery property to get what the user searched for.  I then had to set this value to null, because I was replacing the keyword query with a FullTextSqlQuery. 

// get the actual internal srho object attached to CoreResultsWebPart

object searchResultsHiddenObject = searchResultsHiddenObjectField.GetValue(this);

 

// get the type of the srho

Type searchResultsHiddenObjecType = searchResultsHiddenObject.GetType();

 

// get the keyword query property

PropertyInfo keywordQueryProperty = searchResultsHiddenObjecType.GetProperty("KeywordQuery", BindingFlags.Instance | BindingFlags.Public);

 

// read what the user searched for

string keywordQuery = (string)keywordQueryProperty.GetValue(searchResultsHiddenObject, null);

 

// set the keywordProperty to null so we can change it to a fullTextQuery

keywordQueryProperty.SetValue(searchResultsHiddenObject, null, null);

It was then just a matter of forming a new SQL query string (check the code on how I did that), and setting some additional fields _IsFullTextQuerySetFromForm and m_bIsKeywordQuery

 

// get the fullTextQuery field

PropertyInfo fullTextQueryProperty = searchResultsHiddenObjecType.GetProperty("FullTextQuery", BindingFlags.Instance | BindingFlags.Public);

 

// create a new query and set it

string fullTextQueryString = GetFullTextQuery(keywordQuery, keywordsAsQuery);

fullTextQueryProperty.SetValue(searchResultsHiddenObject, fullTextQueryString, null);

 

// this field needs to be set to true to use a full text query

FieldInfo fullTextQuerySetField = searchResultsHiddenObjecType.GetField("_IsFullTextQuerySetFromForm", BindingFlags.NonPublic | BindingFlags.Instance);

fullTextQuerySetField.SetValue(searchResultsHiddenObject, true);

 

// tell the srho that it is not a keyword query any more

FieldInfo isKeywordQueryField = searchResultsHiddenObjecType.GetField("m_bIsKeywordQuery", BindingFlags.NonPublic | BindingFlags.Instance);

isKeywordQueryField.SetValue(searchResultsHiddenObject, false);

The code for this is really pretty simple (aside from the reflection).  Had the SearchResultsHiddenObject been marked public, we could have had this functionality over a year ago, but oh well. 

Installation

Installation is relatively simple and instructions are included in a readme file in the document.  A solution package has been provided for ease of installation.  Once the package has been installed activate the Wildcard Search Web Part feature on your site collection.  I went with a site collection feature because the search center site does not have a web part gallery in it.  Now that the feature is activated, go to your results page in your Search Center, edit the page, and add the Wildcard Search Core Results Web Part to the Bottom Zone.  You can then remove the old CoreResultsWebPart.  Also note that this web part requires .NET Framework 3.5 because I used LINQ to XML to parse through the SelectColumns property.

Usage

Once you have the web part installed, you can perform a wildcard search by just adding an asterisk to whatever you type in the search box.  For example app* would return mataches on app, apple, and application.  You can also set the Always Use Wildcard property in the Miscellaneous property settings to always perform a wildcard search.

One thing to note.  Wildcard searches reek havoc on your search relevance.  Where you might be used to having nice clean looking results with your keyword searches, your wildcard searches will look different.  It might not always be obvious why a particular item was returned in the search results.  The best thing to do is try and see if it works for your particular situation.

This type of web part probably could have been sold, but I thought it was more important to give it to the community.  This feature gets asked for by MOSS customers all the time.  Finally there is an easy solution to implementing it.  Since this web part is new, I am sure there are going to be issues with it.  Please, log any issues you run into in installation or in us on the issue tracker of the CodePlex site.  Currently, it only supports simple keyword queries.  I still need to implement support for passing scopes and managed properties, so look for that in an update soon.

You can find the release files at CodePlex.

Corey Roth is a MOSS consultant for Stonebridge.

Comments

# Tooltime

Monday, June 9, 2008 12:04 PM by SharePoint, SharePoint and stuff

Heute geht aber die Post ab im SharePoint Land: da wird zum einen das Podcasting Kit for SharePoint (PKS)

# Tooltime

Monday, June 9, 2008 12:48 PM by Mirrored Blogs

Heute geht aber die Post ab im SharePoint Land: da wird zum einen das Podcasting Kit for SharePoint

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, June 9, 2008 2:00 PM by CoreyRoth

The link didnt come through on some of the RSS feeds, so here it is again.

www.codeplex.com/WildcardSearch

# Bookmarking the web - w24/2008 - double density design

Pingback from  Bookmarking the web - w24/2008 - double density design

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, June 18, 2008 10:17 PM by fromonesource

Does this work with people search?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, June 23, 2008 10:02 AM by CoreyRoth

Ah excellent question about using it with people search.  Right now, the answer is no because people search uses PeopleCoreResultsWebPart instead of CoreResultsWebPart.  This should be relatively easy to implement though.  I'll log a feature for this on CodePlex.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Tuesday, June 24, 2008 9:01 AM by nilang19

Hi gr8 article, it helped me lot.

I am installed your Wild card search on our server. its working like a charm.

however I also deployed Facets Search, it was working with normal search. however with wild card search(codeplex.com/sct). and its giving following error:

Error while executing web part: Microsoft.Office.Server.Search.WebControls.SrhdcGenericException: Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information.

Thanks,

Nilang Shah

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Tuesday, June 24, 2008 1:24 PM by CoreyRoth

I get the feeling that at some point I will have to write a Search Facets web part that is compatible with wildcard search because the way the search facets web part works is that it does its own keyword query to get the list of facets.  Out of the box this poses a problem because even if it did work, it would actually be running a different query than what the WildcardSearchWebPart so the facets would actually be incorrect.  I'll note this as an issue.  Thanks.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Sunday, August 31, 2008 12:06 AM by Tim

Hi Corey,

That is really a magnificent webpart. You've hit the nail on the head as far as missing-functionality in Search. I have 2 comments:

1. I'm using a BDC Scope. Do you have any idea when you might include the Scope functionality?

2. I noticed when I use the wildcard (eg: appl*) the hit highlighting or bolding doesnt appear. It only appears for exact matches.

Great work.

Cheers.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, September 3, 2008 7:44 PM by stevebowers

Hi Corey,

Great webpart.   :-)  I noticed that it does not display the RSS links either on the webpart, or the "Search Action Links" webpart when the wildcard webpart is on the page, even if you select the "Display RSS Link" option in the webpart configuration.   Is this a casualty of using Full Text Query, or am I doing something wrong?

Thanks.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, September 15, 2008 4:12 PM by CoreyRoth

I noticed that I needed to add scope to the query recently myself.  I think I can get that working pretty quickly.   The highlighting definitely doesn't work when using this.  I think it is based off keywords, but I need to confirm by using the builtin advanced search web part.

I hadn't noticed the Search Action Links being missing until you pointed it out.  Let me do some more research and I'll log these items on CodePlex.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Tuesday, September 16, 2008 12:51 PM by CoreyRoth

I have confirmed that when using the Advanced Search web part the RSS links button is not present either.  This tells me that the RSS link only supports keyword queries.  So it looks like this is by design on that web part.  Thanks.

# Recent Links Tagged With "wildcard" - JabberTags

Saturday, January 10, 2009 4:04 PM by Recent Links Tagged With "wildcard" - JabberTags

Pingback from  Recent Links Tagged With "wildcard" - JabberTags

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, February 11, 2009 5:31 AM by kathir

Hi Corey

I am not able to implement the sorting i.e order by in the fulltextquery property. while executing the query, it shows the error query is malformed.

Please help me to resolve this issue on how to use the sorting in this wildcardsearch webpart.

Cheers

Kathir

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Tuesday, February 17, 2009 11:15 AM by CoreyRoth

I believe the reason it does this is because CoreResultsWebPart has functionality to automatically append an ORDER BY clause onto the string based on if the built in web part property is set to relevance or date.  I think it might be possible to work around this, so I am going to log it as a feature to look into.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, February 25, 2009 2:45 PM by thetony01

I installed this as per the readme instructions.  I was able to add the webpart to my search results page, but nothing is ever returned, with or without a wild card search.  I have removed the core results web part as instructed.  I have not removed the paging and high confidence web parts.  Am I missing something?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, February 26, 2009 10:09 AM by thetony01

Please disregard my previous message.  I did not have the 3.5 framework installed and therefore it was not working.  As soon as I installed the 3.5 framework results started to show in the webpart.  I have run into a new issue however.  The quick search seems to work fine, but I am unable to get the advanced search to work.  Do I need to do anything special for that to work?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, March 4, 2009 11:11 AM by CoreyRoth

Yes 3. is definitely required since I use LINQ to XML to query which managed properties you are using.  I'll take a look into the Advanced Search issue.  In the meantime, you can always create another results page for use with your advanced search and use the original CoreResultsWebPart.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, March 26, 2009 1:31 PM by Mathews

Corey

First, Thanks so much by this excellent web part.

In my job, we used MOSS in spanish, and your webpart is working very well.

Only exists one issue:

For the search results by the scope "This site:...." or "This list...", MOSS used the page osssearchresults.aspx (not results.aspx). I custom this page adding your webpart.

The problem is: The webpart don't filter by the scope and the search is made in all the site collection.

The wildcard is working, the problem is only the scope don't working

I edit osssearchresults.aspx in this way:

1) I add the register directive:

<%@ Register TagPrefix="WpNs0" Namespace="DotNetMafia.Office.Server.Search.WildcardSearch" Assembly="DotNetMafia.Office.Server.Search.WildcardSearch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"%>

2) I replace all the ocurrences of "SearchWC:CoreResultsWebPart"

by

"WpNs0:WildcardSearchCoreResultsWebPart"

I missing something?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, March 26, 2009 2:55 PM by Mathews

It's an error:

Step 2) In the page exists two webparts "SearchWC:CoreResultsWebPart".

I replace the ocurrences of "SearchWC:CoreResultsWebPart"

by

"WpNs0:WildcardSearchCoreResultsWebPart"

ONLY in the second webpart.

Corey, I missing something aditional change?

Thanks

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, April 2, 2009 12:33 PM by CoreyRoth

I assume you have the latest version right?  I did make some changes to correct issues around scopes in the last build.  Not sure that you can get this web part to work on the OSSSearchResults.aspx in the way that you are.

# SharePoint Search doesn&#8217;t have Wildcard searching &raquo; novolocus.com

Pingback from  SharePoint Search doesn&#8217;t have Wildcard searching &raquo; novolocus.com

# SharePoint can have Wildcard searching&#8230; &raquo; Andy Burns&#8217; SharePoint Blog

Pingback from  SharePoint can have Wildcard searching&#8230; &raquo; Andy Burns&#8217; SharePoint Blog

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, October 14, 2009 7:50 AM by soumya rao

Hi Corey,

This is an excellent blog. This has been very helpful for us, for one of our requirement.

We have deployed the webpart and its working fine,but the problem we are facing is, we want faceted search also with wild card search. But when wild card is installed, facets dont work.

I have gone through all blogs of yours which say the difference between the two.

Can you please provide a solution for this problem?Do you suggest code modifications?

# Wildcard searches

Thursday, October 15, 2009 7:45 AM by Confluence: SharePoint 2010 Development Wiki

MOSS2007 search functionality is missing a common requirement of a search engine in the wildcard searches. This is commonly raised when the People Search is implemented and End Users wish to search for a person by a few characters of their Title etc.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Tuesday, November 10, 2009 1:58 AM by Mihail Stacanov

Hi Corey,

It is very interesting solution for wildcard search. Thank you for this.

Could you help me to install it on WSS. I've deployed and activated solution for site collection but in WSS there is no Search Center exists. How can I use installed web-part results?

Thanks a lot for advance.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Tuesday, November 10, 2009 7:51 AM by CoreyRoth

I'm afraid you can't use this web part in WSS search.  It was built for MOSS 2007.  However, you can install Search Server Express on top of your WSS install and use it on the Search Center there.  

Thanks,

Corey

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, November 13, 2009 11:21 AM by krasburn

Hi Corey.

First I want to say your job is really useful to me. Second, I have a little problem using this custom . I made a modification to the sql query, I'm using a CONTAINS predicate to find exact phrases in columns of documents. Here is a sample of my code:

if (keywordQuery.StartsWith("\"") && keywordQuery.EndsWith("\""))

               {

                   fullTextQuery.Append("CONTAINS('");

                   fullTextQuery.Append(keywordQuery);

                   fullTextQuery.Append("')");

                   if (Page.Request.QueryString["s"] == "Documentos")

                       fullTextQuery.Append(" AND IsDocument=1");

               }

Until this step there is no problem. My problem start when I try to make a simple query to match an exact phrase, "Microsoft Search Engines" for example. The webpart returns this error "Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information"

Do you have any idea what could be my problem?

Thanks a lot.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Tuesday, November 17, 2009 2:55 AM by Mihail Stacanov

Corey,

Plae help me to install this web-part on Search Server Express age. I can't understand what I need to do.

Thanks for advance

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, November 19, 2009 9:18 AM by DaveSam

I installed following the instructions and the jobs all executed properly, but the feature never shows up on my site and cannot be activated.

I am running WSS and Moss and have only one site collection.  I changed the server name variable to the path of my server (IE:http://servername).

Any thoughts?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, November 19, 2009 9:29 AM by CoreyRoth

If you are not seeing the feature listed under site collection features, I would verify that the package actually installed correctly.  Go to solution management and verify that the .wsp for wildcardsearch did not have an error.  You can also check your features folder in the 12 hive and verify that the WildcardSearch feature folder got deployed.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, February 3, 2010 12:33 AM by Trishia

I have specify the following for 'Fixed Full Text Sql Query' (and everything else as default) but it returns nothing.

SELECT WorkId, Rank, Title, Author, Size, Path, Description, Write, SiteName, CollapsingStatus, HitHighlightedSummary, HitHighlightedProperties, ContentClass, IsDocument, PictureThumbnailURL FROM Scope() WHERE "scope"='Project Status'

However if I specify 'Fixed Keyword Query' for 'Fixed Keyword Query', it returns some records.

Can you please advice why is it so?

contentType:"Project Status"

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, February 3, 2010 12:41 AM by Trishia

Does 'Sort Order' works only when 'Fixed Full Text Sql Query' is specify?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, February 3, 2010 9:24 AM by CoreyRoth

Trishia,

If your query is not returning any results, I would recommend simplifying your query some first and then build it back up a piece at a time to see where something is not working.   Do you have a scope called "Project Status" or are you just trying to query on the content type of that name?

The custom sort order will work in a number of situations.  If you are using a Full Text SQL Query be sure and specify your sort order using the custom property and not directly in the query.  This is due to the way the CoreResultsWebPart assembles the query.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, February 4, 2010 3:09 AM by Trishia

Hi CoreyRoth,

i need to correct myself. I mean if i put the following, it returns some records.

Fixed Keyword Query = contentType:"Project Status"

Can I use custom sort order (Title) for this 'Fixed Keyword Query' without specifying a Full Text SQL Query?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, February 4, 2010 8:58 AM by CoreyRoth

Ok.  I'm actually not sure if it will work with the Fixed Keyword Query or not.  I didn't write any specific code to handle that property, so there is a good chance it won't.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, February 8, 2010 8:22 AM by burial

Great post... WebPrart works great...

Does anyone know a similar solution for PeopleSearch?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, February 15, 2010 11:07 PM by Mehul Jamod

Hi Corey,

We are using this webpart and it's working fine expect some issues..

Now a days my site which using this webpart are creating so many deadlocks in memory and i am not able to find reason. Then after locking a call in Microsoft they are suggesting that this wild card search web part using using core dll using Reflection and that is out of box of sharepoint model so it's creating deadlock.

Is there any way we can achieving same goal without using reflection ?

Regards,

Mehul

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, February 18, 2010 12:24 AM by Trishia

Hi CoreyRoth,

So how should I build my fulltextquery so that I can do sorting by Title for Fixed Keyword Query = contentType:"Project Status"?

Many thanks.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, February 18, 2010 9:06 AM by CoreyRoth

There are some issues involving this approach for People Search.

www.dotnetmafia.com/.../wildcard-search-with-moss-people-search.aspx

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, February 18, 2010 9:08 AM by CoreyRoth

@Trishia - I think you can use what you have and it would be something like...

SELECT WorkId, Rank, Title, Author, Size, Path, Description, Write, SiteName, CollapsingStatus, HitHighlightedSummary, HitHighlightedProperties, ContentClass, IsDocument, PictureThumbnailURL FROM Scope() WHERE ContentType='Project Status'

You would then use the custom sort property of the wildcard search web part to specify a sort order by title.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Saturday, March 20, 2010 11:17 AM by poupreh

Hi Corey, i am trying to  do something very similar and I came accross this excellent post..

I want to do something like this:

..  AND( (scope='myParam1' OR scope='myParam2' ) AND scope='myParam3') AND (publicationdate < 15January) AND publicationDate>30January

so my problem is logical OR and aND betwenn search scopes created in Central Administration and the content publication date.

As for the publication date - does all content has it? Fo example if i add a element to some list .. the query also should take it into consideration.. Administrators won't be inserting publication date of a row in some list.. that would be nonsense, so I have to implement it. Visitors can filter content puting two date boundaries

please advice...

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, March 22, 2010 3:44 PM by poupreh

Corey, in Sharepoint SetPropertiesOnHiddenObject() is obsolete and empty, the srho doesnt exist and the webpart won;t work :(

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, March 22, 2010 3:51 PM by CoreyRoth

@Poupreh - Are you referring to SharePoint 2010?  If so yes, that is the case.  You can now override GetXPathNavigator(), I believe to make use of the SharedQueryManager object to do custom queries.  However, this only supports Keyword Queries.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, March 24, 2010 2:12 PM by poupreh

Hi Corey, GetXPathNavigator resolves the scopes problem but it seems not to support dates comparison.. I wonder if there is any solution in which you could use your own advance query, display results using existing CoreResultsWebpart and paging them using existing PagingWebpart

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, April 15, 2010 6:11 AM by Remsal Fernandes

It works great when you type in your query in the basic search box on the results page that has the WilCardSearch Webpart. But what if I want to enable wild card search for an Advance Search webpart located on another page? Is that possible?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 9, 2010 3:17 AM by Mike Myers

Hi Corey - I'd reeeaaaaallllly appreciate your help ;-)

2 questions:

1. I'm noticing the wildcard is not working at the beginning of the search term.  So if say I type "S29*", I get results, but if I type "*29", I do not get results.  Is there a specific property (or even piece of code) I can modify to rectify this?

2. I have a search scope that is all PDF documents.  Is there a way to make the wildcard  search prioritize  a specific column, in this case the document Title, so that matches on the title are prioritized over matches on the document's content?

Thanks much, and thanks for the great web part!

*Mike*

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 9, 2010 10:29 AM by CoreyRoth

@Remsal Unfortunately, the wildcard search web part doesn't work well with the Advanced Search web part.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 9, 2010 10:31 AM by CoreyRoth

@Mike So unfortunately, SharePoint 2007 doesn't support prefix matching like you are describing.  The only way to get that is to use FAST in SharePoint 2010.

As far as your PDF issue.  I think you could achieve that, but it would require you make some code changes to the Wildcard Search web part to tweak the Full Text SQL Query.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 9, 2010 12:43 PM by Mike Myers

Thanks so much for the response, Corey.   Seems like we'll have to maybe create a new property with part number that excludes the prefix.

As far as the PDF issue, I'm happy to tweak the code in the web part.  ANy suggestions?  I know this is like asking for free consulting, so no worries if you don't have time for this ;-p

very best,

Mike

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 9, 2010 12:47 PM by CoreyRoth

@Mike Get familiar with the Full Text SQL Query syntax.  It shouldn't take long, it's very similar to T-SQL.  Then, you can edit the code of the WildcardSearchWebPart and change the query so that it just searches the Title field.  It shouldn't be too difficult.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 9, 2010 12:57 PM by Mike Myers

THANKS!!!!!!

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 9, 2010 1:42 PM by Mike Myers

Sorry, one more question -- can specific custom managed properties or columns be specified in the Full Text SQL Query?  So I could specify to search, say, only "Title" and "MyCustomProperty"??

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 9, 2010 1:49 PM by CoreyRoth

@Mike Yes that is correct.  You can specify multiple properties using AND/OR and have the query search just those properties.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Sunday, July 11, 2010 3:06 PM by Senthil

Hi Corey, thanks so much for this greate web part & article.

But I am searching same soultion for "People Search"; yes as you said people search uses PeopleCoreResultsWebPart instead of CoreResultsWebPart.  

And as you said earlier, have you released this feature for People Search at Codeplex? if not, can you please let me know what would be the relatively easy to implement?

once again, thanks for the great web part & article.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, July 12, 2010 10:39 AM by CoreyRoth

@Senthil Unfortunately, People Search can't be inherited and so there is no clear way to implement it in 2007.  There may be some hope for 2010, but that is yet to be determined.

# Wildcard no SharePoint &#8211; Se voc?? ainda n??o precisou, um dia vai precisar. &laquo; Blog ValeLigado

Pingback from  Wildcard no SharePoint &#8211; Se voc?? ainda n??o precisou, um dia vai precisar. &laquo;  Blog ValeLigado

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, August 25, 2010 1:35 PM by TomVr

Like some commented before it's not possible to extend the PeopleCoreResultsWebPart instead of the CoreResultsWebPart because it's sealed but i have made some adjustments by reverse engineering some of the PeopleCoreResultsWebPart functionality's so if you're looking for specific People WildCard Search webpart check out my post at www.moss2007.be/.../MOSS%202007%20People%20wildcard%20search%20webpart%20and%20refine%20your%20results..aspx

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, September 27, 2010 12:38 AM by Ahmed

would you please post a step by step instruction on how to use it to search a specific document library with custom columns ? i installed it ,activated the feature ,created a scope ,added the webpart to the page ,then ,it doesn't show anything ,not even a search box,what am i missing?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, November 4, 2010 8:07 AM by Andy

I have the same problem as DaveSam's comments that the solutions shows up in central admin, but does not show up as a feature on my site collection.  I read your post and the solution is not showing in my features folder in the 12 hive....what can I do?

# Wildcard no SharePoint ??? Se voc?? ainda n??o precisou, um dia vai precisar. | ValeLigado

Pingback from  Wildcard no SharePoint ??? Se voc?? ainda n??o precisou, um dia vai precisar. | ValeLigado

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, January 14, 2011 5:30 AM by Riccardo

Thank you. Great work.

# Search Results Hidden Object | My Insights

Wednesday, April 13, 2011 8:55 PM by Search Results Hidden Object | My Insights

Pingback from  Search Results Hidden Object | My Insights

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 1, 2011 9:19 AM by Ankit Singhal

i have .net 3.5 sp1 installed on the server. The deployment of the wsp file is successful. But when I add the web part to a page, I get this error message:

Could not load file or assembly "DotNetMafia.Office.Server.Search.WildcardSearch, Version= 1.0.0.0, Culture=neutral" or one of its dependencies. Access is denied.

Please help...

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 1, 2011 9:39 AM by CoreyRoth

@Ankit Confirm that the assembly actually got deployed to the bin folder of your web application.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Monday, July 4, 2011 7:13 AM by Ankit Singhal

Hi Corey,

Thank you for answering. The dll exists in the bin folder of web application but there is no reference to it in Assembly.

Could this be the issue?

Please help...

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, July 8, 2011 4:22 PM by CoreyRoth

@Ankit Hmmm, go into your solutions gallery in Central Administration and see if there were any issues deploying the .wsp file.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Tuesday, July 12, 2011 4:53 AM by Ankit Singhal

Hi Cory, thank you for answering but there were no issues in deploying the .wsp file. I have retracted and redeployed it, but no use...

Please help...

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, July 13, 2011 4:59 AM by Ankit Singhal

Hi Corey, I deployed it on other farm and it worked like a charm. Thank you for sharing such a wonderful web part.

Could you provide more information about Full Text search enable/disable option?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, July 20, 2011 5:11 PM by CoreyRoth

@Ankit Excellent.  The basic premise there is that it will force the query to only look at the title field when querying.  I see this functionality asked for from time to time in the forums so I thought it would be good to add.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, August 26, 2011 2:20 AM by Ankit Singhal

Adding the webpart to a page from a client machine throws the error.

Works like a charm when I add the web part to the page from the server box.

Great work ! Thanks for sharing !

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, September 28, 2011 9:11 PM by Neeraj Sapra

Great Post.

This method returns null for me and i am not getting  any value for searchResultsHiddenObjectField

FieldInfo searchResultsHiddenObjectField = coreResultsWebPartType.BaseType.GetField("srho", BindingFlags.NonPublic | BindingFlags.Instance);

Do i need to use some other string instead of "srho"???

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, September 29, 2011 8:42 AM by CoreyRoth

@Neeraj is this with SharePoint 2007?  srho is what the field is called internally.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Friday, September 30, 2011 9:38 AM by Neeraj Sapra

No Corey.I am using SharePoint 2010 standard environment.Even I have used this query:

object queryObject = HttpContext.Current.Items["WSSSRHDC_0"];

Type valType = queryObject.GetType();

but I didn't find any value for query object.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Saturday, October 1, 2011 12:32 PM by CoreyRoth

This web part only works in SharePoint 2007.  For SharePoint 2010, see this web part instead.

wildcardsearch2010.codeplex.com

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, October 6, 2011 3:34 PM by Neeraj Sapra

Thanks Corey.I am trying to do the multilingual metadata search by extending the core result web part.

The GetXPathNavigator method solves my purpose.

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Thursday, November 10, 2011 10:00 AM by Todd Bethel

We tested this mostly for the ability to sort search results, and that worked well.  However, we found that it doesn't work with searches on managed property values, which is essential for us.  I see on CodePlex that this issue has been discussed before; is there a fix for this?

# re: NEW! Web Part for Wildcard Search in Enterprise Search

Wednesday, December 7, 2011 8:33 PM by CoreyRoth

@Todd I'm afraid there has not been an update. I suspect it could be possible but haven't had the time to update the code to produce the right query I am afraid.

# MOSS 2007 People wildcard search webpart and refine your results. | Tom Van Rousselt&#039;s Blog

Pingback from  MOSS 2007 People wildcard search webpart and refine your results. | Tom Van Rousselt&#039;s Blog

# NothingButSharePoint.com

Friday, December 5, 2014 9:26 PM by NothingButSharePoint.com

Pingback from  NothingButSharePoint.com

Thanks for sharing your feedback! If your feedback doesn't appear right away, please be patient as it may take a few minutes to publish - or longer if the blogger is moderating comments.

Leave a Comment

(required) 
(required) 
(optional)
(required)