grails 可搜索索引空值
我正在尝试使用可搜索来查找空字段的值。或者就此而言,甚至可以索引子域中的 id。
class Classified
{
searchable = {
only = ['id','title']
id name: 'classified_id'
title name: 'classified_title'
}
String title
Dealer dealer
}
class Dealer
{
String name
}
我只想索引分类表中存在的 Dealer_id 以引用经销商。然后我希望能够通过空的 Dealer_id 和数字 Dealer_id 搜索分类。我尝试使经销商可搜索,但问题是,如果没有经销商并且classified.dealer_id 为空,它甚至永远不会到达那里。
I'm trying to use searchable to find values by a null field. Or for that matter even index an id from a sub domain.
class Classified
{
searchable = {
only = ['id','title']
id name: 'classified_id'
title name: 'classified_title'
}
String title
Dealer dealer
}
class Dealer
{
String name
}
I want to just index the dealer_id that would exist in classifieds table to reference dealer. Then I want to be able to search classifieds by null dealer_id and numeric dealer_id. I tried making dealer searchable, but the problem with that is that if there is no dealer and classified.dealer_id is null it never even gets there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
示例
以及经销商内部
Example,
And Within the Dealer