Searches the full-text index with a specified query string and returns all items that still exist in SimpleDB.

Namespace: Simol
Assembly: Simol (in Simol.dll) Version: 1.0.0.0

Syntax

C#
public List<T> Find<T>(
	string queryText,
	int resultStartIndex,
	int resultCount,
	string searchProperty
)
Visual Basic
Public Function Find(Of T) ( _
	queryText As String, _
	resultStartIndex As Integer, _
	resultCount As Integer, _
	searchProperty As String _
) As List(Of T)
Visual C++
public:
generic<typename T>
virtual List<T>^ Find(
	String^ queryText, 
	int resultStartIndex, 
	int resultCount, 
	String^ searchProperty
) sealed

Parameters

queryText
Type: System..::..String
The search query text
resultStartIndex
Type: System..::..Int32
The start index of items to return from the full-text index.
resultCount
Type: System..::..Int32
The maximum number of items to return from the full-text index.
searchProperty
Type: System..::..String
The default indexed property to search

Type Parameters

T
The item type to return

Return Value

Remarks

The search query string and search property are simply passed through to the underlying full-text engine through the configured IIndexer. Items found during the full-text search are retrieved from SimpleDB using multiple threads. The returned items are ordered according to the ordering logic of the full-text engine. The LuceneIndexer installed by default orders items by search score rank.

Here are some query examples for use with the LuceneIndexer. To search the "Message" property for "Send the package" you have two options:

  • queryText=Send the package
    searchProperty=Message
  • queryText=Message: Send the package
    searchProperty=null
To search both the "Address1" and "Address2" fields for "6523 Front St":
  • queryText=Address1:"6523 Front St"
    searchProperty="Address2"
  • queryText=Address1:"6523 Front St" OR Address2:"6523 Front St"
    searchProperty=null

You can find out more about the Lucene query syntax at http://lucene.apache.org/java/2_4_0/queryparsersyntax.html.

IMPORTANT:ConsistentReadScope has no effect when used with the Find methods because all indexed item retrievals are done asynchronously.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionIf the queryText parameter is null
System..::..ArgumentOutOfRangeExceptionIf the queryText parameter is empty
AmazonSimpleDBExceptionIf the request to SimpleDB fails for any reason
Simol..::..SimolDataExceptionIf the SimpleDB item cannot be converted into the requested item type
Simol..::..SimolConfigurationExceptionIf no valid SimpleDB mapping can be configured for the requested item type or no indexer is installed
System..::..InvalidOperationExceptionIf the requested item type has no indexed properties.

See Also