# get-indices [*Function*]

## Purpose

The **get-indices** function returns the indices attached to a given concept. These indices accelerate retrieval based on the values of specified roles of the concept.

## Syntax

**get-indices** *concept* `&key` *direct-p*

## Arguments

The *concept* argument is concept, or the name of a concept.
If the *direct-p* argument is **t**, only indices directly defined on *concept* are returned. Otherwise, inherited indices are also returned.

## Value

The **get-indices** function returns a list of indices, where each index is identified by either a role name or a list of role names.

## Examples

(defconcept A :indices (r))
(defconcept B :is-primitive A :indices ((s1 s2)))
(get-indices 'A) ==> ((|R|R))
(get-indices 'B) ==> ((|R|R) (|R|S1 |R|S2))
(get-indices (fc B) :direct-p t) ==> ((|R|S1 |R|S2))

## See Also

Last modified: Jun 1 1995