cancel
Showing results for 
Search instead for 
Did you mean: 

Search must performed 2 times to get the complete list

wmay
Champ in-the-making
Champ in-the-making
I have the problem that i often have to search 2 times to get the complete result list - the first time when i perform the search - only a quick search using a single word which should bring back a longer result list e.g. 200 document hits.

When i search the first time i get only a single document as result and then when i perform the search a second time i get the full and i would say correct search result list with all documents. This happens only when the search result is a longer list of documents.

When i then do this search again and again with the same search criteria - the result is allways ok and also faster then the first time - so it seems to be cached. But when i try a new word which also should bring back a longer hit list - very often the same happens - first search - no result or only one document and then the second try the complete list.

It seems that there is a timeout and the seach or fill the result list is cancled and then in the background the old search is cache and so when i try this search a second time it is in the cache and i get the full list.

There is no "error" message or something else to inform the customer - what happens - this is a problem which makes the user uncertain because he knows that there are multiple results but they do not come up and when he tries it a second time the result is different like before.

Is there any parameter and setting what can be changed or tuned so that this does not happens and that all the complete or the same result list comes up with each search ?

Thank you for your help and comments.
17 REPLIES 17

wmay
Champ in-the-making
Champ in-the-making
I retested it with the share search function - "advanced search" - and i searched only for "atom" in the name field.

Same like Alf. Explorer - after 30 sek. a result but only one document - then i did the search again and the next search with "all" documents = 250 documents = 5 pages came up after 15 sec. this is the only difference to the search via Alf Explorer where this 2nd and complete result comes immediately.

mrogers
Star Contributor
Star Contributor
What version of 3.2 are you using?

wmay
Champ in-the-making
Champ in-the-making
CE 3.4 (d3370)

wmay
Champ in-the-making
Champ in-the-making
Hallo,

We "played around" with this parameter but we did now have the impression that this parameter has an real effect to solve this problem - is ther someone who is able to reproduce this and is this a know bug / problem or is there any chance to solve this problem by some settings / paramters ?

This effect can be reproduced with all the different search functions - node browser / share / Alf explorer…

thank you for your help.

afaust
Legendary Innovator
Legendary Innovator
Hello,

just a quick question: What is your setting for the following parameter?

system.readpermissions.bulkfetchsize

This defaults to 1000. It controls the amount of metadata loaded while checking for permissions and is the main contributor to the duration of the permission check. The paramaters Mike has listed control how lenient the permission check is in regards to duration - this parameter directly affects how long the check can take in the wort cases. This parameter is especially important for paged requests and result sets where the user has access to only a limited fraction of the content items. As Alfresco pre-loads content based on the low-level Lucene search, it may load to much content into memory, i.e. content that is not contained in the requested page or the user does not have permissions for anyway.

In my experience, in a properly managed content repository with large volumes of content items and properly differentiated permissions, the observed performance is closer to a worst case than to the best case scenario. The worst case is something like this: you request a result page of 25 items and have the parameter set to the default of 1000 - if the 25 items you actually have access to are located/sorted at the 1st, 1001st, 2001st … position, you may end up loading up to 25000 content items in memory just for the permission check alone.

The problem with permission checking is that there is not guarantee of a certain performance for an arbitrary search - nor is there a narrow corridor performance measurements fall into. This is why I always set the parameter to 0 in installations I set up / manage. This of course is detrimental to retrieval of large page sizes as content is only loaded into memory on demand - but provides a guaranteed linear scalability and near unnoticable variance for common page sizes in user oriented searches.

Regards

wmay
Champ in-the-making
Champ in-the-making
Ok, thank you very much - this is the solution so that we do not have to perform the search 2 times to get the complete list.

dhartford
Champ on-the-rise
Champ on-the-rise
confirmed I ran into a similar issue, thank you for posting this information and your own confirmation.

problem statement:  First search for a common value took a long time but only returned one result.  The second search for the same value was quick but returned many (the expected) results.

resolution in alfresco-global.properties to have the first search always return all/expected results. Problem and resolution experienced/resolved on Alfresco 3.4.d:

system.acl.maxPermissionCheckTimeMillis=30000
system.acl.maxPermissionChecks=1000
system.readpermissions.bulkfetchsize=0

andy
Champ on-the-rise
Champ on-the-rise
Hi

These issues are resolved in Alfresco 4.0 using SOLR.

Andy