This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Learn » eZ Publish » Need for speed - How to use eZ Find...

Need for speed - How to use eZ Find search fetch instead of standard content list/tree fetch

Tuesday 13 July 2010 10:27:45 am

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Step 3: Mapping legacy fetch parameters to eZ Find search parameters

 

content list/tree function parameters

eZ Find search function equivalent

Tree List
Tree or list
By default Add to filter following condition: main_parent_node_id:[PID]
parent_node_id subtree_array
sort_by

sort_by

More or less the same except :

  • Default is score/relevance ranking based on boost parameters
  • No priority sort
  • No depth sort
  • path_string should be sortable by specifying url_alias field
offset & limit offset & limit
attribute_filter

filter

In standard content list/tree function only 1 type of condition can be put (AND or OR). eZ Find supports more conditions and these conditions can be nested.

Keep in mind that matching is different. E.g. ‘in’ can be replaced with (term1 OR term 2). Possibilities to use :

  • combinations: ‘OR’ and ‘AND’ with nesting
  • ranges: [0 TO *], [* TO 5] , [10 TO 20]
  • obligatory (‘+’) and negative (‘-’) operators
extended_attribute_filter

filter or eZ Find special rawSolrRequest function

Solr query possibilities are different from SQL query possibilities so direct comparison does not make much sense. eZ Find rawSolrRequest function can use only data stored in the index so it will be less capable then extended_attribute_filter which is written in PHP and can use all data from the database.

class_filter_type & class_filter_array

class_id

For including classes.

Excluding can be done through ezfind.ini ( [IndexExclude] section )

only_translated & language

filter

To narrow down to specific language results can be filtered with e.g. language_code:ger-DE

There is also a SearchMainLanguageOnly switch in [LanguageSearch] section in ezfind.ini for using only prime language. Otherwise SiteLanguageList[] setting in site.ini is used.

For leveraging even more from Solr shards can be used as a specific index for every language. In that case specific Solr configuration can be applied per language e.g. collation, stemming, etc.

main_node_only

No data in the index.

Generally always returns the main node, but finds the object in other locations also.

as_object Not implemented yet.
depth No data in index.
limitation limitation
ignore_visibility ignore_visibility
 

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)

Proudly Developed with from