Share » Learn » eZ Publish » Advanced development with eZ Find -...

Advanced development with eZ Find - part 1 : Datatypes in Solr and eZ Find

Monday 07 June 2010 8:05:08 am

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

Step 3 : Understanding the addObject method

The addObject (/search/plugins/ezsolr/ezsolr.php) method takes the following parameters :

  • One single content object (eZContentObject)
  • An optional parameter, indicating whether the freshly added content should be followed by a 'commit' (this is, by the way, a very good way to optimize batch-indexings of content)

In brief, this methods acts as follows :

  • Checks whether the content object should be indexed or not, according to the list of excluded content classes (settings : [IndexExclude])
  • Retrieval of the objects's metadata and creation of names and values for the associated Solr fields
  • Retrieval of the node's metadata and creation of names and values for the associated Solr fields
  • Retrieval of the object attributes' content, for each language, and creation of names and values for the associated Solr fields
  • Push of the collected data to Solr's index, in single or multi-core mode, depending on the settings
  • Final commit, conditioned by the second, optional parameter of the addObject method

Note : since eZ Find 2.2, it is possible to use language-specific 'cores' (/extension/ezfind/java/solr.multicore), allowing for having per-language indexes and configuration files (spellings.txt, synonmys.txt, stopwords.txt, etc.).

 

Printable

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

Author(s)