Doxygen
Loading...
Searching...
No Matches
SearchIndex::IndexWord Class Reference
Collaboration diagram for SearchIndex::IndexWord:

Public Types

using URLInfoMap = std::unordered_map<int,URLInfo>

Public Member Functions

 IndexWord (const QCString &word)
void addUrlIndex (int, bool)
URLInfoMap urls () const
QCString word () const

Private Attributes

QCString m_word
URLInfoMap m_urls

Detailed Description

Definition at line 80 of file searchindex.h.

Member Typedef Documentation

◆ URLInfoMap

using SearchIndex::IndexWord::URLInfoMap = std::unordered_map<int,URLInfo>

Definition at line 83 of file searchindex.h.

Constructor & Destructor Documentation

◆ IndexWord()

SearchIndex::IndexWord::IndexWord ( const QCString & word)
inline

Definition at line 84 of file searchindex.h.

84: m_word(word) {}
QCString word() const
Definition searchindex.h:87

References m_word, and word().

Member Function Documentation

◆ addUrlIndex()

void SearchIndex::IndexWord::addUrlIndex ( int idx,
bool hiPriority )

Definition at line 53 of file searchindex.cpp.

54{
55 //printf("IndexWord::addUrlIndex(%d,%d)\n",idx,hiPriority);
56 auto it = m_urls.find(idx);
57 if (it==m_urls.end())
58 {
59 //printf("URLInfo::URLInfo(%d)\n",idx);
60 it = m_urls.emplace(idx,URLInfo(idx,0)).first;
61 }
62 it->second.freq+=2;
63 if (hiPriority) it->second.freq|=1; // mark as high priority document
64}

References m_urls.

◆ urls()

URLInfoMap SearchIndex::IndexWord::urls ( ) const
inline

Definition at line 86 of file searchindex.h.

86{ return m_urls; }

References m_urls.

◆ word()

QCString SearchIndex::IndexWord::word ( ) const
inline

Definition at line 87 of file searchindex.h.

87{ return m_word; }

References m_word.

Referenced by IndexWord().

Member Data Documentation

◆ m_urls

URLInfoMap SearchIndex::IndexWord::m_urls
private

Definition at line 91 of file searchindex.h.

Referenced by addUrlIndex(), and urls().

◆ m_word

QCString SearchIndex::IndexWord::m_word
private

Definition at line 90 of file searchindex.h.

Referenced by IndexWord(), and word().


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