[Brug-talk] Ferret - sphinx - Solr
Peter Vandenabeele
peter at vandenabeele.com
Thu Jan 24 04:22:15 EST 2008
On Jan 24, 2008 9:48 AM, Peter De Berdt (10-forward)
<peter at 10-forward.be> wrote:
> Which brings me to a new problem: indexing virtual attributes, both on the
> main record and related records.
I will face the same problem, once we get to adding tags (both synomyns
and multiple language aspects).
> It does happen quite often for us that certain fields are stored in English
> in the database (by internal convention), but should be stored as the
> combination of all available languages in the application in the index. E.g.
> the database will hold a boolean "published" which will be set to either
> true or false, but the index holds "gepubliceerd published publié". I know I
> could use a before_save filter to save the virtual attribute to the database
> and then index it that way, but it's something I'd really rather avoid. This
> is just a basic example, but there are cases that would be more complex.
>
> Have I missed something here or is it effectively impossible to use one of
> the sphinx plugins to include virtual attributes in the index?
Could the "synonyms" feature at the level of the search engine be useful ?
For sphinx, I did not see it in the main documentation, but this
thread eventually
shows the solution in sphinx:
http://www.sphinxsearch.com/forum/view.html?id=1165
For tsearch2, the synonyms concept is clearly marked in the documentation
under the section: "Dictionaries":
http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/tsearch2-ref.html
I have not tried that, but for pre-defined tags (a limited, controlled
set), I will
certainly to look into it (e.g. bedrijfswagen = company_car = firmawagen ...).
BTW, does anyone have stemmers, stopword files, synonyms in Dutch ?
HTH,
Peter
More information about the Brug-talk
mailing list