Dgraph brick

A Dgraph brick runs the Dgraph (the MDEX Engine software).

Dgraph brick settings

Setting

Description

input

The file prefix for the output from Dgidx.

port

The port at which the Dgraph should listen. The default is 8000.

startup_timeout

Specifies the amount of time in seconds that the Control Interpreter will wait while starting the Dgraph. If it cannot determine that the Dgraph is running in this timeframe, it times out. The default is 60.

dgraph_binary

Path to the Dgraph (MDEX Engine) program.

Note: You use this setting to override the endeca_mdex_bin default setting.

dgraph_options

Command-line flags to pass to Dgraph.

Note: --spellpath is now automatically included unless you add it yourself and will be set to the directory containing the Dgidx output.

log_dir

Directory where the Dgraph writes its request log files.

stdout

Where to redirect stdout for the brick. By default, stdout is sent to the screen. Specifying a value for stdout overrides the stdout_base setting.

stderr

Where to redirect stderr for the brick. By default, stderr is sent to the screen. Specifying a value for stderr overrides the stderr_base setting.

Dgraph commands

The commands listed below can be used within Script bricks to control the Dgraph program:

Command

Description

start

Starts the Dgraph.

Note: This command succeeds even if the Dgraph is already started.

running

Succeeds if the Dgraph is running. This operation can be used to conditionalize a script (for example, “if dgraph.running …”) or to check assumptions (like an assertion that the Dgraph is running at a certain time).

stop

Stops the Dgraph.

Note: This command succeeds even if the Dgraph is already stopped.

update

Checks for the presence of partial updates. If any partial update files are present, they are uploaded to the Dgraph.

This an example of a Dgraph brick called dg01:
dg01 : Dgraph
	working_machine = indexer
	port = 5555
	input = input.\indexed
The following excerpt from a Script brick illustrates how Dgraph commands work. This example shows how to stop and restart a running Dgraph:
restart_dg01 : Script
	dg01.stop
	dg01.start