-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating documentation. (End of day.)
- Loading branch information
Pat Daburu
committed
Feb 12, 2019
1 parent
f2a265b
commit 9f176a9
Showing
5 changed files
with
116 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.. _blobbing: | ||
|
||
.. image:: _static/images/logo.svg | ||
:width: 100px | ||
:alt: elastalk | ||
:align: right | ||
|
||
.. toctree:: | ||
:glob: | ||
|
||
|
||
"Blobbing" | ||
========== | ||
|
||
In order to minimize database overhead, some applications may want to store non-searchable document | ||
content in binary form in a field called `blob` so once a document has been indexed. | ||
|
||
If you want to store some (or all) of your seed data as a single | ||
`base-64 <https://www.base64decode.org/>`_ `BLOB <https://techterms.com/definition/blob>`_, you can | ||
add a `blobs` key to your :ref:`index configuration file <seed_data_extra_config>`. | ||
|
||
Within the `blobs` key you can supply two directives: | ||
|
||
:enabled: *(bool)* `true` to convert seed data to BLOBs | ||
|
||
:exclude: *(list)* a list of top-level keys in your seed data document that should not be | ||
included in the BLOB | ||
|
||
TODO: Convert to TOML. | ||
|
||
.. code-block:: javascript | ||
{ | ||
"blobs": { | ||
"enabled": true, | ||
"exclude": [ | ||
"firstName", | ||
"lastName" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
.. _configuration: | ||
|
||
.. image:: _static/images/logo.svg | ||
:width: 100px | ||
:alt: elastalk | ||
:align: right | ||
|
||
.. toctree:: | ||
:glob: | ||
|
||
|
||
Configuring Your Connection | ||
=========================== | ||
|
||
Configuration from TOML | ||
----------------------- | ||
|
||
In addition to :ref:`configuring from objects <elastalk_flask_config_from_objects>`, you can also | ||
configure `elastalk` connections using `TOML <https://pypi.org/project/toml/>`_. | ||
|
||
TOML aims to be a minimal configuration file format that's easy to read due to obvious | ||
semantics. TOML is designed to map unambiguously to a | ||
`hash table <https://en.wikipedia.org/wiki/Hash_table>`_. | ||
|
||
-- the TOML project's `README.md <https://github.com/toml-lang/toml>`_ | ||
|
||
A Sample TOML Configuration | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: ini | ||
[blobs] | ||
excluded = ["owner_", "group_"] | ||
[indexes.cats] | ||
mappings = "cats/mappings.json" | ||
[indexes.dogs.blobs] | ||
enabled = True | ||
excluded = ["name", "breed"] | ||
Options | ||
^^^^^^^ | ||
|
||
blobs | ||
===== | ||
|
||
This section contains global configuration options that control how, when, and which data is | ||
converted to binary representations (see :ref:`Blobbing <blobbing>`). | ||
|
||
:excluded: the names of attributes that are never included in binary representations when a | ||
document is packed using the | ||
:py:func:`ElastalkConnection.pack() <elastalk.connect.ElastalkConnection.pack>` | ||
method | ||
|
||
TODO | ||
|
||
indexes | ||
======= | ||
|
||
TODO | ||
|
||
|
||
Configuration from Objects | ||
-------------------------- | ||
|
||
If you're wanting to configure your connection from a python object, you're likely using | ||
:ref:`Flask <elastalk_and_flask>`. There is another article on that subject called | ||
:ref:`elastalk_flask_config_from_objects`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters