cancel
Showing results for 
Search instead for 
Did you mean: 

How to exceed Lucene Limit Search?

razieltd
Champ in-the-making
Champ in-the-making
Hi!

Is it possible with a ws java-backed research by lucene an unlimited number of nodes?
Now if i try to reseach in a store that contains 1100 nodes, the results list contains only 1000

I found this code:

SearchParameters sp = new SearchParameters();
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
sp.setQuery("PATH:\"/*\"");
sp.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
sp.setLimitBy(LimitBy.FINAL_SIZE);
sp.setLimit(1100);
rs=searchService.query(sp);

but nothing… if i try with sp.setLimit(10); work and my result list length is 10 but if i try with any value more higher then 1000 dont work… Smiley Sad

why? Smiley Indifferent
20 REPLIES 20

razieltd
Champ in-the-making
Champ in-the-making
Ok guys! if there is no way with this SearchParameters how can i fetch result set??

Thx

razieltd
Champ in-the-making
Champ in-the-making
i see that there is another method in the SearchParameters

.setBulkFetch(true);
i think in combination with this other
.setBulkFetchSize(1000);

but dont work  :? 

It is correct to use these methods for Alfresco 3.1 ? and How can i use it?

Pls Somebody can Helpme?

Thx

mrogers
Star Contributor
Star Contributor
You certainly don't want to play with bulk fetch size.

Have you tried setting
system.acl.maxPermissionCheckTimeMillis
system.acl.maxPermissionCheck

in your custom-repository.properties file?

And isn't it obvious that setMaxPermissionChecks does not exist on 3.1?   What sort of development environment do you have that doesn't highlight that instantly?      In particular make sure you are using the right version of the SDK for the code you are developing.

razieltd
Champ in-the-making
Champ in-the-making
Thank you for the answare  Smiley Happy

If is it possible i want to do it without modify any file.
and yes it is obvious that setMaxPermissionChecks does not exist on 3.1, iam sorry in the previous post i explained bad  :roll: . iam using 3.1SDK with eclipse  :wink:


but now want can i do for break this limit without modify the properties file?

Thx a lot  Smiley Happy

razieltd
Champ in-the-making
Champ in-the-making
So…. is it possible with 3.1??? and if yes how without modify any file?

mrogers
Star Contributor
Star Contributor
No I don't think its possible without modifying your configuration.    What's your objection to changing config?

razieltd
Champ in-the-making
Champ in-the-making
Simple  Smiley Happy  - i cant! Because we have several  webscript for searching nodes and a lot of these are used by our users and this limit (1000 record) is useful. But some ws in particular this i'm developing in only for powerUser (not many around 5-7) and we need some statistics for example, and i cant get all node with a query lucene but only 1000 and in some spece there are 20000-30000.

For example if i want to know the exact number of nodes in a particular space i do my query lucene and i obtain the resultSet.size(). but if i have this limit what kind of research i can do? or there is another way to know this information?

iam thinking if is it possible to operate with the native code of lucene and bypass SearchParameter, searchService ect..
because when i do my search with searchService, at some point, there is some use of lib lucene that execute the query… :roll:

however thx for your help  :wink:

mrogers
Star Contributor
Star Contributor
It would probably be easier to upgrade to a more recent version of Alfresco  Smiley Happy

mrogers
Star Contributor
Star Contributor
To find the number of nodes in a space there's no need to touch lucene at all!   

Use the FileFolderService or NodeService directly. 

Or run a SQL query directly.   Or CQL.

razieltd
Champ in-the-making
Champ in-the-making
:shock:


Thx!  Smiley Very Happy

I apologize for my ignorance  :lol:  can you show me how to use a query sql (tables)? I did not know that i can use in alfresco  Smiley Surprised .

Thx so much