Help

Re: Specify Search App rules?

643 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Nicolas_Bauwens
4 - Data Explorer
4 - Data Explorer

Hi !

We have a search app installed on a base, the app is configured to search accross 5 tables. When we search for “permis” (in French), the search return results for word starting with “perm” like “permanence” for instance, but that’s not relevant at all.

Also, it only search content starting with the search keywords. For instance, if we search “entreprenariat”, it won’t return content with the words “l’entreprenariat”, again, that’s not relevant at all.

Is there a way to know exactly the search rules for the app ? Or a way or another to configure the rules ? Because, as is, it’s quite useless…

Thanks,
Nicolas

1 Reply 1

Hi @Nicolas_Bauwens
I do not know how the Search app does its job. I did play around with it and got the same results as you did, even setting the language option.

I have a light weight script that will let you search and will not give you the same errors you listed. It is no where near as robust as the search app, but you are welcome to build on it.

const config = input.config({
    title: 'Airtable Search',
    description: 'Airtable Search App Settings',
    items: [
        input.config.table('baseTable', {
            label: 'Base table',
            description: 'The table you want to search'
        }),
        input.config.field('baseField', {
            label: 'The field you want to search',
            parentTable: 'baseTable',
        }),
    ]
});
let field = config.baseField;
let table = config.baseTable;
let tableId = table.id
let recordInput = await input.textAsync("SEARCH");
let queryResult = await table.selectRecordsAsync({});
for (let record of queryResult.records) {
    if(record.getCellValueAsString(field).includes(recordInput)){
        let name = record.getCellValueAsString(field)
        let id = record.id
        output.markdown(`
[${name}](https://airtable.com/${base.id}/${tableId}/${id})  
        `)
    }
}

image