|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.storage.NativeValueIndex
org.exist.storage.NativeValueIndexByQName
The new index by QName that will make queries like
/ root [ key = 123 ]very quick. It is used by an Xquery extension function with this signature :
qname-index-lookup( $qname as xs:string, $key as xs:string ) as node*that can be used this way :
$key := qname-index-lookup( "key", "123") $user := $key / parent::rootThe way of indexing is the same as current range indices
NativeValueIndex
,
except that for each QName like
Field Summary |
Fields inherited from class org.exist.storage.NativeValueIndex |
PROPERTY_INDEX_CASE_SENSITIVE |
Constructor Summary | |
NativeValueIndexByQName(DBBroker broker,
BFile valuesDb)
|
Method Summary | |
boolean |
close()
|
void |
dropIndex(DocumentImpl doc)
Drop all index entries for the given document. |
void |
endElement(ElementImpl node,
NodePath currentPath,
java.lang.String content)
|
NodeSet |
find(int relation,
DocumentSet docs,
NodeSet contextSet,
ValueIndexKeyFactory value)
find |
Sequence |
findByQName(QName qname,
AtomicValue comparisonCriterium,
Sequence contextSequence)
called from the special XQuery function util:qname-index-lookup() |
void |
removeAttribute(AttrImpl attr,
NodePath currentPath,
boolean index)
|
void |
removeElement(ElementImpl node,
NodePath currentPath,
java.lang.String content)
Mark given Element for removal; added entries are written to the list of pending entries. |
void |
startElement(ElementImpl node,
NodePath currentPath,
boolean index)
updates the index type of given node according to the Index By QName config. |
void |
storeAttribute(AttrImpl node,
NodePath currentPath,
boolean index)
store and index given attribute |
void |
storeAttribute(RangeIndexSpec spec,
AttrImpl node)
Store the given attribute's value in the value index. |
void |
storeElement(int xpathType,
ElementImpl node,
java.lang.String content)
Store the given element's value in the value index. |
Methods inherited from class org.exist.storage.NativeValueIndex |
dropIndex, endElement, find, flush, match, match, printStatistics, reindex, remove, scanIndexKeys, setDocument, storeText, sync, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.exist.storage.ContentLoadingObserver |
dropIndex, endElement, flush, reindex, remove, setDocument, storeText, sync |
Constructor Detail |
public NativeValueIndexByQName(DBBroker broker, BFile valuesDb)
Method Detail |
public void storeAttribute(RangeIndexSpec spec, AttrImpl node)
NativeValueIndex
storeAttribute
in class NativeValueIndex
spec
- The index specificationnode
- The attributeNativeValueIndex.storeAttribute(org.exist.storage.RangeIndexSpec, org.exist.dom.AttrImpl)
public void storeAttribute(AttrImpl node, NodePath currentPath, boolean index)
ContentLoadingObserver
storeAttribute
in interface ContentLoadingObserver
storeAttribute
in class NativeValueIndex
public void removeAttribute(AttrImpl attr, NodePath currentPath, boolean index)
public void storeElement(int xpathType, ElementImpl node, java.lang.String content)
NativeValueIndex
storeElement
in class NativeValueIndex
xpathType
- The value typenode
- The elementcontent
- The string representation of the valueNativeValueIndex.storeElement(int, org.exist.dom.ElementImpl, java.lang.String)
public void startElement(ElementImpl node, NodePath currentPath, boolean index)
startElement
in interface ContentLoadingObserver
startElement
in class NativeValueIndex
public void endElement(ElementImpl node, NodePath currentPath, java.lang.String content)
public void removeElement(ElementImpl node, NodePath currentPath, java.lang.String content)
ContentLoadingObserver
ContentLoadingObserver.flush()
is called later to flush all pending entries.
removeElement
in interface ContentLoadingObserver
removeElement
in class NativeValueIndex
public Sequence findByQName(QName qname, AtomicValue comparisonCriterium, Sequence contextSequence) throws XPathException
XPathException
public NodeSet find(int relation, DocumentSet docs, NodeSet contextSet, ValueIndexKeyFactory value) throws TerminatedException
relation
- binary operator used for the comparisonvalue
- right hand comparison value
TerminatedException
public void dropIndex(DocumentImpl doc) throws ReadOnlyException
ContentLoadingObserver
dropIndex
in interface ContentLoadingObserver
dropIndex
in class NativeValueIndex
ReadOnlyException
public boolean close() throws DBException
close
in class NativeValueIndex
DBException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |