How to use multiple wildcard

Hi All,

is there any way to perform such kind of filter in algolia?

Select data1,data2,data3 from Dataset where data1 like ‘%param1%’ and data2 like ‘%param2%’ and data3 like '%param3%'

Hello abelondev,

Thank you for contacting us. If what you want to achieve is to filter according specific values of inner attributes of your record, this is doable using filters. If you haven’t read it already, I’d suggest you to read the overview on Filtering we provide in our documentation: https://www.algolia.com/doc/guides/searching/filtering/#filter-overview. What you want to achieve should be doable whether by ORing or ANDing the values, depending on your use-case.

If you need more specific help, let us know what your data look like with a few sample records and which record you are trying to retrieve and according to which attribute/value pairs.

Hi Anthony,

Thank you for replying. I would like to fetch data by performing multiple wildcards on the basis of different string. Like SQL

In algolia filter, it shows data if conditional data is exact matching with parameter string.

for e.g. this is my dataSet
[
{ Data1 : ‘A First value’, Data2 : ‘B First Value’ , Data3 : ‘C First value’},
{ Data1 : ‘A Second value’, Data2 : ‘B Second Value’ , Data3 : ‘B Second value’},
{ Data1 : ‘C Third value’, Data2 : ‘C Third Value’ , Data3 : ‘C Third value’}
]
I want to make a query like

Select data1,data2,data3 from Dataset where data1 like ‘%A First%’ and data2 like ‘%B First%’ and data3 like ‘%C First%’

It should return value
[
{ Data1 : ‘A First value’, Data2 : ‘B First Value’ , Data3 : ‘C First value’}
]

Hello abelondev,

I’m sorry but no, this is not easily feasible using Algolia, which is not an RDBMS so it cannot fully handle specific retrievable queries but is much more powerful when it comes to textual relevancy.

1 Like