SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to change the way refinement query URLs are built so that they use "contains" operation (":") rather than "equals" ("=")?


a) Document A - tagged with Sector = Retail

b) Document B - tagged with Sector = Retail and Energy

c) A search refinement exists for the Sector property.

When I clicking on "Sector : Retail" refinement only Document A is displayed. Document B won't show.


When refining my search results by "Sector: Retail" I would expect all items tagged with "Retail" to show up. Not only items tagged with "Sector: Retail" but also tagged with more than one sector (e.g. "Sector : Retail; Energy, Construction")


By default when clicking on a search refinement the page is reloaded with a new url that uses an "equals" operation ("=") rather than "contains" (":")

E.g. clicking on a "Sectors: Retail" refinement:

Encoded URL: /Search/Pages/results.aspx?r=sectors%3D%22Retail%22

Decoded URL: /Search/Pages/results.aspx?k=report&r=sectors="Retail"

This will display items that have the "Sectors" field set to "Retail" only.

However, items that have the "Sectors" field set to more than one option (e.g. "Retail" and "Energy") will not be displayed.


If I change the URL to use a "contains" operator (":") all items that are tagged with Retail (or Retail and another sector) are displayed fine.

e.g. /Search/Pages/results.aspx?k=report&r=sectors:"Retail"

Is there any way to change the way refinement query URLs are built so that they use "contains" instead of "equals"?

Related info:

share|improve this question

I can't see a way of doing that with the out-of-box functionality. However, you could write your own refinement filter generator. Essentially, it's about subclassing RefinementFilterGenerator

share|improve this answer

Or you can make your custom XSL Transformation. Go to Edit mode in Search-Results Page, edit Refinement panel open "XSL-Editor ..."

then there must be a part when the URLs a printed (usually with the css class: ms-searchref-filterLink. You could parse the URL parameter there and change the Link as needed. But you have to know XSL to do this propper, which is not my strength.

share|improve this answer

Yes, it is possible, with a custom refiner implementation.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.