search api doesn't pull up partial matches or numeric search

search api doesn't pull up partial matches or numeric search

Hi,

I'm using smartsheet integrations and use search API to get the queried sheet name.

https://api.smartsheet.com/2.0/search?query=myquery&scopes=sheetNames

Example: Assume that these are the sheetnames I have created

  1. a
  2. sheet a
  3. ac
  4. sheet ac
  5. sheet account
  6. sheet account10

These are the issues

  1. When I query "a", it returns only "a" and "sheet a". Infers that only exact word match applies when searched with one character
  2. When I query "ac", it returns only "ac and sheet ac". Infers again that only exact word match applies.
  3. However if I search "acc", it returns "sheet account and sheet account10". Infers partial match
  4. If I search for 10 it doesn't pull up any result.

Need clarification on how to make it partial search all the time irrelevant of whether the query is single character, double character, numeric or any word.

Please help with this.

Thanks in advance,

Bala.

Best Answers

  • Accepted Answer

    Hi @Genevieve P

    Yeah I found that partial search works only from 3 character onwards.

    I infer that currently there is no way to get partial search for numbers or queries with only one or two characters. This is exactly user's request.

    Is my understanding right ?

Answers

  • Genevieve PGenevieve P admin
    edited 03/25/20

    Hi @Balamanohar B

    Can I confirm how you are enclosing the query? Here's what I found in the API Documentation on Searching (here):

    Parameters - query (required): text with which to perform the search. Enclose in double-quotes for an exact search.

    The double quote character " is what you want here (ASCII character 34). How you insert that into a string will depend upon the programming language you are using. I would recommend testing in a tool like Postman.

    Partial matches will require at least 3 character to match (as you're finding for point 3).

  • Hi @Genevieve P

    Thank you for the clarification. I have raised an enhancement request.

Sign In or Register to comment.