在 SphinxQL 中选择联合? [英] Select Union in SphinxQL?

查看:39
本文介绍了在 SphinxQL 中选择联合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 SphinxQL 执行任何类型的 Union?我想返回一组包含两个查询并按查询顺序排列的结果.一个简单的例子是:

Is it possible to do any sort of Union using SphinxQL? I want to return one set of results containing two queries and in order of the query. A simple example would be:

从 idx_jobs 中选择作者,其中 MATCH('@(Author) Steinbeck')Union Select Author from idx_jobs where MATCH('@(Description) Steinbeck')

我当然可以

从 idx_jobs 中选择作者,其中 MATCH('@(Author, Description) Steinbeck')

但我试图对结果中的相关性"提供一些控制.

but I'm trying to provide some control over 'relevance' in the results.

推荐答案

无联合.

但似乎字段权重会很有用http://sphinxsearch.com/docs/current.html#sphinxql-select

.... OPTION field_weights=(author=1000)

应该首先匹配作者字段.(即添加到第二个查询的末尾)

Should put the matches against the author field first. (ie add that to end of second query)

这篇关于在 SphinxQL 中选择联合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆