You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Dave Viner <dv...@yahoo-inc.com> on 2002/11/19 05:19:28 UTC

a simple grep implementation

Hi,
	I've been using a simple grep addition to the xindice core that I think is
useful.  Basically, it functions like Query, except that it greps all the
documents in a collection and returns an xml doc representing the documents
and the matches.
	I know that XPath is prefered when dealing with searches, but I've found
that many people know regex far better than they know xpath.  So, I've
developed this addition to help  my users find information in the way they
normally do.
	This is a super simple implementation that allows any Perl 5 regular
expression.  It uses the ORO package from Jakarta.  So if we add this, it
would introduce a new dependancy upon that library.
	Here's the additional file required in
java/src/org/apache/xindice/server/rpc/messages .  Let me know what you all
think of this.

Thanks
Dave Viner

Re: a simple grep implementation

Posted by Kurt Ward <ku...@yahoo.com>.
+1  Having an addons directory in CVS is a great idea! 

----- Original Message ----- 
From: "Vladimir R. Bossicard" <vl...@apache.org>
To: <xi...@xml.apache.org>
Sent: Tuesday, November 19, 2002 1:16 AM
Subject: Re: a simple grep implementation


> I do like the idea but I don't think that it has its place into the main 
> Xindice code.  Otherwise it's the open door for other non vital 
> dependencies and tons of additional jars.
> 
> One idea could be to create another project (e.g. Xindice-addons, in the 
> same cvs tree, but into different folder) to hold classes related to 
> Xindice but not essential to it.
> 
> Could you try to set up such a project and give feedback?
> 
> -Vladimir
> 
> -- 
> Vladimir R. Bossicard
> Apache Xindice - http://xml.apache.org/xindice
> 


Re: a simple grep implementation

Posted by "Vladimir R. Bossicard" <vl...@apache.org>.
> But, I have a question.  For the
> grep implementation to work, the XMLRPC server needs to find an
> org.apache.xindice.server.rpc.messages.<method-name> class, right?  What
> would be the recommended way of adding a new class without having to
> recompile the Xindice.jar file each time I want to add a new RPC handler?

I was primarly thinking of the package
    org.apache.xindicex.*  (x like in javax)

Of course this is only a first idea and we may have to (re)use the 
standard org.apache.xindice but I really would like to have a clear 
separation.

As for the rpc.messages, I would say that the current solution can be 
modified to fit new needs.  You could try an ugly

    try {
       class.forName(...xindice...)
    } catch () {
       class.forName(...xindicex...)
    }

but it's definitively too ugly.  My fingers almost refused to type the 
code :-)

So it will be up to you to propose a nice solution :-)

I would like to start organizing the source tree a little bit better. 
So since the addons are not part of the project, there no reason that 
the code is mixed with the rest of the main source.  A root project 
"addons" would make sense IMO.  Simple and efficient.

    addons
       src
       lib
       classes
       dist
       build.xml

-Vladimir

-- 
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice



RE: a simple grep implementation

Posted by Dave Viner <dv...@yahoo-inc.com>.
Hi Vladimir,
	That's a great idea.  An addons directory will help promote modularity in
Xindice (which I think is a "Good Thing").  But, I have a question.  For the
grep implementation to work, the XMLRPC server needs to find an
org.apache.xindice.server.rpc.messages.<method-name> class, right?  What
would be the recommended way of adding a new class without having to
recompile the Xindice.jar file each time I want to add a new RPC handler?
	Also, what should I call the directory? xml-xindice/addons/ ? or are you
thinking more like xml-xindice-addons/ ?

dave


-----Original Message-----
From: Vladimir R. Bossicard [mailto:vladimir@apache.org]
Sent: Monday, November 18, 2002 10:16 PM
To: xindice-dev@xml.apache.org
Subject: Re: a simple grep implementation


I do like the idea but I don't think that it has its place into the main
Xindice code.  Otherwise it's the open door for other non vital
dependencies and tons of additional jars.

One idea could be to create another project (e.g. Xindice-addons, in the
same cvs tree, but into different folder) to hold classes related to
Xindice but not essential to it.

Could you try to set up such a project and give feedback?

-Vladimir

--
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice




Re: a simple grep implementation

Posted by "Vladimir R. Bossicard" <vl...@apache.org>.
I do like the idea but I don't think that it has its place into the main 
Xindice code.  Otherwise it's the open door for other non vital 
dependencies and tons of additional jars.

One idea could be to create another project (e.g. Xindice-addons, in the 
same cvs tree, but into different folder) to hold classes related to 
Xindice but not essential to it.

Could you try to set up such a project and give feedback?

-Vladimir

-- 
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice