mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-13 02:36:06 -04:00
search for site:dk now works, but should be refined further. On terms page, term hashes are now 48-bit as stored in posdb
This commit is contained in:
17
XmlDoc.cpp
17
XmlDoc.cpp
@ -26995,10 +26995,22 @@ bool XmlDoc::hashUrl ( HashTableX *tt ) { // , bool isStatusDoc ) {
|
||||
dom_valid = true;
|
||||
}
|
||||
|
||||
|
||||
if ( name < end3 && dom_valid ) goto loop;
|
||||
|
||||
|
||||
// BR 20160121: Make searching for e.g. site:dk work
|
||||
setStatus ( "hashing tld for site search");
|
||||
char *tld = fu->getTLD();
|
||||
int32_t tldLen = fu->getTLDLen();
|
||||
|
||||
char *p = buf;
|
||||
gbmemcpy ( p , "http://", 7 ); p += 7;
|
||||
gbmemcpy ( p , tld, tldLen); p += tldLen;
|
||||
gbmemcpy ( p , "/", 1 ); p += 1;
|
||||
*p = '\0';
|
||||
if ( ! hashSingleTerm (buf,p-buf,&hi ) ) return false;
|
||||
|
||||
|
||||
setStatus ( "hashing ext colon");
|
||||
|
||||
//
|
||||
@ -35193,7 +35205,8 @@ bool XmlDoc::printTermList ( SafeBuf *sb , HttpRequest *hr ) {
|
||||
|
||||
if ( ! isXml )
|
||||
{
|
||||
sb->safePrintf("<td>0x%016"PRIx64"</td>", tp[i]->m_termId);
|
||||
// Show termId in decimal, masked as it would be stored in posdb
|
||||
sb->safePrintf("<td align=\"right\">%"INT64"</td>", (int64_t)(tp[i]->m_termId & TERMID_MASK));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user