lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] Commented: (LUCENE-1540) Improvements to contrib.benchmark for TREC collections
Date Tue, 01 Feb 2011 04:34:28 GMT


Shai Erera commented on LUCENE-1540:

Patch looks good !

Few comments:

In TrecFTParser.parse(), I think you can extract the logic which finds the date and title
into a common method which receives the strings to look for as parameters (e.g. find(String
str, String start, int startlen, String end))? Then the code can be simplified to:
Date date = trecSrc.parseDate(find(dobBuf, DATE, DATE_LENGTH, DATE_END));

I believe this method will be useful for other parsers as well, so might be good to pull it
up to the abstract TrecDocParser (and +1 for making it abstract and moving logic from TCS
to it).

In TrecContentSource you changed rawDocSize from int to int[], however it's an array that's
always allocated at size 1 and never resized. I think it can be an int?

Also, TCS.cleanTags has two versions, one taking a String and one a StringBuilder (took me
a minute to notice the difference) -- do you think the performance gain (of not allocating
a String in the SB variant) is worth the code dup? I didn't understand what does cleanTags
do - does it strip tags off of the HTML content?

I would also make all those static methods public (and move them to TrecDocParser) in case
someone wants to impl his own parser.

Thanks for adding support for GZIP in ContentSource - I had this on my TODO list for a long
time :). Two things:
# I think the try-catch can be extracted to wrap the 'switch' because it is now needed by
both BZIP and GZIP.
# Is it possible to add support for ZIP as well? If it's not trivial, then let's resolve it
in a different issue.

> Improvements to contrib.benchmark for TREC collections
> ------------------------------------------------------
>                 Key: LUCENE-1540
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/benchmark
>            Reporter: Tim Armstrong
>            Assignee: Doron Cohen
>            Priority: Minor
>             Fix For: 3.1, 4.0
>         Attachments: LUCENE-1540.patch, LUCENE-1540.patch
> The benchmarking utilities for  TREC test collections ( are quite
limited and do not support some of the variations in format of older TREC collections.  
> I have been doing some benchmarking work with Lucene and have had to modify the package
to support:
> * Older TREC document formats, which the current parser fails on due to missing document
> * Variations in query format - newlines after <title> tag causing the query parser
to get confused.
> * Ability to detect and read in uncompressed text collections
> * Storage of document numbers by default without storing full text.
> I can submit a patch if there is interest, although I will probably want to write unit
tests for the new functionality first.

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message