mirror of https://github.com/apache/lucene.git
SOLR-11848: Ref Guide: include info on grouping operations and using curl for large files. This closes #303.
This commit is contained in:
parent
95122e1448
commit
a4320aab8d
|
@ -181,7 +181,7 @@ Bug Fixes
|
||||||
|
|
||||||
* SOLR-11873: Use time based expiration cache in all necessary places in HdfsDirectoryFactory. (Mihaly Toth via Mark Miller)
|
* SOLR-11873: Use time based expiration cache in all necessary places in HdfsDirectoryFactory. (Mihaly Toth via Mark Miller)
|
||||||
|
|
||||||
* SOLR-11661: New HDFS collection reuses unremoved data from a deleted HDFS collection with same name causes
|
* SOLR-11661: New HDFS collection reuses unremoved data from a deleted HDFS collection with same name causes
|
||||||
inconsistent view of documents (Cao Manh Dat, shalin)
|
inconsistent view of documents (Cao Manh Dat, shalin)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
|
@ -245,6 +245,8 @@ Other Changes
|
||||||
|
|
||||||
* SOLR-11067: REPLACENODE should identify appropriate nodes if targetNode is not provided (noble)
|
* SOLR-11067: REPLACENODE should identify appropriate nodes if targetNode is not provided (noble)
|
||||||
|
|
||||||
|
* SOLR-11848: Update Ref Guide to include info on grouping operations and using curl for large files. (Dariusz Wojtas via Cassandra Targett)
|
||||||
|
|
||||||
================== 7.2.1 ==================
|
================== 7.2.1 ==================
|
||||||
|
|
||||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||||
|
|
|
@ -136,6 +136,26 @@ When using the Join query parser in a Delete By Query, you should use the `score
|
||||||
|
|
||||||
The rollback command rolls back all add and deletes made to the index since the last commit. It neither calls any event listeners nor creates a new searcher. Its syntax is simple: `<rollback/>`.
|
The rollback command rolls back all add and deletes made to the index since the last commit. It neither calls any event listeners nor creates a new searcher. Its syntax is simple: `<rollback/>`.
|
||||||
|
|
||||||
|
==== Grouping Operations
|
||||||
|
|
||||||
|
You can post several commands in a single XML file by grouping them with the surrounding `<update>` element.
|
||||||
|
|
||||||
|
[source,xml]
|
||||||
|
----
|
||||||
|
<update>
|
||||||
|
<add>
|
||||||
|
<doc><!-- doc 1 content --></doc>
|
||||||
|
</add>
|
||||||
|
<add>
|
||||||
|
<doc><!-- doc 2 content --></doc>
|
||||||
|
</add>
|
||||||
|
<delete>
|
||||||
|
<id>0002166313</id>
|
||||||
|
</delete>
|
||||||
|
</update>
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
=== Using curl to Perform Updates
|
=== Using curl to Perform Updates
|
||||||
|
|
||||||
You can use the `curl` utility to perform any of the above commands, using its `--data-binary` option to append the XML message to the `curl` command, and generating a HTTP POST request. For example:
|
You can use the `curl` utility to perform any of the above commands, using its `--data-binary` option to append the XML message to the `curl` command, and generating a HTTP POST request. For example:
|
||||||
|
@ -162,6 +182,13 @@ For posting XML messages contained in a file, you can use the alternative form:
|
||||||
curl http://localhost:8983/solr/my_collection/update -H "Content-Type: text/xml" --data-binary @myfile.xml
|
curl http://localhost:8983/solr/my_collection/update -H "Content-Type: text/xml" --data-binary @myfile.xml
|
||||||
----
|
----
|
||||||
|
|
||||||
|
The approach above works well, but using the `--data-binary` option causes `curl` to load the whole `myfile.xml` into memory before posting it to server. This may be problematic when dealing with multi-gigabyte files. This alternative `curl` command performs equivalent operations but with minimal `curl` memory usage:
|
||||||
|
|
||||||
|
[source,bash]
|
||||||
|
----
|
||||||
|
curl http://localhost:8983/solr/my_collection/update -H "Content-Type: text/xml" -T "myfile.xml" -X POST
|
||||||
|
----
|
||||||
|
|
||||||
Short requests can also be sent using a HTTP GET command, if enabled in <<requestdispatcher-in-solrconfig.adoc#requestparsers-element,RequestDispatcher in SolrConfig>> element, URL-encoding the request, as in the following. Note the escaping of "<" and ">":
|
Short requests can also be sent using a HTTP GET command, if enabled in <<requestdispatcher-in-solrconfig.adoc#requestparsers-element,RequestDispatcher in SolrConfig>> element, URL-encoding the request, as in the following. Note the escaping of "<" and ">":
|
||||||
|
|
||||||
[source,bash]
|
[source,bash]
|
||||||
|
|
Loading…
Reference in New Issue