On 11/26/01 7:53 AM, "Hugh Brien" <[EMAIL PROTECTED]> wrote:
> I have prototyped a SearchService for Turbine that uses Lucene. It provides
> methods for searching a Lucene created index. That being said I will ask
> the following:
>
> 1. Does anyone think this is a good idea?
Yes, it would be a good idea :-)
> 2. Has it been done?
There are bits in Scarab that you might want to lift.
> 3. Should indexing be part of service or a separate service.
No. The core functionality should be testable without running the service. I
feel that the service provides some management.
> 4. Here is the interface I am using with my service. The index method does
> nothing for now, but I have searching working. The only problem I have is
> getting the the ResourceService to resolve an abolute URL from a relative.
> I searched through the source code of other services but I could not find an
> answer.
>
> If you guys think this is a good service I will put the source code together
> an send it to a committer for review.
It would definitely be useful but don't code it against the service
framework in the 2.x tree. Code it against fulcrum. No more services will go
into the 2.x tree.
>
> public interface SearchService extends Service
> {
> public static final String SERVICE_NAME = "SearchService";
>
> static String SEARCH_PREFIX= "search.engine";
>
> static String INDEX_OUTPUT_DIRECTORY = "index.directory";
Might want to manage several directories of indices.
> static String OBJECT_CLASS_NAMES = "database.objects";
Database specific?
> public Hits search(Query query);
>
> public Query getQuery(String searchText, String fieldName);
>
> public void indexData();
> }
There are other search engines, you might want to make the search service
work with lucene and any other searching packages.
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>