This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE 'http://localhost:9200/test/test/1' | |
curl -XPUT 'http://localhost:9200/test/test/1' -d '{}' | |
curl -XPUT 'localhost:9200/test/_settings' -d '{"index":{"merge.policy.expunge_deletes_allowed":25}}' | |
curl -XPOST 'localhost:9200/test/_close' | |
curl -XPUT 'localhost:9200/test/_settings' -d '{"index":{"merge.policy.hello_world":15}}' | |
curl -XPOST 'localhost:9200/test/_open' | |
curl -XGET 'localhost:9200/test/_settings?pretty=true' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Transforms a string to a valid url parameter | |
* | |
* @param string $string String to transform to valid url | |
* @param int $limit Max length of return string. Default is 255, because url shouldn't be longer | |
* @return string | |
*/ | |
public static function toUrl($string, $limit = 255) { | |
$string = self::toAscii($string, true); | |
$string = str_replace('.', '-', $string); |
NewerOlder