我有一系列表,包含我想要全文搜索的数据.我已尝试将表合并UNION,但结果丢失了其全文索引,因此无法进行全文搜索.我不认为将数据放入临时表是可行的方法.有道理我可以全文搜索这些表吗?提前致谢!
更新:
我的全文查询是
SELECT ID, Title, Description, Author, MATCH (Title,Tags,Body) AGAINST ("search terms") AS Relevance
FROM [combination of tables goes here]
WHERE MATCH (Title,Tags,Body) AGAINST ("search terms")
Run Code Online (Sandbox Code Playgroud) 我正试图从一个已知id.i'm的特定组中获取联系人,以便能够获得该组中的组ID和联系人姓名.但是我无法获得联系号码.来自Google搜索的一些解决方案,但每次都是我正在获取与组ID相同的电话号码,如果我使用Phone.number,Phone.DISPLAY_NAME查询组电话号码和联系人姓名.如果我使用以下方法我收到错误请帮我弄清楚我的错误是什么码.
代码:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.group_contacts);
addGroups = (Button) findViewById(R.id.selectGroup);
groupAdapter = new SimpleCursorAdapter(getApplicationContext(),
android.R.layout.select_dialog_singlechoice, GroupCursor(),
new String[] { ContactsContract.Groups.TITLE },
new int[] { android.R.id.text1 });
setListAdapter(groupAdapter);
getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
addGroups.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(myGroups.this, Main.class);
Bundle carry = new Bundle();
carry.putStringArrayList("numbers", cNumbers);
carry.putStringArrayList("name", cNames);
intent.putExtras(carry);
setResult(RESULT_OK, intent);
finish();
}
});
}
private Cursor GroupCursor() {
String[] projection = { ContactsContract.Groups.TITLE,
ContactsContract.Groups._ID };
Cursor gCursor = getContentResolver().query(
ContactsContract.Groups.CONTENT_URI, projection, null, null, …Run Code Online (Sandbox Code Playgroud)