Q:

Multiple, Relative "Path:" in SharePoint 2013 CSWPs

In pre-launch preparation phases; am attempting to convert CSWP "page rollup" queries from absolute paths on our staging site to relative paths, so that when we cutover we don't have to update all the CSWPs.  It's working fine when I provide a single relative path, but when I provide multiple relative paths, well... it's not working as (I, at least,) expect.
Test 01 --- path:http://www-staging.example.com/path1/patha --- returns correct single target
Test 02 --- path:http://www-staging.example.com/path2/pathb --- returns correct single target
Test 03 --- path:http://www-staging.example.com/path1/patha OR path:http://www-staging.example.com/path2/pathb --- returns both correct targets
Test 04 --- path:{SiteCollection.URL}path1/patha/ --- returns correct single target
Test 05 --- path:{SiteCollection.URL}path2/pathb/ --- returns correct single target
Test 06 --- path:{Site.URL}path1/patha/ --- returns correct single target
Test 07 --- path:{Site.URL}path2/pathb/ --- returns correct single target
The following all return the second correct target and two seemingly random views from the Pages Library?
Test 08 --- path:{SiteCollection.URL}path1/patha OR path:{SiteCollection.URL}path2/pathb
Test 09 --- path:{SiteCollection.URL}path1/patha/ OR path:{SiteCollection.URL}path2/pathb/
Test 10 --- path:{SiteCollection.URL}/path1/patha/ OR path:{SiteCollection.URL}/path2/pathb/
Test 11 --- path:{SiteCollection.URL}/path1/patha OR path:{SiteCollection.URL}/path2/pathb
Test 12 --- path:{SiteCollection}path1/patha OR path:{SiteCollection}path2/pathb
Test 13 --- path:{SiteCollection}path1/patha/ OR path:{SiteCollection}path2/pathb/
Test 14 --- path:{SiteCollection}/path1/patha/ OR path:{SiteCollection}/path2/pathb/
Test 15 --- path:{SiteCollection}/path1/patha OR path:{SiteCollection}/path2/pathb
Test 16 --- path:{Site.URL}path1/patha OR path:{Site.URL}path2/pathb
Test 17 --- path:{Site.URL}path1/patha/ OR path:{Site.URL}path2/pathb/
Test 18 --- path:{Site.URL}/path1/patha/ OR path:{Site.URL}/path2/pathb/
Test 19 --- path:{Site.URL}/path1/patha OR path:{Site.URL}/path2/pathb
Test 20 --- path:{Site}path1/patha OR path:{Site}path2/pathb
Test 21 --- path:{Site}path1/patha/ OR path:{Site}path2/pathb/
Test 22 --- path:{Site}/path1/patha/ OR path:{Site}/path2/pathb/
Test 23 --- path:{Site}/path1/patha OR path:{Site}/path2/pathb
Putting quotes around the path, i.e. --- path:{Site}"/path1/patha" OR path:{Site}"/path2/pathb" --- results in zero results returned for any of those tests.
Putting parens around the entire query, i.e. --- (path:{Site}/path1/patha OR path:{Site}/path2/pathb) --- results in no difference in results returned for any of those tests (still get the second result and two random views from the Pages Library)
What am I doing wrong here?  I feel like I'm missing something fairly obvious in the KQL syntax but neither http://technet.microsoft.com/en-us/library/jj683123(v=office.15).aspx nor http://msdn.microsoft.com/en-us/library/office/ee558911(v=office.15).aspx, nor the power of Google and Bing Search, is helping me understand what it is.
Any insights?

A:

This is a slightly different way to solve your problem: if you are getting random list views, maybe you could specify to return only Pages? Add to your query:
ContentTypeId:0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39*

Okay, I can duplicate your issue (I think).  This is what I used that got me the Pages for two subsites:
ContentTypeId:0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39*
Path:{\SiteCollection.URL}/subsite/subsitea/ 
Path:{\SiteCollection.URL}/subsite/subsiteb/ 
Site<>{\SiteCollection.URL}

A:

Not sure if it should be, but the syntax you offered isn't working for me. Whenever I have more than one {RelativityAnchor} in the query, nothing works right. 
I've found the syntax...
path:{RelativityAnchor}(patha OR pathb OR pathc) 

... to work best, though it still has the quirk where I can't reliably use full relative paths such as 'site1/subsite2/patha' but only 'patha'.  For some paths it works, for others, it doesn't.  As long as the friendly target names remain unique enough, this solution should work, though it begs a future case where it won't, so I'm going to keep digging a bit on that.  I'm wondering if its related to pages whose paths have moved around during their lifetime and some sort of caching or misindexing, but haven't nailed down a pattern yet.
On the bright side, for whatever reason, the system in no longer returning the wrong results (the random views). I hate when stuff stops not working for no apparent reason! I'm going to keep an eye on this, but for now the problem just seems to no longer exist.
With the syntax I just mentioned and the wrong results gone, I think the spirit of this thread is fulfilled.  Thanks for working things through with me, appreciate the collegiality of this forum and folks such as yourself a lot. 
Peace and Joy,
Nick

