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 nameType

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 nameType
content_idLong
nameString
content_typeString
bodyString
matcherString
namespaceString
tagsString
flex_attributesString

Example

var entryContents = contents.find('@flex_attributes "rhino.catalog.entryName:' + referencedContent.name + '" "rhino.catalog.entryType:content"', { limit : 100 });
    
if (entryContents.length > 0) {

  [...]

}

customer

Field nameType
customer_idLong
loginString
display_nameString
emailString
activeBoolean
flex_attributesString

Example

... 
customers.find('alice') // => [customer0, customer1, ...]
...

line_item

Field nameType
descriptionString
backendUuidUUID
flex_attributesString

Example


medium

Field nameType
medium_idLong
nameString
file_nameString
tagsString
kindString
namespaceString
flex_attributesString

Example


order

Field nameType
uuidUUID
order_idLong
itemUuidUUID
backendUuidUUID
itemBackendUuidUUID
billing_address_nameString
billing_address_first_nameString
billing_address_emailString
billing_address_zipString
shipping_address_nameString
shipping_address_first_nameString
shipping_address_zipString
shipping_address_emailString
voucherString
campaignString
historyString
portalString
statusString
financeString
supportString
bookingString
productionString
customer_nameString
payment_modeString
flex_attributesString

Example



namespace

Field nameType
package_idLong
titleSring

Example

... 
namespaces.find('124') 
...

product

Field nameType
product_idLong
nameString
name1String
name2String
descriptionString
format1String
format2String
tagsString
typString
namespaceString
categoryString
eanString
flex_attributesString
custom_urlString
uuidUUID
skuString

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.