|
Rank: Advanced Member
Groups: Registered
Joined: 2/29/2008 Posts: 43
|
I'm using version 2012.5.14.903.
I'm trying to update the index programmatically. I use GetIndexableSourceForRecord to get the source I want to re-import (WebSiteBasedSource) and call Import(). I can see from the logs and the AddedDocument event handler that it's crawling and adding documents, but the index doesn't get updated. No slice files are generated and no indexer.txt is created with logging turned on.
What am I missing?
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Hi Bill, if you're not getting any files being updated, not even logs, then it must be that your app is working on a different folder than the one you are looking at. Simple but easy mistake to make. Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/29/2008 Posts: 43
|
I'm looking in the folder that my code is loading the index from. Other logs (CentralEventDispatcher, Document, HtmlDocumentParser, Reader, WebSiteSpider, XmlIndexableSourceRecordTable) are all being created. Is there a way the index would be going to a different folder?
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Ok, so that sounds fine - can you ZIP up all logs and send to me via support@keyoti.com, so I can check them out. To answer your question, there's no way that it's writing some files to one folder and others to a different folder. -your feedback is helpful to other users, thank you!
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Thanks for the files, in your CrawlSite method, you're not closing the DocumentIndex ('index' variable), add a call to Close() please and I think it will resolve it. Jim -your feedback is helpful to other users, thank you!
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/29/2008 Posts: 43
|
Sorry, when I pulled my code together to send to you I grabbed pieces from different places and stuck them all in one method for simplicity, but I missed that bit. I am closing the index elsewhere. I also added a call to Flush to see if that would do anything, but it didn't help.
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/29/2008 Posts: 43
|
Update on this: If I use index.ReimportIndexableSources() that appears to be working.
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 Location: Canada
|
Sorry, I missed that, yes the other thing you could do if you want to import one source only is index.Import(source) -your feedback is helpful to other users, thank you!
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/29/2008 Posts: 43
|
index.Import(source) worked correctly.
|
|