Static Public Member Functions inherited from Documents matching this clause will (in addition to the normal weightings) have their score multiplied by b. Gets or sets the boost for this query clause to b. The slop is zero by default, requiring exact matches. More exact matches are scored higher than sloppier matches, thus search results are sorted by exactness. For example, to switch the order of two words requires two moves (the first move places the words atop one another), so to permit re-orderings of phrases, the slop must be at least two. The slop is in fact an edit-distance, where the units correspond to moves of terms in the query phrase out of position. For larger values this works like a WITHIN or NEAR operator. If zero, then this is an exact phrase search. Sets the number of other words permitted between words in query phrase. By default the Searcher's Similarity implementation is returned. Subclasses may override this method to specify their own Similarity implementation, perhaps one that delegates through that of the Searcher. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.Įxpert: called when re-writing queries under MultiSearcher.Įxpert: Returns the Similarity implementation to be used for this query. Public Member Functions inherited from Įxpert: Constructs and initializes a Weight for a top-level query.Įxpert: called to re-write queries into primitive queries. Returns a hash code value for this object. Prints a user-readable version of this query. Returns the relative positions of terms in this phrase.Įxpert: Constructs an appropriate Weight implementation for this query.ĮxtractTerms ( queryTerms) phrases with more than one term at the same position or phrases with gaps (e.g. The relative position of the term within the phrase is specified explicitly. The relative position of the term is the one immediately after the last term added.Īdds a term to the end of the query phrase. A PhraseQuery is built by QueryParser for input like "new york".Īdds a term to the end of the query phrase. A Query that matches documents containing a particular sequence of terms.
0 Comments
Leave a Reply. |