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 81 of file searchindex.h.

Member Typedef Documentation

◆ URLInfoMap

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

Definition at line 84 of file searchindex.h.

Constructor & Destructor Documentation

◆ IndexWord()

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

Definition at line 85 of file searchindex.h.

85: m_word(word) {}
QCString word() const
Definition searchindex.h:88

References m_word, and word().

Member Function Documentation

◆ addUrlIndex()

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

Definition at line 54 of file searchindex.cpp.

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

References m_urls.

◆ urls()

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

Definition at line 87 of file searchindex.h.

87{ return m_urls; }

References m_urls.

◆ word()

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

Definition at line 88 of file searchindex.h.

88{ return m_word; }

References m_word.

Referenced by IndexWord().

Member Data Documentation

◆ m_urls

URLInfoMap SearchIndex::IndexWord::m_urls
private

Definition at line 92 of file searchindex.h.

Referenced by addUrlIndex(), and urls().

◆ m_word

QCString SearchIndex::IndexWord::m_word
private

Definition at line 91 of file searchindex.h.

Referenced by IndexWord(), and word().


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