#541: WebSearch - external_collections search degrades performance of the search
engine
-----------------------+-----------------
Reporter: rchyla | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: WebSearch | Version:
Keywords: |
-----------------------+-----------------
In the search_engine.perform_request_search()
There is this piece of code:
{{{
results_in_any_collection = HitSet()
# searching....
if len(results_in_any_collection) == 0 and not
hosted_colls_actual_or_potential_results_p:
if of.startswith("h"):
perform_external_collection_search(req, cc, [p, p1, p2, p3],
f, ec, verbose, ln, selected_external_collections_infos)
elif of.startswith("x"):
# Print empty, but valid XML
print_records_prologue(req, of)
print_records_epilogue(req, of)
return page_end(req, of, ln)
# continue searching....
}}}
So, the search fills the results_in_any_collection with recids, but then
it calls the external collection search which does not work with the
'results_in_any_collection' hitset, nor enriches it.
The placement of the external_collection_search is not optimal, as it
potentially degrades performance of all the searches (it does remote
request, which is very slow -- and the search operation must wait until
that completes).
I guess this is not a problem for INSPIRE if INSPIRE does not use external
collections, but seems sub-optimal.
--
Ticket URL: <https://invenio-software.org/ticket/541>
Invenio <http://invenio-software.org>