Module: Ferret
- Defined in:
- ext/ferret.c,
lib/ferret_version.rb,
lib/ferret/document.rb,
ext/ferret.c,
lib/ferret/index.rb
Overview
See the README
Defined Under Namespace
Modules: Analysis, BoostMixin, Browser, Index, Search, Store, Utils Classes: Document, Field, FileNotFoundError, ParseError, QueryParser, StateError, Term
Constant Summary collapse
- VERSION =
'0.11.6'
- OBJECT_SPACE =
object_space
- EXCEPTION_MAP =
error_map
- FIX_INT_MAX =
INT2FIX(INT_MAX >> 1)
- I =
Index::Index
Class Method Summary collapse
-
.locale ⇒ Object
Returns a string corresponding to the locale set.
-
.locale=(locale) ⇒ Object
Set the global locale.
Class Method Details
.locale ⇒ Object
Returns a string corresponding to the locale set. For example;
puts Ferret.locale #=> "en_US.UTF-8"
1729 1730 1731 1732 |
# File 'ext/r_analysis.c', line 1729
static VALUE frt_get_locale(VALUE self, VALUE locale)
{
return (frt_locale ? rb_str_new2(frt_locale) : Qnil);
}
|
.locale=(locale) ⇒ Object
Set the global locale. You should use this method to set different locales when indexing documents with different encodings.
1741 1742 1743 1744 1745 1746 |
# File 'ext/r_analysis.c', line 1741
static VALUE frt_set_locale(VALUE self, VALUE locale)
{
char *l = ((locale == Qnil) ? NULL : rs2s(rb_obj_as_string(locale)));
frt_locale = setlocale(LC_CTYPE, l);
return frt_locale ? rb_str_new2(frt_locale) : Qnil;
}
|