X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmircoders%2Fsearch%2FSearchTerm.java;fp=source%2Fmircoders%2Fsearch%2FSearchTerm.java;h=af2de1cc240508380f1af320a88df753f9ba9107;hb=c9ac8fa71b679f8d967aac901bbef945c13b94c9;hp=6ed50799fa954280edc904a54964a70009459dee;hpb=d63595f89aaa4b6a524dc0b4af9e0eef888f4c6b;p=mir.git diff --git a/source/mircoders/search/SearchTerm.java b/source/mircoders/search/SearchTerm.java index 6ed50799..af2de1cc 100755 --- a/source/mircoders/search/SearchTerm.java +++ b/source/mircoders/search/SearchTerm.java @@ -31,11 +31,42 @@ package mircoders.search; import java.util.Map; + import javax.servlet.http.HttpServletRequest; + import mir.entity.Entity; + import org.apache.lucene.document.Document; +/** + * The SearchTerm class attempts to encapsulate the relationships + * between: + * + * The basic idea is that how you index, query, and display a + * particular field in a resource are all intimately related, possibly + * more so than how you index two different fields of the same + * resource. + * + *

Instances of classes implementing SearchTerm are created when a Mir + * content entity is indexed by the IndexingProducerNode Class. The + * index method of each class is called in turn to add a bit of + * information to the Lucene documents which will be added to the + * index after it is created and all its fields specified. Instances + * of the same classes are created by ServletModuleOpenIndy so that it + * can construct a query to match against the lucene index, here the + * makeTerm methods are called in turn to pick out the parameter they + * want from the request and then construct the appropriate fragment + * of lucene query, which are ultimately concatenated together. These + * classes are also used to return appropriate template models + * representing any hits to be displayed as a result of processing the + * query.

+ */ abstract public class SearchTerm { protected String partOfEntity; protected String paramName;