Opentaps Search Feature

From Opentaps Wiki
Revision as of 22:08, 26 June 2009 by Sichen (talk | contribs)
Jump to navigationJump to search
 This is a conceptual document and the features described here are being implemented

Contents

Architecture

The basic idea is to use Hibernate Search to index data in the opentaps database, and then have a search tool which allows you to find results based on keywords rather than explicit parameters like on a find form. This is however different than Google Enterprise Search which is designed to index documents rather than database table values. However, the overall architecture should support integration to external search interfaces such as Google Enterprise Search fairly easily.

 Now these are just my notes

Each domain has a search capability: DomainSearch: ie --> AccountsSearch.searchByKeyword(...) -> List<Account>
SalesOpportunity.searchByKeyword(...) -> List<SalesOpportunity>

so each application (CRM, purchasing, etc.) can have a SearchService
which you can do setKeyWord(...); maybe some other set parameters.
then search() and then getAccounts() getContacts() getSalesOpportunities()

And then purchasing just has a search which allows you to getSuppliers() for now 

the results of the search should be passed to our GWT EntityListViews so that the webapps could display them.

hibernate search should be set to configure entities and fields and their weights
so for example, if I want SalesOpportunity.opportunityName to weigh 10x as much as SalesOpportunity.description
similar to applications/product/config/prodsearch.properties

the other thing we need is AOP on the delegator to index the entities as they are stored by delegator and do it in 1 transaction prior to ofbiz committing so we don't open up more transactions

here's a good thought experiment:
what if we integrate in Google Search Appliance which indexes your documents
so...let's say it's part of CRM and we want to link to documents
so we drop a new DocumentDomainSearchInterface/Impl into opentaps CRM
I guess what we need is a method in CRMSearchInterface/Impl which returns a link and a description for each result in the List<Document>
and then implement Google Search Appliance as one kind of DocumentDomainSearchInterface