ArticleSearch Class Reference
[Search]

Class for retrieving article search results. More...

List of all members.

Public Member Functions

_getMergedArray (&$journal, &$keywords, $publishedFrom, $publishedTo, &$resultCount)
_getMergedKeywordResults (&$journal, &$keyword, $type, $publishedFrom, $publishedTo, $resultsPerKeyword, $resultCacheHours)
_getMergedPhraseResults (&$journal, &$phrase, $type, $publishedFrom, $publishedTo, $resultsPerKeyword, $resultCacheHours)
_getSparseArray (&$mergedResults, $resultCount)
 _parseQuery ($signTokens, $tokens, &$pos, $total)
formatResults (&$results)
 parseQuery ($query)
retrieveResults (&$journal, &$keywords, $publishedFrom=null, $publishedTo=null, $rangeInfo=null)


Detailed Description

Class for retrieving article search results.

See also:
ArticleSearchDAO
FIXME: NEAR; precedence w/o parens?; stemming; weighted counting

Definition at line 35 of file ArticleSearch.inc.php.


Member Function Documentation

& ArticleSearch._getMergedArray ( &$  journal,
&$  keywords,
publishedFrom,
publishedTo,
&$  resultCount 
)

See implementation of retrieveResults for a description of this function.

Definition at line 102 of file ArticleSearch.inc.php.

References _getMergedKeywordResults(), and Config.getVar().

Referenced by retrieveResults().

& ArticleSearch._getMergedKeywordResults ( &$  journal,
&$  keyword,
type,
publishedFrom,
publishedTo,
resultsPerKeyword,
resultCacheHours 
)

Recursive helper for _getMergedArray.

Definition at line 126 of file ArticleSearch.inc.php.

References _getMergedPhraseResults().

Referenced by _getMergedArray(), and _getMergedPhraseResults().

& ArticleSearch._getMergedPhraseResults ( &$  journal,
&$  phrase,
type,
publishedFrom,
publishedTo,
resultsPerKeyword,
resultCacheHours 
)

Recursive helper for _getMergedArray.

Definition at line 180 of file ArticleSearch.inc.php.

References _getMergedKeywordResults(), and DAORegistry.getDAO().

Referenced by _getMergedKeywordResults().

& ArticleSearch._getSparseArray ( &$  mergedResults,
resultCount 
)

See implementation of retrieveResults for a description of this function.

Definition at line 213 of file ArticleSearch.inc.php.

Referenced by retrieveResults().

ArticleSearch._parseQuery ( signTokens,
tokens,
&$  pos,
total 
)

Query parsing helper routine. Returned structure is based on that used by the Search.QueryParser Perl module.

Definition at line 54 of file ArticleSearch.inc.php.

References ArticleSearchIndex.filterKeywords(), String.strtolower(), and Locale.translate().

Referenced by parseQuery().

& ArticleSearch.formatResults ( &$  results  ) 

See implementation of retrieveResults for a description of this function. Note that this function is also called externally to fetch results for the title index, and possibly elsewhere.

Definition at line 230 of file ArticleSearch.inc.php.

References DAORegistry.getDAO(), IssueAction.subscribedDomain(), IssueAction.subscribedUser(), and IssueAction.subscriptionRequired().

Referenced by PubMedExportPlugin.display(), NativeImportExportPlugin.display(), EruditExportPlugin.display(), CrossRefExportPlugin.display(), PubMedExportPlugin.executeCLI(), NativeImportExportPlugin.executeCLI(), CrossRefExportPlugin.executeCLI(), retrieveResults(), and SearchHandler.titles().

ArticleSearch.parseQuery ( query  ) 

Parses a search query string. Supports +/-, AND/OR, parens

Parameters:
$query 
Returns:
array of the form ('+' => <required>, '' => <optional>, '-' => excluded)

Definition at line 43 of file ArticleSearch.inc.php.

References _parseQuery().

Referenced by SearchHandler.advancedResults(), and SearchHandler.results().

& ArticleSearch.retrieveResults ( &$  journal,
&$  keywords,
publishedFrom = null,
publishedTo = null,
rangeInfo = null 
)

Return an array of search results matching the supplied keyword IDs in decreasing order of match quality. Keywords are supplied in an array of the following format: $keywords[ARTICLE_SEARCH_AUTHOR] = array('John', 'Doe'); $keywords[ARTICLE_SEARCH_...] = array(...); $keywords[null] = array('Matches', 'All', 'Fields');

Parameters:
$journal object The journal to search
$keywords array List of keywords
$publishedFrom object Search-from date
$publishedTo object Search-to date
$rangeInfo Information on the range of results to return

Definition at line 304 of file ArticleSearch.inc.php.

References _getMergedArray(), _getSparseArray(), and formatResults().

Referenced by SearchHandler.advancedResults(), and SearchHandler.results().


The documentation for this class was generated from the following file:

Generated on Mon Jul 14 10:55:39 2008 for Open Journal Systems by  doxygen 1.5.6