Monday 07 June 2010 8:05:08 am
The following tips will make development on eZ Find more comfortable, and also significantly increase your speed as a developer, and the quality of the output work.
Re-indexing all content to merely test one single, minor modification's impact on one's application can quickly become a drawn-out process. A few, hidden, life-saver arguments exist in the concerned script /bin/php/updatesearchindexsolr.php, allowing for pointing to:
It is mandatory to use the 3 parameters simultaneously :
php extension/ezfind/bin/php/updatesearchindexsolr.php --siteaccess=mysiteaccess --topNodeID=2546 --offset=0 --limit=10
In order to check whether the content and its attributes were properly indexed, simply search for them in Solr's Web administration : http://localhost:8983/solr/admin/. This interface will also help you figure how the Solr fields were named. For instance, when using the 2.2 version of eZ Find, one can observe two fields looking like duplicates when it comes to articles' titles :
The rest of the tutorial explains this behaviour.
By leaving an active console opened, you will be able to view all messages sent to Solr, of the following form :
INFO: [] webapp=/solr path=/select params={ ... MESSAGE ... } status=400 QTime=5
This message can be copied and pasted from the console to the end of the URL, in Solr's administration interface : http://localhost:8983/solr/select/?MESSAGE. The obtained result is the exact output sent by Solr to eZ Find before transformation and display of the results. Using this trick is pretty useful when debugging, by, for example, directly manipulating the messages to retrieve the expected result.