In SharePoint 2013 on premise, I have a search page with a search box where it is possible to search for items of a specific content type under a specific site. This works as expected.
path:"http://path1" ContentTypeId:0x0100XXX*
But, if I also add path2 as the other site that I also would like to query for those content types, I get the strangest results.
(path:"http://path1" OR path:"http://path2") ContentTypeId:0x0100XXX*
Everything seems alright until I enter a search word in the search box. If I search for a word that I know does not exist in one of the sites, the search results bring up all the items with the content type under that site and for the other site it highlights the words in the items where there is a match.
I can also mention that this search page is configured to display all items of this specific content type when no search word is entered in the search box.
I suspect it is some kind of problem with the syntax I use in the query builder, but I have tried several variants without success. But the strange part is that the error only can be seen when a search word is entered in the search box.