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
Table of Contents | ||
---|---|---|
|
...
To search within a specific field, add the field name prefixed by an \@
in your query (e.g. "\@name SomeName
"TheName
" to search for records where the name field matches 'TheName')
category
KeyField name | Type |
---|---|
category_id | Long |
name | String |
title | String |
description | String |
shortDescription | String |
uuid | UUID |
flex_attributes | String |
namespace | String |
...
Code Block | ||||
---|---|---|---|---|
| ||||
... var filter = "*" + request.parameter("filter") + "*"; var filteredCategories = categories.find(filter, { limit: 5 }); // => [category0, category1, ...] ... |
content
KeyField name | Type |
---|---|
content_id | Long |
name | String |
content_type | String |
body | String |
matcher | String |
namespace | String |
tags | String |
flex_attributes | String |
...
Code Block | ||||
---|---|---|---|---|
| ||||
var entryContents = contents.find('@flex_attributes "rhino.catalog.entryName:' + referencedContent.name + '" "rhino.catalog.entryType:content"', { limit : 100 }); if (entryContents.length > 0) { [...] } |
customer
KeyField name | Type |
---|---|
customer_id | Long |
login | String |
display_name | String |
String | |
active | Boolean |
flex_attributes | String |
...
Code Block | ||||
---|---|---|---|---|
| ||||
... customers.find('alice') // => [customer0, customer1, ...] ... |
line_item
KeyField name | Type |
---|---|
description | String |
backendUuid | UUID |
flex_attributes | String |
Example
medium
KeyField name | Type |
---|---|
medium_id | Long |
name | String |
file_name | String |
tags | String |
kind | String |
namespace | String |
flex_attributes | String |
Example
order
KeyField 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
KeyField name | Type |
---|---|
package_id | Long |
title | Sring |
...
Code Block | ||||
---|---|---|---|---|
| ||||
... namespaces.find('124') ... |
product
KeyField 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 |
...
Code Block | ||||
---|---|---|---|---|
| ||||
...
//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.