You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "sarkaramrit1993 (via GitHub)" <gi...@apache.org> on 2026/10/05 22:52:37 UTC
[PR] SOLR-18031: Respect --filetypes for files and globs in bin/solr post [solr]
sarkaramrit1993 opened a new pull request, #5032:
URL: https://github.com/apache/solr/pull/5032
https://issues.apache.org/jira/browse/SOLR-18031
`bin/solr post --filetypes xml example/exampledocs/*` posted every file. The shell expands `*` before the tool sees it, so the tool gets a list of files, and only directory walks checked `--filetypes`.
The dry run summary was also wrong. The count was overwritten for each argument instead of added up, so it always said 1.
Changes:
- Files and globs now go through the same `--filetypes` check as directories. A skipped file gets a warning, which the ref guide already says should happen.
- A glob that matches files, but none of the allowed types, now says so instead of claiming nothing matched.
- With `--type` set, all files are still posted like before.
- The count now sums across arguments.
Not changed: with `--type` set, directories are still filtered by `--filetypes` but explicit files aren't. That was already the case, and changing it would break the documented `--type text/csv data.tsv` example. Happy to open a separate issue if that's worth looking at.
Tests: two new cases in PostToolTest (explicit files, and globs; the glob test is skipped on Windows since `*` isn't a valid path character there). Ran the cli tests, SolrCloudExampleTest, and the post, help, auth, extraction, SSL and rolling upgrade BATS tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18031: Respect --filetypes for files and globs in bin/solr post [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #5032:
URL: https://github.com/apache/solr/pull/5032#issuecomment-6006676935
any chance you can give me a sample command that shows the problem taht I can manually test? bin/solr post ???
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18031: Respect --filetypes for files and globs in bin/solr post [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh merged PR #5032:
URL: https://github.com/apache/solr/pull/5032
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18031: Respect --filetypes for files and globs in bin/solr post [solr]
Posted by "sarkaramrit1993 (via GitHub)" <gi...@apache.org>.
sarkaramrit1993 commented on PR #5032:
URL: https://github.com/apache/solr/pull/5032#issuecomment-6005143843
@epugh you filed SOLR-18031, would you mind taking a look when you get a chance?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18031: Respect --filetypes for files and globs in bin/solr post [solr]
Posted by "sarkaramrit1993 (via GitHub)" <gi...@apache.org>.
sarkaramrit1993 commented on PR #5032:
URL: https://github.com/apache/solr/pull/5032#issuecomment-6011001996
Sure. From the root of a dev build (`./gradlew dev`, then `cd solr/packaging/build/dev`):
```
bin/solr post -c gettingstarted --filetypes xml --dry-run --skip-commit example/exampledocs/*
```
No running Solr needed with `--dry-run --skip-commit`.
On main it lists all 18 files, csv/json/pdf/html included, and ends with `Dry run complete. 1 would have been indexed.`
With this PR it lists only the 13 xml files, prints a `WARNING: Skipping <path>/books.csv, its file type is not in xml` line for books.csv and the other 4 non-xml files, and ends with `Dry run complete. 13 would have been indexed.`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org