Indexes the ID(s) of the term(s) in the FieldName field, for each crawled item. Search automatically creates indexed properties that correspond to managed metadata fields that facilitate querying search for items that are tagged with specific managed metadata values, as detailed in Table 1. By passing true to the bool includeDescendants parameter to TaxonomyField.GetWssIdsOfKeywordTerm, you get the lookup IDs for the term with the specified GUID, and you get the IDs for all its child terms. A common task is to build a query that gets items that are tagged with a specified term or any of that term’s descendent terms. You can build queries that include lookup IDs for multiple terms. Below is a Collaborative Application Markup Language (CAML) query that queries for items in a list that have lookup ID 14 and lookup ID 15 in the field ItemType. After you find the lookup IDs for a term, you can combine the IDs in an IN clause in a Collaborative Application Markup Language (CAML) query to query for items tagged with that term. In certain scenarios, a single term may have multiple lookup IDs for the same site collecton for example, a merged term has one lookup ID for each term that was used in the site collection and later merged into the single term. Or, you can use the GetWssIdsOfKeywordTerm() method if the term is a keyword (if the term’s IsKeyword property is set to true). To get the lookup ID for a term, you can use the GetWssIdsOfKeywordTerm() method. Lookup IDs are site collection–specific a specified term has a different lookup ID for every site collection where that term is used. When writing a Collaborative Application Markup Language (CAML) query to return items from an SPList object that are tagged with a specific value in a managed metadata column, you must specify the lookup ID of the term that you want to match. SharePoint Server 2010 supports returning scoped metadata values or unscoped metadata values from the TermStore database, regardless of whether you are writing a Collaborative Application Markup Language (CAML) query and using an API (such as the SPQuery object) to get items from a specific list, or using an API (such as Query) to execute search queries. In Microsoft SharePoint Server 2010, you must be careful when constructing queries that are designed to return results that represent items that were tagged with values in a managed metadata column.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |