[Opensource] About the New eSearch Engine!

Gaspar Gonzalez Oliva gaspar at borderlessgroup.com
Thu Sep 18 23:42:49 PDT 2003


Hi All,

----------------------------------
  About the New eSearch engine
----------------------------------

I want that the community know a work that is in progress and soon will be release as
alpha version. This work is related with a part of eSearch engine that let us put a
Search TAG on any JSP page and let the user search look for any information that reside on
DBObjects. In the past a similar job was do it by Peter Pilgrim for eForum component (was
a mandatory reference to the actual work), this Search job on eForum work very fine, but
was build to work only with eForum. The actual work is to isolate in a generic way this
mechanism that let any web developer to create a XML configuration file that said to the
eSearch component what DBObject must be indexed for query by the web application user.
Later and when you install eSearch component you can regiter the esearch configuration
file for any application/component that you have.



For example and taking eForum as example i show how will be build the XML for it.

<esearch-config>
    ...
    <dbobject-mappings>
         <dbobject name="ForumMessage"
                          classname="com.jcorporate.eforum.dbobj.ForumMessage"
                          indexname="eforum">

              <dbfield name="MessageId" type="text"/>
              <dbfield name="GroupId" type="text"/>
              <dbfield name="LoginName" type="text"/>
              <dbfield name="Created" type="keyword"/>
              <dbfield name="Subject" type="text"/>
              <dbfield name="Body" type="text"/>

              <dbfield name="ExpUid" type="unstored"/>
              <dbfield name="ThreadId" type="unstored"/>

              <link-field url="{web-path}/eforum/Browse.do?state=displayMessage">
                  <link-field-param name="ThreadId" dbfieldname="ThreadId"/>
                  <link-field-param name="MessageId" dbfieldname="MessageId"/>
              </link-field>

         </dbobject>
    </dbobject-mappings>
    ...
<esearch-config>
-------------------------------------------------------------------
    Fig 1. eSearch definition file for eForum DBObject search.


This definition let you listener all change that is doing on ForumMessage DBObject and
store it on a index (using Lucene API), this index process let you Search on DBObjects and
show the result to users, you need too for each application/component put how the eSearch
will build the URL to show the Information for this DBObject (see link-field definition on
the XML).


Later to this definition you can add search capability to your web application using the
eSearch TAG Library as i show below:


== (eSearch Form) ==

<esearch:Form advanced="true" preferences="true"... />

 -) This TAG let you include a form similar to this on any page:


    Search: |                 | < GO > .Advanced Search
                                                 .Preferences


== (eSearch Result Page construction) ==

<expresso:stylesheet/>
<expresso:stylesheet component="esearch"/>
...
<esearch:Pager MaxHits="" MaxHitsByPage="">
    <esearch:MainLink hightlight="true">

     <esearch:Info highlight="true" label="User ID:" name = "UserID"
                          style="jc-esearch-infostyle_1">
     <esearch:Info highlight="false" label="Created:" name = "createdDate"
                          style="jc-esearch-infostyle_2">
     <esearch:Info highlight="false" label="Login name:" name = "login"
                          style="jc-esearch-infostyle_2">
</esearch:Pager>


please all this is under development and any thing can be change at any moment.
any feedback, advice, tips, correction are very welcome!.

thanks for your attention, soon will have the first version of this part of the eSearch
component.


Gaspar

P.D.
-) The other part in the future will be make a Crawler that let Web Developer include
Search capability for his/her Web Site as Google add this capability for the entire
Internet.






More information about the Opensource mailing list