tag:blogger.com,1999:blog-9049032025342264339.post8048087854435507080..comments2024-03-29T01:06:25.773+03:00Comments on sadomovalex's blog: How to limit search results to the current site collection in Sharepoint 2013Alexey Sadomovhttp://www.blogger.com/profile/18112105989691733410noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-9049032025342264339.post-14292617870516956572015-05-12T10:53:17.453+03:002015-05-12T10:53:17.453+03:00hi Samol,
instead if enumerating all site collecti...hi Samol,<br />instead if enumerating all site collections' urls in query transform, try to put only web application's url there:<br />Path:http://example.comAlexey Sadomovhttps://www.blogger.com/profile/18112105989691733410noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-8945010847092547642015-05-12T10:17:00.740+03:002015-05-12T10:17:00.740+03:00I have created and enabled result sources at the s...I have created and enabled result sources at the search service appln level for single site collection and 2 site collections. and it worked. But if the number of site collections are more than 50 within my web application, how can I enter all the site collections path in the query transform text box? if I give all the 50 site collections' name, will my search work?<br /><br />Thanks<br />SaMolPPhttps://www.blogger.com/profile/04702481218557567435noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-18462442733511941702015-05-12T10:13:51.826+03:002015-05-12T10:13:51.826+03:00If I want to get the search results from all site ...If I want to get the search results from all site collections within my web application, where will io create the result source and what's the query transform string I need to build. I don't want my search will pull the results from other web applications. <br />SaMolPPhttps://www.blogger.com/profile/04702481218557567435noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-50580046804470506692014-06-04T00:14:13.596+04:002014-06-04T00:14:13.596+04:00legendgod,
I don't remember about this particu...legendgod,<br />I don't remember about this particular scenario, but if it is OTB behavior, most probably we didn't prevent it at all. One of the ways of how you may ensure that user entered something is to check it in javascript (search box has own javascript handler attached to search icon. You may override it with custom function which will check that entered value is not empty first Alexey Sadomovhttps://www.blogger.com/profile/18112105989691733410noreply@blogger.comtag:blogger.com,1999:blog-9049032025342264339.post-22153880873672621912014-06-03T11:14:35.191+04:002014-06-03T11:14:35.191+04:00I have tested with your method. However when I inp...I have tested with your method. However when I input nothing, the search will return all the item within the site collection. (just like search wildcard) How do you prevent it happen?Anonymousnoreply@blogger.com