mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-17 02:56:07 -04:00
Removed 'startHash' parameter from hash64n().
It was always default (0) or explicitly 0.
This commit is contained in:
@ -420,7 +420,7 @@ bool Query::setQTerms ( Words &words ) {
|
||||
Synonyms syn;
|
||||
int32_t sn = 0;
|
||||
if ( m_queryExpansion ) sn = m_numWords;
|
||||
int64_t to = hash64n("to",0LL);
|
||||
int64_t to = hash64n("to");
|
||||
for ( int32_t i = 0 ; i < sn ; i++ ) {
|
||||
// get query word
|
||||
QueryWord *qw = &m_qwords[i];
|
||||
|
4
hash.cpp
4
hash.cpp
@ -97,8 +97,8 @@ uint32_t hash32n ( const char *s ) {
|
||||
return h;
|
||||
}
|
||||
|
||||
uint64_t hash64n ( const char *s, uint64_t startHash ) {
|
||||
uint64_t h = startHash;
|
||||
uint64_t hash64n(const char *s) {
|
||||
uint64_t h = 0;
|
||||
for ( register int32_t i = 0 ; s[i] ; i++ )
|
||||
h ^= g_hashtab [(unsigned char)i] [(unsigned char)s[i]];
|
||||
return h;
|
||||
|
2
hash.h
2
hash.h
@ -31,7 +31,7 @@ uint32_t hash32 ( const char *s, int32_t len,uint32_t startHash=0);
|
||||
uint32_t hash32h ( uint32_t h1 , uint32_t h2 ) ;
|
||||
uint64_t hash64h ( uint64_t h1 , uint64_t h2 );
|
||||
uint32_t hash32Lower_a ( const char *s, int32_t len,uint32_t startHash=0);
|
||||
uint64_t hash64n ( const char *s, uint64_t startHash =0LL);
|
||||
uint64_t hash64n(const char *s);
|
||||
uint96_t hash96 ( const char *s, int32_t slen);
|
||||
|
||||
// . these convert \n to \0 when hashing
|
||||
|
2
main.cpp
2
main.cpp
@ -4864,7 +4864,7 @@ void dumpLinkdb ( const char *coll,
|
||||
Url u;
|
||||
u.set( url, strlen( url ), true, false );
|
||||
uint32_t h32 = u.getHostHash32();
|
||||
int64_t uh64 = hash64n(url,0);
|
||||
int64_t uh64 = hash64n(url);
|
||||
startKey = Linkdb::makeStartKey_uk ( h32 , uh64 );
|
||||
endKey = Linkdb::makeEndKey_uk ( h32 , uh64 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user