[ 
https://issues.apache.org/jira/browse/SOLR-10812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036999#comment-16036999
 ] 

Cassandra Targett commented on SOLR-10812:
------------------------------------------

bq. Introspect documentation points to the ref guide: Where should the url 
point to now?

When the new Ref Guide is published online, the specs should point to it. As of 
this exact moment, the old location is still valid.

bq. The experimental warning comes up three times

See SOLR-10405.

bq. "numShards"/"replicationFactor" says "type" as number. Should it be 
integer? maxShardsPerNode says integer

I think there are places where types are wrong in the specs. See SOLR-10411 for 
another example.

bq. I tried out the "create" command specified "collection.configName" param 
instead of the new "config" param . So when I tried it I got the following 
error which should be made easier to understand to our users as it didn't 
mention anything useful

See also SOLR-10435 and SOLR-10408.

As for all the comments about wording of descriptions - a lot of that was 
copied from the existing Ref Guide documentation, so where that is incomplete 
or wrong, the property descriptions are incomplete or wrong. Things have no 
defaults because the docs have no defaults, etc. IMO if you think it's wrong or 
missing, you can fix it, but probably in both places so there isn't a confusing 
disconnect if someone happens to look at both the spec and the docs.

As a side note, this is kind of a huge issue that's going to be hard for 
someone to address all at once. I think you may want to split out the problems 
into more actionable categories - docs, specs, errors, actual functionality 
(like 1 issue for your docs problems, 1 issue for type problems, etc.) - and 
create other issues (maybe sub-tasks if you like) that are easier for someone 
to pick up. Otherwise this is likely going to sit for 3 years until someone 
finally realizes it's obsolete because others ended up fixing it all with newer 
issues that were more focused.

> V2 API Collection API Improvements
> ----------------------------------
>
>                 Key: SOLR-10812
>                 URL: https://issues.apache.org/jira/browse/SOLR-10812
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: v2 API
>    Affects Versions: 6.5
>            Reporter: Varun Thacker
>
> Observations when I hit : http://localhost:8983/v2/c/_introspect
> - Can the default be indent=on?
> - Introspect documentation points to the ref guide: Where should the url 
> point to now?
> - The experimental warning comes up three times
> For the create action:
> - The "required" param only says name. It should have numShards or router ?
> - Missing "default" values for replicationFactor / maxShardsPerNode / 
> createNodeSet.shuffle 
> - "Create collections and collection aliases, backup or restore collections, 
> and delete collections and aliases" - Replace the first and with a comma?
> - "These properties define how to distribute documents across a collection's 
> shards." -> "The router properties defines how documents are distributed 
> across shards" ?
> - "The compositeId option has Solr decide how to distribute documents (with 
> some possibilities for customization)" -> "The 'compositeId' router hashes 
> the value in the uniqueKey field with the additional ability to manually 
> direct the routing" ?
> - "The implicit option requires you define your own routing strategy, and 
> puts the balancing of documents in shards entirely in your hands." -> "The 
> indexing client needs to specify for each document which shard should a 
> document belong to" ?
> - "numShards"/"replicationFactor" says "type" as number. Should it be 
> integer? maxShardsPerNode says integer
> - "Replicas are physical copies of each shard, acting as failover for the 
> shard." -> ... "and helps distribute query load" ?
> - Empty description for "snitch" ? Maybe we should point it to a 
> documentation page ?
> - "properties" : the properties description seems to be vague? What does 
> "additionalProperties" = true mean? It wasn't clear how to use it until I 
> went to the test cases.
> - I tried out the "create" command specified "collection.configName" param 
> instead of the new "config" param . So when I tried it I got the following 
> error which should be made easier to understand to our users as it didn't 
> mention anything useful:
> {code}
> ~/solr-6.5.0$ curl -X POST -d '{create:{name: test_api, 
> collection.configName: gettingstarted , shards: 1 }}' 
> http://localhost:8983/v2/c
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
> <title>Error 400 
> {metadata={error-class=org.apache.solr.api.ApiBag$ExceptionWithErrObject,root-error-class=org.apache.solr.api.ApiBag$ExceptionWithErrObject},errorMessages=[{create={name=test_api,
>  collection.configName=gettingstarted, shards=1}, errorMessages=[Expected 
> type : string but found : 1in object : 1, Unknown field 
> &apos;collection.configName&apos; in object : {
>   &quot;name&quot;:&quot;test_api&quot;,
>   &quot;collection.configName&quot;:&quot;gettingstarted&quot;,
>   &quot;shards&quot;:1}]}],msg=Error in command payload,code=400}</title>
> </head>
> <body><h2>HTTP ERROR 400</h2>
> <p>Problem accessing /solr/____v2/c. Reason:
> <pre>    
> {metadata={error-class=org.apache.solr.api.ApiBag$ExceptionWithErrObject,root-error-class=org.apache.solr.api.ApiBag$ExceptionWithErrObject},errorMessages=[{create={name=test_api,
>  collection.configName=gettingstarted, shards=1}, errorMessages=[Expected 
> type : string but found : 1in object : 1, Unknown field 
> &apos;collection.configName&apos; in object : {
>   &quot;name&quot;:&quot;test_api&quot;,
>   &quot;collection.configName&quot;:&quot;gettingstarted&quot;,
>   &quot;shards&quot;:1}]}],msg=Error in command payload,code=400}</pre></p>
> </body>
> </html>
> {code}
> - Now I changed it tried the following command and got an error similar to 
> the above error.
> - Should the "DELETE" and "GET" operations show up when you hit 
> http://localhost:8983/v2/collections/_introspect?command=create or 
> http://localhost:8983/v2/collections/_introspect?command=create-alias ?
> - I tried the backup-collection command and I got an error which seems to 
> indicate that the location param is getting escaped? Also didn't see any 
> tests for backup-collection
> {code}
> ~/solr-6.5.0$ curl -X POST -d '{backup-collection:{name: backup_test, 
> collection: gettingstarted , location: '/Users/varunthacker/solr-6.5.0' }}' 
> http://localhost:8983/v2/c
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
> <title>Error 400 
> {metadata={error-class=org.apache.solr.common.SolrException,root-error-class=org.noggit.JSONParser$ParseException},msg=org.noggit.JSONParser$ParseException:
>  Invalid comment: expected //, /*, or #: char=U,position=79 
> BEFORE=&apos;{name: backup_test, collection: gettingstarted , location: 
> /U&apos; AFTER=&apos;sers/varunthacker/solr-6.5.0 }}&apos;,code=400}</title>
> </head>
> <body><h2>HTTP ERROR 400</h2>
> <p>Problem accessing /solr/____v2/c. Reason:
> <pre>    
> {metadata={error-class=org.apache.solr.common.SolrException,root-error-class=org.noggit.JSONParser$ParseException},msg=org.noggit.JSONParser$ParseException:
>  Invalid comment: expected //, /*, or #: char=U,position=79 
> BEFORE=&apos;{name: backup_test, collection: gettingstarted , location: 
> /U&apos; AFTER=&apos;sers/varunthacker/solr-6.5.0 }}&apos;,code=400}</pre></p>
> </body>
> </html>
> {code}
> - We have a "create" collection API and then a DELETE method to delete it. 
> Should delete-alias be similar?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to