Menu

#571 Advanced Search on Web Pages fails for OR searches

v1.0 (example)
open
nobody
None
5
2015-04-16
2015-04-16
Ahasuerus
No

Advanced Search on Web Pages produces unexpected results for OR searches. This is due to the fact that the final query looks like this:

select distinct authors.* from authors,webpages where ((authors.author_canonical like '%bo%') OR (webpages.url like '%bogdanov%')) and webpages.author_id=authors.author_id order by author_canonical limit 100

Which only finds authors who have Web pages associated with their records. Instead the query probably should look like this:

select distinct authors.* from authors,webpages where ((authors.author_canonical like '%bo%') OR (webpages.url like '%bogdanov%' and webpages.author_id=authors.author_id)) order by author_canonical limit 100

although we will need to check performance.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB