Wow thanks Karl, this really helpes :)
On 7.1.2005, at 11:11, Karl �ie wrote:
Hi there Eirikur
Here is the source for the indexer that i have worked on so far, the
update() method is still not finished but it will give you an idea. As
you can see i am using a Lucene xml indexer from another project here,
and thats the reason why i have skipped the DASL route. Here is what
my my domain.xml entry looks like:
<listener classname="org.apache.slide.search.IndexTrigger">
<configuration>
<indexer classname="org.apache.slide.search.LoggingIndexer"
synchronous="false" uri="/files/articles"/>
<indexer classname="no.gan.slide.search.XMLIndexer"
synchronous="false" uri="/files">
<configuration>
<!-- an existing directory to use as lucenes index -->
<parameter name="lucene-path">${filespath}/lucene</parameter>
<!-- the lucene Analyzer class to be used for indexing -->
<parameter
name="lucene-analyzer">no.gan.lucene.GanAlyzer</parameter>
<!-- the subject that will perform the indexing -->
<parameter name="subject"></parameter>
</configuration>
</indexer>
</configuration>
</listener>
<XMLIndexer.java>
The security has yet not been a issue for me as all the documents i am
working with are public norwegian governmental publications available
to all citizens. But yes, doing this you could a: only index after
checking some authority, b: filter the search results against a
authority. But that should be doable.
Really off topic here (could send me an email directly rather): So your
working for the Norweigan government? We work a lot for Swedish and
Icelandic municipalities, infact the Slide work I'm doing now is for a
new version of our IdegaWeb eGov platform. Are you also doing a
document management system for a municipality or the national
government perhaps?
A quick route to index into slides DASL is to configure a extractor:
<extractors>
<extractor classname="org.apache.slide.extractor.SimpleXmlExtractor"
uri="/files/articles/test.xml">
<configuration>
<instruction property="title" xpath="/article/title/text()"/>
<instruction property="summary" xpath="/article/summary/text()"/>
</configuration>
</extractor>
</extractors>
Create a class that extends SimpleXmlExtractor if neccessary, or just
tweak the configuration to suite your documents. If these documents
are not XML take a look at how to implement a extractor. This should
just plug into Slides own Lucene indexing and be available in DASL
with security to go. But yeah, i havent tried this yet, only looked at
the sources.
This sounds very interesting I will take a look at the docs for
extractors if there are any ;)
Heja Norge
Eirikur, Idega.
Mvh karl �ie
On 6. jan. 2005, at 16.41, Eirikur Hrafnsson wrote:
Hi guys!
On 6.1.2005, at 13:35, Karl �ie wrote:
Yes, the index i am creating is not used by Slide at all but a
legacy webapp operating on a lucene directory. The IndexTrigger and
Index system is really clever for maintaining indexes that is not
integrated into Slide. As Stefan points out DASL search will not be
available by doing this and i would not advice you to index these
document into the same lucene index as Slide uses.
The reason for this is that Lucene is a indexing toolkit, and allows
you to create any document->field strategy you want. By using the
IndexTrigger i can update a lucene index that has a different
strategy than DASL, and therefor not compatible with the DASL
searchers that requires a DASL strategy for searching. If you got
just a few days i would advice you to do this.
Mvh Karl �ie
First thanks a lot to both of you for taking the time to answer all
my annoying questions, I hope this thread helps other developers
also...
I'm really thinking about taking your advice Karl and use a listener.
What do I have to register to Domain.xml for that exactly? Just the
listener itself or do I have to activate Lucene in some way?
Any code example for a listener you might be willing to send me to
get started?
What do you do about security though? I think DASL ensures your
search only returns allowed entries according to who is logged on
(via webdavresource) but I would think you have to somehow filter the
search results afterwards if you maintain your own indexer?
greeeeat...so Lucene only really works in 2.2 but the webdav
servlet doesn't so basically I can't search because I have to the
WebdavServlet mapped to "/content/"?
????
The issue in 2 was: the DASL stuff only works if the WebdavServlet
is mapped to "/" (Note: this does not mean the mapping of the slide
web application). This is resolved in 2.2.
Hmmm? Now your just confusing me on purpose hehehe ;)
You say " only works if the WebdavServlet is mapped to "/" (Note:
this does not mean the mapping of the slide web application)" what
other mapping is there? As I understood your last reply it would only
work if the servlet is mapped to "/" meaning the root of the context.
Do you mean the root of the Slide repository e.g. where /roles,
/users are? If so then I'm back in business!
You also say "This is resolved in 2.2", so is it resolved in the HEAD
version but just still mentioned as unresolved in the Release notes?
Sorry for being completely stupid....
Best Regards
Eirikur S. Hrafnsson, [EMAIL PROTECTED]
Chief Software Engineer
Idega Software
http://www.idega.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- you are what you eat. Avoid fruits and nuts...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Best Regards
Eirikur S. Hrafnsson, [EMAIL PROTECTED]
Chief Software Engineer
Idega Software
http://www.idega.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]