Closed (fixed)
Project:
Apache Solr Search
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2008 at 19:41 UTC
Updated:
18 Sep 2008 at 15:16 UTC
I've been seeing inconsistent indexing results and after 2 days of digging into the wrong end of Solr, I tracked it down to bad SQL...
Here's test cases and fix that works for me patched against 5.x-dev (0917).
Test case 1: sort order BY GREATEST(n.changed, c.last_comment_timestamp) ASC
nid timestamp
1 1219256347
2 1219256340
3 1219256348
Node 2 will not be indexed.
Test case 2: where ((GREATEST(n.changed, c.last_comment_timestamp) = %d AND n.nid > %d) OR
nid timestamp
1 1219256347
2 1219256347
3 1219256348
Node 2 will not be indexed.
| Comment | File | Size | Author |
|---|---|---|---|
| apachesolr_sql_fix.patch | 1.44 KB | john.money |
Comments
Comment #1
john.money commentedNote that the test cases above assume indexing 1 node per run.
Comment #2
JacobSingh commentedI'm guessing this is a dupe of:
http://drupal.org/node/302378
We need to do some work on the patch from:
http://drupal.org/node/42277#comment-846833
If you're keen, please go ahead, if you think this is a separate issue, please close.
Thanks!
Jacob
Comment #3
john.money commentedFirst link fixes case 1 (order by) but does not fix case 2 (where)... I like my implementation better because there is no need to recalculate last_change when ordering.
Second link (node.module patch) has essentially the same SQL, fixing both cases... I like my implementation better because there is no need to recalculate last_change when ordering.
I'd be happy to mark this as closed, as long as we get _some_ solution into dev ASAP. I wasted a day+ on this (as apparently other people have to). If we can't trust that every node is being indexed, then I know my employer will be hesitant to use ApacheSolr on production and instead fallback on the current Google site search (yuck).
Comment #4
john.money commentedMoving suggested patch to other thread.