umbraco7 - Umbraco search engine duplicate bug -
hi here scenario created site1 in blog has examine search engine , working correctly. have copy whole page duplicate new demo site2 test search engine , picked searched item on page self "and picked item on site1!" :/ that's bad issue..
any idea how avoid picked search item on other site or content??
here search code:
@{ string searchterm = request.querystring["search"]; var searcher = examinemanager.instance.searchprovidercollection["websitesearcher"]; var searchcriteria = searcher.createsearchcriteria(examine.searchcriteria.booleanoperation.and); var query = searchcriteria.groupedor(new string[] { "nodename", "addblogimage", "blogtitle", "datepublished", "blogcategory", "blogauthor", "blogbodytext", "blogreadmore" }, searchterm).compile(); var searchresults = searcher.search(query); } @{ try { if (searchresults.any()){ <div class="items-row cols-3 row-0 row-fluid clearfix clean-list background-white"> <div class="span4 post padding"> @foreach (var result in searchresults){ var node = umbraco.content(result.fields["id"]); <div class="item column-1" itemprop="blogpost" style="margin:0"> @if(node.hasvalue("addblogimage")){ var blogimg = umbraco.typedmedia(node.getpropertyvalue<string>("addblogimage")); <img src="@blogimg.url" alt="" width="898" height="597"> }
sounds both sites use same search index.
make sure in examineindex.config indexers using different indexpath
for more useful examine documentation, check out: http://umbraco.com/follow-us/blog-archive/2011/9/16/examining-examine
Comments
Post a Comment