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 dbx 函数 sort a result from a dbx query by a custom sort functionphp gmp 函数 export to a binary stringphp grapheme 函数 find position in grapheme units of first occurrence of a case insensitive stringphp zlib 函数 compress a stringphp informix 函数 formats all rows of a query into a html tablephp imap 函数 decode a modified utf 7 string to utf 8php maxdb 函数 别名 maxdb real escape stringphp maxdb 函数 escapes special characters in a string for use in an sql statement taking into account the current charset of the connectionphp sqlite 函数 escapes a string for use as a query parameterphp yp/nis 函数 returns the error string associated with the given error codephp gmagick returns the graphicsmagick api copyright as a stringphp mysqlnduhconnection escapes special characters in a string for use in an sql statement taking into account the current charset of the connectionphp reflectionclassconstant returns the string representation of the reflectionclassconstant objectphp sdo das xml 函数 returns sdo das xml document for a given xml instance stringphp solrcollapsefunction returns a string representing the constructed collapse functionphp 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 tokyotyrantquery get the hint string of the query
关注编程学问公众号