]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21602 improved docs for /api/components/search
authorlukasz-jarocki-sonarsource <lukasz.jarocki@sonarsource.com>
Tue, 26 Mar 2024 15:08:36 +0000 (16:08 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 27 Mar 2024 20:02:41 +0000 (20:02 +0000)
server/sonar-webserver-webapi/src/main/java/org/sonar/server/component/ws/SearchAction.java

index 0f06dde4ec251092deb84dccd4b52e162fb5797f..c5ab1572ebd67feed9776346436669fdc1f3d3d6 100644 (file)
@@ -40,6 +40,7 @@ import org.sonar.server.component.index.ComponentIndex;
 import org.sonar.server.component.index.ComponentQuery;
 import org.sonar.server.es.SearchIdResult;
 import org.sonar.server.es.SearchOptions;
+import org.sonar.server.es.newindex.DefaultIndexSettings;
 import org.sonarqube.ws.Components;
 import org.sonarqube.ws.Components.SearchWsResponse;
 
@@ -90,7 +91,9 @@ public class SearchAction implements ComponentsWsAction {
       .setDescription("Limit search to: <ul>" +
         "<li>component names that contain the supplied string</li>" +
         "<li>component keys that are exactly the same as the supplied string</li>" +
-        "</ul>")
+        "</ul><br>" +
+        "The value length of the param must be between " + DefaultIndexSettings.MINIMUM_NGRAM_LENGTH + " and " +
+        DefaultIndexSettings.MAXIMUM_NGRAM_LENGTH + " (inclusive) characters. In case longer value is provided it will be truncated.")
       .setExampleValue("sonar");
 
     createQualifiersParameter(action, newQualifierParameterContext(i18n, resourceTypes), VALID_QUALIFIERS)