EmptyPreparator

Suggestions, questions oder problems with regain

Moderator: thtesche

EmptyPreparator

Postby talker » Mon Apr 14, 2008 12:45 am

When using this EmptyPreparator to index a new file for the first time, I get the following line in the log:

Code: Select all
Preparation done: file://...


When I run Regain again, I get the following in the log:

Code: Select all
Ignoring file://..., because preparation already failed the last time and no retry is wanted.


The file remains in the index however, but this still a bug.
talker
 
Posts: 11
Joined: Sun Apr 13, 2008 7:50 pm

Postby talker » Mon Apr 14, 2008 12:53 am

Anyway, I think that the following would make sense to implement by default:

Code: Select all
if (none of the preparators claim a file && for EmptyPreparator enabled=true)
then use it on the file.


Currently, in order to implement this behavior one needs to write a regexp for the EmptyPreparator's urlPattern which negates all other extensions that are claimed, which is awkward and a pain to keep updated as one adds new preparators.
talker
 
Posts: 11
Joined: Sun Apr 13, 2008 7:50 pm

Postby Til » Mon Apr 14, 2008 8:16 am

Could you provide a little example (config plus example files) that shows your bug?

I don't understand your second post: Why is it necessary to write a regexp that negates all other extensions? The preparators are asked in the order in which they are configured. The first one that feels resposible for the file will extract its content. So if all preparators before the EmptyPreparator didn't want a file then the EmptyPreparator will get it, if it uses a regex that matches the URL (e.g. ".*")
User avatar
Til
Site Admin
 
Posts: 242
Joined: Wed Jan 26, 2005 8:54 pm



Return to regain

Who is online

Users browsing this forum: kenjaytony and 3 guests

cron