Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(arcgis-rest-portal): add supported search fields #928

Merged
merged 2 commits into from
Oct 23, 2021

Conversation

dbouwman
Copy link
Member

@dbouwman dbouwman commented Oct 21, 2021

Adds the following fields to the allow list of properties that are copied from ISearchOptions into the request

    "filter",
    "countFields",
    "countSize",
    "categories",
    "categoryFilters",

Also added these to ISearchOptions as optional.

Added tests to ensure these flow through; verified they actually work with the API via linking to another project

@codecov
Copy link

codecov bot commented Oct 21, 2021

Codecov Report

Merging #928 (7db59e7) into master (688d58b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #928   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          140       140           
  Lines         2406      2406           
  Branches       422       422           
=========================================
  Hits          2406      2406           
Impacted Files Coverage Δ
...ages/arcgis-rest-portal/src/util/generic-search.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 688d58b...7db59e7. Read the comment docs.

Copy link
Contributor

@patrickarlt patrickarlt left a comment

Choose a reason for hiding this comment

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

Code LGTM but should we add support for categories, filter and categoryFilter to SearchQueryBuilder?

@dbouwman
Copy link
Member Author

@patrickarlt I took a quick look at SearchQueryBuilder and since that's focus is building the q param, and these are other params are peers to q, I think we'd have to take a different approach... like SearchQueryBuilder's constructor could take a hash of additional props, and then in generic-search we could look for those props and transfer them onto params similar to how ISearchOptions is handled.

Near term we need these other params to be supported on ISearchOptions for some work we are landing in Hub.js. I'm open to input on how to cleanly add these to SearchQueryBuilder as a follow on PR.

@tomwayson
Copy link
Member

I've added a follow up issue for SearchQueryBuilder and will port these changes to the v4 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants