Hi Jay,
This is not mention in the sys-doc indeed and the parameters that restrict
the result are not thoroughfully explained too. Generally there are two
restrictive parameters that by default limit respectively queryiing entities
and documents so that the result set does not become too large and the time
to retrieve it does not become unacceptable. They are defined as follows:
SESAME_MAX_RESULT_COUNT in ./config/semantic.repository.properties
INDEX_MAX_RESULT_COUNT in ./config/indexing.properties
The first one limits the result of queries asking for entities (default
200), and the second of those asking for documents (default 100). There are
several ways to change those limits:
1) change the values directly in the config files and restart KIM
2) at run time use the methods to set them
apiQuery.setDefaultMaxEntitiesCount(....);
apiIndexAndPersist.setDefaultMaxDocsCount(...);
3) use methods with maxCount parameter when querying
apiQuery.getEntities(query, maxCount)
apiQuery.getDocuments(query, indexPath, persistURL, maxCount)
So, the QueryResultFlags object that comes along with an EntityQueryResult
or a DocumentQueryResult holds flags that tell you which of those limits
were exceeded during the execution of your query. I will give an example to
clarify that:
1) imagine you are searching for documents that contain persons which names
contain 'john'
2) on the first step all entities that are persons and contain 'john' should
be returned, but actually only the first 200 of them will be given -
execution to getting documents will continue, but the flag
hasExceededEntityResultLimit() will be raised to show that the entity result
was cut i.e. not full
3) in the same way, while retrieving the documents containing those entities
on the second step, if you get more than 100 you will anyway recieve this
result, but the flag hasExceededDocumentResultLimit() will be raised so that
you are aware that there are more documents
Those flags are in general intended to show you that your query is too wide.
However if you are determined to have all the results you just have to set
those limits to some large numbers, start your query and go for a coffee
break :)
HTH,
Ilian
----- Original Message -----
From: "Jay Johnston" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: 14 September 2006, Thursday 05:27
Subject: [KIM-discussion] hasExceededEntityResultLimit?
> There is no documentation for
> QueryResultFlags.hasExceededEntityResultLimit()
> in the javadocs. What is the limit that this flag is referring to? I
> have
> modified the "CombinedSortedGrouppedSearch" sample and am getting a
> positive
> result on this flag, but have no idea what it means.
>
> - Jay
>
>
> __________ NOD32 1.1754 (20060913) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
--------------------------------------------------------------------------------
> _______________________________________________
> NOTE: Please REPLY TO ALL to ensure that your reply reaches all members of
> this mailing list.
>
> KIM-discussion mailing list
> [email protected]
> http://ontotext.com/mailman/listinfo/kim-discussion_ontotext.com
>
>
> __________ NOD32 1.1754 (20060913) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
_______________________________________________
NOTE: Please REPLY TO ALL to ensure that your reply reaches all members of this
mailing list.
KIM-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion_ontotext.com