Note: The first module is not commonly used in commerce applications.

Designed primarily for use with unstructured data, the first module ranks documents by how close the query terms are to the beginning of the document. The first module groups its results into strata of different sizes. The strata are not the same size, because while the first word is probably more relevant than the tenth word, the 301st is probably not significantly more relevant than the 310th word. This module assumes that the closer a word is to the beginning of a document, the more likely it is to be relevant.

The first module works as follows:

When the query has a single term, the first module retrieves the first absolute position of the word in the document, then calculates which stratum contains that position. The score for this document is based upon that stratum; earlier strata are better than later strata.

When the query has multiple terms, first determines the first absolute position for each of the query terms, and then calculates the median position. This median is treated as the position of this query in the document and can be used with stratification as described in the single word case.

With query expansion (using stemming or the thesaurus), the first module treats expanded terms as if they occurred in the source query. For example, the phrase glucose intolerance would be corrected to glucose intolerance (with intolerance spell-corrected to intolerance). first then continues as it does in the non-expansion case. The first position of each term is computed and the median of these is taken.

In a partially matched query, where only some of the query terms cause a document to match, first behaves as if the intersection of terms that occur in the document and terms that occur in the original query were the entire query. For example, if the query cat bird dog is partially matched to a document on the terms cat and bird, then the document is scored as if the query were cat bird. If no terms match, then the document is scored in the lowest strata.

The first module is supported for wildcard queries.

The first module can optionally be specified with the considerFieldRanks parameter. Specifying this parameter causes the exact module to sort records according to their priorities in your search interface after it has sorted them according to its own criteria.


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices