On 18.2.2013, at 18.10, Valery V. Sedletski <valerius at afterlogic.com>
wrote:
> I discovered that the full-text search (fts) plugin can work without
> SQUAT/LUCENE/SOLR backend. I.e., Dovecot creates separate indexes for
> header search in files dovecot.index and dovecot.index.cache. Even, the
> search by headers is fast enough, and can search for phrases. Also, it
> seems that this buillt-in search is faster than Solr-based search.
Well, that depends on the mailbox size. The built-in search probably does more
work than Solr, but the latency is better I guess.
> But if I
> enable the Solr backend (fts_solr), then the FTS generic plugin built-in
> search becomes disabled.
> But, Solr-based Full-text search is faster if search inside message bodies.
> Also, it appears that the built-in search inside message bodies works too,
> but very slow (it seems that is because it is dumb file-based search and
> does not use indexes at all)
> So, my question is: is it possible to combine the built-in search with Solr
> or Lucene plugin-based search so that the first one searches by headers,
> and the second one works by bodies?
> This could make the advantages of both search methods combined.
If you unconditionally want to remove it, that's easy. Just have
fts_header_want_indexed() in fts-api.c always return FALSE.
But there are also advantages to searching all headers through Solr, even if
it's slower, because it can do inexact matching. For example
"query" can match "queries" and so on.