: Due to the prolification of number of fields.  Say, we want
: to have the field "title" to have the title of the book in
: its original language.  But because Solr has this implicit
: assumption of one language per field, we would have to have
: the artifitial fields title_fr, title_de, title_en, title_es,
: etc. etc. for the number of supported languages, only one of
: which has a ral value per document.  This sounds silly, doesn't it?

not really, i have indexes with *thousands* of fields ... if you turn
field norms off it's extremely efficient, but even with norms: 50*n fields
where n is the number of "real" fields you have (title, author, etc..)
should work fine.

furthermore, declaration of these fields can be simple -- if you have a
language you want to treat special, then presumably you have a special
analyzer for it.  dynamicFields where the field name is the wildcard
and the language is set can be used to handle all of the different
"indexed" fields,

<dynamicField name="*english" type="english" />
<dynamicField name="*french" type="french" />
<dynamicField name="*spanish" type="german" />
...more like the above for each lanague you wnat to support...
<copyField source="*_english" dest="english" />
<copyField source="*_french" dest="french" />
<copyField source="*_spanish" dest="spanish" />
...more like the above for each lanague you wnat to support...

and now you can index documents with fields like this...

   author_english = Mr. Chris Hostetter
   author_spanish = Senor Cristobol Hostetter
   body_english = I can't Believe It's not butter
   body_spanish = No puedo creer que no es mantaquea
   title_english = One Man's Disbelief

...and you can search on english:Chris, spanish:Cristobol,
author_spanish:Cristobol, etc...

you could even add dynamicFields with the field name set and the language
wildcarded to handle any fields used solely for display with even less
declaration (one per field instead of one per langauge) ...

<dynamicField name="display_title_*" type="string" />
...




-Hoss

Reply via email to