Lucene query problem

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2013 03:18 AM
Hi,
I am using SDK 4.2.b and java api. When I call a lucene query like below, it takes 5 minutes and there are only 4 contents.
In alfresco.log I saw lines about lucene index cleaner.I added log file.
Any suggestions.
Thanks,
Beslan
I am using SDK 4.2.b and java api. When I call a lucene query like below, it takes 5 minutes and there are only 4 contents.
In alfresco.log I saw lines about lucene index cleaner.I added log file.
Any suggestions.
SearchParameters searchParameters = new SearchParameters(); searchParameters.addStore(spacesStoreRef); searchParameters.addSort(orderBy, !descending); searchParameters.setQuery(query); searchParameters.setLanguage(SearchService.LANGUAGE_LUCENE); searchParameters.setMaxPermissionCheckTimeMillis(30000); searchParameters.setMaxPermissionChecks(100000); ResultSet results = this.getServiceRegistry().getSearchService().query(searchParameters);
Thanks,
Beslan
Labels:
- Labels:
-
Archive
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2013 03:27 AM
Hi,
you may force to rebuild index and take a look to how much memory you gave to Alfresco for startup…
Could you provide an extract from Alfresco.log?
Regards,
Andrea
you may force to rebuild index and take a look to how much memory you gave to Alfresco for startup…
Could you provide an extract from Alfresco.log?
Regards,
Andrea

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2013 04:26 AM
Hi,
I did a full reindex.
JVM memory parameters are MaxPermSize=512m -Xms256M -Xmx3500M
I added alfresco.log. <a>https://forums.alfresco.com/sites/forums/files/alfresco_2.txt</a>
Thanks.
I did a full reindex.
JVM memory parameters are MaxPermSize=512m -Xms256M -Xmx3500M
I added alfresco.log. <a>https://forums.alfresco.com/sites/forums/files/alfresco_2.txt</a>
Thanks.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2013 04:29 AM
why are you doing this?
searchParameters.setMaxPermissionCheckTimeMillis(30000);
searchParameters.setMaxPermissionChecks(100000);
This is not required unless you have very large resultset.
Also could you post your query?
searchParameters.setMaxPermissionCheckTimeMillis(30000);
searchParameters.setMaxPermissionChecks(100000);
This is not required unless you have very large resultset.
Also could you post your query?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2013 05:13 AM
Yes I have very large resultset. But I will limit the resultset to 500;
Thanks,
Beslan
+PATH:"/app:company_home/cm:archive//*" AND @\{http\://www.uz.com/metadata\}contentModel:'8295ae0a-8e1d-4a90-ba37-20fff0b4c1a3" AND @\{http\://www.uz.com/metadata\}Ada:'5115" AND @\{http\://www.uz.com/metadata\}Parsel:'1"
Thanks,
Beslan

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2013 05:56 AM
Hi,
PATH queries with "//*" are very slow if you use LUCENE search subsystem.
You should try to avoid such PATH entries if possible.
Cheers, Jan
PATH queries with "//*" are very slow if you use LUCENE search subsystem.
You should try to avoid such PATH entries if possible.
Cheers, Jan
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2013 06:41 AM
Yes, make it more targeted
also one more thing are you using any clustering?
Also if any one of the space huge number of documents it is advisable to categories them and distribute them among the subfolders.
also one more thing are you using any clustering?
Also if any one of the space huge number of documents it is advisable to categories them and distribute them among the subfolders.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2013 11:39 PM
Hi,
Removing PATH is the key. Everything is fine now.
Thanks,
Beslan
Removing PATH is the key. Everything is fine now.
Thanks,
Beslan

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2013 10:02 AM
Hi
Are you using SOLR or the lucene search subsystem.
SOLR is much faster at this sort of PATH query.
Andy
Are you using SOLR or the lucene search subsystem.
SOLR is much faster at this sort of PATH query.
Andy
