forked from Mirrors/privacore-open-source-search-engine
Fix missed out changes in commit a8716aec79
This commit is contained in:
@ -705,7 +705,7 @@ bool processLoop ( void *state ) {
|
||||
return sendErrorReply ( st , g_errno );
|
||||
}
|
||||
|
||||
if ( ! ww.set ( &xml, true ) ) {
|
||||
if ( ! ww.set ( &xml ) ) {
|
||||
return sendErrorReply ( st , g_errno );
|
||||
}
|
||||
|
||||
|
2
Xml.cpp
2
Xml.cpp
@ -990,7 +990,7 @@ bool Xml::getTagContent( const char *fieldName, const char *fieldContent, char *
|
||||
s[len] = saved;
|
||||
}
|
||||
|
||||
if ( ( !wp.set(&xml, true) ) ) {
|
||||
if ( ( !wp.set(&xml) ) ) {
|
||||
// unable to allocate buffer
|
||||
return false;
|
||||
}
|
||||
|
@ -3860,7 +3860,7 @@ Words *XmlDoc::getWords ( ) {
|
||||
int64_t start = logQueryTimingStart();
|
||||
|
||||
// now set what we need
|
||||
if ( !m_words.set( xml, true ) ) {
|
||||
if ( !m_words.set( xml ) ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -4623,7 +4623,7 @@ int32_t *XmlDoc::getSummaryVector ( ) {
|
||||
|
||||
// word-ify it
|
||||
Words words;
|
||||
if ( ! words.set ( sb.getBufStart() , true ) ) {
|
||||
if ( ! words.set ( sb.getBufStart() ) ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -9472,7 +9472,7 @@ char **XmlDoc::getFilteredContent ( ) {
|
||||
xml.set(m_content, m_contentLen, m_version, *ct);
|
||||
|
||||
Words words;
|
||||
words.set(&xml, true);
|
||||
words.set(&xml);
|
||||
if (words.getNumAlnumWords() > g_conf.m_spiderFilterableMaxWordCount) {
|
||||
logTrace( g_conf.m_logTraceXmlDoc, "END. HTML and getNumAlnumWords too high");
|
||||
return &m_filteredContent;
|
||||
|
16
main.cpp
16
main.cpp
@ -4899,7 +4899,7 @@ static bool parseTest(const char *coll, int64_t docId, const char *query) {
|
||||
|
||||
t = gettimeofdayInMilliseconds();
|
||||
for ( int32_t i = 0 ; i < 100 ; i++ )
|
||||
if ( ! words.set ( &xml , true ) ) {
|
||||
if ( ! words.set ( &xml ) ) {
|
||||
log(LOG_WARN, "build: speedtestxml: words set: %s", mstrerror(g_errno));
|
||||
return false;
|
||||
}
|
||||
@ -4912,7 +4912,7 @@ static bool parseTest(const char *coll, int64_t docId, const char *query) {
|
||||
|
||||
t = gettimeofdayInMilliseconds();
|
||||
for ( int32_t i = 0 ; i < 100 ; i++ )
|
||||
if ( ! words.set ( &xml , true ) ) {
|
||||
if ( ! words.set ( &xml ) ) {
|
||||
log(LOG_WARN, "build: speedtestxml: words set: %s", mstrerror(g_errno));
|
||||
return false;
|
||||
}
|
||||
@ -4926,7 +4926,7 @@ static bool parseTest(const char *coll, int64_t docId, const char *query) {
|
||||
|
||||
t = gettimeofdayInMilliseconds();
|
||||
for ( int32_t i = 0 ; i < 100 ; i++ )
|
||||
if ( ! words.set ( content , true ) ) {
|
||||
if ( ! words.set ( content ) ) {
|
||||
log(LOG_WARN, "build: speedtestxml: words set: %s", mstrerror(g_errno));
|
||||
return false;
|
||||
}
|
||||
@ -4940,7 +4940,7 @@ static bool parseTest(const char *coll, int64_t docId, const char *query) {
|
||||
|
||||
Pos pos;
|
||||
// computeWordIds from xml
|
||||
words.set ( &xml , true ) ;
|
||||
words.set ( &xml ) ;
|
||||
t = gettimeofdayInMilliseconds();
|
||||
for ( int32_t i = 0 ; i < 100 ; i++ )
|
||||
if ( ! pos.set ( &words ) ) {
|
||||
@ -4957,7 +4957,7 @@ static bool parseTest(const char *coll, int64_t docId, const char *query) {
|
||||
|
||||
Bits bits;
|
||||
// computeWordIds from xml
|
||||
words.set ( &xml , true ) ;
|
||||
words.set ( &xml ) ;
|
||||
t = gettimeofdayInMilliseconds();
|
||||
for ( int32_t i = 0 ; i < 100 ; i++ )
|
||||
if ( ! bits.setForSummary ( &words ) ) {
|
||||
@ -4974,7 +4974,7 @@ static bool parseTest(const char *coll, int64_t docId, const char *query) {
|
||||
|
||||
Sections sections;
|
||||
// computeWordIds from xml
|
||||
words.set ( &xml , true ) ;
|
||||
words.set ( &xml ) ;
|
||||
bits.set(&words);
|
||||
t = gettimeofdayInMilliseconds();
|
||||
for ( int32_t i = 0 ; i < 100 ; i++ )
|
||||
@ -5029,7 +5029,7 @@ static bool parseTest(const char *coll, int64_t docId, const char *query) {
|
||||
log(LOG_WARN, "build: speedtestxml: getText: %s", mstrerror(g_errno));
|
||||
return false;
|
||||
}
|
||||
if ( ! words.set ( buf,true) ) {
|
||||
if ( ! words.set ( buf ) ) {
|
||||
log(LOG_WARN, "build: speedtestxml: words set: %s", mstrerror(g_errno));
|
||||
return false;
|
||||
}
|
||||
@ -5047,7 +5047,7 @@ static bool parseTest(const char *coll, int64_t docId, const char *query) {
|
||||
Query q;
|
||||
q.set2(query, langUnknown, 1.0, 1.0, NULL, false, true, ABS_MAX_QUERY_TERMS);
|
||||
matches.setQuery ( &q );
|
||||
words.set ( &xml , true ) ;
|
||||
words.set ( &xml ) ;
|
||||
t = gettimeofdayInMilliseconds();
|
||||
for ( int32_t i = 0 ; i < 100 ; i++ ) {
|
||||
matches.reset();
|
||||
|
@ -29,7 +29,7 @@ TEST( PosTest, FilterAllCaps ) {
|
||||
Pos pos;
|
||||
char buf[MAX_BUF_SIZE];
|
||||
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_strs[i]), true ) );
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_strs[i]) ) );
|
||||
|
||||
int32_t len = pos.filter( &words, 0, words.getNumWords(), false, buf, buf + MAX_BUF_SIZE );
|
||||
|
||||
@ -110,7 +110,7 @@ TEST( PosTest, FilterEnding ) {
|
||||
Pos pos;
|
||||
char buf[MAX_BUF_SIZE];
|
||||
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_strs[i]), true ) );
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_strs[i]) ) );
|
||||
|
||||
int32_t len = pos.filter( &words, 0, -1, true, buf, buf + 180 );
|
||||
|
||||
@ -144,7 +144,7 @@ TEST( PosTest, FilterTags ) {
|
||||
std::sprintf(input, input_strs[i]);
|
||||
|
||||
ASSERT_TRUE( xml.set( input, strlen( input ), TITLEREC_CURRENT_VERSION, CT_HTML ) );
|
||||
ASSERT_TRUE( words.set( &xml, true ) );
|
||||
ASSERT_TRUE( words.set( &xml ) );
|
||||
|
||||
int32_t len = pos.filter( &words, 0, words.getNumWords(), false, buf, buf + MAX_BUF_SIZE );
|
||||
|
||||
@ -182,7 +182,7 @@ TEST( PosTest, FilterSamePunct ) {
|
||||
Pos pos;
|
||||
char buf[MAX_BUF_SIZE];
|
||||
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_strs[i]), true ) );
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_strs[i]) ) );
|
||||
|
||||
int32_t len = pos.filter( &words, 0, -1, true, buf, buf + 180 );
|
||||
|
||||
@ -223,7 +223,7 @@ TEST( PosTest, DecodeHTMLEntities ) {
|
||||
Pos pos;
|
||||
char buf[MAX_BUF_SIZE];
|
||||
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_strs[i]), true ) );
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_strs[i]) ) );
|
||||
|
||||
int32_t len = pos.filter( &words, 0, -1, true, buf, buf + 180 );
|
||||
|
||||
@ -239,7 +239,7 @@ TEST(PosTest, SegFaultDotPrevChar) {
|
||||
|
||||
const char *input_str = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . ...";
|
||||
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_str), true ) );
|
||||
ASSERT_TRUE( words.set( const_cast<char*>(input_str) ) );
|
||||
|
||||
int32_t len = pos.filter( &words, 0, -1, true, buf, buf + 180 );
|
||||
|
||||
|
@ -23,7 +23,7 @@ static void generateSummary( Summary &summary, char *htmlInput, const char *quer
|
||||
ASSERT_TRUE(xml.set(htmlInput, strlen(htmlInput), 0, CT_HTML));
|
||||
|
||||
Words words;
|
||||
ASSERT_TRUE(words.set(&xml, true));
|
||||
ASSERT_TRUE(words.set(&xml));
|
||||
|
||||
Bits bits;
|
||||
ASSERT_TRUE(bits.set(&words));
|
||||
|
Reference in New Issue
Block a user