Can you add a Yes/No value to a scope rule
-
15 Mei 2009 20:39I have a managed property tied to a Yes/No field in my site. When I try to add a rule to my search scope "MyProp" = True (also tried, 1, yes, etc) it yields an error as if it doesn't like the format. How can you add a yes/no value to a scope?
Thanks,
-Alan
Semua Balasan
-
15 Mei 2009 21:03Yes you can, if you have Yes/No as a choice field and crawled property as ows_youryesnofield mapped to your managed property. In that case you can set the scope rule "YourManagedProperty = Yes".
It works for me.
Hope it Helps -
18 Mei 2009 13:42Thank you, but that is not successful for me. Sorry, let me emplain myself better. I can create the rule without error, but under the item count the value yields "error". Check out my blog page for screenshots: http://alanlambkin.blogspot.com/2009/05/scope-rule-error-for-yesno-value.html
I am running MOSS up to the Infra Update, SP2 deployment for us is planned for next month.
Thank you!
-Alan -
20 Mei 2009 3:51Check this out :
http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/e5148c42-3413-4ef0-a9d0-416983370cf7
Similar problem -
20 Mei 2009 11:20Sorry if this is really obvious, but have you done a full crawl since you created the managed property?
-
20 Mei 2009 13:02I had the same issue but when I got the "error" my entire search broke. I had to reconnect the Indexer and then reset all crawled content. My solution - create a calculated field that equals whatever the yes/no field equals. If Yes then it will be "Yes". Add that field as the managed property. Remember to do a full crawl after creating the new properties.
My issue: the number of items contained in my new managed properties is zero. The crawled properties however have sample documents. Perhaps I just need to wait a while and be patient. -
20 Mei 2009 13:32Yes/No fields store data as 1 and 0. What data type did you specify the field as?
John
SharePoint911: SharePoint Consulting
Blog: http://www.rossonmoss.com
Twitter: JohnRossJr
MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007 -
20 Mei 2009 15:01I specified it as a Yes No field.
In the scopes property query, I get an error whether I use Yes or 1. -
20 Mei 2009 15:09
Personally, I don't like Yes/No fields. Have written blog posts on the subject. I prefer to use Choice fields with values as Yes and No. Works exactly as expected and has never given any issues.
John
SharePoint911: SharePoint Consulting
Blog: http://www.rossonmoss.com
Twitter: JohnRossJr
MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007 -
20 Mei 2009 15:14I have to agree with that!
Unfortunately, if you in the situation where you have lots of data already, I found that the simplest solution is just to create a calculated field as a text field that wil be based on the yes/no field. Interestingly, the text is stored as Yes. Or, that's what it seem to be in the do library. Still can't get the search scopes working though. In fact, my search scopes page now after so much fiddling gives me the error "Your search encountered an error. If the problem persists, contact the portal site administrator."
Thats all my page shows - no scopes are showing at all.
Streesssss -
20 Mei 2009 16:51Ok, this works...
Use the calculated field and have it set to your nasty yes/no field.
Make sure its a site column.
Do a full crawl. Create a managed property and map to the crawled property.
Now, in your scopes add a property query so that your Managed Property = boolean;#1 for True and boolean;#0 for False.
I was using Yes and that didnt work.- Disarankan sebagai Jawaban oleh stevemagid 20 Mei 2009 17:00
- Saran Jawaban dibatalkan oleh Mike Walsh FIN 20 Mei 2009 17:42
-
13 Januari 2010 22:11There is a KB article about this.
You cannot create query restrictions on Boolean-managed properties that have Yes/No restrictions or that have True/False restrictions in SharePoint sites
http://support.microsoft.com/default.aspx/kb/972046 -
31 Maret 2011 14:57
Hi
To anyone having trouble with this with a sql-like advanced query, I ended up having to use:
where MyProperty like ‘1′
for yes\no columns - having had all of:
where MyProperty = true
where MyProperty = 1
where MyProperty = Yes
were MyProperty = 'true'
where MyProperty = '1'
where MyProperty = 'Yes'
either error or return nothing
Maybe it would work for a scope too?
-
16 Februari 2012 14:20
Just in case anyone lands on this page and doesn't realize that this forum is for pre 2010 (see top), this does not seem to be an issue in SharePoint 2010 Search. I was able to create a scope against a managed property that is set to Yes/No. I just set the scope property to equal 1--if you set it to true, SP will change it to 1 anyways. If the results still don't come up, give it time and make sure to run a full crawl.
-Mario