Issue Details (XML | Word | Printable)

Key: LUCENE-448
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Yonik Seeley
Reporter: Yonik Seeley
Votes: 4
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

optional norms

Created: 09/Oct/05 12:56 AM   Updated: 27/May/06 01:39 AM
Return to search
Component/s: Index
Affects Version/s: CVS Nightly - Specify date in submission
Fix Version/s: CVS Nightly - Specify date in submission

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works omitNorms.txt 2005-10-09 12:57 AM Yonik Seeley 18 kB

Resolution Date: 29/Oct/05 01:15 PM


 Description  « Hide
For applications with many indexed fields, the norms cause memory problems both during indexing and querying.
This patch makes norms optional on a per-field basis, in the same way that term vectors are optional per-field.

Overview of changes:

  • Field.omitNorms that defaults to false
  • backward compatible lucene file format change: FieldInfos.FieldBits has a bit for omitNorms
  • IndexReader.hasNorms() method
  • During merging, if any segment includes norms, then norms are included.
  • methods to get norms return the equivalent 1.0f array for backward compatibility

The patch was designed for backward compatibility:

  • all current unit tests pass w/o any modifications required
  • compatible with old indexes since the default is omitNorms=false
  • compatible with older/custom subclasses of IndexReader since a default hasNorms() is provided
  • compatible with older/custom users of IndexReader such as Weight/Scorer/explain since a norm array is produced on demand, even if norms were not stored

If this patch is accepted (or if the direction is acceptable), performance for scoring could be improved by assuming 1.0f when hasNorms(field)==false.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order