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

Multiple search fields per table for the search endpoint #174

Open
MattiasSp opened this issue May 16, 2024 · 0 comments
Open

Multiple search fields per table for the search endpoint #174

MattiasSp opened this issue May 16, 2024 · 0 comments

Comments

@MattiasSp
Copy link
Contributor

When defining a search model for the search endpoint, the current searchField parameter can only handle one field per table definition, like in this example from the docs:

{
    table: 'Adresser',
    searchField: 'NAMN',
    schema: 'public',
    geometryName: 'geom',
    gid: 'OBJECTID'
}

To search more than one field in the same table, the definition has to be repeated, and worse the query will be run once for each definition:

{
    table: 'Adresser',
    searchField: 'NAMN',
    schema: 'public',
    geometryName: 'geom',
    gid: 'OBJECTID'
},
{
    table: 'Adresser',
    searchField: 'POPNAMN',
    schema: 'public',
    geometryName: 'geom',
    gid: 'OBJECTID'
}

It would be great if each table only had to be defined and queried once, using a searchFields array:

{
    table: 'Adresser',
    searchFields: ['NAMN', 'POPNAMN'],
    schema: 'public',
    geometryName: 'geom',
    gid: 'OBJECTID'
}
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

No branches or pull requests

1 participant