Letractively / dataparksearch

Automatically exported from code.google.com/p/dataparksearch
GNU General Public License v2.0
0 stars 0 forks source link

Multi-dbaddr is broken in 4.52 onwards #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Setup dpsearch with multiple indices each with its own searchd daemon.
Setup the search.htm to search across all the searchd daemons
If there are duplicate articles between the indices you will sometimes get
results with no document information depending on the order of the searchd
daemons specified in the search.htm. 

The problem lies around line 348 in the file src/searchd.c #ifdef 
DpsDocFromTextBuf(&Res->Doc[ndocs], tok);
WITH_MULTIDBADDR
                                        {
                                          char *dbstr =
DpsVarListFindStr(&Res->Doc[ndocs].Sections, "dbnum", NULL);
                                          if (dbstr != NULL) {
                                            Res->Doc[ndocs].dbnum =
DPS_ATOI(dbstr);
                                          }
                                        }
#endif

Assigning Res->Doc[ndocs].dbnum causes the db number to be set incorrectly
and the document is looked for in the wrong index. Previous versions did
not have that code and also the assignment
DpsDocFromTextBuf(&Res->Doc[ndocs], tok); was after the #endif.

Commenting out the whole if(dbstr) ... clause and moving the assignment to
the old position seems to fix the problems.

Original issue reported on code.google.com by amitshar...@gmail.com on 14 May 2009 at 5:18

GoogleCodeExporter commented 9 years ago
A quick-fix has been commited to SVN, please check it.
http://dataparksearch.googlecode.com/svn-history/r174/trunk/src/searchd.c

Original comment by dp.max...@gmail.com on 17 May 2009 at 12:50

GoogleCodeExporter commented 9 years ago

Original comment by dp.max...@gmail.com on 17 Jun 2009 at 1:11