org.tigris.scarab.util.word
Interface SearchIndex

All Known Implementing Classes:
LuceneSearchIndex

public interface SearchIndex

Support for searching/indexing text

Version:
$Id: SearchIndex.java 9381 2005-01-09 15:28:09Z dabbous $
Author:
John McNally

Field Summary
static java.lang.String ATTACHMENT_ID
           
static java.lang.String ATTACHMENT_TYPE_ID
           
static java.lang.String ATTRIBUTE_ID
           
static java.lang.Long[] EMPTY_LIST
           
static java.lang.String INDEX_PATH
           
static java.lang.String ISSUE_ID
           
static java.lang.String PARSE_ERROR
           
static java.lang.String TEXT
           
static java.lang.String VALUE_ID
           
 
Method Summary
 void addAttachmentQuery(java.lang.Integer[] ids, java.lang.String text)
          Specify search criteria for attachments
 void addQuery(java.lang.Integer[] attributeIds, java.lang.String text)
          Specify search criteria.
 void clear()
          Prepares the instance for reuse.
 java.lang.Long[] getRelatedIssues()
          returns a list of related issue IDs sorted by relevance descending.
 java.lang.Long[] getRelatedIssues(boolean mergeResults)
          returns a list of related issue IDs sorted by relevance descending.
 void index(Attachment attachment)
          Store index information for an Attachment
 void index(AttributeValue attributeValue)
          Store index information for an AttributeValue
 void updateIndex()
          update the index for all entities that currently exist
 

Field Detail

PARSE_ERROR

public static final java.lang.String PARSE_ERROR
See Also:
Constant Field Values

INDEX_PATH

public static final java.lang.String INDEX_PATH
See Also:
Constant Field Values

VALUE_ID

public static final java.lang.String VALUE_ID
See Also:
Constant Field Values

ISSUE_ID

public static final java.lang.String ISSUE_ID
See Also:
Constant Field Values

ATTRIBUTE_ID

public static final java.lang.String ATTRIBUTE_ID
See Also:
Constant Field Values

ATTACHMENT_ID

public static final java.lang.String ATTACHMENT_ID
See Also:
Constant Field Values

ATTACHMENT_TYPE_ID

public static final java.lang.String ATTACHMENT_TYPE_ID
See Also:
Constant Field Values

TEXT

public static final java.lang.String TEXT
See Also:
Constant Field Values

EMPTY_LIST

public static final java.lang.Long[] EMPTY_LIST
Method Detail

addQuery

public void addQuery(java.lang.Integer[] attributeIds,
                     java.lang.String text)
              throws java.lang.Exception
Specify search criteria. This is incremental.

Throws:
java.lang.Exception

addAttachmentQuery

public void addAttachmentQuery(java.lang.Integer[] ids,
                               java.lang.String text)
                        throws java.lang.Exception
Specify search criteria for attachments

Throws:
java.lang.Exception

getRelatedIssues

public java.lang.Long[] getRelatedIssues()
                                  throws java.lang.Exception
returns a list of related issue IDs sorted by relevance descending. Should return an empty/length=0 array if search returns no results.

Throws:
java.lang.Exception

getRelatedIssues

public java.lang.Long[] getRelatedIssues(boolean mergeResults)
                                  throws java.lang.Exception
returns a list of related issue IDs sorted by relevance descending. Should return an empty/length=0 array if search returns no results. if(mergeResults==false) performs an implicit AND on internal partial queries. if(mergeResults==true) performs an implicit OR on internal partial queries. The method getRelatedIssue() is equivalent to getRelatedIssues(false);

Throws:
java.lang.Exception

index

public void index(AttributeValue attributeValue)
           throws java.lang.Exception
Store index information for an AttributeValue

Throws:
java.lang.Exception

index

public void index(Attachment attachment)
           throws java.lang.Exception
Store index information for an Attachment

Throws:
java.lang.Exception

updateIndex

public void updateIndex()
                 throws java.lang.Exception
update the index for all entities that currently exist

Throws:
java.lang.Exception

clear

public void clear()
Prepares the instance for reuse.



Copyright © 2000-2004 Tigris.org. All Rights Reserved.