| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.search.LuceneMemberSearchEngine
public class LuceneMemberSearchEngine
Provides member indexing and search.
| Field Summary | |
|---|---|
static String | 
ALLFIELDS_FIELD
 | 
protected  Channel | 
channel
 | 
static String | 
EMAIL_FIELD
 | 
static String | 
FIRSTNAME_FIELD
 | 
static String | 
GROUPS_FIELD
 | 
static String | 
ID_FIELD
 | 
protected  org.apache.lucene.store.FSDirectory | 
indexDirectory
 | 
static String | 
INDEXING_DATE_EXTRAINFO
 | 
static String | 
INDEXING_DATE_FIELD
 | 
protected  boolean | 
isOperationRunning
 | 
static String | 
JOBTITLE_FIELD
 | 
static String | 
LASTNAME_FIELD
 | 
static String | 
LOGIN_FIELD
 | 
protected static String | 
MEMBER_INDEX_DIRECTORY
 | 
static String | 
ORGANIZATION_FIELD
 | 
static String | 
REVISION
 | 
static String | 
USAGE_FIELD
 | 
| Fields inherited from interface com.jalios.util.JaliosConstants | 
|---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR | 
| Method Summary | |
|---|---|
 void | 
add(Member mbr)
Add the specified Member to the lucene index.  | 
 org.apache.lucene.store.FSDirectory | 
getDirectory()
Returns the lucene directory used by this LuceneMemberSearchEngine.  | 
 Date | 
getIndexingDate(Member mbr)
Retrieve the Date at which the specified Member was indexed.  | 
static LuceneMemberSearchEngine | 
getInstance()
Retrieve the LuceneMemberSearchEngine singleton.  | 
 org.apache.lucene.document.Document | 
getLuceneDocument(Member mbr)
Retrieve a new lucene Document for the specified Member in preparation of indexing.  | 
 void | 
index(Member mbr,
      org.apache.lucene.document.Document doc)
Add the specified lucene Document to the index.  | 
 boolean | 
isAvailable()
 | 
 boolean | 
isOperationRunning()
Check if an writing operation is being performed on the MemberIndex.  | 
 void | 
optimize()
Realize a Lucene optimization of the Lucene Member Index.  | 
 void | 
reindexAll()
Reindex all Member and DBMember in the Lucene Member Index.  | 
 void | 
remove(Member mbr)
Remove the specified Member from the lucene index.  | 
 LinkedHashMap<String,Float> | 
search(AllMemberQueryHandler amqh)
Search all members (Member and DBMember) using the specified criteria (paging excepted).  | 
 org.apache.lucene.document.Document | 
searchLuceneDocument(Member mbr)
Returns the lucene Document corresponding to the specified Member.  | 
 PageResult<Member> | 
searchPage(AllMemberQueryHandler amqh)
Search all members (Member and DBMember) using the specified criteria.  | 
 void | 
update(Member mbr)
Update the specified Member in the lucene index.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String REVISION
protected static final String MEMBER_INDEX_DIRECTORY
public static final String ID_FIELD
public static final String ALLFIELDS_FIELD
public static final String INDEXING_DATE_FIELD
public static final String INDEXING_DATE_EXTRAINFO
public static final String LOGIN_FIELD
public static final String FIRSTNAME_FIELD
public static final String LASTNAME_FIELD
public static final String EMAIL_FIELD
public static final String JOBTITLE_FIELD
public static final String ORGANIZATION_FIELD
public static final String GROUPS_FIELD
public static final String USAGE_FIELD
protected final Channel channel
protected final org.apache.lucene.store.FSDirectory indexDirectory
protected boolean isOperationRunning
| Method Detail | 
|---|
public static LuceneMemberSearchEngine getInstance()
                                            throws Exception
 After engine has been started during Channel startup, use Channel.getMemberSearchEngine()
 to retrieve singleton getter without having to catch exception.
Exception - if was not initialized and the initialization failed.public org.apache.lucene.store.FSDirectory getDirectory()
IndexReader.indexExists(Directory).
public boolean isAvailable()
public org.apache.lucene.document.Document searchLuceneDocument(Member mbr)
mbr - the Member being looked for
public Date getIndexingDate(Member mbr)
mbr - the Member for which to retrieve the indexing date.
public PageResult<Member> searchPage(AllMemberQueryHandler amqh)
amqh - the AllMemberQueryHandler instance specifying search criteria.
public LinkedHashMap<String,Float> search(AllMemberQueryHandler amqh)
amqh - the AllMemberQueryHandler instance specifying search criteria.
public void add(Member mbr)
mbr - the Member to be added to lucene.public void update(Member mbr)
mbr - the Member to be update in lucene.public void remove(Member mbr)
mbr - the Member to be removed from lucene.public org.apache.lucene.document.Document getLuceneDocument(Member mbr)
mbr - the Member to index (must no be null).
index(Member, Document)index(Member, Document)
public void index(Member mbr,
                  org.apache.lucene.document.Document doc)
mbr - the Member to be indexed in lucene.doc - the lucene Document instance build (see getLuceneDocument(Member)public void optimize()
public void reindexAll()
public boolean isOperationRunning()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||