How can I trigger indexing on pages I modified directly within the database.

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
2/17/2012 7:54:47 PM
Gravatar
Total Posts 12

How can I trigger indexing on pages I modified directly within the database.

I found out mojoportal, and I could not believe how awesome this product is. I am a sql server DBA/architect can also code in C# but nothing web related. Thanks to mojoportal I started building my personal consulting portal/blog etc. What I did is digged into the database structure little bit and created pages mimicking microsoft sql server management studio object explorer style interface with the code I have written and keeping as a library in the last years. I build the page indexed everything perfectly (the index is slightly over 300MB if that gives you an idea). I added some additional columns to mp_pages, mp_htmlcontent, mp_modules, mp_pagemodules etc table to keep track of what changed in the last week in my library (since I get a current snapshot of all my objects and full overwrite the existing data in mojoportal I know exactly which pages have changed). Now I would like to only rebuild the indexes on the newly added (less than 1% of the data usually) records (i know in mp_pages, mp_htmlcontent, mp_modules, mp_pagemodules are new).

I noticed there is a table mp_IndexingQueue but not sure how it is used etc. You can feel free to browse the site www.sqlboost.com if anything interests you. (probably it's better if you directly go to http://www.sqlboost.com/Util_dbo_BinaryReverse.aspx since the contents are not under the main page).

Anyway can I control the indexing of the newly added pages not using the interface but directly from the database?

Thank you

2/18/2012 5:29:57 PM
Gravatar
Total Posts 2239

Re: How can I trigger indexing on pages I modified directly within the database.

Hi,

What you've done is essentially forked mojoPortal because you've modifed the structure of database objects that mojoPortal uses. This is not the correct way to do things as it could prevent you from ever upgrading. If the developers of mojoPortal decide to add a new column to the mp_Pages table that has the same name as one of the columns you've added, you're stuck.

I don't recommend doing something like this from the database. You could write some custom code that will give you the ability to reindex a set of pages from the UI. Basically, you would show a list of the pages on the site and then select which pages to index and  have a button that would then index all selected page. Kind rudementary but will get the job done and you'll be sure that everything is being done properly because you'll be using mojoPortal to handle the indexing like all the other pages.

I do like the concept behind your site, I'll add it to my toolbox.

HTH,
Joe D. 

2/18/2012 5:38:14 PM
Gravatar
Total Posts 12

Re: How can I trigger indexing on pages I modified directly within the database.

Question still remains how do I force page contents to be indexed again without deleting all the files in the index directory and have my home desktop crank the harddrive for couple hours?

Can I insert some records into a table with the page id's or module id's so that they will be picked up.

About inserting data not from user interface, there was no other way of doing it, there are over 8000 pages I am generating once an hour at work hours and comparing of changes and keeping the site up to date with changes. Can't be done with a ui. I gotta figure out how to have the index be accurate after the changes to make sure it picks up the new pages etc.

2/18/2012 5:40:31 PM
Gravatar
Total Posts 12

Re: How can I trigger indexing on pages I modified directly within the database.

about the column names, I added column names starting with _$ prefix, I doubt mojoportal will use that kind of naming convention [_$UpdateTime] in they columns, I don't think clashing with column names is a possibility. If it was I will get a fresh mojoportal database and modify my code that populate pages to be compatible with mojoportal database and the latest version, it's more than worth the effort to me to have everything the latest and greatest.

2/20/2012 5:47:55 AM
Gravatar
Total Posts 18439

Re: How can I trigger indexing on pages I modified directly within the database.

Hi,

Sorry but the search index is file based and built on Lucene.NET, it is not connected to the database and there is no way to trigger indexing from the database, or at least I have no suggestion of how to do that.

If you modify the mojoPortal source code or the mojoPortal tables I cannot provide support for any problems you may have in a modified version. I will say that just adding some columns "probably" won't cause problems if you named them with a different convention and did not modify any of the mojoPortal stored procedures.

You might consider just using google or bing for site search instead of the internal Lucene search engine if your site is public and crawled frequently. We have built in support for using either or both of those, only problem is they won't be able to crawl content protected by roles whereas our internal search index is able to index all content and filter it in results according to the user's roles.

Best,

Joe

2/20/2012 8:21:44 AM
Gravatar
Total Posts 12

Re: How can I trigger indexing on pages I modified directly within the database.

This is as close to I got to reindexing all files. I have the batch job deleting all the files in the index directory for the site and call iisreset command after that. Now if I manually login as administrator and hit the rebuild index button the goal is accomplished. What I'd like to do though is do this like 3 am at night automatically and I won't be around at that time every day, and I prefer before users login the index be ready and also the index would be build when the server is idle around 3 am in the morning.

Assuming the batch job is running as a system administrator is there anything it can do to initiate the reindexing, I am not too internet saby, I am a sql  server administrator / architect with limited C# knowledge for windows form apps and CLR development.

Can I initiate the reindex button click from within a batch job ran by an administrator ?

Thank you

2/20/2012 8:23:09 AM
Gravatar
Total Posts 12

Re: How can I trigger indexing on pages I modified directly within the database.

... and yes probably only 15% of my content is actually can be seen by non administrators or users I assigned right to, therefore bing or google search probably will not do too good for me.

Thank you

2/20/2012 8:24:29 AM
Gravatar
Total Posts 18439

Re: How can I trigger indexing on pages I modified directly within the database.

best suggestion I have is on the other thread where you asked the same question.

You must sign in to post in the forums. This thread is closed to new posts.