Create an Analyzer
Creates a new Analyzer based on the provided configuration.
See the description of Analyzers for an introduction and the available types, properties and features.
Examples
curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/analyzer' <<'EOF'
{
"name": "testAnalyzer",
"type": "identity"
}
EOFShow output
HTTP/1.1 201 Created
content-type: application/json
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
connection: Keep-Alive
content-length: 80
content-security-policy: frame-ancestors 'self'; form-action 'self';
expires: 0
pragma: no-cache
server: ArangoDB
strict-transport-security: max-age=31536000 ; includeSubDomains
x-arango-queue-time-seconds: 0.000000
x-content-type-options: nosniff
{
"name" : "_system::testAnalyzer",
"type" : "identity",
"properties" : {
},
"features" : [ ]
}Get an Analyzer definition
Retrieves the full definition for the specified Analyzer name. The resulting object contains the following attributes:
name: the Analyzer nametype: the Analyzer typeproperties: the properties used to configure the specified typefeatures: the set of features to set on the Analyzer generated fields
Examples
Retrieve an Analyzer definition:
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_api/analyzer/testAnalyzer'Show output
HTTP/1.1 200 OK
content-type: application/json
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
connection: Keep-Alive
content-length: 105
content-security-policy: frame-ancestors 'self'; form-action 'self';
expires: 0
pragma: no-cache
server: ArangoDB
strict-transport-security: max-age=31536000 ; includeSubDomains
x-arango-queue-time-seconds: 0.000000
x-content-type-options: nosniff
{
"error" : false,
"code" : 200,
"features" : [ ],
"properties" : {
},
"type" : "identity",
"name" : "_system::testAnalyzer"
}List all Analyzers
Retrieves a an array of all Analyzer definitions. The resulting array contains objects with the following attributes:
name: the Analyzer nametype: the Analyzer typeproperties: the properties used to configure the specified typefeatures: the set of features to set on the Analyzer generated fields
Examples
Retrieve all Analyzer definitions:
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_api/analyzer'Show output
HTTP/1.1 200 OK
content-type: application/json
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
connection: Keep-Alive
content-length: 2116
content-security-policy: frame-ancestors 'self'; form-action 'self';
expires: 0
pragma: no-cache
server: ArangoDB
strict-transport-security: max-age=31536000 ; includeSubDomains
x-arango-queue-time-seconds: 0.000000
x-content-type-options: nosniff
{
"error" : false,
"code" : 200,
"result" : [
{
"name" : "text_ru",
"type" : "text",
"properties" : {
"locale" : "ru",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_fr",
"type" : "text",
"properties" : {
"locale" : "fr",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_pt",
"type" : "text",
"properties" : {
"locale" : "pt",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_nl",
"type" : "text",
"properties" : {
"locale" : "nl",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_sv",
"type" : "text",
"properties" : {
"locale" : "sv",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_zh",
"type" : "text",
"properties" : {
"locale" : "zh",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : false
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_en",
"type" : "text",
"properties" : {
"locale" : "en",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_es",
"type" : "text",
"properties" : {
"locale" : "es",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_it",
"type" : "text",
"properties" : {
"locale" : "it",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_fi",
"type" : "text",
"properties" : {
"locale" : "fi",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "text_no",
"type" : "text",
"properties" : {
"locale" : "no",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
},
{
"name" : "identity",
"type" : "identity",
"properties" : {
},
"features" : [
"frequency",
"norm"
]
},
{
"name" : "text_de",
"type" : "text",
"properties" : {
"locale" : "de",
"case" : "lower",
"stopwords" : [ ],
"accent" : false,
"stemming" : true
},
"features" : [
"frequency",
"position",
"norm"
]
}
]
}Remove an Analyzer
Removes an Analyzer configuration identified by analyzer-name.
If the Analyzer definition was successfully dropped, an object is returned with the following attributes:
error:falsename: The name of the removed Analyzer
Examples
Removing without force:
curl -X DELETE --header 'accept: application/json' --dump - 'http://localhost:8529/_api/analyzer/testAnalyzer'Show output
HTTP/1.1 200 OK
content-type: application/json
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
connection: Keep-Alive
content-length: 57
content-security-policy: frame-ancestors 'self'; form-action 'self';
expires: 0
pragma: no-cache
server: ArangoDB
strict-transport-security: max-age=31536000 ; includeSubDomains
x-arango-queue-time-seconds: 0.000000
x-content-type-options: nosniff
{
"error" : false,
"code" : 200,
"name" : "_system::testAnalyzer"
}Removing with force:
curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/collection' <<'EOF'
{
"name": "testCollection"
}
EOF
curl -X POST --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/view' <<'EOF'
{
"name": "testView",
"type": "arangosearch",
"links": {
"testCollection": {
"analyzers": [
"testAnalyzer"
]
}
}
}
EOF
curl -X DELETE --header 'accept: application/json' --dump - 'http://localhost:8529/_api/analyzer/testAnalyzer?force=false'
curl -X DELETE --header 'accept: application/json' --dump - 'http://localhost:8529/_api/analyzer/testAnalyzer?force=true'Show output
HTTP/1.1 200 OK
content-type: application/json
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
connection: Keep-Alive
content-length: 57
content-security-policy: frame-ancestors 'self'; form-action 'self';
expires: 0
pragma: no-cache
server: ArangoDB
strict-transport-security: max-age=31536000 ; includeSubDomains
x-arango-queue-time-seconds: 0.000000
x-content-type-options: nosniff
{
"error" : false,
"code" : 200,
"name" : "_system::testAnalyzer"
}