这是我的日志:
指数:购买
{details: { name: john, corID: 12345678 }}
{details: { name: bill, corID: 96657545}}
{town: NY, ID: 12345678 }
{a:b , v: g}
{a: hi, b: 12345678}
{g:f , k:ggg777 }
我想创建一个查询,对于给定名称,查询将在purchase
索引中搜索details.name=<name>
,解压缩details.corID
并在索引中搜索包含details.corID
上述细节的例子:
name =“john”
查询结果
(所有日志都有12345678
)
{details: { name: john, corID: 12345678 }}
{town: NY, ID: 12345678 }
{a: hi, b: 12345678}
修改
这就是我在SQL中的表现:
SELECT * FROM purchase
where corID=
(SELECT details.corID
FROM [purchase]
where details.name = "john")