使用POST方法时查询扩展/同义词

时间:2015-11-03 12:16:16

标签: google-search-appliance

情况

我们的Google Search Appliance {men, mens}设置为使用包含此条目的自定义同义词文件来扩展查询:+-----------------+-------------+----------------+-----------+ | Request Type | Query | Result Count | Good? | +-----------------+-------------+----------------+-----------+ | GET | mens | 705 | yes | | POST | mens | 691 | yes | | GET | men | 706 | yes | | POST | men | 88 | no | +-----------------+-------------+----------------+-----------+

问题

Search Appliance在响应GET请求时似乎使用这些同义词,但在响应POST请求时则不会。见下表

GET /search?q=men&output=xml_no_dtd&client=default_frontend&
   getfields=*&filter=0&start=0&num=25&site=some_value&
   requiredfields=(-core__isblocked.core__brandid:brand.
   (core__catalog:163%252D2101|(inv__0104|inv__3301))) HTTP/1.1
Host: xxx.xxx.xxx.xxx:80
Cache-Control: no-cache

问题

如何为POST请求启用查询扩展/同义词,以便它返回(大致)相同的结果。

详细请求

获取请求

POST /search HTTP/1.1
Host: xxx.xxx.xxx.xxx
Content-Type: application/x-www-form-urlencoded
Content-Length: 242
Cache-Control: no-cache

q=men&output=xml_no_dtd&client=default_frontend&
getfields=*&filter=0&start=0&num=2&site=some_value&
requiredfields=(-core__isblocked.core__brandid:brand.
(core__catalog:163%2D2101|(inv__0104|inv__3301)))

发布请求

var arr = [1, 2, 3];
var max = Math.max(...arr);

奖金问题:为什么“男士”的GET和POST结果也不同。

1 个答案:

答案 0 :(得分:1)

您可以设置"查询扩展政策"在前端。您确定在两个查询中使用相同的前端。据我所知,GET / POST方法不应影响搜索结果。

为什么没有stackflow允许我在问题中添加评论。糟..

更新

另外,core__catalog:163 - 这个值在GET和POST中是不同的。可能与字符编码/解码有关吗?你可以删除所有这些必填字段,然后只提供q'并寻找伯爵?