Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
SloppyPhraseScorer.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef SLOPPYPHRASESCORER_H
8#define SLOPPYPHRASESCORER_H
9
10#include "PhraseScorer.h"
11
12namespace Lucene {
13
66
67}
68
69#endif
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Position of a term in a document that takes into account the term offset within the phrase.
Definition PhrasePositions.h:15
Scoring functionality for phrase queries. A document is considered matching if it contains the phrase...
Definition PhraseScorer.h:22
ByteArray norms
Definition PhraseScorer.h:32
WeightPtr weight
Definition PhraseScorer.h:30
SimilarityPtr similarity
Definition Scorer.h:45
Definition SloppyPhraseScorer.h:14
Collection< PhrasePositions * > repeats
Definition SloppyPhraseScorer.h:23
Collection< PhrasePositions * > tmpPos
Definition SloppyPhraseScorer.h:24
int32_t initPhrasePositions()
Init PhrasePositions in place. There is a one time initialization for this scorer:
PhrasePositions * termPositionsDiffer(PhrasePositions *pp)
We disallow two pp's to have the same TermPosition, thereby verifying multiple occurrences in the que...
PhrasePositions * flip(PhrasePositions *pp, PhrasePositions *pp2)
Flip pp2 and pp in the queue: pop until finding pp2, insert back all but pp2, insert pp back....
SloppyPhraseScorer(const WeightPtr &weight, Collection< TermPositionsPtr > tps, Collection< int32_t > offsets, const SimilarityPtr &similarity, int32_t slop, ByteArray norms)
int32_t slop
Definition SloppyPhraseScorer.h:22
virtual double phraseFreq()
Score a candidate doc for all slop-valid position-combinations (matches) encountered while traversing...
bool checkedRepeats
Definition SloppyPhraseScorer.h:25
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< Similarity > SimilarityPtr
Definition LuceneTypes.h:435
boost::shared_ptr< Weight > WeightPtr
Definition LuceneTypes.h:480

clucene.sourceforge.net