Phil
10/18/2021, 3:32 PMKishore Nallan
10/18/2021, 3:36 PMtypesense/typesense:0.22.0.rcs18
Docker image.
You can do a filter on IDs via filter_by=id: [1,2,3]
Phil
10/18/2021, 6:21 PMJason Bosco
10/18/2021, 7:29 PMPhil
10/26/2021, 10:34 PMPhil
10/26/2021, 10:34 PMPhil
10/27/2021, 12:38 AMJason Bosco
10/27/2021, 2:57 AMJason Bosco
10/27/2021, 3:03 AMPhil
10/27/2021, 5:29 AM<Configure facetFilters={["id:[id1,id2]"]} />
I looked at the code and the difference is that the SearchRequestAdapter.js will see id:[id1,id2] as string facets so they will be put into the filter_by with ":=", add escape characters "``", and not parse the array resulting in id:=[[id1,id2]
] instead of id:[id1,id2]
Is this a change that could be made?Phil
11/10/2021, 8:31 PMJason Bosco
11/11/2021, 7:40 AM<Configure facetFilters={[['id:id1', 'id:id2']]} />
Docs for that format is here: https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/Phil
11/12/2021, 9:16 AMJzhGgJ6dQbrjkudNvaSj
,TqLsp6OzikXF8iDhNLxW
]`
It needs to omit the "=" and "`" to work. output that would work:
filter_by: id:[JzhGgJ6dQbrjkudNvaSj,TqLsp6OzikXF8iDhNLxW]
Jason Bosco
11/13/2021, 12:42 AMis just to escape the tokens, so in this case its presence should not affect results.
=` on the other had currently only works on faceted field. Does it through an error though?Jason Bosco
11/13/2021, 12:43 AMPhil
11/13/2021, 12:55 AM=
, it just returns no results.
The backticks ``` do affect results for id (not for other fields that are faceted), tested hitting the api directly.
Will defining id as a faceted field affect performance or is id already indexed in that way? I can do it that way but the enhancement to retrieve multiple id's without faceting will kind of fall to the side then.Jason Bosco
11/13/2021, 1:00 AMThe backticks ` do affect results for id (not for other fields that are faceted), tested hitting the api directly.That's surprising to hear. When you say affected, does it return no results if you don't use backtick or just different results?
Will defining id as a faceted field affect performanceIt will consume additional memory... Actually since you're already running an RC build, could you use 0.22.0.rcs29? That doesn't have the requirement to use faceted fields for
=
match.Phil
11/13/2021, 2:37 AMxyz
] && id:[JzhGgJ6dQbrjkudNvaSj,TqLsp6OzikXF8iDhNLxW]"`
This with backticks on id returns no results:
`"filter_by": "otherFacetedField:=[xyz
] && id:[JzhGgJ6dQbrjkudNvaSj
,TqLsp6OzikXF8iDhNLxW
]"`Kishore Nallan
11/13/2021, 2:38 AMPhil
11/13/2021, 2:40 AMPhil
11/13/2021, 3:07 AM"filter_by": "id:[JzhGgJ6dQbrjkudNvaSj,TqLsp6OzikXF8iDhNLxW]"
This returns no results:
"filter_by": "id:=[JzhGgJ6dQbrjkudNvaSj,TqLsp6OzikXF8iDhNLxW]"
Kishore Nallan
11/13/2021, 3:08 AMKishore Nallan
11/13/2021, 3:08 AMKishore Nallan
11/13/2021, 2:12 PMtypesense/typesense:0.22.0.rcs30
-- can you please try it out?Phil
11/14/2021, 1:11 AM:=
works, and all working smoothly with the instantsearch adapter, Configure widget, and facetFilters.
Thanks!Kishore Nallan
11/14/2021, 1:35 AM