Sphinx / ThinkingSphinx
IFE uses ThinkingSphinx to communicate with the Sphinx full-text search. (Manual: http://sphinxsearch.com/docs/current.html)
Searches are performed using a query string that conforms to the sphinx query syntax and an optionally supplied options object.
All indexed fields of the respective index are searched, unless you narrow your search scope, for example by querying specific fields.
You may use all features the sphinx syntax provides. Grouping, boolean operators and many more.
Inhalt
Searchable fields
To search within a specific field, add the field name prefixed by an @
in your query (e.g. "@name TheName
" to search for records where the name field matches 'TheName')
category
Field name | Type |
---|---|
category_id | Long |
name | String |
title | String |
description | String |
shortDescription | String |
uuid | UUID |
flex_attributes | String |
namespace | String |
Example
... var filter = "*" + request.parameter("filter") + "*"; var filteredCategories = categories.find(filter, { limit: 5 }); // => [category0, category1, ...] ...
content
Field name | Type |
---|---|
content_id | Long |
name | String |
content_type | String |
body | String |
matcher | String |
namespace | String |
tags | String |
flex_attributes | String |
Example
var entryContents = contents.find('@flex_attributes "rhino.catalog.entryName:' + referencedContent.name + '" "rhino.catalog.entryType:content"', { limit : 100 }); if (entryContents.length > 0) { [...] }
customer
Field name | Type |
---|---|
customer_id | Long |
login | String |
display_name | String |
String | |
active | Boolean |
flex_attributes | String |
Example
... customers.find('alice') // => [customer0, customer1, ...] ...
line_item
Field name | Type |
---|---|
description | String |
backendUuid | UUID |
flex_attributes | String |
Example
medium
Field name | Type |
---|---|
medium_id | Long |
name | String |
file_name | String |
tags | String |
kind | String |
namespace | String |
flex_attributes | String |
Example
order
Field name | Type |
---|---|
uuid | UUID |
order_id | Long |
itemUuid | UUID |
backendUuid | UUID |
itemBackendUuid | UUID |
billing_address_name | String |
billing_address_first_name | String |
billing_address_email | String |
billing_address_zip | String |
shipping_address_name | String |
shipping_address_first_name | String |
shipping_address_zip | String |
shipping_address_email | String |
voucher | String |
campaign | String |
history | String |
portal | String |
status | String |
finance | String |
support | String |
booking | String |
production | String |
customer_name | String |
payment_mode | String |
flex_attributes | String |
Example
namespace
Field name | Type |
---|---|
package_id | Long |
title | Sring |
Example
... namespaces.find('124') ...
product
Field name | Type |
---|---|
product_id | Long |
name | String |
name1 | String |
name2 | String |
description | String |
format1 | String |
format2 | String |
tags | String |
typ | String |
namespace | String |
category | String |
ean | String |
flex_attributes | String |
custom_url | String |
uuid | UUID |
sku | String |
Example
... //search for products with wildcard enabled var p = products.find(args[0], args[1], true); ...
Common options
The optional options object has common settings that are applicable for all JSMA find methods:
Option limit:integer (Default: 20)
The maximum amount of records to fetch
Option page:integer (Default: 1)
Records are paginated. Sets the page to retrieve.