Skip to content

Commit

Permalink
Use 'versionless' links to the Solr ref guide in comments and docs (s…
Browse files Browse the repository at this point in the history
…olariumphp#820)

* Replace cwiki.apache.org links with their versionless lucene.apache.org counterparts

* Replace versioned lucene.apache.org links with their versionless counterparts, fix a few that were broken

* Add @see links to all CoreAdmin Actions

* Replace wiki.apache.org links with their versionless lucene.apache.org counterparts

* Replace broken external link

* Add note about versionless links to the Solr ref guide

* Style fixes
  • Loading branch information
thomascorthals authored Jun 26, 2020
1 parent a0bb875 commit eb5eb28
Show file tree
Hide file tree
Showing 83 changed files with 184 additions and 101 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ If you are uncertain about any part or need help please feel free to ask for hel
* Solarium follows the Symfony2 code standards: http://symfony.com/doc/current/contributing/code/standards.html
* Each PR will be checked for code standards violations. Of course anything other than a 'green' status needs to be fixed before a PR can be merged.
* Each PR will be checked by the CI environment automatically. Of course anything other than a 'green' status needs to be fixed before a PR can be merged.
* If you link to the Solr reference guide in a comment or the docs, use a 'versionless' URL (e.g. <https://lucene.apache.org/solr/guide/getting-started.html>). This will always redirect to the latest release.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Solarium 6:
$categoriesTerms = new Solarium\Component\Facet\JsonTerms(['local_key' => 'categories', 'field' => 'cat', 'limit'=>4,'numBuckets'=>true]);
```

See https://lucene.apache.org/solr/guide/8_5/local-parameters-in-queries.html for an introduction about local parameters.
See https://lucene.apache.org/solr/guide/local-parameters-in-queries.html for an introduction about local parameters.


### Pitfall when upgrading from 3.x or 4.x
Expand Down
2 changes: 1 addition & 1 deletion docs/queries/extract-query.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
An extract query can be used to index files in Solr. For more info see <http://wiki.apache.org/solr/ExtractingRequestHandler>
An extract query can be used to index files in Solr. For more info see <https://lucene.apache.org/solr/guide/uploading-data-with-solr-cell-using-apache-tika.html>

Building an extract query
-------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/queries/morelikethis-query.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
A MoreLikeThis (MLT) query is designed to generate information about "similar" documents using the MoreLikeThis functionality provided by Lucene. It supports faceting, paging, and filtering using CommonQueryParameters.

This query uses the [Solr MoreLikeThis Handler](http://wiki.apache.org/solr/MoreLikeThisHandler) that specifically returns MLT results. Alternatively you can use the [MLT component](V2:MoreLikeThis_component "wikilink") for the select query.
This query uses the [Solr MoreLikeThis Handler](https://lucene.apache.org/solr/guide/morelikethis.html) that specifically returns MLT results. Alternatively you can use the [MLT component](V2:MoreLikeThis_component "wikilink") for the select query.

Building a MLT query
--------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/queries/ping-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ A ping query can be used to check the connection to the Solr server and the heal

*It's not advisable to check Solr with a ping before every request, this can have a big performance impact. You are better of using the ping query with intervals, or as a check after a query error to see if the query was faulty or if Solr has problems.*

To use ping queries first of all you need to have a ping query defined in your solrconfig.xml file and working. See the Solr wiki for more info about this: <http://wiki.apache.org/solr/SolrConfigXml#The_Admin.2BAC8-GUI_Section>
The search executed by a ping is configured with the Request Parameters API. For more info see <https://lucene.apache.org/solr/guide/ping.html>

Creating a ping query
---------------------
Expand Down
4 changes: 3 additions & 1 deletion docs/queries/query-helper/query-helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ See the API docs (linked at the bottom of this page) for more details.
Dereferenced params
-------------------

The query helper also supports dereferenced params. See the implementation of the join() and qparser() methods. For more info also see <http://wiki.apache.org/solr/LocalParams>: Parameter dereferencing or indirection allows one to use the value of another argument rather than specifying it directly. This can be used to simplify queries, decouple user input from query parameters, or decouple front-end GUI parameters from defaults set in solrconfig.xml.
The query helper also supports dereferenced params. See the implementation of the join() and qparser() methods. For more info also see <https://lucene.apache.org/solr/guide/local-parameters-in-queries.html#parameter-dereferencing>:

> Parameter dereferencing, or indirection, lets you use the value of another argument rather than specifying it directly. This can be used to simplify queries, decouple user input from query parameters, or decouple front-end GUI parameters from defaults set in `solrconfig.xml`.
Special helper methods
----------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/queries/realtimeget-query.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A RealtimeGet query is useful when using Solr as a NoSql store. For more info see <http://wiki.apache.org/solr/RealTimeGet>
A RealtimeGet query is useful when using Solr as a NoSQL store. For more info see <https://lucene.apache.org/solr/guide/realtime-get.html>

Building a realtime query
-------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
For a description of Solr debugging see the [http://wiki.apache.org/solr/CommonQueryParameters\#Debugging Solr wiki page](http://wiki.apache.org/solr/CommonQueryParameters#Debugging_Solr_wiki_page "wikilink").
For a description of Solr debugging see <https://lucene.apache.org/solr/guide/common-query-parameters.html#debug-parameter>.

Options
-------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
For a description of Solr distributed search (also referred to as 'shards' or 'sharding') see the [http://wiki.apache.org/solr/DistributedSearch\#Distributed\_Search\_Example Solr wiki page](http://wiki.apache.org/solr/DistributedSearch#Distributed_Search_Example_Solr_wiki_page "wikilink").
For a description of Solr distributed search (also referred to as 'shards' or 'sharding') see <https://lucene.apache.org/solr/guide/distributed-search-with-index-sharding.html>.

Options
-------
Expand Down Expand Up @@ -27,7 +27,7 @@ $client = new Solarium\Client($adapter, $eventDispatcher, $config);
$query = $client->createSelect();

// add distributed search settings
// see http://wiki.apache.org/solr/DistributedSearch#Distributed_Search_Example for setting up two solr instances
// see https://lucene.apache.org/solr/guide/distributed-search-with-index-sharding.html#testing-index-sharding-on-two-local-servers for setting up two Solr instances
$distributedSearch = $query->getDistributedSearch();
$distributedSearch->addShard('shard1', 'localhost:8983/solr');
$distributedSearch->addShard('shard2', 'localhost:7574/solr');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Only the facet-type specific options are listed. See [Facetset component](V3:Fac
| offset | int | null | Show facet count starting from this offset. |
| mincount | int | null | Minimal term count to be included in facet count results. |
| missing | boolean | null | Also make a count of all document that have no value for the facet field. |
| method | string | null | Use one of the class constants as value. See <http://wiki.apache.org/solr/SimpleFacetParameters#facet.method> for details. |
| method | string | null | Use one of the class constants as value. See <https://lucene.apache.org/solr/guide/faceting.html#field-value-faceting-parameters> for details. |
||

Example
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The facet class supports the Solr pivot facet: <http://wiki.apache.org/solr/SimpleFacetParameters#Pivot_.28ie_Decision_Tree.29_Faceting>
The facet class supports the Solr pivot facet: <https://lucene.apache.org/solr/guide/faceting.html#pivot-decision-tree-faceting>.

Options
-------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The facet class supports the Solr range facet: <http://wiki.apache.org/solr/SimpleFacetParameters#Facet_by_Range>
The facet class supports the Solr range facet: <https://lucene.apache.org/solr/guide/faceting.html#range-faceting>.

Options
-------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
For a description of Solr grouping (also referred to as 'result grouping' or 'field collapse') see the [http://wiki.apache.org/solr/FieldCollapsing Solr wiki page](http://wiki.apache.org/solr/FieldCollapsing_Solr_wiki_page "wikilink").
For a description of Solr grouping (also referred to as 'result grouping' or 'field collapse') see <https://lucene.apache.org/solr/guide/result-grouping.html>.

It's important to have a good understanding of the available options, as they can have have big effects on the result format.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The highlighting component can be used to highlight matches in content. For more info see <http://wiki.apache.org/solr/HighlightingParameters>
The highlighting component can be used to highlight matches in content. For more info see <https://lucene.apache.org/solr/guide/highlighting.html>.

Options
-------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The morelikethis component can be used if you want to retrieve similar documents for your query results. This component uses morelikethis in the standardrequesthandler, not the standalone morelikethis handler. For more info see <http://wiki.apache.org/solr/MoreLikeThis>
The morelikethis component can be used if you want to retrieve similar documents for your query results. This component uses morelikethis in the standardrequesthandler, not the standalone morelikethis handler. For more info see <https://lucene.apache.org/solr/guide/morelikethis.html>.

Options
-------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
For a description of Solr spellcheck (also referred to as 'query suggest') see the [http://wiki.apache.org/solr/SpellCheckComponent Solr wiki page](http://wiki.apache.org/solr/SpellCheckComponent_Solr_wiki_page "wikilink").
For a description of Solr spellcheck (also referred to as 'query suggest') see <https://lucene.apache.org/solr/guide/spell-checking.html>.

The `setQuery()` method of this component supports [placeholders](V3:Placeholders "wikilink").

Expand All @@ -25,7 +25,7 @@ Options
Collate params
--------------

Using the API method setCollateParam($param, $value) you can set any collate params you need. For more info please see this page: <http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.collateParam.XX>
Using the API method setCollateParam($param, $value) you can set any collate params you need. For more info see <https://lucene.apache.org/solr/guide/spell-checking.html#spell-check-parameters>.

Example
-------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
For a description of the Solr StatsComponent see the [http://wiki.apache.org/solr/StatsComponent Solr wiki page](http://wiki.apache.org/solr/StatsComponent_Solr_wiki_page "wikilink").
For a description of the Solr StatsComponent see <https://lucene.apache.org/solr/guide/the-stats-component.html>.

Options
-------
Expand Down
9 changes: 4 additions & 5 deletions docs/queries/select-query/select-query.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
With select queries you can select documents and/or facet counts from your Solr index. Solr select queries have lots of options. See the following pages for an intro:

- <http://wiki.apache.org/solr/CommonQueryParameters>
- <http://wiki.apache.org/solr/SearchHandler>
- <http://wiki.apache.org/solr/SimpleFacetParameters>
With select queries you can select documents and/or facet counts from your Solr index. Solr select queries have lots of options. See the following pages in the Solr reference guide for an intro:

- [Common Query Parameters](https://lucene.apache.org/solr/guide/common-query-parameters.html)
- [The Standard Query Parser](https://lucene.apache.org/solr/guide/the-standard-query-parser.html)
- [Faceting](https://lucene.apache.org/solr/guide/faceting.html)
4 changes: 2 additions & 2 deletions docs/queries/server-query/core-admin-query.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Core admin queries can be used to administrate cores on your solr server (https://lucene.apache.org/solr/guide/7_4/coreadmin-api.html)
Core admin queries can be used to administrate cores on your solr server (https://lucene.apache.org/solr/guide/coreadmin-api.html)

The core admin api on the Apache Solr server has several "actions" available and every action can have a set of arguments.

Expand Down Expand Up @@ -133,7 +133,7 @@ Split

Use to split a core.

See also: https://lucene.apache.org/solr/guide/7_4/coreadmin-api.html#coreadmin-split
See also: https://lucene.apache.org/solr/guide/coreadmin-api.html#coreadmin-split

**Available action methods**:

Expand Down
2 changes: 1 addition & 1 deletion docs/queries/suggester-query.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A suggester query is a fast way to create an autocomplete feature. For more info on the Solr suggester component see: <http://wiki.apache.org/solr/Suggester>
A suggester query is a fast way to create an autocomplete feature. For more info on the Solr suggester component see: <https://lucene.apache.org/solr/guide/suggester.html>.

Building a suggester query
--------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/queries/terms-query.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A terms query provides access to the indexed terms in a field. For details see: <http://wiki.apache.org/solr/TermsComponent>
A terms query provides access to the indexed terms in a field. For details see: <https://lucene.apache.org/solr/guide/the-terms-component.html>.

Building a terms query
----------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
An update query has options and commands. These commands and options are instructions for the client classes to build and execute a request and return the correct result. In the following sections both the options and commands will be discussed in detail. You can also take a look at <http://wiki.apache.org/solr/UpdateXmlMessages> for more information about the underlying Solr update handler XML request format.
An update query has options and commands. These commands and options are instructions for the client classes to build and execute a request and return the correct result. In the following sections both the options and commands will be discussed in detail. You can also take a look at <https://lucene.apache.org/solr/guide/uploading-data-with-index-handlers.html#xml-formatted-index-updates> for more information about the underlying Solr update handler XML request format.

Options
-------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
You can use this command to optimize your Solr index. Optimizing 'defragments' your index. The space taken by deleted document data is reclaimed and can merge the index into fewer segments. This can improve search performance a lot.

See this page: <http://wiki.apache.org/solr/SolrPerformanceFactors#Optimization_Considerations> for more info about optimizing.
See <https://lucene.apache.org/solr/guide/uploading-data-with-index-handlers.html#commit-and-optimize-during-updates> for more info about optimizing.

While 'optimizing' sounds like it's always a good thing to do, you should use it with care, as it can have a negative performance impact *during the optimize process*. If possible use try to use it outside peak hours.

Expand Down
2 changes: 1 addition & 1 deletion docs/solarium-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ If you want to customize Solarium please read the docs on this first. While you

### Response parser format

Solarium supports two Solr responsewriters: json and phps. The ‘phps’ responsewriter returns data as serialized PHP. This can be more efficient to decode than json, especially for large responses. For a benchmark see [http://www.raspberry.nl/2012/02/28/benchmarking-php-solr-response-data-handling/ this blogpost](http://www.raspberry.nl/2012/02/28/benchmarking-php-solr-response-data-handling/_this_blogpost "wikilink") (but be sure to test for your own use-case)
Solarium supports two Solr responsewriters: json and phps. The ‘phps’ responsewriter returns data as serialized PHP. This can be more efficient to decode than json, especially for large responses. For a benchmark see [this blogpost](https://dzone.com/articles/benchmarks-php-solr-response) (but be sure to test for your own use-case).

However this comes at the cost of a possible security risk in PHP deserialization. As long as you use a trusted Solr server this should be no issue, but to be safe the default is still JSON.

Expand Down
2 changes: 1 addition & 1 deletion examples/2.1.5.8-distributed-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$query = $client->createSelect();

// add distributed search settings
// see http://wiki.apache.org/solr/DistributedSearch#Distributed_Search_Example for setting up two solr instances
// see https://lucene.apache.org/solr/guide/distributed-search-with-index-sharding.html#testing-index-sharding-on-two-local-servers for setting up two Solr instances
$distributedSearch = $query->getDistributedSearch();
$distributedSearch->addShard('shard1', 'localhost:8983/solr');
$distributedSearch->addShard('shard2', 'localhost:7574/solr');
Expand Down
4 changes: 3 additions & 1 deletion src/Component/Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Debug component.
*
* @see http://wiki.apache.org/solr/CommonQueryParameters#Debugging
* @see https://lucene.apache.org/solr/guide/common-query-parameters.html#debug-parameter
*/
class Debug extends AbstractComponent
{
Expand Down Expand Up @@ -57,6 +57,8 @@ public function getExplainOther(): ?string
/**
* Set the explainOther query.
*
* @see https://lucene.apache.org/solr/guide/common-query-parameters.html#explainother-parameter
*
* @param string $query
*
* @return self Provides fluent interface
Expand Down
2 changes: 1 addition & 1 deletion src/Component/DisMax.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* DisMax component.
*
* @see http://wiki.apache.org/solr/DisMaxQParserPlugin
* @see https://lucene.apache.org/solr/guide/the-dismax-query-parser.html
*/
class DisMax extends AbstractComponent
{
Expand Down
10 changes: 5 additions & 5 deletions src/Component/DistributedSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
/**
* Distributed Search (sharding) component.
*
* @see http://wiki.apache.org/solr/DistributedSearch
* @see http://wiki.apache.org/solr/SolrCloud/
* @see https://lucene.apache.org/solr/guide/distributed-search-with-index-sharding.html
* @see https://lucene.apache.org/solr/guide/solrcloud.html
*/
class DistributedSearch extends AbstractComponent
{
Expand Down Expand Up @@ -62,7 +62,7 @@ public function getRequestBuilder(): ComponentRequestBuilderInterface
*
* @return self Provides fluent interface
*
* @see http://wiki.apache.org/solr/DistributedSearch
* @see https://lucene.apache.org/solr/guide/distributed-search-with-index-sharding.html
*/
public function addShard(string $key, string $shard): self
{
Expand Down Expand Up @@ -199,7 +199,7 @@ public function getShardRequestHandler(): ?string
*
* @return self Provides fluent interface
*
* @see http://wiki.apache.org/solr/SolrCloud/
* @see https://lucene.apache.org/solr/guide/solrcloud.html
*/
public function addCollection(string $key, string $collection): self
{
Expand Down Expand Up @@ -287,7 +287,7 @@ public function getCollections(): array
*
* @return self Provides fluent interface
*
* @see https://cwiki.apache.org/confluence/display/solr/Distributed+Requests
* @see https://lucene.apache.org/solr/guide/distributed-requests.html
*/
public function addReplica(string $key, string $replica): self
{
Expand Down
2 changes: 1 addition & 1 deletion src/Component/EdisMax.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* EdisMax component.
*
* @see http://wiki.apache.org/solr/ExtendedDisMax
* @see https://lucene.apache.org/solr/guide/the-extended-dismax-query-parser.html
*/
class EdisMax extends DisMax
{
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Facet/AbstractFacet.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Facet base class.
*
* @see http://wiki.apache.org/solr/SimpleFacetParameters
* @see https://lucene.apache.org/solr/guide/faceting.html
*/
abstract class AbstractFacet extends Configurable implements FacetInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Facet/AbstractField.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* Facet query.
*
* @see http://wiki.apache.org/solr/SimpleFacetParameters#Field_Value_Faceting_Parameters
* @see https://lucene.apache.org/solr/guide/faceting.html#field-value-faceting-parameters
*/
abstract class AbstractField extends AbstractFacet
{
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Facet/AbstractRange.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* Facet range.
*
* @see http://wiki.apache.org/solr/SimpleFacetParameters#Facet_by_Range
* @see https://lucene.apache.org/solr/guide/faceting.html#range-faceting
*/
abstract class AbstractRange extends AbstractFacet
{
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Facet/FacetInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* Facet interface.
*
* @see http://wiki.apache.org/solr/SimpleFacetParameters
* @see https://lucene.apache.org/solr/guide/faceting.html
*/
interface FacetInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Facet/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Facet query.
*
* @see http://wiki.apache.org/solr/SimpleFacetParameters#Field_Value_Faceting_Parameters
* @see https://lucene.apache.org/solr/guide/faceting.html#field-value-faceting-parameters
*/
class Field extends AbstractField
{
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Facet/Interval.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Facet interval.
*
* @see http://wiki.apache.org/solr/SimpleFacetParameters#Interval_Faceting
* @see https://lucene.apache.org/solr/guide/faceting.html#interval-faceting
*/
class Interval extends AbstractFacet
{
Expand Down
Loading

0 comments on commit eb5eb28

Please sign in to comment.