Introduction to Storing

In Wuha, "indexing" means "storing information in the search engine". When we say "index a document" we mean "processing that document and storing it so that users can find it".

Preparing your data

Wuha uses the concept of "schemas" to index and search for data. A schema defines the structure of your documents, and allows Wuha to perform relevant searches. When you index data in Wuha, that data needs to be correctly prepared to match your selected schema.

For example, let's say you're using Wuha's demo schema. By going to the "Schemas" page in the Wuha interface, we can see exactly which fields we need to provide in our data:

Based on this schema, we can then index a document that looks like this:

{
  "title": "This is the title of my document",
  "contents": "This is the content of my document"
}

The demo schema tells me that I need to store data with 2 properties: title and contents. These properties are both text.

This schema is very simple, but schemas can become more and more complex as your data becomes complex. When using Wuha, you can either prepare your data so that it fits into one of our predefined schemas, or you can create your own schema.

Note that if you're indexing files such as PDF, Word, Excel, etc. - you must use the built-in document schema.

Indexing your data

Once you understand your schema, we're ready to start sending files. There are 2 ways of doing this:

  1. Send a JSON object over HTTP via our JSON indexing API. This JSON object must conform to the schema of your index.

  2. Send a file (such as PDF, Word, or Excel) via our file indexing API. In this case, you must send this document to an index that uses the built-in document schema.

pageIndexing via the JSON APIpageIndexing Files (PDF, Word, etc.)

Last updated