Filter using key words

Options
Hi!

I would like to know if it’s possible to search a name that contains key words. For example

Search: larri junior

Returns: larri mingnoni junior

Thanks in advance 

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Yes. This is what the By Custom Query part of Query All Records accomplishes - https://youtu.be/cUDdGudAMJ0?t=113

    For the type of search you are describing you would want to use the INCLUDES operator
  • Larri Junior
    Options
    I appreciate your help, , but I already tried using INCLUDES operator but it doesn't do exactly what I want to. I'll give you another example. 
    Let's suppose I have the following product description: 

    Notebook 15" Touchscreen Intel

    and I use in my filter: notebook intel
    It returns null. 

    If I only type Intel, it does return. 
    I'm trying to build a query that I can use key words and wherever they are, it returns a product or a list of products. 
    I'm trying to make it more clear, but I'm not English speaker. Sorry for that

    Thanks again.
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
     The way to "play on easy" is to use the includes operator as Michael suggests, and also to use a "replace" filter that substitutes a "%" for each space (" "). This will trick Xano into making a query with wildcards, generating the result you are looking for. I made a video to demonstrate this approach: https://www.loom.com/share/6c9860b742604dce8499894a9bcb1feb

    The "play on hard" approach is to build a regular expression from your words. That gives you a lot more power, but I suspect the simpler replace filter will solve 90% of likely use cases. 
  • Larri Junior
    Options
     It does 99% of what I need! The only thing, as you mentioned in your video, if you change the words position it doesn't work, but most of the time we use correct order during searches. 
    It's solved! Thank you so much