[ Index ] |
|
Code source de LifeType 1.2.4 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 386 lignes (15 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 6 fois |
Nécessite: | 0 fichiers |
SearchEngine:: (9 méthodes):
adaptSearchString()
getAdaptSearchTerms()
search()
getNumSearchResults()
getArticleSearchConditions()
siteSearch()
getNumSiteSearchResults()
searchBlogs()
searchGalleryResources()
Classe: SearchEngine - X-Ref
\ingroup DAOadaptSearchString( $searchTerms ) X-Ref |
takes the search string as originally input by a user and makes it "better", in the sense that for example converts it to "term1 AND term2" instead of "term1 OR term2" which is the default behaviour. In order to do so, the "+" operator must be added before each one of the search terms as long as it is not already there. param: searchTerms The original search string return: Returns an 'improved' version of the search terms |
getAdaptSearchTerms( $searchTerms ) X-Ref |
MARKWU: takes the search string as originally input by a user and makes it "better", in the sense that for example converts it to "term1 AND term2" instead of "term1 OR term2" which is the default behaviour. In order to do so, the "+" operator must be added before each one of the search terms as long as it is not already there. This one is for public use, and will also convert the search string to a search terms array. param: searchTerms The original search string return: Returns an 'improved' and 'arraized' version of the search terms |
search( $blogId, $searchTerms, $status = POST_STATUS_PUBLISHED, $includeFuture = true, $page = -1, $itemsPerPage = -1 ) X-Ref |
Searches through articles, custom fields and comments only if enabled param: blogId The blog id where we're searching, or -1 if we're doing a global search param: searchTerms A string containing the search terms param: status In case we're looking for a particular status param: includeFuture param: page Page of results to return param: itemsPerPage Number of items per page return: |
getNumSearchResults( $blogId, $searchTerms, $status, $includeFuture = true ) X-Ref |
Returns the number of search results, but this method only applies to article searches. If you're interested in getting the number of total matching blogs or resources, use getNumSiteSearchResults param: blogId param: searchTerms param: status return: |
getArticleSearchConditions( $searchTerms ) X-Ref |
siteSearch( $searchTerms, $searchType, $status = -1, $includeFuture = true, $page = -1, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE ) X-Ref |
performs a site-wide search param: searchTerms An string with the terms for the search param: searchType One of the following: SEARCH_ARTICLE, SEARCH_BLOG or SEARCH_GALLERYRESOURCE param: status The status. Each item has its own constants for status codes, so this value will depend param: includeFuture Whether to include posts with a future date in the results param: page The page of results to get param: itemsPerPage Number of items per page return: |
getNumSiteSearchResults( $searchTerms, $searchType, $status = -1, $includeFuture = true ) X-Ref |
Returns the total number of matching items, be it articles, blogs or files. param: searchTerms An string with the terms for the search param: searchType One of the following: SEARCH_ARTICLE, SEARCH_BLOG or SEARCH_GALLERYRESOURCE param: status The status. Each item has its own constants for status codes, so this value will depend param: includeFuture whether to include future articles in the search return: The number of matching items for the given search terms |
searchBlogs( $searchTerms, $blogStatus = BLOG_STATUS_ACTIVE, $page = -1, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE ) X-Ref |
Returns an array of SearchResult objects containing information about the search, such as the relevance (not very relevant, though :)), and the BlogObject param: searchTerms An string with the terms for the search param: blogStatus param: page The page of results to get param: itemsPerPage Number of items per page return: An array of SearchResult objects |
searchGalleryResources( $ownerId, $searchTerms, $page = -1, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE ) X-Ref |
Returns an array of SearchResult objects containing information about the searchand the GalleryResource object param: ownerId the id of the blog/user whose pictures we're searching, or "-1" or "_all_" to search through param: searchTerms An string with the terms for the search param: page The page of results to get param: itemsPerPage Number of items per page return: An array of SearchResult objects |
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |