Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Search child portals from main portalSearch child portals from main portal
Previous
 
Next
New Post
6/16/2014 12:48 PM
 

Is there a way to search parent and child portals from any portal?

i.e. Search any child from the parent or search parent and child from another child.

Thanks

Bob

 
New Post
6/16/2014 2:24 PM
 
I feat you need to extend the search module yourself

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/17/2014 11:19 AM
 

Yes, I was afraid of that. Unfortunately I wouldn't have a clue as to how to do that.

But then, learning is fun!

 Bob

 
New Post
8/21/2014 12:57 PM
 

I found this on a post from 2004. Before I start messing up my stored procedures, would this work?

 *****

I forgot to include the fact that I changed the dbo.GetSearchResults stored procedure.


I also want to be able to search child portals from anywhere in either the parent or any of the children.  I think the best way to do this is to change the stored procedure in the SQL database.  You could do this with SQL Server Magement Studio quite simply by changing the WHERE clause.  I just added the following: "Or (t.PortalID >=1)".  This assumes your parent portal is 0.  The new stored procedure is:

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO

ALTER procedure [dbo].[GetSearchResults]
    @PortalID int,
    @Word nVarChar(100)
AS
SELECT si.SearchItemID,
    sw.Word,
    siw.Occurrences,
    siw.Occurrences + 1000 as Relevance,
    m.ModuleID,
    tm.TabID,
    si.Title,
    si.Description,
    si.Author,
    si.PubDate,
    si.SearchKey,
    si.Guid,
    si.ImageFileId,
    u.FirstName + ' ' + u.LastName As AuthorName,
    m.PortalId
FROM    dbo.SearchWord sw
    INNER JOIN dbo.SearchItemWord siw ON sw.SearchWordsID = siw.SearchWordsID
    INNER JOIN dbo.SearchItem si ON siw.SearchItemID = si.SearchItemID
    INNER JOIN dbo.Modules m ON si.ModuleId = m.ModuleID
    LEFT OUTER JOIN dbo.TabModules tm ON si.ModuleId = tm.ModuleID
    INNER JOIN dbo.Tabs t ON tm.TabID = t.TabID
    LEFT OUTER JOIN dbo.Users u ON si.Author = u.UserID
WHERE   (((m.StartDate Is Null) OR (GetDate() > m.StartDate)) AND ((m.EndDate Is Null) OR (GetDate() < m.EndDate)))
    AND (((t.StartDate Is Null) OR (GetDate() > t.StartDate)) AND ((t.EndDate Is Null) OR (GetDate() < t.EndDate)))
    AND (sw.Word = @Word)
    AND (t.IsDeleted = 0)
    AND (m.IsDeleted = 0)
    AND (t.PortalID = @PortalID) Or (t.PortalID >=1)
ORDER BY Relevance DESC
 

After you execute this, the search results are returned from your parent portal (0) and all child sites - assuming you have just created child sites and not a mixture of child and parent sites on your portal.

*****

Thanks

Bob

 
New Post
8/21/2014 1:00 PM
 
Bob, search has significantly changed in DNN 7.2 by introducing lucene, which stores sarch results in files and will not use the procedure you listed any more.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Search child portals from main portalSearch child portals from main portal


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out