5

I would like to know if there is any difference in querying the taxonomy field by term id vs term label.

When a managed metadata field is crawled, it creates 2 crawled properties -

  1. ows_taxid_fieldname (which is automatically mapped to a managed
    property "owstaxidfieldname" and contains the term id)
  2. ows_fieldname (This contains the term label)

I can either query by owstaxidfieldname like owstaxidfieldname:#guid. But this requires term id. Other way is to use the mapped property of ows_fieldname and query using the term label.

I'm using the advanced search webpart to query on the managed field. Since the end user wouldn't know the Term GUID, I have mapped the text field so that user can search against the term label.

Is there any performance implication in using a term id managed property vs text field?

Robert Lindgren
  • 24,520
  • 12
  • 53
  • 79
Rajesh
  • 51
  • 1
  • 3

1 Answers1

1

This is a matter of opinion, but basically many people who delve deeply into search would tell you to put it against the term label.

But I know some people don't agree. Performance wise, it's a hard one to judge, if you include the value in the index, it's indexed and I don't think that the guids are stored using a hashing algorithm, so it would be a fair game, if anything the labels are shorter so index matching would be a little quicker.

But that part is just thoery on my part.

Source: I did have a great source for this, explaining how to map managed metadata more efficiently and how to better your search results leveraging them. But I can't find it, if I do I will update this post with the information.

Hugh Wood
  • 6,285
  • 1
  • 26
  • 45
  • Thanks Hugh. If you can find that article would be helpful. – Rajesh Oct 29 '12 at 10:57
  • Does using term label require a full crawl of the content? I did an incremental crawl, then I created a managed property and mapped to ows_fieldname(text) crawled property. When I searched using the term label I did not get any results. When I queried using owstaxid field using the term guid, I did get results. I then did a full crawl and searched again using the term label and I got the results this time. Does this mean a full crawl is required after creating of the managed property for the term label? This is a big limitation as the full crawl would take couple of days in production. – Rajesh Oct 29 '12 at 11:16
  • Yes a full crawl would be required, since you need to make a new set of data and you aren't updating existing data. – Hugh Wood Oct 29 '12 at 13:54
  • Thanks again. Is this a limitation with the managed property mapped to term label? Managed properties for term ids i.e. owstaxidfield gets created automatically and works with incremental crawl. – Rajesh Oct 29 '12 at 16:55
  • It's a limitation when adding a new field that needs to be indexed pretty much. New mappings need to be made. The same would happen if you added a new custom field and wanted to index it. – Hugh Wood Oct 29 '12 at 17:28
  • We never do a full crawl in order to be able to create a managed property. I can understand about metadata mapping, but failing to understand why a mapping done against term label requires a full crawl vs incremental crawl for termid. Normally whenever new columns are added, we do an incremental crawl which creates the crawled property which is then mapped to a managed property and used in search. . – Rajesh Oct 30 '12 at 00:20