Andreas Hartmann wrote:
Hi Lenya devs,
currently, the only available LinkManager implementation is the
ContentLinkManager. When you ask it to return all links that point to
a particular document, it parses all (!) other documents in the same
area and extracts the links based on the link XPaths of the resource
type. As you can imagine that can take a while, especially in large
publications. I expericened this with the docu publication. If you
want to decativate a page, you can fetch a coffee in the meantime, and
even drink it (at least if it's an espresso).
In a discussion on the Jackrabbit mailing list, Bertrand Delacretaz
suggested to extract all links that are contained in a document before
saving it,
I guess you mean rather just after it has been saved successfully, right?
and store them in the meta data. Now, since all Lenya meta data are
indexed, this link list can be used for a Lucene search. The query
looks like this (special characters have to be escaped):
\{http\://apache.org/lenya/metadata/link/1.0\}outgoingLinks:lenya\-document\:1aca68c0\-0243\-11dd\-881a\-f3cc793eb58e\*
The name of the meta data field is
{http://apache.org/lenya/metadata/link/1.0}outgoingLinks
The term value is
lenya-document:1aca68c0-0243-11dd-881a-f3cc793eb58e*
Note the wildcard at the end of the term value. It includes URLs with
an attached language or publication parameter. The link manager uses
some post-search checks to verify that only the actually linked
documents are listed (conforming to the declared LinkResolver
implementation).
With the MetaDataLinkManager, the deactivate screen appears virtually
immediately. I guess this scales nicely with large number of documents
(as good as Lucene scales). If you have an index spanning multiple
publications, you can even detect links from other publications.
I have the MetaDataLinkManager in my local sandbox. It depends on the
search API which I have posted on the user list. If you want to take a
closer look at the classes, I can upload a ZIP somewhere, or maybe I
can extract a patch.
that would be great
Replacing the ContentLinkManager with the MetaDataLinkManager would
require to "touch" all documents so that the links are extracted (they
are indexed automatically when the session is committed).
Is anybody interested in this feature?
sure, I think it would be a great improvement
Cheers
Michael
-- Andreas
--
Michael Wechner
Wyona - Open Source Content Management - Yanel, Yulup
http://www.wyona.com
[EMAIL PROTECTED], [EMAIL PROTECTED]
+41 44 272 91 61
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]