SolrUtils::escapeQueryChars

(PECL solr >= 0.9.2)

SolrUtils::escapeQueryCharsEscapes a lucene query string

说明

public static SolrUtils::escapeQueryChars ( string $str ) : string

Lucene supports escaping special characters that are part of the query syntax.

The current list special characters are:

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ /

These characters are part of the query syntax and must be escaped

参数

str

This is the query string to be escaped.

返回值

Returns the escaped string 或者在失败时返回 FALSE.

相关文章
php collator get sorting key for a stringphp imap 函数 convert a quoted printable string to an 8 bit stringphp ingres 函数 escape special characters for use in a queryphp ingres 函数 get the number of rows affected or returned by a queryphp maxdb 函数 escapes special characters in a string for use in an sql statement taking into account the current charset of the connectionphp 多字节字符串 函数 multibyte regular expression match for predefined multibyte stringphp ncurses 函数 reads string from terminal screenphp ncurses 函数 move position and add stringphp oci8 函数 returns the next row from a query as an objectphp sqlite 函数 escapes a string for use as a query parameterphp mysqlnduhconnection escapes special characters in a string for use in an sql statement taking into account the current charset of the connectionphp simplexmlelement creates a prefix/ns context for the next xpath queryphp solrdismaxquery set query alternate q.alt parameter php solrdismaxquery specifies the amount of slop permitted on phrase queries explicitly included in the user s query string qf parameter php solrutils parses an response xml string into a solrobjectphp solrutils escapes a lucene query stringphp solrutils prepares a phrase from an unescaped lucene stringphp swffont returns the glyph shape of a char as a text stringphp swoole buffer append the string or binary data at the end of the memory buffer and return the new size of memory allocated.php tokyotyrantquery get the hint string of the query
关注编程学问公众号