Algolia helper searcher 方法 Filter 不过滤字符串,只过滤数字
Algolia helper searcher method Filter doesn't filter strings but filters numericals only
我正在使用 Algolia-helper-swift [0.1] 和 Algolia-client-swift [3.7] 因为我使用的是 xcode 7.3.1 和 swift 2.0+和我的json结构片段如下
"-KTKNoEhrdaBShtXJGM8" : {
"Book_name" : "Hello World",
"Book_price" : 7273,
"uploaded_by" : "John" }
试验 1
{
"params": "facetFilters=[]&filters=Book_price%3E0%20AND%20uploaded_by:John&hitsPerPage=8&page=0&query=&restrictSearchableAttributes=[%22Book_name%22]"
}
试验 2
{
"params": "facetFilters=[]&filters=Book_price%3E0%20AND%20uploaded_by:%22John%22&hitsPerPage=8&page=0&query=&restrictSearchableAttributes=[%22Book_name%22]"
}
试验 3
{
"params": "facetFilters=[]&filters=Book_price%3E0&hitsPerPage=8&page=1&query=&restrictSearchableAttributes=[%22Book_name%22]"
}
试炼 4
{
"params": "facetFilters=[]&filters=uploaded_by:%22John%22&hitsPerPage=8&page=0&query=&restrictSearchableAttributes=[%22Book_name%22]"
}
试用 1,2 & 4 不起作用 returns 我 0 results/hits
然而,第三个有效,但它是一个数值逻辑。
如果有人可以帮助我,那就太好了。
这就是您需要做的,通过获取属性 uploaded_by 分面来使过滤工作。这对于分析以及了解如何共享相同的标签或属性名称非常有帮助。
- 转到您的 algolia 仪表板
- 点击指数
- 点击显示
- 在构面下,添加您想要保存的属性,然后
等到 algolia 处理,因为它将取决于数据量
你有。
- 使用 Searcher.query.filters = [""],对我来说是
["uploaded_by:\"约翰\""]
我正在使用 Algolia-helper-swift [0.1] 和 Algolia-client-swift [3.7] 因为我使用的是 xcode 7.3.1 和 swift 2.0+和我的json结构片段如下
"-KTKNoEhrdaBShtXJGM8" : {
"Book_name" : "Hello World",
"Book_price" : 7273,
"uploaded_by" : "John" }
试验 1
{
"params": "facetFilters=[]&filters=Book_price%3E0%20AND%20uploaded_by:John&hitsPerPage=8&page=0&query=&restrictSearchableAttributes=[%22Book_name%22]"
}
试验 2
{
"params": "facetFilters=[]&filters=Book_price%3E0%20AND%20uploaded_by:%22John%22&hitsPerPage=8&page=0&query=&restrictSearchableAttributes=[%22Book_name%22]"
}
试验 3
{
"params": "facetFilters=[]&filters=Book_price%3E0&hitsPerPage=8&page=1&query=&restrictSearchableAttributes=[%22Book_name%22]"
}
试炼 4
{
"params": "facetFilters=[]&filters=uploaded_by:%22John%22&hitsPerPage=8&page=0&query=&restrictSearchableAttributes=[%22Book_name%22]"
}
试用 1,2 & 4 不起作用 returns 我 0 results/hits 然而,第三个有效,但它是一个数值逻辑。 如果有人可以帮助我,那就太好了。
这就是您需要做的,通过获取属性 uploaded_by 分面来使过滤工作。这对于分析以及了解如何共享相同的标签或属性名称非常有帮助。
- 转到您的 algolia 仪表板
- 点击指数
- 点击显示
- 在构面下,添加您想要保存的属性,然后 等到 algolia 处理,因为它将取决于数据量 你有。
- 使用 Searcher.query.filters = [""],对我来说是 ["uploaded_by:\"约翰\""]