> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bicola.me/llms.txt
> Use this file to discover all available pages before exploring further.

# ES高级搜索交互方案

# 1. 交互方案选型

**目标用户：** 新兴产业研究员

**用户特点：** 擅长查找资料，熟练掌握检索技能，能接受一定复杂度的界面交互，飞书等协同办公软件使用较多，对于自由度过高的编写式交互接受程度低

**用户分级：** 偏中级用户

**竞品调研方向：**

* ES本身的工具，偏技术向
* 多维表格等工具，偏办公向
* 垂类检索工具，比如政策、专利、企业等

**竞品调研内容：**

* 比较不同竞品的”条件编排“的交互体验
* 比较不同竞品的“筛选操作符”约束，考虑交互细节

## 1.1 竞品调研：条件编排

### 1.1.1 ES工具类

<Frame caption="kibana">
  <img src="https://mintcdn.com/variter/cel1JSfN1oIwunAh/images/image.png?fit=max&auto=format&n=cel1JSfN1oIwunAh&q=85&s=e22d33dab87ecd51eca55f90279593e0" alt="Image" title="Image" className="mx-auto" width="1924" height="1143" data-path="images/image.png" />
</Frame>

<Accordion title="对应的检索式">
  ```json theme={null}
  {
    "bool": {
      "must": [],
      "filter": [
        {
          "bool": {
            "should": [
              {
                "bool": {
                  "must": [],
                  "filter": [
                    {
                      "bool": {
                        "minimum_should_match": 1,
                        "should": [
                          {
                            "match_phrase": {
                              "abs": "人工智能"
                            }
                          },
                          {
                            "match_phrase": {
                              "abs": "大语言模型"
                            }
                          },
                          {
                            "match_phrase": {
                              "abs": "大模型"
                            }
                          },
                          {
                            "match_phrase": {
                              "abs": "生成"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "should": [],
                  "must_not": []
                }
              },
              {
                "bool": {
                  "must": [],
                  "filter": [
                    {
                      "bool": {
                        "minimum_should_match": 1,
                        "should": [
                          {
                            "match_phrase": {
                              "standard_title": "人工智能"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "should": [],
                  "must_not": []
                }
              }
            ],
            "minimum_should_match": 1
          }
        },
        {
          "bool": {
            "minimum_should_match": 1,
            "should": [
              {
                "match_phrase": {
                  "pubDept_Name": "国务院"
                }
              }
            ]
          }
        },
        {
          "bool": {
            "minimum_should_match": 1,
            "should": [
              {
                "match_phrase": {
                  "abs": "生成式"
                }
              }
            ]
          }
        }
      ],
      "should": [],
      "must_not": []
    }
  }
  ```
</Accordion>

<Frame>
  <img src="https://mintcdn.com/variter/cel1JSfN1oIwunAh/images/image-1.png?fit=max&auto=format&n=cel1JSfN1oIwunAh&q=85&s=cdc60219f0e2d04f22f06420f87dce09" alt="Image" width="1907" height="1141" data-path="images/image-1.png" />
</Frame>

### 1.1.2 多维表格类

<Frame caption="airtable">
  <img src="https://mintcdn.com/variter/cel1JSfN1oIwunAh/images/image-3.png?fit=max&auto=format&n=cel1JSfN1oIwunAh&q=85&s=cd2d97b93af304219630ffc38f5a31a5" alt="Image" width="1350" height="808" data-path="images/image-3.png" />
</Frame>

<Frame caption="notion的database">
  <img src="https://mintcdn.com/variter/cel1JSfN1oIwunAh/images/image-4.png?fit=max&auto=format&n=cel1JSfN1oIwunAh&q=85&s=247c49061539126af3cf5958b617109a" alt="Image" width="1204" height="805" data-path="images/image-4.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/variter/1oxNeyKsSW8ecKgH/images/image-5.png?fit=max&auto=format&n=1oxNeyKsSW8ecKgH&q=85&s=d5b6a8b14bc6e28e1828ac75ce57aa07" alt="Image" width="1262" height="846" data-path="images/image-5.png" />
</Frame>

<Frame caption="飞书多维表格">
  <img src="https://mintcdn.com/variter/1oxNeyKsSW8ecKgH/images/image-6.png?fit=max&auto=format&n=1oxNeyKsSW8ecKgH&q=85&s=214871fdf53ee5e91d100ad0e8341aa6" alt="Image" width="1020" height="608" data-path="images/image-6.png" />
</Frame>

### 1.1.3 垂类搜索产品

<Frame caption="国家法律法规库 https://flk.npc.gov.cn/advanceSearch">
  <img src="https://mintcdn.com/variter/1oxNeyKsSW8ecKgH/images/image-7.png?fit=max&auto=format&n=1oxNeyKsSW8ecKgH&q=85&s=7f58734bd4e314ea18bcab4df0841d7a" alt="Image" width="2847" height="1044" data-path="images/image-7.png" />
</Frame>

<Frame caption="佰腾专利 https://www.baiten.cn/gjs.html">
  <img src="https://mintcdn.com/variter/1oxNeyKsSW8ecKgH/images/PixPin_2026-04-24_17-35-54.png?fit=max&auto=format&n=1oxNeyKsSW8ecKgH&q=85&s=a6963171bc5ef2a25882ad7446ab8714" alt="Pix Pin 2026 04 24 17 35 54" width="1329" height="736" data-path="images/PixPin_2026-04-24_17-35-54.png" />
</Frame>

### 1.1.4 其他

<Frame>
  <img src="https://mintcdn.com/variter/1oxNeyKsSW8ecKgH/images/image-8.png?fit=max&auto=format&n=1oxNeyKsSW8ecKgH&q=85&s=cf109b57fbcc43e357e288e4b7ce3269" alt="Image" width="2360" height="1147" data-path="images/image-8.png" />
</Frame>

## 1.2 竞品调研：筛选操作符

| 字段类型 | 操作符                                                                                                                 |
| ---- | ------------------------------------------------------------------------------------------------------------------- |
| 文本   | <ul><li>是</li><li>不是</li><li>包含</li><li>不包含</li><li>开头是</li><li>结尾是</li><li>为空白</li><li>不为空白</li></ul>              |
| 多选枚举 | <ul><li>包含</li><li>不包含</li><li>为空白</li><li>不为空白</li></ul>                                                           |
| 单选枚举 | <ul><li>是</li><li>不是</li><li>为空白</li><li>不为空白</li></ul>                                                             |
| 数值   | <ul><li>=</li><li>≠</li><li>></li><li>≥</li><li>\<</li><li>≤</li><li>为空白</li><li>不为空白</li></ul>                     |
| 日期   | <ul><li>是</li><li>早于</li><li>晚于</li><li>不早于</li><li>不晚于</li><li>介于</li><li>相对于今天</li><li>为空白</li><li>不为空白</li></ul> |

## 1.3 方案结果

<Frame caption="https://demo1.bicola.me">
  <img src="https://mintcdn.com/variter/1oxNeyKsSW8ecKgH/images/PixPin_2026-04-24_17-16-22.png?fit=max&auto=format&n=1oxNeyKsSW8ecKgH&q=85&s=43068e5a23fad2b929b8a9eb1168f0ad" alt="Pix Pin 2026 04 24 17 16 22" width="1439" height="934" data-path="images/PixPin_2026-04-24_17-16-22.png" />
</Frame>

# 2. 技术限制下的交互设计

**问题背景**

针对“招投标”这些复杂查询场景，对招标单位、中标单位有一些限定，比如“上市的民营企业”，数据库设计采用 nested 结构存储，这种技术背景下，继续采用扁平字段来编排条件已无法预期结果。

如何保证在 nested 这种嵌套结构的结束背景下，实现用户编排的条件用于检索的结果是符合预期的？

**解决思路**

参考“装饰器”设计模式，引入“输入助手”来辅助输入引导，保证生成的检索式是符合预期的

**方案结果**

<Frame>
  <img src="https://mintcdn.com/variter/1oxNeyKsSW8ecKgH/images/PixPin_2026-04-24_17-18-23.png?fit=max&auto=format&n=1oxNeyKsSW8ecKgH&q=85&s=13dfdcac1cbcf6f5d55bcc5f09a4ad00" alt="Pix Pin 2026 04 24 17 18 23" width="1356" height="833" data-path="images/PixPin_2026-04-24_17-18-23.png" />
</Frame>
