Skip to main content

Content Search REST Endpoints

Simflofy 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.


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=Simflofy Rocks or q=content:Simflofy 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/simflofy-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.

info

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.