|
Do Xindice indices keep a pointer to the location
of a value ([EMAIL PROTECTED], for instance) inside stored resources, or just the keys for the
documents they appear in?
Looking at the source code, Indexer method "add"
has the following signature:
public void
add(String value, Key key, int pos, int len, short elemID, short
attrID);
Do "pos" and "len" refer to the place the
"value" appears inside a stored resource identified by "key"?
Looking at another piece of code, method
"XPathQueryResolver.prepareNextNode()", it seems that when the query is being
executed and resources being fetched from the database, the "keys" are only
relevant to the point of fetching documents from the database. Once a resource
is loaded into a DBDocument object, the XPath is "re-executed" entirely on this
DBDocument.
This then leads me to the conclusion that indices
are only useful to the extent of locating the keys for documents in the
database, but from that point on, the fetched documents must be searched with
xpath anyway, without any help from "pos/len" information.
This question is not critical, but would help me
better understand how Xindice works.
If anyone can shed some light, I would
appreciate.
Thanks,
jlerm
|
- Re: Question on indices jcplerm
- Re: Question on indices Terry Rosenbaum
