Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Simple question really how can I restrict the SharePoint search to only search against one field for a content type.

I can create a scope for the content type but how do I go about restricting the search to just the one particular field?

Thanks

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

The search crawler will INDEX the entire document as well as the managed properties you have specified. I don't think that it is possible to limit the indexing process to just one managed property. However, you can customize the form/page used for search input to only allow for one managed property to be searched. Start with the Advanced Search page and remove everything you don't want the users to see.

share|improve this answer
add comment

you can set the ContentType managed property to be allowed in search scopes:

SSP > Search administration > Managed Properties

find ContentTypes managed property > Edit/map property

check "Allow this property to be used in scopes".

Now you can create a new scope

SSP > Search settings > scopes

When adding rules to the scope, select Property Query and add ContentTypes as property restriction. The value should be the content type you want to restrict the scope for.

Update scopes and add your new property to scope dropdown in your site settings, or add a new search tab (OBS: it might take a while before the new scope shows up in View Scopes in site settings).

hth Anders Rask

share|improve this answer
    
Hi, thanks for the reply but I have already done this, I can easily restrict my scope to content type my question is how can I then further restrict search to only index the data held in one particular field in the content type. –  Anonymous Jan 8 '10 at 10:04
    
ah my bad! didnt read that question too well did i? :-) Ok ill need my box to tinker with that, so ill get back to you tomorrow –  Anders Rask Jan 9 '10 at 11:35
    
re-reading your question im getting a bit confused: isnt filtering on just one field, just to add that field as a new managed property? or do you mean adding that particular site column only when it is used in conjunction with a specific content type? The first is straight forward, the second would take using the above mentioned ContentType managed property and the site column in question together in an AND query (so that both the CT should be MyCT AND the field value of MySC is MySCValue). Does that make sense? –  Anders Rask Jan 10 '10 at 22:49
    
Thanks for that I kinda fingured I would have to filter the search query on a managed property, the field in question is a lookup field and the indexer doesn't seem to be picking it up, but thats probably another issue. I really wanted to control the indexer to only index particular fields within a content type, but that doesn't seem possible. –  Anonymous Jan 11 '10 at 10:37
    
You made my day Anders! mvh :) –  Falak Mahmood Sep 7 '11 at 13:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.