lux
Class DocIDNumberAllocator
java.lang.Object
net.sf.saxon.tree.util.DocumentNumberAllocator
lux.DocIDNumberAllocator
- All Implemented Interfaces:
- Serializable
public class DocIDNumberAllocator
- extends net.sf.saxon.tree.util.DocumentNumberAllocator
We guarantee that lux:search returns result in document order, which to Saxon means that
the ids of the documents it returns must be in increasing order. lux:search gathers
docIDs in increasing order and calls setNextDocID(int) in order to maintain the same numbering
scheme in Saxon. Internally-generated documents are allocated ids starting at Integer.MAX_VALUE+1 -
Lucene ids are always ints.
- See Also:
- Serialized Form
|
Method Summary |
long |
allocateDocumentNumber()
|
void |
setNextDocID(Integer id)
It is the caller's responsibility to ensure that the same id is not assigned to multiple different documents,
IDs must be assigned to documents in such a way that a consistent document ordering is maintained. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocIDNumberAllocator
public DocIDNumberAllocator()
setNextDocID
public void setNextDocID(Integer id)
- It is the caller's responsibility to ensure that the same id is not assigned to multiple different documents,
IDs must be assigned to documents in such a way that a consistent document ordering is maintained.
In order to ensure thread safety, a separate id is maintained for each calling thread.
- Parameters:
id - the next id to allocate for the calling thread, or null if the next id to allocate should be an internal id.
allocateDocumentNumber
public long allocateDocumentNumber()
- Overrides:
allocateDocumentNumber in class net.sf.saxon.tree.util.DocumentNumberAllocator
Copyright © 2013. All Rights Reserved.