Skip to content

SOLR-18100: Improve Combined Query Feature documentation#4144

Open
ilariapet wants to merge 3 commits intoapache:mainfrom
SeaseLtd:SOLR-18100-improve-combined-query-documentation
Open

SOLR-18100: Improve Combined Query Feature documentation#4144
ilariapet wants to merge 3 commits intoapache:mainfrom
SeaseLtd:SOLR-18100-improve-combined-query-documentation

Conversation

@ilariapet
Copy link
Contributor

https://issues.apache.org/jira/browse/SOLR-18100

Description

Some sections of the Combined Query Feature documentation have been made clearer to improve understanding and usability of the feature.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 18, 2026
`maxCombinerQueries`::
This parameter can be set to put upper limit check on the maximum number of queries can be executed defined in `combiner.query`.
It defaults to `5` if not set.
The class to implement the custom logic has to extend `QueryAndResponseCombiner`, which is an abstract base class that provides a framework for implementing various algorithms used to merge ranked lists and shard documents.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the full reference of the class 'QueryAndResponseCombiner'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, having the full class reference here would be nice.

```

In this case, `customAlgorithm` is specified which is the name defined in the configuration; the RRF-specific parameters do not need to be provided.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add links to our blog posts, we have two on the topic, you can ask Lisa for the URLs (they will be published before this documentation will)

Copy link
Contributor

@alessandrobenedetti alessandrobenedetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation change is interesting and needs some minor changes

Copy link
Contributor

@dsmiley dsmiley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for contributing!

CC @ercsonusharma

In Standalone (user-managed) mode, shard URLs must be explicitly allow-listed using the *allowUrls* parameter, otherwise Solr returns HTTP 403. For example:

```
--jvm-opts "-Dsolr.security.allow.urls=http://localhost:8983/solr/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm; okay, the need for this is something Solr should improve (to automatically add localhost same-port). If this was improved, I suspect you wouldn't of even written this entire paragraph.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--jvm-opts -- surely we can just pass -Dsolr.....

--jvm-opts "-Dsolr.security.allow.urls=http://localhost:8983/solr/"
```

In SolrCloud mode, this is managed automatically via ZooKeeper.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do away with this sentence, as redundant with the prior paragraph. And the ZK reference is a needless implementation detail reference.

The Search Component also accepts parameters as below:

`maxCombinerQueries`::
This parameter can be set to put upper limit check on the maximum number of queries can be executed defined in `combiner.query`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This parameter can be set to put upper limit check on the maximum number of queries can be executed defined in `combiner.query`.
This parameter can be set to enforce an upper limit on the number of queries defined in `combiner.query`.

The class to implement the custom logic has to extend `QueryAndResponseCombiner`, which is an abstract base class that provides a framework for implementing various algorithms used to merge ranked lists and shard documents.

=== Combiner Algorithm Plugin
The custom class must be implemented in a Java project built against the Solr version that includes this feature (declared as a dependency in the build configuration), and the compiled JAR must then be deployed to the Solr libraries directory `../server/solr-webapp/webapp/WEB-INF/lib`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than say these specific things, please instead refer to solr-plugins.adoc which discusses several ways to install them (IMO least preferred is WEB-INF/lib). If you want to say more about java development, I think that page would be where we might want to say such things. But not this page here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't add to the changelog on documentation matters

[IMPORTANT]
====
This feature works in both Standalone and SolrCloud modes and always performs distributed search execution.
In Standalone (user-managed) mode, shard URLs must be explicitly allow-listed using the *allowUrls* parameter, otherwise Solr returns HTTP 403. For example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven’t encountered this issue before, as it might vary depending on the infrastructure (?)

</searchComponent>
```

Then, when executing the combined query, the only thing that changes in the JSON query payload is the value specified in the `combiner.algorithm` parameter:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate you breaking this down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments