[MNT-10425] Avoid multiple identical search requests Created: 20-Jan-14  Updated: 18-Jul-14  Resolved: 18-Apr-14

Status: Closed
Project: Service Packs and Hot Fixes
Component/s: Search and Indexing (non-UI), Share Application
Affects Version/s: 4.1.7
Fix Version/s: 4.1.9

Type: Service Pack Request
Reporter: Corentin Roux [X] (Inactive) Assignee: Closed Bugs (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 1 day, 3 hours
Original Estimate: Not Specified

Tomcat6, PostgreSQL, Solr, firefox

Attachments: PNG File ResultPageShowStatus.png     PNG File quickSearchBox.png    
Issue Links:
is cloned by MNT-11301 CLONE - Avoid multiple identical sear... Closed
is related to by MNT-11063 Share de-selects the single site crit... Closed
Bug Priority:
Category 3
ACT Numbers:

00143418 PREMIER

Build Location: http://releases.alfresco.com/Enterprise%204.1/4.1.9/build-00036/



When a end-user use the "quick search" box (top right corner of the Share UI) to search for some keywords the result page is shown.
This page display a new search form with its submit button enabled.
For some end-users it is not obvious that the search query as already been sent to the server and they don't pay attention to the element showing the status.
The result is that they are clicking the search button of the result page leading to another identical FTS query being sent.

Most of the time this is not a big issue but when the search server is struggling to handle a query this could have dramatic effect since it doubles the number of those queries.

Steps to reproduce

1- Install Alfresco 4.1.4 with Solr
2- Set log4j.logger.org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient=debug
3- Start Alfresco and login as admin
4- On the admin dashboard fill the quick search box with a complex FTS query such as "*t*" and press enter
5- As soon as the search form of the result page is shown press enter again

Expected Behaviour

The search button of Share result page should be disabled (or replaced by a cancel button) when search is in progress.
Another option could be to display a "loader" popup to prevent the user from searching the same keywords once again.

Observed Behaviour

A second identical FTS query is sent to the server before Solr returned the result of the first one (See SolrQueryHTTPClient output is alfresco.log).

Analysis to date

Some complex FTS queries can consume up to several GB of memory on Solr.
So we should do our best to avoid multiples of those to be sent at the same time.
Customer is complaining because Solr is often becoming unresponsive because end-users are searching for complex queries like *xxyyzz* from their dashboard (so by default search is executed against all sites). It seems most of those users are not reading the search status displayed on the result page and execute their searches many times leading to solr becoming unresponsive handling identical FTS queries.

Comment by Alfresco QA Team (Inactive) [ 04-Mar-14 ]

Successfully verified against Alfresco Enterprise v4.1.8 (r63222-b946), RHEL 6.4x64, ootb; client: Win7x64, FF last;

Generated at Fri Feb 26 03:40:09 GMT 2021 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.