Chris Hammond

Director of Training Programs for DotNetNuke Corporation

News

Thanks for visiting my blog, you can find more about me at ChrisHammond.com. I am the Director of Training Programs for DotNetNuke Corporation.

Cool Sites

My domains

Projects

DotNetNuke Daily Tip #3 6/26/06 Clear Search Tables

Check out all of the DotNetNuke Daily Tips from Chris Hammond.

DotNetNuke Daily Tip for 6/26/2006

During your development you may run across a time when you need to clear out the search tables for DotNetNuke's searching engine. Here's the SQL to do so.

delete SearchItemWordPosition where SearchItemWordId in (select SearchItemWordId from SearchItemWord where SearchItemID in (select SearchItemId from SearchItem)) 
delete SearchWord where SearchWordsId in (select SearchWordsId from SearchItemWord where SearchItemID in (select SearchItemId from SearchItem)) 
delete SearchItemWord where SearchItemId in (select SearchItemId from SearchItem) delete SearchItem 

Thanks to Mark Gorla from Engage Software for providing this tip.

Do you have a question about DotNetNuke? Perhaps I can answer it here as a Daily DotNetNuke Tip! Email chris.hammond at dotnetnuke.com  with your question! Be sure to put Daily Tips in the subject line.

 

UPDATE:

here's objectQualifier included code

delete {objectQualifier}SearchItemWordPosition where SearchItemWordId in (select SearchItemWordId from {objectQualifier}SearchItemWord where SearchItemID in (select SearchItemId from {objectQualifier}SearchItem)) 
delete {objectQualifier}SearchWord where SearchWordsId in (select SearchWordsId from {objectQualifier}SearchItemWord where SearchItemID in (select SearchItemId from {objectQualifier}SearchItem)) 
delete {objectQualifier}SearchItemWord where SearchItemId in (select SearchItemId from {objectQualifier}SearchItem) delete {objectQualifier}SearchItem 

Comments

Déclic Vidéo FX said:

You are just perfect !! I was exactly searching this kind of help. Thanks to Scott (Ventrian) for helping me, it solves my problem of indexing !!

Déclic Vidéo FX

# May 25, 2007 3:00 AM

Id said:

Thanks, excellent tip ;)

# February 24, 2008 2:49 PM

Chris Hammond said:

With the 3.0 release of DotNetNuke, way back in March of 2005 searching was implemented in the project, after a hiatus in the 2.* releases. Since then, not much has changed with the search, t ...

# March 25, 2008 4:20 PM

Irfan said:

i have issue with DNN search,

DNN do index the for entries in the searchitem tables, means my module does get entry there,

but in searchword no word is entered

how to add words in searchword?

i am getting this problem now, my modules are marked searchable in settings,

entry is made in searchitem tables , but not in searchword table

please help

# March 23, 2010 2:38 PM

DotNetNuke said:

<div style="color: #cccccc; right: 20px; top: 4px; float: right;"><br /> <br /> <br /> </div> <br /> <br /> <div style="text-align: le ...

# January 27, 2011 6:32 AM