Forum OpenACS Q&A: Bugtracker Search Live on OpenACS.org

Collapse
Posted by Dave Bauer on
I enabeld the bugtracker search on openacs.org. It required changing subsite::get to work in a scheduled proc, which I will have to figure out a permanent solution to, but for now you can type in a full text query or bug number into the search box on the bugtracker navbar.

TODO: implement search as a bugtracker filter so results come back in the bugtracker list format.

Collapse
Posted by Carl Robert Blesius on
Forgot to thank you for this Dave. Nice work!
Collapse
Posted by Robert Taylor on
cool!
Collapse
Posted by Nima Mazloumi on
this is nice but also slow: 267.95 Sec for searching the word "storage" that was found 220 times. Any idea why? For some reason bug-tracker is always very slow. Even with the new pagination. It seems to me that this is a workflow problem.
Collapse
Posted by Dave Bauer on
Nima,

I'll check the server setup. When I used the bug tracker search it was quite fast. In fact I noticed that overall bugtracker was much faster on the new server we put openacs.org on.

Collapse
Posted by Dave Bauer on
Well I restarted AOLserver (it was at 718mb) and vacuumed the database. it didn't help. Main issue is the existing code runs the search query twice, one to search and once to count the results.

We need to write a "best guess" result estimator, sort of how Google gives results. Its faster, but still not efficient to do the count seperately on Oracle.

Collapse
Posted by Dave Bauer on
One reason it is probably not as fast as we'd like, is the way to builds the search results display.

The search package currently re-queries the datasource procedure for each displayed result (10 on a page) which means 10 or more queries to display one page of results.

I suspect bugtracker is pretty complex to get the full datasource.

The next generation search engine caches the datasource in a table so headline data can be retrieved with the search results.

The work for that is on HEAD and is working for Oracle, it needs some work on PostgreSQL still.

Collapse
Posted by Dave Bauer on
I did the wrong test.

Nima
after vacuum and restarting aolserver search for "storage" in only bugtracker (not the whole site) took .95 seconds.

Collapse
Posted by Dave Bauer on
Ok,

Initial searchs for a certain term can be slow and take 5-10 seconds or more. Subsequent searchs are fast (the index is in ram now).

Collapse
Posted by Brian Fenton on
Heh, this is interesting. I recently had the opportunity to hear Tom Kyte (from asktom.oracle.com) talk about this. He demonstrated how Google completely guesses the number of results in a search (and also how it slows pretty badly after the first 5 or so pages). He said to never give an exact count, just make a guess using cardinality from v$sql_plan. Or if you're using Intermedia it can give you a guess. He also said never to give a link to a "Last Page" - just give the user an option to sort the query in a different way. I think this is because Oracle is usually tuned to quickly get "First Rows" rather than "All Rows".

Some information here (search on the page for "The application we are developing should use pagination to show the results" and read Tom's answer):
http://asktom.oracle.com/pls/ask/f?p=4950:8:1838703355396606297::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:127412348064

Brian

Collapse
Posted by Dirk Gomez on
Brian, interMedia could do this since version 8i, however this is pretty useless for most openacs-based since: usually they use very granular permissioning and that cannot be estimated by interMedia.