Search the knowledge graph

Each knowledge graph has a Lucene index that is created and maintained automatically. It allows you to search for entities and relationships using the content stored in some properties. You can also search for provenance records using the content stored in their properties.

Search entities by keyword

When you search a knowledge graph, the criteria you provide are evaluated against all indexed properties of all entity types by default. The search results indicate the entity found by the search, its entity type, and the individual properties whose text satisfied the search criteria.

In the example below, a keyword search using the word cookie found two entities in the knowledge graph. One entity has the entity type Pet, and the other is a Document entity. Two properties of the Document entity had text that satisfied the search: the name property and the url property.

Keyword search for cookie with two entities found

  1. Open an investigation and browse its content.
  2. At the top of the investigation view, click in the search text box or press Ctrl+F and click Search, if needed.

    The search control appears.

    Click in the search text box to open the search control.

  3. Type a keyword in the text box and press Enter.

    Entities that match the specified search criteria appear in the investigation's contents list.

    Searching with the text 9091* returned two entities.

Search syntax

In general, you can use the same syntax to search for entities, relationships, and provenance records in a knowledge graph as when you search for project items in the Catalog pane or the catalog view, and when you perform an advanced search in an ArcGIS Enterprise portal. Consider the following examples:

  • Perform a keyword search by typing drive. All graph items with a text property containing the words drive, driver, and driving are found by the search.
  • You can refine your results by adding a word. Providing two words such as drive truck will find graph items in which a text property contains both the words drive and truck.
  • You can find graph items in which a property contains one word or the other by adding the Boolean operator OR, as with drive OR truck.
  • To find graph items with text properties that contain a specific phrase, the appropriate words must be enclosed in quotation marks, such as "drive a truck".
  • To look for entities and relationships in which the word truck is present specifically in the note property, you would use the syntax note:truck. To find graph items in which a phrase exists in the note property, use the syntax note:"drive a truck".

While user-defined properties with the GUID data type are indexed and searchable by default, the system-defined and maintained property globalid is not. The value for this property is indexed, but you can only find a graph item by its globalid value by searching this specific field, for example, globalid:9612603C-D3A5-49B6-8631-B8A79234BC49. GUID values are displayed in an investigation's details panel enclosed in braces, such as {9612603C-D3A5-49B6-8631-B8A79234BC49}. You can search for a graph item using a GUID enclosed in braces by placing the entire string in quotation marks, for example, globalid:"{9612603C-D3A5-49B6-8631-B8A79234BC49}".

Many other advanced searches are possible using the standard Lucene search syntax.

What you can search

By default, all properties on all entity types, all relationship types, and all provenance records are indexed if they have the Text data type or the Globally Unique Identifier (GUID) data type. This includes the value of the Document entity type's text property, which can contain notes that you typed or text extracted from the file associated with a Document entity.

When you modify the value of a property with the Text or GUID data type and save your changes, the modified value is immediately updated in the index and available for a search. This includes the update that occurs when you click Extract Text because the referenced file's contents were updated.

To find entities in which a specific property contains a value or entities connected with specific relationships, consider exploring your data with histograms or writing an openCypher query instead.

Modify and update search results

Once you can see an initial set of search results, you often realize you need to refine your search terms.

  1. Click in the search text box or press Ctrl+F.

    The search control appears and lists other similar searches in your search history that you can run again. The control will also list the first three graph items returned by the current search for reference.

  2. Update the text of the existing search criteria, for example, by typing new or removing existing characters or adding another keyword. Press Enter to run the search.

    The search control lists recent searches associated with the current search text and the first three entities returned.

    Entities and relationships matching the updated search criteria appear in the investigation's contents list.

  3. Click the Reset Search button Reset Search in the search text box to clear the search and remove the results.

    The graph items that were previously listed in the investigation view appear again.

  4. When the search text box is empty, click in the search text box to open the search control and list the three most recent searches that were performed.
    1. Click a search in the list to run it again.

      The search control lists the three most recent searches that were performed.

      The selected search is run and the results of the search appear in the investigation.

    2. Click the Remove From History button Remove From History to remove a search from the search history.

      Click in an empty search text box and hover over the Remove From History button.

      The specified search is removed from the list. Your search history is updated to show the three most recent searches.

Find specific entities and relationships or provenance records

Instead of searching only entities, options are available that allow you to search only relationships or both entities and relationships. You can be selective about which entity types or relationship types you want to target with your search. You can also search provenance records.

  1. Click in the search text box or press Ctrl+F and ensure Search mode is selected.
  2. Click the Show/Hide Advanced Options button Show/Hide Advanced Options.

    The Advanced Options toolbar appears below the search text box.

    The Advanced Options toolbar appears below the search text box.

  3. Click the Scope drop-down list and click one of the available options to search different information in the knowledge graph with the provided criteria. For example, click Entities and relationships.

    Entities

    Compare the search criteria to properties of all entity types in the knowledge graph.

    Relationships

    Compare the search criteria to properties of all relationship types in the knowledge graph.

    Entities and relationships

    Compare the search criteria to properties of all entity types and all relationship types in the knowledge graph.

    Provenance

    Compare the search criteria to properties of all provenance records in the knowledge graph.

  4. To narrow the searches to specific entity types or relationship types, click the Type Filters button Type Filters and check all entity types and relationship types to search.

    You can start typing the name of an entity type or a relationship type that you want to select. The list of types is filtered automatically, and you can check the types you want to search in the filtered list. If the scope of the search is entity types, only entity types are listed. If the scope of the search is relationship types, only relationship types are listed.

    This option is not available if you select Provenance in the Scope drop-down list.

    The total number of selected entity types and relationship types appears on the Advanced Options toolbar.

    The Advanced Options toolbar indicates how many entity and relationship types are selected.

  5. Click the Start Search button Start Search next to the search text box to rerun the current search with the new options.

    Click the Start Search button to rerun the current search with the new options.

    According to the selected scope, entities and relationships of the specified types that match the search criteria are included in the search results and appear in the investigation's contents list.

    The search results are updated to represent the modified search options.

  6. To hide the advanced search options toolbar, click the Show/Hide Advanced Options button Show/Hide Advanced Options.

    The Advanced Options toolbar is hidden.