Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Search Scope Exclude

  Asked By: Katlyn    Date: Oct 04    Category: Sharepoint    Views: 3709

I am trying to create a scope which excludes items which meet both
condition A and condition B.

Anyone has done similar thing before?



13 Answers Found

Answer #1    Answered By: Josie Barron     Answered On: Oct 04

What I want to do is:

If the content's content type is A, and its metadata field B is set to
certain value, then the search  scope should exclude  it.

I can not figure out how to implement this.

Answer #2    Answered By: Tamika Cummings     Answered On: Oct 04

Just make sure metadata (managed property) B is checked for "Allow the
property to be used in scope". You can then create  or update any scopes
with the new rule that exclude  any results where B = XXX (select
"Property Query" and check "Exclude"). After scope(s) is updated, the
search result should pick up the new rule.

Answer #3    Answered By: Linsey Bauer     Answered On: Oct 04

I do not want to exclude  the content unless it
matches both criteria.

1. its content type is A
2. metadata field B = XXX

It seems the scope  rules can not contain complex rules like above

Answer #4    Answered By: Ivy Salinas     Answered On: Oct 04

OK, sorry I misunderstood your points. I guess you are right since scope
rule only allows one condition, you can't create  a rule to exclude  items
match both conditions A and B.

A possible tricky way might be to define a calculated column and you can
concatenate the values of column A and B. Make this column a managed
property (I assume it will become a crawled property) and allow it to be
used in scope. I guess now you can create a rule to exclude items  when
the value for this new managed property is XXXYYY (A=XXX & B=YYY). I
just do not recall how you can trigger to populate all existing items
with new calculated columns. Do you?

Answer #5    Answered By: Kevin Davis     Answered On: Oct 04

I have never thought about utilizing calculated field, which
might be helpful. I will give it a try and see if it could have solved
the problem.

Answer #6    Answered By: Meenakshi Khochar     Answered On: Oct 04

if the content types are setup correctly, meaning that each
metadata field on each content type is uniquely named, the setting an
exclusion rule for metadata B=XXXX should be easy to do within the
scope. If you're using the same metadata field names across multiple
content types, then I would question the quality of your information

Answer #7    Answered By: Latrice Henson     Answered On: Oct 04

Setup an additional rule on the scope  to exclude  the managed property if
the property's value is set to X.

Create the managed property by grouping the specific metadata property
in the managed properties section. Be sure that the managed property is
set to be included in scopes (checkbox at the bottom of the page).

Answer #8    Answered By: Nidhi Tiwary     Answered On: Oct 04

It should be doable. What's your specific question?

Answer #9    Answered By: Beatrice Serrano     Answered On: Oct 04

I have a document library which stores a content type (A), and it has a
metadata field B. However this field is not exclusively for A, another
document library has content type (C) and it also contains metadata
field B.

What I want to do is to remove the content whose content type is A and
metadata field B is set to certain value.

If I use the scope  rules, and exclude  content type = A and exclude field
B = Certain Value, it seems it will remove the all contents in my
document library, plus content type C whose field B has been set to
Certain Value. What I need is to have a brace ( ) to have the two rules
into one combined rule and only exclude the joint set.

Any suggestions?

Answer #10    Answered By: Maya Lewis     Answered On: Oct 04

Perhaps I'm not understanding something, but how can you discriminate
between documents when their metadata fields are named the same thing?
Understanding that CT inheritance will produce this multiple naming of
content types with the same metadata fields, I'm assuming that the
discriminatory metadata field is not inherited and is unique to that
individual content type. Even if it is used across multiple document
libraries, it would seem to me that the problem lies in using the same
metadata field name across multiple content types when only one content
type is needs the exclusion in the result set.

Answer #11    Answered By: Paola Mcmahon     Answered On: Oct 04

I will try to explain my case thoroughly

I have a document library A which contains one document type, it is
called Native Document. There is one field is called Region
(multi-select), and another field is called Show PDF (yes or no field)

We have a third party utility, which can convert Office document from
document library A to PDF document and store them into document library
B. All metadata fields/value are copied over.

I want to create  a scope, which only contain document whose region is
set to X and { [whose "Show PDF" is checked, document is in document
library B] or [Whose "Show PDF" is not checked, document is in document
library A] }

For example,

Document Library A {

Document name Region Show PDF

Document 1 X Yes

Document 2 X No

Document 3 Y Yes


Document Library B {

Document name Region Show PDF

Document 1" X Yes

Document 2" X No

Document 3" Y Yes


The scope  should only contain Document 2 and Document 1" after the rules
are applied.

One solution might be create a dedicated document library for documents
which are not required to convert to PDF, however the requirement may
change very often, for example, one document may not be required to
convert to PDF, but next day it may. Moving a document between document
libraries is messy especially when we want to keep the complete history
of the documents.

What do you think of this problem?

Answer #12    Answered By: Justin Mckee     Answered On: Oct 04

I would either custom code the solution or I would try to find a
different set of metadata for the PDFs. Bottom line: you can't
discriminate between documents when they use the same metadata. It's
like saying: show me documents 1-3 but not 4-6 based on the same value
for the same metadata field.

Answer #13    Answered By: Jared Bell     Answered On: Oct 04

We will consider custom code the solution.

Didn't find what you were looking for? Find more on Search Scope Exclude Or get search suggestion and latest updates.