lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rutherglen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-1278) Add optional storing of document numbers in term dictionary
Date Wed, 07 May 2008 22:01:58 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jason Rutherglen updated LUCENE-1278:
-------------------------------------

    Attachment: lucene.1278.5.7.2008.test.patch
                lucene.1278.5.7.2008.patch

lucene.1278.5.7.2008.patch - RangeFilter, FieldCacheImpl, ExtendedFieldCacheImpl automatically
use termenum loaddocs=true.  A byte buffer is used to load the docs, if the bytes read will
exceed the buffer, a new IndexInput is created and a DocIdSetIterator will read over that
when TermEnum.docs() is called.  This makes the usual case of a small number of docs (usually
1) to a term fast using a byte buffer.  It also removes the issue if a term has too many docs
and the whole byte array is loaded into ram.  TermEnum.docs() returns DocIdSetIterator.

lucene.1278.5.7.2008.test.patch - TestSort stores documents with Field.TermDocs.STORE



> Add optional storing of document numbers in term dictionary
> -----------------------------------------------------------
>
>                 Key: LUCENE-1278
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1278
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Index
>    Affects Versions: 2.3.1
>            Reporter: Jason Rutherglen
>            Priority: Minor
>         Attachments: lucene.1278.5.4.2008.patch, lucene.1278.5.5.2008.2.patch, lucene.1278.5.5.2008.patch,
lucene.1278.5.7.2008.patch, lucene.1278.5.7.2008.test.patch, TestTermEnumDocs.java
>
>
> Add optional storing of document numbers in term dictionary.  String index field cache
and range filter creation will be faster.  
> Example read code:
> {noformat}
> TermEnum termEnum = indexReader.terms(TermEnum.LOAD_DOCS);
> do {
>   Term term = termEnum.term();
>   if (term == null || term.field() != field) break;
>   int[] docs = termEnum.docs();
> } while (termEnum.next());
> {noformat}
> Example write code:
> {noformat}
> Document document = new Document();
> document.add(new Field("tag", "dog", Field.Store.YES, Field.Index.UN_TOKENIZED, Field.Term.STORE_DOCS));
> indexWriter.addDocument(document);
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message