Content Search REST Endpoints

3Sixty Content Search Services provides a RESTful service to your indexes via a Content Search Connection

Configuration

A working Content Search Connection is required. When using these connections strictly for APIs, only the authentication connection and default queries, are used.

SELECT

GET /api/search/<connectorId>/<collection>/select?

or

GET /api/search/<connectorId>/select?

Note:  
If no collection is provided, the configured collection will be used. If none is present, an error will occur.


Clustering

Note: Required Fields

For clustering to function the following fields must be in the field list (fl) parameter:

  • simflofy_filename

  • source_repository_id

  • content

These fields are used to form clusters and associate them with their documents.

 

Clustering(cluster) Parameter

Boolean, defaults to false. If true 3Sixty will feed search results through a clustering aglorithm.

 

Algorithm(algorithm) Parameter

algorithm - String. Default is lingo. Requires clustering to be true. If left off the call, will use lingo. Options are 'lingo','stc','kmeans'

https://carrot2.github.io/release/4.0.0/doc/tuning-quality/#choosing-the-algorithm

 

Lingo

STC

Kmeans

Cluster diversity

High, many small (outlier) clusters highlighted.

Low, small (outlier) clusters rarely highlighted

Low, small (outlier) clusters rarely highlighted

Cluster labels

Longer, often more descriptive

Shorter, but still appropriate

One-word only, may not always describe all documents in the cluster

Scalability

Low. For more than about 1000 documents, Lingo clustering will take a long time and large memory .

High

Low, based on similar data structures as Lingo.

Overlapping clusters

Yes. A document can belong to more than one cluster.

Yes. A document can belong to more than one cluster.

No. A document can belong to only one cluster.

 


Return Count(rows) Parameter

-Default 10. Controls the number of documents returned.


Query (q) Parameter

There is one query parameter allowed per search request. Mostly used for full text searches.

q=<field>:<value>

If a field is not included, the field will be set to content

Examples:

Query all:

q=*:*

Full text query:

q=3Sixty Rocks or q=content:3Sixty Rocks

Query name field with an OR clause:

q=name:Mike OR Ted

Query with NOT and AND clause:

q=location:London AND Frankfurt NOT Lebanon

Inclusion operators (+,-):

q=location:+London +Frankfurt -LebanonF


Field List (fl) Parameter

The majority of the time you do not want to return all fields in the result set. Similar to SQL where you only select the fields you want.

Example: fl=name,age,height

Example Complete Query:

Search users where age is 20-40 years old and live in the state of Tennessee return the name field as well as the facet statistics for the age field.

http://localhost:8080/3sixty-admin/api/search/users/select?q=*:*&facet=true&facet.field=age&fq=age:[20 TO 40]&fq=state:TN&fl=name&json.nl=map


Facet Field (facet.field) Parameter

This argument will take a list of fields that you want broken down into distinct values, such as counting content types.

facet.field=simflofy_content_type,age


Facet Query (fq) Parameter

You can have an unlimited number of facet query parameters.

Note:  
Facet query fields must also be included in the facet.field list

Examples:

FQ by name:

fq=name:Mike

FQ date range:

fq=simflofy_lastmodified:[1995-12-31T23:59:59.999ZTO2007-03-06T00:00:00Z]

FQ number range:

fq=age:[20 TO 40]

FQ OR: (SOLR ONLY)

fq=age:((20) OR (40))


QUERY

POST /api/search/<connectorId>/<collection>/query

or

POST /api/search/<connectorId>/query

Note:  
If no collection is provided, the configured collection will be used. If none is present, an error will occur.

Usage

None. This endpoint only accepts a body which is a raw query for the underlying indexing engine.

ElasticSearch - Performs a search using the /<index>/_search endpoint.

MongoDB - Performs a search as if using <collection>.find()

Solr - Same as SELECT, passes the full query to Solr.