Parameters:request – Request object

Home/Index page view

Read all constants values from the database and associate via a 2-level dictionary;
1st level contains name_of_table_name_of_field keys and the 2nd level contains the constant value.
Parameters:request – Request object
Return a list of all available configuration options.
Accepts the data parameter with a JSON object containing:
  1. section [1, 2, 3, 4] (see constants table for value meaning)
  2. name filter options by matching the start of their name with this value

Example call:

curl -k --compressed 'https://techu/option/list/?pretty=1' --data-urlencode data='{ "section" : 4, "name" : "sql_attr" }'
Returns all options belonging to datasources starting with “sql_attr”.
techu.views.option(request, section, section_instance_id)
  • request – Request object
  • section – one of [‘searchd’, ‘index’, ‘source’]
  • section_instance_id – instance identifier,,
Connect options with searchd, indexes & sources and store their values.
Receives a JSON object with the data parameter containing options (keys) and their values.
You can group parameters and assign values with a list.

Example call:

curl -k --compressed 'https://techu/option/searchd/6/' --data-urlencode data='{
  "listen" : [
  "workers" : "threads",
  "pid_file" : "/var/run/",
  "max_matches" : 1000
techu.views.delete(index_id, doc_id, queue=True)

Build DELETE statement

techu.views.insert(index_id, fields, values, queue=True)

Build INSERT statement. Supports multiple VALUES sets for batch inserts.

techu.views.modify_index(index_id, sql, queue, values=None, retries=0)

Either adds to index directly or queues statements for async execution by storing them in Redis If either Redis or searchd is unresponsive MAX_RETRIES attempts will be performed in order to store the request to the alternative

techu.views.rqueue(queue, index_id, sql, values)

Redis queue for incoming requests Applier daemon continuously reads from this queue and executes asynchronously TODO: check if it works better with Pub/Sub

techu.views.update(index_id, doc_id, fields, values, queue=True)

Build UPDATE statement

Previous topic


Next topic


This Page