Lines Matching refs:opts
1285 function BuildExcerpts ( $docs, $index, $words, $opts=array() ) argument
1290 assert ( is_array($opts) );
1304 if ( !isset($opts["before_match"]) ) $opts["before_match"] = "<b>";
1305 if ( !isset($opts["after_match"]) ) $opts["after_match"] = "</b>";
1306 if ( !isset($opts["chunk_separator"]) ) $opts["chunk_separator"] = " ... ";
1307 if ( !isset($opts["limit"]) ) $opts["limit"] = 256;
1308 if ( !isset($opts["around"]) ) $opts["around"] = 5;
1309 if ( !isset($opts["exact_phrase"]) ) $opts["exact_phrase"] = false;
1310 if ( !isset($opts["single_passage"]) ) $opts["single_passage"] = false;
1311 if ( !isset($opts["use_boundaries"]) ) $opts["use_boundaries"] = false;
1312 if ( !isset($opts["weight_order"]) ) $opts["weight_order"] = false;
1320 if ( $opts["exact_phrase"] ) $flags |= 2;
1321 if ( $opts["single_passage"] ) $flags |= 4;
1322 if ( $opts["use_boundaries"] ) $flags |= 8;
1323 if ( $opts["weight_order"] ) $flags |= 16;
1329 $req .= pack ( "N", strlen($opts["before_match"]) ) . $opts["before_match"];
1330 $req .= pack ( "N", strlen($opts["after_match"]) ) . $opts["after_match"];
1331 $req .= pack ( "N", strlen($opts["chunk_separator"]) ) . $opts["chunk_separator"];
1332 $req .= pack ( "N", (int)$opts["limit"] );
1333 $req .= pack ( "N", (int)$opts["around"] );