Indexing and search
Management
/index/search
URL Syntax | /index/search ? [index] [field] [query] [seq] [termno] [order] [hitPageStart] [hitPageSize] [format] [ident] [auto] [ademand] [highlight] [fuzzy] [facet] [facet_minmax] [facet_order] |
Description | Search index |
Access | free |
HTTP Method | GET |
Return (XML) |
<search query="commercial" indexName="idx" sortFields="score,desc" hitPageStart="1" hitPageSize="10" hitTotal="1" auto="true" elapsed="0.01">
<hit no="1" score="25.9988">
<data>
<seq><![CDATA[54085b68eafb5]]></seq>
<label><![CDATA[Commercial or Open-Source CMS]]></label>
<title><![CDATA[Commercial or Open-Source CMS: something in between | Vilius Kuciukas]]></title>
<description><![CDATA[Choosing a content management system (CMS) is a likely ...]]></description>
<url><![CDATA[/blog/commercial-or-open-source-cms-something-in-between]]></url>
<code><![CDATA[]]></code>
<creator><![CDATA[CMS]]></creator>
<created><![CDATA[2016-02-06]]></created>
</data>
<words>
<word><![CDATA[commercial]]></word>
</words>
<field name="doc.desc" snippet="yes"><![CDATA[Choosing a content management system (CMS) is a likely ...]]></field>
<field name="doc.item"><![CDATA[0]]></field>
<field name="doc.label" snippet="yes"><![CDATA[<span class="highlight">Commercial</span> or Open-Source CMS]]></field>
<field name="doc.lang"><![CDATA[en]]></field>
<field name="doc.pid"><![CDATA[54085b68eaefd]]></field>
<field name="doc.seq"><![CDATA[54085b68eafb5]]></field>
<field name="doc.text"><![CDATA[54085b68eaefd]]></field>
<field name="doc.text"><![CDATA[54085b68eafb5]]></field>
<field name="doc.text" snippet="yes"><![CDATA[<span class="highlight">Commercial</span> or Open-Source CMS]]></field>
<field name="doc.text" snippet="yes"><![CDATA[<span class="highlight">Commercial</span> or Open-Source CMS ...]]></field>
<field name="doc.text" snippet="yes"><![CDATA[Choosing a content management system (CMS) is a likely ...]]></field>
<field name="doc.text" snippet="yes"><![CDATA[cms, content management system, blog ...]]></field>
<field name="doc.text"> <![CDATA[en]]></field>
<field name="doc.text" snippet="yes"><![CDATA[Blog: <span class="highlight">Commercial</span> or ...]]></field>
<field name="doc.title" snippet="yes"><![CDATA[<span class="highlight">Commercial</span> or Open-Source CMS ...]]></field>
</hit>
</search>
|
Return (JSON) |
{
"query":"commercial",
"indexName":"doc.text",
"sortFields":"score,desc",
"hitPageStart":1,
"hitPageSize":10,
"hitTotal":1,
"auto":true,
"elapsed":0.01,
"facet":[
],
"hits":[
{
"no":1,
"score":25.9988,
"data":{
"seq":"54085b68eafb5",
"label":"Commercial or Open-Source CMS",
"title":"Commercial or Open-Source CMS: ...",
"description":"Choosing a content management system (CMS) is a likely ...",
"url":"\/blog\/commercial-or-open-source-cms-something-in-between",
"code":"",
"creator":"CMS",
"created":"2016-02-06",
"external":false
},
"words":["commercial"],
"fields":{
"doc.desc":[
{"snippet":true,"key":"doc.desc","value":"Choosing a content management system (CMS) is a likely ..."}
],
"doc.item":[
{"snippet":false,"key":"doc.item","value":"0"}
],
"doc.label":[
{"snippet":true,"key":"doc.label","value":"<span class=\"highlight\">Commercial<\/span> or Open-Source CMS"}
],
"doc.lang":[
{"snippet":false,"key":"doc.lang","value":"en"}
],
"doc.pid":[
{"snippet":false,"key":"doc.pid","value":"54085b68eaefd"}
],
"doc.seq":[
{"snippet":false,"key":"doc.seq","value":"54085b68eafb5"}
],
"doc.text":[
{"snippet":false,"key":"doc.text","value":"54085b68eaefd"},
{"snippet":false,"key":"doc.text","value":"54085b68eafb5"},
{"snippet":true,"key":"doc.text","value":"<span class=\"highlight\">Commercial<\/span> or Open-Source CMS"},
{"snippet":true,"key":"doc.text","value":"<span class=\"highlight\">Commercial<\/span> or Open-Source CMS ..."},
{"snippet":true,"key":"doc.text","value":"Choosing a content management system (CMS) is a likely ..."},
{"snippet":true,"key":"doc.text","value":"cms, content management system, blog, ..."},
{"snippet":false,"key":"doc.text","value":"en"},
{"snippet":true,"key":"doc.text","value":"Blog: <span class=\"highlight\">Commercial<\/span> or Open-Source CMS ..."}
],
"doc.title":[
{"snippet":true,"key":"doc.title","value":"<span class=\"highlight\">Commercial<\/span> or Open-Source CMS ..."}
]
}
}
]
}
|
Return (Table) |
{
"draw":2,
"recordsTotal":"1",
"recordsFiltered":"1",
"data":[
[
"<input type=\"button\" value=\"View\" class=\"results-button\">",
1,
"5292",
25.9988,
"54085b68eafb5",
"Commercial or Open-Source CMS",
"Commercial or Open-Source CMS: something in between | Vilius Kuciukas",
"<a class=\"results-url\" href=\"http:\/\/www.kusoftas.com\/blog\/commercial-or-open-source-cms-something-in-between\" target=\"_blank\">\/blog\/commercial-or-open-source-cms-something-in-between<\/a>",
""
]
],
"rc":"0",
"msg":"success"
}
|
GET request data:
HTTP Response status codes:
Sample search request parameters to be added for facets:
&facet_order=index,
&facet[0][field]=doc.text,
&facet[0][item][0]=world,
&facet[0][item][1]=digital,
&facet[0][item][2]=object,
&facet[0][item][3]=sample,
&facet[0][item][4]=[10 TO 100],
&facet[1][field]=doc.title,
&facet[1][minmax]=1
Saple of response snippet with facets:
<search query="object%7E" indexName="idx" sortFields="score,desc" hitPageStart="1" hitPageSize="10" hitTotal="5" auto="true" elapsed="0.19">
<facet>
<field>
<code>doc.text</code>
<items>
<item count="17">digital</item>
<item count="52">object</item>
<item count="19">sample</item>
<item count="1">world</item>
<item count="5">[10 TO 100]</item>
</items>
</field>
<field>
<code>doc.title</code>
<min>0</min>
<max>1877</max>
<items/>
</field>
</facet>
...
</search>
/index/browse
URL Syntax | /index/browse ? [index] [field] [term] [hitPageStart] [hitPageSize] [format] [ident] |
Description | Browse index |
Access | free |
HTTP Method | GET |
Return (XML) |
<browse term="object" indexName="idx" hitPageStart="2106" hitPageSize="10" hitTotal="6522" elapsed="0.02">
<hit no="2106" docs="6"><term><![CDATA[Object]]></term><term_lc><![CDATA[object]]></term_lc></hit>
<hit no="2107" docs="3"><term><![CDATA[Objects]]></term><term_lc><![CDATA[objects]]></term_lc></hit>
<hit no="2108" docs="2"><term><![CDATA[Ok]]></term><term_lc><![CDATA[ok]]></term_lc></hit>
<hit no="2109" docs="1"><term><![CDATA[Once]]></term><term_lc><![CDATA[once]]></term_lc></hit>
<hit no="2110" docs="1"><term><![CDATA[One]]></term><term_lc><![CDATA[one]]></term_lc></hit>
<hit no="2111" docs="8"><term><![CDATA[Only]]></term><term_lc><![CDATA[only]]></term_lc></hit>
<hit no="2112" docs="1"><term><![CDATA[Opacity]]></term><term_lc><![CDATA[opacity]]></term_lc></hit>
<hit no="2113" docs="47"><term><![CDATA[Open]]></term><term_lc><![CDATA[open]]></term_lc></hit>
<hit no="2114" docs="2"><term><![CDATA[Open-Source]]></term><term_lc><![CDATA[open-source]]></term_lc></hit>
<hit no="2115" docs="3"><term><![CDATA[Opportunity]]></term><term_lc><![CDATA[opportunity]]></term_lc></hit>
</browse>
|
Return (JSON) |
{
"term":"objects",
"indexName":"doc.text",
"hitPageStart":2107,
"hitPageSize":10,
"hitTotal":6522,
"elapsed":0.02,
"hits":[
{"no":2107,"term":"Objects","term_lc":"objects","docs":3},
{"no":2108,"term":"Ok","term_lc":"ok","docs":2},
{"no":2109,"term":"Once","term_lc":"once","docs":1},
{"no":2110,"term":"One","term_lc":"one","docs":1},
{"no":2111,"term":"Only","term_lc":"only","docs":8},
{"no":2112,"term":"Opacity","term_lc":"opacity","docs":1},
{"no":2113,"term":"Open","term_lc":"open","docs":47},
{"no":2114,"term":"Open-Source","term_lc":"open-source","docs":2},
{"no":2115,"term":"Opportunity","term_lc":"opportunity","docs":3},
{"no":2116,"term":"Optimization","term_lc":"optimization","docs":2}
]
}
|
Return (Table) |
{
"draw":2,
"recordsTotal":"6522",
"recordsFiltered":"6522",
"data":[
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2101","Nowrap","nowrap","2"],
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2102","Number","number","1"],
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2103","OK","ok","15"],
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2104","ONLY","only","2"],
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2105","OS","os","11"],
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2106","Object","object","6"],
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2107","Objects","objects","3"],
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2108","Ok","ok","2"],
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2109","Once","once","1"],
["<input type=\"button\" value=\"Docs\" class=\"results-button\">","2110","One","one","1"]
],
"rc":"0",
"msg":"success"
}
|
GET request data:
HTTP Response status codes:
/index/fields ? key
URL Syntax | /index/empty/:key |
Description | Index fields list |
Access | Free |
HTTP Method | GET | POST |
Request data |
Variables automatically issued by dataTable() object:
|
Return |
{
draw: 'sequence number', // ex. '1'
recordsTotal: 'total records in table', // ex. '13'
recordsFiltered: 'total records in table', // ex. '13'
data: [ // datatable record array
[
'<input type="checkbox">', // checkbox <input> element
'No', // sequence no ex. '1'
'field id in DB table', // ex. '1'
'unique field ID', // ex. 'doc.code'
'field title', // ex. 'Document code'
'items number', // ex. '460'
]
...
],
rc: '0',
msg: 'success'
}
|
HTTP Response status codes:
/index/empty/:key
URL Syntax | /index/empty/:key |
Description | Empty index content |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
:key | Index unique key |
Return |
{
rc: "0", // return code, 0 - is OK
msg: "success", // return message
elapsed: 0.26 // elapsed time
}
|
HTTP Response status codes:
/index/create/:key
URL Syntax | /index/create/:key |
Description | Create index content |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
:key | Index unique key |
Return |
{
rc: "0", // return code, 0 - is OK
msg: "success", // return message
docs: "96", // total number of indexed items
memory: "2.5M", // max amount of memory used
elapsed: 0.26 // elapsed time
}
|
HTTP Response status codes:
/index/update
URL Syntax | /index/update |
Description | Update index(s) content using queued site content updates: add, remove |
HTTP Method | GET |
Return |
{
rc: "0", // return code, 0 - is OK
msg: "success", // return message
docs: "idx => 96", // updated index key => indexed/deindexed items
memory: "2.5M", // max amount of memory used
elapsed: 0.26 // elapsed time
}
|
HTTP Response status codes:
/index/queue/:key
URL Syntax | /index/queue/:key |
Description | Queue all index items for index update |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
:key | Index unique key |
Return |
{
rc: "0", // return code, 0 - is OK
msg: "success", // return message
docs: "96", // total number of queued items
elapsed: 0.01 // elapsed time
}
|
HTTP Response status codes:
/index/dequeue/:key
URL Syntax | /index/dequeue/:key |
Description | Dequeue all index items for index update |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
:key | Index unique key |
Return |
{
rc: "0", // return code, 0 - is OK
msg: "success", // return message
elapsed: 0.01 // elapsed time
}
|
HTTP Response status codes:
/index/dequeue
URL Syntax | /index/dequeue |
Description | Dequeue all index items for all indexes update |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
Return |
{
rc: "0", // return code, 0 - is OK
msg: "success", // return message
elapsed: 0.01 // elapsed time
}
|
HTTP Response status codes:
/index/object
/index/object/:seq
/index/object/:seq/:action
/index/object/:seq/:action/:ext
URL Syntax | /index/empty/:key |
Description | Queue item for index update |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET/POST |
:seq | Item unique id |
:action | add/remove |
:ext | true/false |
Return |
{
rc: "0", // return code, 0 - is OK
msg: "success" // return message
}
|
GET/POST request data:
RAW POST request data:
[
'seq': 'item-unique-id',
'action': 'update-action',
'ext': 'true/false',
'label': 'item-label',
'title': 'item-title',
'description': 'item-description',
'keywords': 'item-keywords',
'language': 'item-language',
'content': 'item-content',
'url': 'item-url',
'code': 'item-calssification-code',
'creator': 'item-creator-name',
'created': 'item-creation-date'
]
HTTP Response status codes:
/index/man/lst
URL Syntax | /index/man/lst |
Description | Index list jQuery DataTable() plugin server side backend |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
Return |
{
"draw":3,
"recordsTotal":"1",
"recordsFiltered":"1",
"data":[
["<input type=\"checkbox\">",1,"1","idx","Index","398","11","6548","yes","CMS","2016-04-09 18:15:57"]
],
"rc":"0",
"msg":"success"
}
|
GET request data: server side backend for jQuery DataTable() plugin
HTTP Response status codes:
/index/man/get/:key
URL Syntax | /index/man/get/:key |
Description | Get index data |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
:key | Index unique key |
Return |
{
"rc":"0", // return code
"msg":"success", // return message
"data":{ // index data
"seq":"54caa31a16ad3", // unique ID
"key":"idx", // key
"title":"Main site index", // title
"task":"0", // 0 - use default (config) indexing task, 1 - use this index indexing task
"stop":"0", // 0 - use default (config) stop words, 1 - use this index stop words
"boost":"0", // 0 - use default (config) boosting words, 1 - use this index boosting words
"ready":"1", // 1 - if index ready to use
"doc_number":"397", // total number of indexed items
"field_number":"8", // total number of created fields
"word_number":"4821", // total number of words
"limit":"0", // limit number of index update items, 0 - unlimited
"table":"1", // 1 - remove/create RDBMS table indexes during content indexing
"editor":"CMS", // index last editor name
"timestamp":"2015-02-05 13:23:35", // index last update timestamp
"fields":[ // index field list
{
"key":"doc.date", // field key
"title":"Date", // field title
"boost":"1.0", // field boosting value
"doc_number":"397" // total number of indexed items belongs to this field
},
... // other fields
]
}
}
|
HTTP Response status codes:
/index/man/get/index/list
URL Syntax | /index/man/get/index/list |
Description | Get index list |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
Return |
{
"rc":"0", // return code
"msg":"success", // return message
"data":[ // index list
{ // index data
"key":"idx", // index key
"title":"Main site index" // index title
}
]
}
|
HTTP Response status codes:
/index/man/put
URL Syntax | /index/man/put |
Description | Put index data |
Access | Restricted to builtin administrator |
HTTP Method | POST |
Return |
{
"rc":"0", // return code
"msg":"success" // return message
}
|
POST RAW data:
{
"seq":"54caa31a16ad3", // unique ID
"key":"idx", // key
"title":"Main site index", // title
"task":"0", // 0 - use default (config) indexing task, 1 - use this index indexing task
"stop":"0", // 0 - use default (config) stop words, 1 - use this index stop words
"boost":"0", // 0 - use default (config) boosting words, 1 - use this index boosting words
"fields":[ // index field list
{
"del":"0", // 1 - delete this field
"id":"1", // 1 - field update, other - new field
"key":"doc.date", // field key
"title":"Date", // field title
"boost":"1.0" // field boosting value
},
... // other fields
]
}
HTTP Response status codes:
/index/man/del
URL Syntax | /index/man/del |
Description | Delete index(s) |
Access | Restricted to builtin administrator |
HTTP Method | POST |
Return |
{
"rc":"0", // return code
"msg":"success" // return message
}
|
POST RAW data:
[ // index list
'idx', // index key
... // other index keys
]
HTTP Response status codes:
/index/man/upd
URL Syntax | /index/man/upd |
Description | Index(s) update items list jQuery DataTable() plugin server side backend |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
Return |
{
"draw":2,
"recordsTotal":"1",
"recordsFiltered":"1",
"data":[
["<input type=\"checkbox\">",1,"5621","index","page","54d33ce57d876","Index Engine API","2016-04-10 17:10:33"]
],
"rc":"0",
"msg":"success"
}
|
GET request data: server side backend for jQuery DataTable() plugin
HTTP Response status codes:
/index/man/upd/del
URL Syntax | /index/man/upd/del |
Description | Delete index(s) update items |
Access | Restricted to builtin administrator |
HTTP Method | POST |
Return |
{
"rc":"0", // return code
"msg":"success" // return message
}
|
POST RAW data:
[ // item update list
'11340', // item update internal ID
... // other item ID's
]
HTTP Response status codes:
/index/man/cfg/get
URL Syntax | /index/man/cfg/get |
Description | Get configuration data |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
Return |
{
"rc":"0", // return code
"msg":"success", // return message
"data":{ // configuration data data
"index":"idx", // default index key
"field":"doc.text", // default field key
"order":"score,reverse", // default search results order
"format":"table", // default search/browse results format
"ident":"1", // 1 - ident XML/JSON format tags
"auto":"1", // 1 - use Levenshtein FSA for fuzzy search, 0 - use RDBMS SQL like statements for fuzzy search
"ademand":"0", // 1 - load Levenshtein FSA states on demand
"limit":"0", // limit number of index update items, 0 - unlimited
"table":"1" // 1 - remove/create RDBMS table indexes during content indexing
}
}
|
HTTP Response status codes:
/index/man/cfg/put
URL Syntax | /index/man/cfg/put |
Description | Put configuration data |
Access | Restricted to builtin administrator |
HTTP Method | POST |
Return |
{
"rc":"0", // return code
"msg":"success" // return message
}
|
POST RAW data:
{
"index":"idx", // default index key
"field":"doc.text", // default field key
"order":"score,reverse", // default search results order
"format":"table", // default search/browse results format
"limit":"0", // limit number of index update items, 0 - unlimited
"ident":"1", // 1 - ident XML/JSON format tags
"auto":"1", // 1 - use Levenshtein FSA for fuzzy search, 0 - use RDBMS SQL like statements for fuzzy search
"ademand":"0", // 1 - load Levenshtein FSA states on demand
"table":"1" // 1 - remove/create RDBMS table indexes during content indexing
}
HTTP Response status codes:
/index/man/export
URL Syntax | /index/man/export |
Description | Export index(s) data |
Access | Restricted to builtin administrator |
HTTP Method | GET |
Return |
{
"rc":"0", // return code
"msg":"success" // return message
}
|
HTTP Response status codes:
/index/man/import
URL Syntax | /index/man/import |
Description | Import index(s) data |
Access | Restricted to builtin administrator |
HTTP Method | GET |
Return |
{
"rc":"0", // return code
"msg":"success" // return message
}
|
HTTP Response status codes:
/index/man/file/get
URL Syntax | /index/man/file/get |
Description | Get file content into editor |
Access | Restricted to roles: admin, demo (r/o) |
HTTP Method | GET |
Return: | file text content |
GET request data:
HTTP Response status codes:
/index/man/file/put
URL Syntax | /index/man/file/put |
Description | Put editor content into file |
Access | Restricted to builtin administrator |
HTTP Method | POST |
Return: | file size |
POST request data:
HTTP Response status codes: