【发布时间】:2009-06-16 07:08:07
【问题描述】:
“testtable”表的结构是
id int 主键
productid int
attributeid int
值 varchar(250)
其中 productid 是产品的唯一 ID, attributeid 是产品属性的唯一 ID,例如尺寸、质量、高度、颜色 'value' 是属性的值
我必须过滤结果。我通过这个查询实现了要求。 但我无法在查询中完成。
select a.* from dbo.testtable a
where a.attributeId=10 and a.[Value]='Romance'
and productId in
(
select productId
from
dbo.testtable where attributeId =7 and [Value]='Hindi'
)
需要帮助来构建此查询..
【问题讨论】:
-
不能用 lucene 查询表。您是否有此数据的现有 lucene 索引?
-
是的..数据已经被索引了
标签: java hibernate lucene hibernate-search