F.3.7 Command 9: GETOBJBYQUERY
GETOBJBYQUERY command@GETOBJBYQUERY command
- Send
- string indexQuery
- Recv
- int error, int count, int matchIDs[]
- Description
- This command is used to perform searches on the set
of attributes of Hyper-G objects. It can only be applied to attributes
that are indexed. Use the OBJECTBYIDQUERY command to match a set of
objects returned by this command against other, non-indexed,
attributes. The search is performed over the whole database of the
server the client is connected to. Use the GETOBJBYQUERYCOLL to
restrict the search to parts of the collection hierarchy, and to
perform distributed searches on other servers. The command returns the
IDs of the matching objects, with one exception: if the object is a
document that is a member of a cluster, the cluster's ID is returned
instead.
Currently, the indexed attributes of Hyper-G objects are:
| Attribute | valid for objects of type |
| Author | documents, anchors, collections |
| Group | user profiles |
| Hint | source anchors |
| Host | user profiles |
| Keywords | documents, collections |
| Name | collections |
| Repl | documents, anchors, collections |
| TimeCreated | documents, anchors, collections |
| TimeModified | documents, anchors, collections |
| Title | documents, destination anchors, collections |
| UName | user profiles |
| UGroup | user profiles |
| UServer | server objects |
The syntax of indexQuery is as follows:

- Status
- The list of indexed attributes can be extended in
future versions.
- Errors
- If nothing is found no object IDs are returned (
count is 0). If error is not zero, an error has occurred,
for example:
CMD_SYNTAX Query is invalid
Q_OVERFLOW Too many intermediate results
- Note
- When too many objects are found (that is, more than a certain
threshold value set in the server), not all possible matches will be
returned (Q_OVERFLOW). This also applies to intermediate
results: for example, the query Title=atom &&
TimeCreated=93/01/01^ will probably not be able to retrieve all
documents created after 1 January 1993 that contain the word
atom in their title, even if there are only five, when the rest of
the database contains 100000 documents created after 1 January 1 1993.
While this limitation will disappear when the link server is supplied
with a query optimizer, you may meanwhile circumvent this problem by
first issuing this command with only the Title=atom query and
then reducing the matches using the OBJECTBYIDQUERY command
(which is a bit slower, however).
