fts-search-args.c revision 1537d20b852cbbf0d6971790b84e0cce5ca61307
/* Copyright (c) 2015 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "mail-namespace.h"
#include "mail-search.h"
#include "fts-api-private.h"
#include "fts-tokenizer.h"
#include "fts-filter.h"
#include "fts-user.h"
#include "fts-search-args.h"
{
const char *const *strings;
unsigned int i, count;
for (i = 1; i < count; ) {
} else {
i++;
}
}
}
static struct mail_search_arg *
{
const char *const *tokenp;
/* create the OR arg first as the parent */
/* now create all the child args for the OR */
}
return or_arg;
}
static void
struct mail_search_arg *parent_arg,
const struct mail_search_arg *orig_arg,
const char *orig_token, const char *token)
{
struct mail_search_arg *arg;
struct fts_user_language *const *langp;
const char *token2;
/* first add the word exactly as it without any tokenization */
/* then add it tokenized, but without filtering */
/* add the word filtered */
}
}
}
struct mail_search_arg **argp)
{
/* we want all the tokens found from the string to be found, so create
a parent AND and place all the filtered token alternatives under
it */
(const void *)orig_token,
orig_token_len)) != NULL) {
token);
}
token);
}
}
static void
struct mail_search_arg **argp)
{
case SEARCH_OR:
case SEARCH_SUB:
case SEARCH_INTHREAD:
break;
case SEARCH_HEADER:
case SEARCH_HEADER_ADDRESS:
case SEARCH_BODY:
case SEARCH_TEXT:
T_BEGIN {
} T_END;
break;
default:
break;
}
}
}
struct mail_search_args *args)
{
const char *error;
/* we need to know all the possible languages for building the
search query. each search word queried by passing it through each
language's filters. */
return -1;
}
/* we'll need to re-simplify the args if we changed anything */
return 0;
}