summaryrefslogtreecommitdiffstats
path: root/version.properties
blob: 08f1f93f06fd089b967ddee52b44bc4e41a76edc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Versioning variables
# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )
# because they are used in Jenkins, whose plug-in doesn't support

major=1
minor=2
patch=0

base_version=${major}.${minor}.${patch}

# Release must be completed with git revision # in Jenkins
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT
light .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Document Indexes

## Overview
An index can be thought of as a collection of _Documents_, and represents the largest granularity of data grouping in the store.

The first step in persisting documents via the _Search Data Service_ is to create the _Index_ into which we will put the documents.

This is where we define the structure of the _Documents_ that we will be storing in our _Index_, including how we want the data in our documents to be analyzed and indexed so that they can be queried for in interesting and useful ways.

## Syntax
When we create an _Index_ we need to define the structure of the _Documents_ that we will be storing in it.  Specifically, we must enumerate the _Fields_ that make up the _Document_, the type of data we expect to be stored in each _Field_, and how we want that data to be indexed by the back end document store.

We express this as a JSON structure, enumerating the _Fields_ in our document, where each _Field_ is expressed as a JSON object which conforms to the following schema:
 
    {
    	"name":            {"type": "string" },
    	"data-type":       {"type": "string" },
    	"format":          {"type": "string" },
    	"searchable":      {"type": "boolean"},
    	"search-analyzer": {"type": "string" },
    	"index-analyzer":  {"type": "string" }
    }
    
Where,

    name            = An arbitrary label to assign to the _Index_
    data-type       = One of:  string, date, long, double, boolean, ip, or nested*
    format          = For 'date' type fields, the date format string to use when persisting the field.
    searchable      = true  - field will be indexed,
                      false - field will not be indexed
    search-analyzer = Default analyzer to use for queries if one is not specified as part of the query
                      One of:  whitespace or ngram.
    index-analyser  = Analyzer to use for this field when indexing documents being persisted to the Index
                      One of:  whitespace or ngram.
                    
\* **Nested** fields:
If the _data-type_ is specified as _nested_, then this indicates that the contents of the field is itself a set of document fields.  In this case, the _Field_ definition should contain an additional entry named _sub-fields_, which is a JSON array containing the definitions of the sub-fields.  

**Example - A simple document definition which includes a 'date' type field.**

_Take note of the following:_
* For our 'BirthDate' field, which is a date, we also specify the format string to use when storing the field's contents.

    {
        "fields": [
        	{"name": "FirstName", "data-type": "string"},
        	{"name": "LastName", "data-type": "string"},
        	{"name": "BirthDate", "data-type": "date", "format": "MMM d y HH:m:s"}
        ]
    }


**Example - An example document definition containing nested sub-fields.**
  
_Take note of the following:_
* It is perfectly valid for a nested field to itself contain nested fields
* For the _Tracks.Title_ field, we are specifying that the _whitespace_ analyzer should be applied for both indexing and queries. 

    {
        "fields": [
        	{"name": "Album", "data-type": "string"},
        	{"name": "Group", "data-type": "string"},
        	{"name": "Tracks", "data-type": "nested", "sub-fields": [
        		{"name": "Title", "data-type": "string", "index-analyzer": "whitespace", "search-analyzer": "whitespace"},
        		{"name": "Length", "data-type": "long"}
        	]},
        	{"name": "BandMembers", "data-type": "nested", "sub-fields": [
        		{"name": "FirstName", "data-type": "string"},
        		{"name": "LastName", "data-type": "string"},
        		{"name": "Address", "data-type": "nested", "sub-fields": [
        			{"name": "Street", "data-type": "string"},
        			{"name": "City", "data-type": "string"},
        			{"name": "Country", "data-type": "string"}
        		]}
        	]}
        ]
    }
## API

### Create Index
Define a new _Index_ in the _Search Data Service_.

---
**URL**

    https://{host}:9509/services/search-data-service/v1/search/indexes/{index}/

**Method** 

    PUT

**URL Params**

    index - The name to assign to the document index we are creating.

**Request Header**

    Accept          = application/json
    X-TransactionId = Unique id set by client (for logging purposes)
    X-FromAppId     = Application identifier (for logging purposes)
    Content-Type    = application/json
    
**Request Payload**

    JSON format document structure for this index (see Syntax Section)

**Success Response**

    Code:      201
    Header(s): None
    Body:      JSON structure containing the URL for the created Index  
               Example:
                     {"url": "indexes/myindex"}
    
**Error Response**

    400 - Bad Request
    403 - Unauthorized
    500 - Internal Error

---


### Delete Index
Remove an existing _Index_ from the _Search Data Service_.  
Note that this results in the removal of all _Documents_ that are stored in the _Index_ at the time that the DELETE operation occurs.

---
**URL**

    https://{host}:9509/services/search-data-service/v1/search/indexes/{index}/

**Method** 

    DELETE

**URL Params**

    index - The name to assign to the document index we are creating.

**Request Header**

    Accept          = application/json
    X-TransactionId = Unique id set by client (for logging purposes)
    X-FromAppId     = Application identifier (for logging purposes)
    Content-Type    = application/json

**Request Payload**

    None

**Success Response**

    Code:      201
    Header(s): None
    Body:      JSON structure containing the URL for the created Index  
               Example:
                     {"url": "indexes/myindex"}
    
**Error Response**

    400 - Bad Request
    403 - Unauthorized
    500 - Internal Error

---