Skip to content

Apache Lucene open-source search software

SOLR-7769: Add bin/post -p alias for -port parameter

Erik Hatcher2c0b36bf0aa0
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 6055a0b654d..18da1bceb50 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -179,6 +179,8 @@ New Features
* SOLR-7799: Added includeIndexFieldFlags (backwards compatible default is true) to /admin/luke.
When there are many fields in the index, setting this flag to false can dramatically speed up requests. (ehatcher)
+* SOLR-7769: Add bin/post -p alias for -port parameter. (ehatcher)
+
Bug Fixes
----------------------
diff --git a/solr/bin/post b/solr/bin/post
index ecaac0e55e0..d0a39e13033 100755
--- a/solr/bin/post
+++ b/solr/bin/post
@@ -66,7 +66,7 @@ function print_usage() {
echo " Solr options:"
echo " -url <base Solr update URL> (overrides collection, host, and port)"
echo " -host <host> (default: localhost)"
- echo " -port <port> (default: 8983)"
+ echo " -p or -port <port> (default: 8983)"
echo " -commit yes|no (default: yes)"
# optimize intentionally omitted, but can be used as '-optimize yes' (default: no)
echo ""
@@ -134,6 +134,10 @@ while [ $# -gt 0 ]; do
# Special case, pull out collection name
shift
COLLECTION="$1"
+ elif [[ "$1" == "-p" ]]; then
+ # -p => -port for convenience and compatability with bin/solr start
+ shift
+ PROPS+=("-Dport=$1")
elif [[ ("$1" == "-d" || "$1" == "--data" || "$1" == "-") ]]; then
if [[ -s /dev/stdin ]]; then
MODE="stdin"