Share via


Combining Property Searches and Free Text Searches

You can use the Search method of the CatalogManager object to combine property search with free text search. The following example searches all books with price less than 100 dollars:

oCatalogManager.Search(“cy_list_price<100”, “books”,”mycatalog”)

You can use the Search method of the Category object to restrict your search to a single category. You can also specify if you want to search recursively or not.

Sometimes the FreetextSearch and Query methods do not return an error and the recordset is null. The FreetextSearch and Query methods will write the error to the event log.

When doing a free text search, you can use the FreeTextSearch_Rank property to find out how well a row in the returned recordset matched your search phrase. You can also sort results based on this rank. For example:

oCatalogManager.FreeTextSearch(“books”,”mycatalog”, ,”[Name],[Description],[ FreeTextSearch_Rank]”,
“[FreeTextSearch_Rank]”)
 oCatalogManager.Search(,“books” ,”mycatalog”, ,”[Name],[Description],[ FreeTextSearch_Rank]”,
“[FreeTextSearch_Rank]”)

However, FreeTextSearch_Rank can be specified with the Search method only if the strFTSPhrase parameter is not blank.

See Also

Service Pack 2 Enhancements for Catalogs

Copyright © 2005 Microsoft Corporation.
All rights reserved.