Example #1
0
$options7->setPageLength(20);
// Set page length
$options7->setQualityWeight(0.5);
// Set quality weight
$options7->write('options7');
// Write the search options to the database
// Read the options from the database and display
echo "Various options:\n\n";
echo htmlspecialchars($options7->read('options7'));
echo "\n\n";
// More options
$options8 = new MLPHP\Options($client);
// Create an Options object (passing the REST client object)
$options8->setReturnConstraints('true');
// Return constraints
$options8->setReturnFacets('false');
// Return facets
$options8->setReturnMetrics('true');
// Return metrics
$options8->setReturnPlan('false');
// Return the plan
$options8->setReturnQtext('true');
// Return the qtext
$options8->setReturnQuery('false');
// Return the query
$options8->setReturnResults('true');
// Return results
$options8->setReturnSimilar('false');
// Return similar documents
$options8->write('options8');
// Write the search options to the database