Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions solr/core/src/java/org/apache/solr/cli/PostTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public class PostTool extends ToolBase {
.hasArg()
.argName("mode")
.desc(
"Which mode the Post tool is running in, 'files' crawls local directory, 'web' crawls website, 'args' processes input args, and 'stdin' reads a command from standard in. default: files.")
"Specifies how to run: 'files' crawls local directories, 'web' crawls websites, 'args' processes positional arguments, and 'stdin' reads standard input stream. Default: files.")
.get();

private static final Option RECURSIVE_OPTION =
Expand Down Expand Up @@ -808,7 +808,7 @@ protected boolean typeSupported(String type) {
}

static void warn(String msg) {
CLIO.err("PostTool: WARNING: " + msg);
CLIO.err("WARNING: " + msg);
}

static void info(String msg) {
Expand Down
2 changes: 1 addition & 1 deletion solr/core/src/java/org/apache/solr/cli/StreamTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void runStream(
streamContext.getSolrClientCache().close();
}

echoIfVerbose("StreamTool -- Done.");
echoIfVerbose("Done.");
}

private StreamContext createStreamContext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ solr and solr.cmd::: This is xref:solr-control-script-reference.adoc[Solr's Cont
This script is the preferred tool to start and stop Solr.
You can also create collections or cores, configure authentication, and work with configuration files when running in SolrCloud mode.

post::: The xref:indexing-guide:post-tool.adoc[], which provides a simple command line interface for POSTing content to Solr.
post::: The xref:indexing-guide:post-command.adoc[], which provides a simple command line interface for POSTing content to Solr.

solr.in.sh and solr.in.cmd:::
These are property files for *nix and Windows systems, respectively.
Expand Down Expand Up @@ -147,7 +147,7 @@ Here are the examples included with Solr:

exampledocs::
This is a small set of simple CSV, XML, and JSON files that can be used with `bin/solr post` when first getting started with Solr.
For more information about using `bin/solr post` with these files, see xref:indexing-guide:post-tool.adoc[].
For more information about using `bin/solr post` with these files, see xref:indexing-guide:post-command.adoc[].

files::
The `files` directory provides a basic search UI for documents such as Word or PDF that you may have stored locally.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The tutorial assumes that you have Docker installed and running on your computer

=== Start an external Apache Tika Server

Indexing binary files (PDF, DOCX, PPTX, etc.) with the Post Tool requires the Solr extraction module to be enabled and an external Apache Tika Server to be running. See xref:indexing-guide:indexing-with-tika.adoc#tika-server[Tika Server] for background. We will be running Tika Server using Docker.
Indexing binary files (PDF, DOCX, PPTX, etc.) with the Solr CLI Post command requires the Solr extraction module to be enabled and an external Apache Tika Server to be running. See xref:indexing-guide:indexing-with-tika.adoc#tika-server[Tika Server] for background. We will be running Tika Server using Docker.

.Start a Tika Server quickly using Docker (exposes port 9998 on localhost)
[,bash]
Expand Down Expand Up @@ -89,10 +89,10 @@ Solr has lots of ways to index data.
Choose one of the approaches below and try it out with your system:

Local Files with `bin/solr post`::
If you have a local directory of files, the Post Tool (`bin/solr post`) can index a directory of files.
If you have a local directory of files, the Post command (`bin/solr post`) can index a directory of files.
We saw this in action in our first exercise.
+
We used only JSON, XML and CSV in our exercises, but the Post Tool can also handle HTML, PDF, Microsoft Office formats (such as MS Word), plain text, and more.
We used only JSON, XML and CSV in our exercises, but the Post command can also handle HTML, PDF, Microsoft Office formats (such as MS Word), plain text, and more.
+
In this example, assume there is a directory named "Documents" locally.
To index it, we would issue a command like this (correcting the collection name after the `-c` parameter as needed):
Expand Down Expand Up @@ -126,7 +126,7 @@ You can see that has happened by looking at the values for `numDocs` and `maxDoc
The `maxDoc` value may be larger as the `maxDoc` count includes logically deleted documents that have not yet been physically removed from the index.
You can re-post the sample files over and over again as much as you want and `numDocs` will never increase, because the new documents will constantly be replacing the old.

Go ahead and edit any of the existing example data files, change some of the data, and re-run the PostTool (`bin/solr post`).
Go ahead and edit any of the existing example data files, change some of the data, and re-run the Post command (`bin/solr post`).
You'll see your changes reflected in subsequent searches.

=== Deleting Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ $ bin/solr healthcheck -c gettingstarted

The healthcheck command gathers basic information about each replica in a collection, such as number of docs, current status (active, down, etc.), and address (where the replica lives in the cluster).

Documents can now be added to SolrCloud using the xref:indexing-guide:post-tool.adoc[].
Documents can now be added to SolrCloud using the xref:indexing-guide:post-command.adoc[].

To stop Solr in SolrCloud mode, you would use the `bin/solr` script and issue the `stop` command, as in:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
** xref:indexing-with-cbor.adoc[]
** xref:indexing-with-tika.adoc[]
** xref:indexing-nested-documents.adoc[]
** xref:post-tool.adoc[]
** xref:post-command.adoc[]
** xref:documents-screen.adoc[]
** xref:partial-document-updates.adoc[]
** xref:reindexing.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= Post Tool
= Solr CLI Post Command
:page-aliases: post-tool.adoc
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand Down Expand Up @@ -30,7 +31,7 @@ $ bin/solr post --solr-url http://localhost:8983 --name gettingstarted example/f
This will contact the server at `localhost:8983`.
The `--help` (or simply `-h`) option will output information on its usage (i.e., `bin/solr post -h)`.

== Using the bin/solr post Tool
== Using the bin/solr post Command

You must either specify `url` that is the full path to the update handler or provide a `c` collection/core name when using `bin/solr post`.

Expand All @@ -57,9 +58,9 @@ List of options:
xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,
ots,rtf,htm,html,txt,log
-h,--help Print this message.
--mode <mode> Which mode the Post tool is running in, 'files' crawls local
directory, 'web' crawls website, 'args' processes input args, and
'stdin' reads a command from standard in. default: files.
--mode <mode> Specifies how to run: 'files' crawls local directories, 'web' crawls
websites, 'args' processes positional arguments, and 'stdin' reads
standard input stream. Default: files.
-o,--optimize Issue an optimize at end of posting documents.
--params <<key>=<value>[&<key>=<value>...]> Values must be URL-encoded; these pass through to Solr update request.
-r,--recursive <recursive> For web crawl, how deep to go. default: 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= Stream Tool
= Solr CLI Stream Command
:page-aliases: stream-tool.adoc
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand All @@ -16,11 +17,11 @@
// specific language governing permissions and limitations
// under the License.

The Stream tool allows you to run a xref:streaming-expressions.adoc[] in Solr and see the results from the command line.
The Stream command allows you to run a xref:streaming-expressions.adoc[] in Solr and see the results from the command line.
It is very similar to the xref:stream-screen.adoc[], but is part of the `bin/solr` CLI.
Being a CLI, you can pipe content into it similar to other Unix style tools, as well as run actually RUN many kinds of expressions locally as well.

NOTE: The Stream Tool is classified as "experimental".
NOTE: The Stream command is classified as "experimental".
It may change in backwards-incompatible ways as it evolves to cover additional functionality.

To run it, open a terminal and enter:
Expand Down Expand Up @@ -84,7 +85,7 @@ CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Me
A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Memory - OEM
----

== Using the bin/solr stream Tool
== Using the bin/solr stream Command

To use the tool you need to provide the streaming expression either inline as the last argument, or provide a file ending in `.expr` that contains the expression.

Expand Down Expand Up @@ -127,7 +128,7 @@ This section presents several examples.
Streaming Expressions by default are executed in the Solr cluster.
However there are use cases where you want to interact with data in your local environment, or even run a streaming expression independent of Solr.

The Stream Tool allows you to specify `--execution local` to process the expression in the Solr CLI's JVM.
The Stream command allows you to specify `--execution local` to process the expression in the Solr CLI's JVM.

However, "local" processing does not imply a networking sandbox.
Many streaming expressions, such as `search` and `update`, will make network requests to remote Solr nodes if configured to do so, even in "local" execution mode.
Expand Down Expand Up @@ -156,7 +157,7 @@ $ bin/solr stream --execution local --header load_data.expr
----


The StreamTool adds some Streaming Expressions specifically for local use:
The Stream command adds some Streaming Expressions specifically for local use:

* stdin() lets you pipe data directly into the streaming expression.
* cat() that allows you to read ANY file on your local system. This is different from the xref:stream-source-reference.adoc#cat[`cat`] operator that runs in Solr that only accesses `$SOLR_HOME/userfiles/`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,6 @@ The xref:math-expressions.adoc[] has in depth coverage of visualization techniqu

* xref:stream-screen.adoc[]: Submit streaming expressions and see results and parsing explanations.

=== Stream Tool
=== Stream Command

* xref:stream-tool.adoc[]: Submit streaming expressions and see results via `bin/solr stream`.
* xref:stream-command.adoc[]: Submit streaming expressions and see results via `bin/solr stream`.
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/modules/query-guide/querying-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@
** xref:graph-traversal.adoc[]
** xref:stream-api.adoc[]
** xref:stream-screen.adoc[]
** xref:stream-tool.adoc[]
** xref:stream-command.adoc[]
Loading