You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mbox-dev@httpd.apache.org by Justin Erenkrantz <ju...@erenkrantz.com> on 2005/04/16 09:28:38 UTC

Re: svn commit: r161526 - httpd/mod_mbox/trunk/module-2.0/mod-mbox-util.c httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c

On Fri, Apr 15, 2005 at 11:33:35PM -0000, pquerna@apache.org wrote:
>      while (apr_dir_read(&finfo, APR_FINFO_NAME, dir) == APR_SUCCESS) {
> -        if (apr_fnmatch("*.mbox", finfo.name, 0) == APR_SUCCESS) {
> +        if (apr_fnmatch("*.mbox", finfo.name, 0) == APR_SUCCESS &&
> +            strstr(finfo.name, "incomplete") == NULL) {
>              *(const char **)apr_array_push(files) = \
>              apr_pstrdup(r->pool, finfo.name);
>          }

There probably needs to be something like a MboxIndexIgnore ITERATE directive
for this rather than hard-coding that string.  -- justin

Re: svn commit: r161526 - httpd/mod_mbox/trunk/module-2.0/mod-mbox-util.c httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Sat, Apr 16, 2005 at 12:44:54AM -0700, Paul Querna wrote:
> In the future, mod-mbox-util needs to know what files should be added to 
> a full text index -- that means you don't want incomplete files included 
> in such an index.. You could always have the Apache Module prune those 
> from the search results at runtime, but that seems far more complicated 
> to me.

In the full text index, you would need to provide the document range you want
to retrieve results over.  (As the user doesn't necessarily want to search all
documents in the corpus: they'd want to restrict to a particular list or a
particular collection of lists.)  So, mod_mbox wouldn't ask for the documents
related to those httpd has excluded.  Admittedly, I've only worked with
research-quality search backends; but that's been in all of them.  

...quick look into Lucene...  Aha.

Quick look in the Lucene FAQ and it's here:

http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-884dadb3abdf5c520a84a2328c6d34a98cc2f4f9

So, no, I think it's fine.  =)  You just have the bit fields set to exclude
the documents that httpd has ignored.  -- justin

Re: svn commit: r161526 - httpd/mod_mbox/trunk/module-2.0/mod-mbox-util.c httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c

Posted by Paul Querna <ch...@force-elite.com>.
Justin Erenkrantz wrote:
> On Sat, Apr 16, 2005 at 12:36:42AM -0700, Paul Querna wrote:
> 
>>I avoided making such a directive, because mod-mbox-util needed to konw 
>>which files to ignore too.
> 
> 
> Is that truly the case?  Couldn't mod-mbox-util create a summary index that
> lists the counts of all the files in the directory and then mod_mbox just
> ignore whatever files are in the httpd directive when creating the summary for
> the user?  So, I'm not so sure they'd have to be in agreement.  -- justin
> 

In the future, mod-mbox-util needs to know what files should be added to 
a full text index -- that means you don't want incomplete files included 
in such an index.. You could always have the Apache Module prune those 
from the search results at runtime, but that seems far more complicated 
to me.

-Paul

Re: svn commit: r161526 - httpd/mod_mbox/trunk/module-2.0/mod-mbox-util.c httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Sat, Apr 16, 2005 at 12:36:42AM -0700, Paul Querna wrote:
> I avoided making such a directive, because mod-mbox-util needed to konw 
> which files to ignore too.

Is that truly the case?  Couldn't mod-mbox-util create a summary index that
lists the counts of all the files in the directory and then mod_mbox just
ignore whatever files are in the httpd directive when creating the summary for
the user?  So, I'm not so sure they'd have to be in agreement.  -- justin

Re: svn commit: r161526 - httpd/mod_mbox/trunk/module-2.0/mod-mbox-util.c httpd/mod_mbox/trunk/module-2.0/mod_mbox_index.c

Posted by Paul Querna <ch...@force-elite.com>.
Justin Erenkrantz wrote:
> On Fri, Apr 15, 2005 at 11:33:35PM -0000, pquerna@apache.org wrote:
> 
>>     while (apr_dir_read(&finfo, APR_FINFO_NAME, dir) == APR_SUCCESS) {
>>-        if (apr_fnmatch("*.mbox", finfo.name, 0) == APR_SUCCESS) {
>>+        if (apr_fnmatch("*.mbox", finfo.name, 0) == APR_SUCCESS &&
>>+            strstr(finfo.name, "incomplete") == NULL) {
>>             *(const char **)apr_array_push(files) = \
>>             apr_pstrdup(r->pool, finfo.name);
>>         }
> 
> 
> There probably needs to be something like a MboxIndexIgnore ITERATE directive
> for this rather than hard-coding that string.  -- justin
> 

I avoided making such a directive, because mod-mbox-util needed to konw 
which files to ignore too.

Parsing the HTTPD conf file isn't a good option, maybe adding another 
command line arg to ignore things, but it makes the command line more 
complicated, and in most cases, you want to ignore the same files on 
every invocation...

I have been resisting making a .conf file for just mod-mbox-util, but 
with the future searching stuff, it might be easier/better in the long run.