[hibernate-commits] Hibernate SVN: r16621 - in search/trunk: src/main/docbook and 5 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Tue May 26 13:04:16 EDT 2009


Author: hardy.ferentschik
Date: 2009-05-26 13:04:16 -0400 (Tue, 26 May 2009)
New Revision: 16621

Added:
   search/trunk/src/main/docbook/pot/
   search/trunk/src/main/docbook/pot/master.pot
   search/trunk/src/main/docbook/pot/modules/
   search/trunk/src/main/docbook/pot/modules/architecture.pot
   search/trunk/src/main/docbook/pot/modules/batchindex.pot
   search/trunk/src/main/docbook/pot/modules/configuration.pot
   search/trunk/src/main/docbook/pot/modules/getting-started.pot
   search/trunk/src/main/docbook/pot/modules/lucene-native.pot
   search/trunk/src/main/docbook/pot/modules/mapping.pot
   search/trunk/src/main/docbook/pot/modules/optimize.pot
   search/trunk/src/main/docbook/pot/modules/query.pot
   search/trunk/src/main/docbook/zh-CN/
   search/trunk/src/main/docbook/zh-CN/master.po
   search/trunk/src/main/docbook/zh-CN/modules/
   search/trunk/src/main/docbook/zh-CN/modules/architecture.po
   search/trunk/src/main/docbook/zh-CN/modules/batchindex.po
   search/trunk/src/main/docbook/zh-CN/modules/configuration.po
   search/trunk/src/main/docbook/zh-CN/modules/getting-started.po
   search/trunk/src/main/docbook/zh-CN/modules/lucene-native.po
   search/trunk/src/main/docbook/zh-CN/modules/mapping.po
   search/trunk/src/main/docbook/zh-CN/modules/optimize.po
   search/trunk/src/main/docbook/zh-CN/modules/query.po
Modified:
   search/trunk/pom.xml
   search/trunk/src/main/docbook/en-US/modules/mapping.xml
Log:
Setup pot and po files for translations.

Modified: search/trunk/pom.xml
===================================================================
--- search/trunk/pom.xml	2009-05-25 19:16:18 UTC (rev 16620)
+++ search/trunk/pom.xml	2009-05-26 17:04:16 UTC (rev 16621)
@@ -145,7 +145,7 @@
             <plugin>
                 <groupId>org.jboss.maven.plugins</groupId>
                 <artifactId>maven-jdocbook-plugin</artifactId>
-                <version>2.1.0</version>
+                <version>2.1.2</version>
                 <extensions>true</extensions>
                 <dependencies>
                     <dependency>
@@ -157,8 +157,11 @@
                 </dependencies>
                 <configuration>
                     <sourceDocumentName>master.xml</sourceDocumentName>
-                    <sourceDirectory>${basedir}/src/main/docbook/en-US</sourceDirectory>
+                    <sourceDirectory>${basedir}/src/main/docbook</sourceDirectory>
                     <masterTranslation>en-US</masterTranslation>
+                    <translations>
+                        <translation>zh-CN</translation>
+                    </translations>                         
                     <imageResource>
                         <directory>${basedir}/src/main/docbook/en-US/images</directory>
                     </imageResource>
@@ -190,6 +193,7 @@
                         <id>make-doc</id>
                         <phase>site</phase>
                         <goals>
+                            <goal>translate</goal>
                             <goal>resources</goal>
                             <goal>generate</goal>
                         </goals>

Modified: search/trunk/src/main/docbook/en-US/modules/mapping.xml
===================================================================
--- search/trunk/src/main/docbook/en-US/modules/mapping.xml	2009-05-25 19:16:18 UTC (rev 16620)
+++ search/trunk/src/main/docbook/en-US/modules/mapping.xml	2009-05-26 17:04:16 UTC (rev 16621)
@@ -161,8 +161,7 @@
                 </row>
 
                 <row>
-                  <entry
-                  align="left">TermVector.WITH_POSITION_OFFSETS</entry>
+                  <entry align="left">TermVector.WITH_POSITION_OFFSETS</entry>
 
                   <entry>Store the term vector, token position and offset
                   information. This is a combination of the YES, WITH_OFFSETS
@@ -833,10 +832,9 @@
                 protect, protects, protection share the same root). Using such
                 a filter allows searches matching related words.</entry>
 
-                <entry><para><literal>language</literal>: Danish, Dutch,
-                English, Finnish, French, German, Italian, Norwegian,
-                Portuguese, Russian, Spanish, Swedish</para>and a few
-                more</entry>
+                <entry><literal>language</literal>: Danish, Dutch, English,
+                Finnish, French, German, Italian, Norwegian, Portuguese,
+                Russian, Spanish, Swedish and a few more</entry>
               </row>
 
               <row>
@@ -923,7 +921,9 @@
         return (String) value;
     }
 }</programlisting>
-          </example>The prerequisite for using
+          </example></para>
+
+        <para>The prerequisite for using
         <classname>@AnalyzerDiscriminator</classname> is that all analyzers
         which are going to be used are predefined via
         <classname>@AnalyzerDef</classname> definitions. If this is the case

Added: search/trunk/src/main/docbook/pot/master.pot
===================================================================


Property changes on: search/trunk/src/main/docbook/pot/master.pot
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/pot/modules/architecture.pot
===================================================================
--- search/trunk/src/main/docbook/pot/modules/architecture.pot	                        (rev 0)
+++ search/trunk/src/main/docbook/pot/modules/architecture.pot	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,268 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: architecture.xml:30
+#, no-c-format
+msgid "Architecture"
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:33
+#, no-c-format
+msgid "Overview"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:35
+#, no-c-format
+msgid "Hibernate Search consists of an indexing component and an index search component. Both are backed by Apache Lucene."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:38
+#, no-c-format
+msgid "Each time an entity is inserted, updated or removed in/from the database, Hibernate Search keeps track of this event (through the Hibernate event system) and schedules an index update. All the index updates are handled without you having to use the Apache Lucene APIs (see <xref linkend=\"search-configuration-event\"/>)."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:44
+#, no-c-format
+msgid "To interact with Apache Lucene indexes, Hibernate Search has the notion of <classname>DirectoryProvider</classname>s. A directory provider will manage a given Lucene <classname>Directory</classname> type. You can configure directory providers to adjust the directory target (see <xref linkend=\"search-configuration-directory\"/>)."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:50
+#, no-c-format
+msgid "Hibernate Search uses the Lucene index to search an entity and return a list of managed entities saving you the tedious object to Lucene document mapping. The same persistence context is shared between Hibernate and Hibernate Search. As a matter of fact, the <classname>FullTextSession</classname> is built on top of the Hibernate Session. so that the application code can use the unified <classname>org.hibernate.Query</classname> or <classname>javax.persistence.Query</classname> APIs exactly the way a HQL, JPA-QL or native queries would do."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:60
+#, no-c-format
+msgid "To be more efficient, Hibernate Search batches the write interactions with the Lucene index. There is currently two types of batching depending on the expected scope. Outside a transaction, the index update operation is executed right after the actual database operation. This scope is really a no scoping setup and no batching is performed. However, it is recommended - for both your database and Hibernate Search - to execute your operation in a transaction be it JDBC or JTA. When in a transaction, the index update operation is scheduled for the transaction commit phase and discarded in case of transaction rollback. The batching scope is the transaction. There are two immediate benefits:"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:73
+#, no-c-format
+msgid "Performance: Lucene indexing works better when operation are executed in batch."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:78
+#, no-c-format
+msgid "ACIDity: The work executed has the same scoping as the one executed by the database transaction and is executed if and only if the transaction is committed. This is not ACID in the strict sense of it, but ACID behavior is rarely useful for full text search indexes since they can be rebuilt from the source at any time."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:86
+#, no-c-format
+msgid "You can think of those two scopes (no scope vs transactional) as the equivalent of the (infamous) autocommit vs transactional behavior. From a performance perspective, the <emphasis>in transaction</emphasis> mode is recommended. The scoping choice is made transparently. Hibernate Search detects the presence of a transaction and adjust the scoping."
+msgstr ""
+
+#. Tag: note
+#: architecture.xml:92
+#, no-c-format
+msgid "Hibernate Search works perfectly fine in the Hibernate / EntityManager long conversation pattern aka. atomic conversation."
+msgstr ""
+
+#. Tag: note
+#: architecture.xml:96
+#, no-c-format
+msgid "Depending on user demand, additional scoping will be considered, the pluggability mechanism being already in place."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:102
+#, no-c-format
+msgid "Back end"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:104
+#, no-c-format
+msgid "Hibernate Search offers the ability to let the scoped work being processed by different back ends. Two back ends are provided out of the box for two different scenarios."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:109
+#, no-c-format
+msgid "Back end types"
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:112
+#, no-c-format
+msgid "Lucene"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:114
+#, no-c-format
+msgid "In this mode, all index update operations applied on a given node (JVM) will be executed to the Lucene directories (through the directory providers) by the same node. This mode is typically used in non clustered environment or in clustered environments where the directory store is shared."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:132
+#, no-c-format
+msgid "Lucene back end configuration."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:136
+#, no-c-format
+msgid "This mode targets non clustered applications, or clustered applications where the Directory is taking care of the locking strategy."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:140
+#, no-c-format
+msgid "The main advantage is simplicity and immediate visibility of the changes in Lucene queries (a requirement in some applications)."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:145
+#, no-c-format
+msgid "<title>JMS</title>"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:147
+#, no-c-format
+msgid "All index update operations applied on a given node are sent to a JMS queue. A unique reader will then process the queue and update the master index. The master index is then replicated on a regular basis to the slave copies. This is known as the master/slaves pattern. The master is the sole responsible for updating the Lucene index. The slaves can accept read as well as write operations. However, they only process the read operation on their local index copy and delegate the update operations to the master."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:167
+#, no-c-format
+msgid "JMS back end configuration."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:171
+#, no-c-format
+msgid "This mode targets clustered environments where throughput is critical, and index update delays are affordable. Reliability is ensured by the JMS provider and by having the slaves working on a local copy of the index."
+msgstr ""
+
+#. Tag: note
+#: architecture.xml:177
+#, no-c-format
+msgid "Hibernate Search is an extensible architecture. Feel free to drop ideas for other third party back ends to <literal>hibernate-dev at lists.jboss.org</literal>."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:183
+#, no-c-format
+msgid "Work execution"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:185
+#, no-c-format
+msgid "The indexing work (done by the back end) can be executed synchronously with the transaction commit (or update operation if out of transaction), or asynchronously."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:190
+#, no-c-format
+msgid "Synchronous"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:192
+#, no-c-format
+msgid "This is the safe mode where the back end work is executed in concert with the transaction commit. Under highly concurrent environment, this can lead to throughput limitations (due to the Apache Lucene lock mechanism) and it can increase the system response time if the backend is significantly slower than the transactional process and if a lot of IO operations are involved."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:201
+#, no-c-format
+msgid "Asynchronous"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:203
+#, no-c-format
+msgid "This mode delegates the work done by the back end to a different thread. That way, throughput and response time are (to a certain extend) decorrelated from the back end performance. The drawback is that a small delay appears between the transaction commit and the index update and a small overhead is introduced to deal with thread management."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:210
+#, no-c-format
+msgid "It is recommended to use synchronous execution first and evaluate asynchronous execution if performance problems occur and after having set up a proper benchmark (ie not a lonely cowboy hitting the system in a completely unrealistic way)."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:219
+#, no-c-format
+msgid "Reader strategy"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:221
+#, no-c-format
+msgid "When executing a query, Hibernate Search interacts with the Apache Lucene indexes through a reader strategy. Choosing a reader strategy will depend on the profile of the application (frequent updates, read mostly, asynchronous index update etc). See also"
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:228
+#, no-c-format
+msgid "Shared"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:230
+#, no-c-format
+msgid "With this strategy, Hibernate Search will share the same <classname>IndexReader</classname>, for a given Lucene index, across multiple queries and threads provided that the <classname>IndexReader</classname> is still up-to-date. If the <classname>IndexReader</classname> is not up-to-date, a new one is opened and provided. Each <classname>IndexReader</classname> is made of several <classname>SegmentReader</classname>s. This strategy only reopens segments that have been modified or created after last opening and shares the already loaded segments from the previous instance. This strategy is the default."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:241
+#, no-c-format
+msgid "The name of this strategy is <literal>shared</literal>."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:245
+#, no-c-format
+msgid "Not-shared"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:247
+#, no-c-format
+msgid "Every time a query is executed, a Lucene <classname>IndexReader</classname> is opened. This strategy is not the most efficient since opening and warming up an <classname>IndexReader</classname> can be a relatively expensive operation."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:253
+#, no-c-format
+msgid "The name of this strategy is <literal>not-shared</literal>."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:257
+#, no-c-format
+msgid "Custom"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:259
+#, no-c-format
+msgid "You can write your own reader strategy that suits your application needs by implementing <classname>org.hibernate.search.reader.ReaderProvider</classname>. The implementation must be thread safe."
+msgstr ""
+


Property changes on: search/trunk/src/main/docbook/pot/modules/architecture.pot
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/pot/modules/batchindex.pot
===================================================================


Property changes on: search/trunk/src/main/docbook/pot/modules/batchindex.pot
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/pot/modules/configuration.pot
===================================================================
--- search/trunk/src/main/docbook/pot/modules/configuration.pot	                        (rev 0)
+++ search/trunk/src/main/docbook/pot/modules/configuration.pot	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,1265 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: configuration.xml:30
+#, no-c-format
+msgid "Configuration"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:33
+#, no-c-format
+msgid "Directory configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:35
+#, no-c-format
+msgid "Apache Lucene has a notion of <literal>Directory</literal> to store the index files. The <classname>Directory</classname> implementation can be customized, but Lucene comes bundled with a file system (<literal>FSDirectoryProvider</literal>) and an in memory (<literal>RAMDirectoryProvider</literal>) implementation. <literal>DirectoryProvider</literal>s are the Hibernate Search abstraction around a Lucene <classname>Directory</classname> and handle the configuration and the initialization of the underlying Lucene resources. <xref linkend=\"directory-provider-table\"/> shows the list of the directory providers bundled with Hibernate Search."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:47
+#, no-c-format
+msgid "List of built-in Directory Providers"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:52 configuration.xml:811
+#, no-c-format
+msgid "Class"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:54 configuration.xml:349 configuration.xml:635 configuration.xml:813
+#, no-c-format
+msgid "Description"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:56
+#, no-c-format
+msgid "Properties"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:62
+#, no-c-format
+msgid "org.hibernate.search.store.RAMDirectoryProvider"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:64
+#, no-c-format
+msgid "Memory based directory, the directory will be uniquely identified (in the same deployment unit) by the <literal>@Indexed.index</literal> element"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:68 configuration.xml:868
+#, no-c-format
+msgid "none"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:72
+#, no-c-format
+msgid "org.hibernate.search.store.FSDirectoryProvider"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:74
+#, no-c-format
+msgid "File system based directory. The directory used will be &lt;indexBase&gt;/&lt; indexName &gt;"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:77
+#, no-c-format
+msgid "<literal>indexBase</literal> : Base directory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:78 configuration.xml:102 configuration.xml:136
+#, no-c-format
+msgid "<literal>indexName</literal>: override @Indexed.index (useful for sharded indexes)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:79 configuration.xml:113 configuration.xml:147
+#, no-c-format
+msgid "<literal> locking_strategy</literal> : optional, see"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:86
+#, no-c-format
+msgid "org.hibernate.search.store.FSMasterDirectoryProvider"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:88
+#, no-c-format
+msgid "File system based directory. Like FSDirectoryProvider. It also copies the index to a source directory (aka copy directory) on a regular basis."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:91 configuration.xml:125
+#, no-c-format
+msgid "The recommended value for the refresh period is (at least) 50% higher that the time to copy the information (default 3600 seconds - 60 minutes)."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:93 configuration.xml:127
+#, no-c-format
+msgid "Note that the copy is based on an incremental copy mechanism reducing the average copy time."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:95
+#, no-c-format
+msgid "DirectoryProvider typically used on the master node in a JMS back end cluster."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:96 configuration.xml:130
+#, no-c-format
+msgid "The <literal> buffer_size_on_copy</literal> optimum depends on your operating system and available RAM; most people reported good results using values between 16 and 64MB."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:101 configuration.xml:135
+#, no-c-format
+msgid "<literal>indexBase</literal>: Base directory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:104 configuration.xml:138
+#, no-c-format
+msgid "<literal>sourceBase</literal>: Source (copy) base directory."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:105 configuration.xml:139
+#, no-c-format
+msgid "<literal>source</literal>: Source directory suffix (default to <literal>@Indexed.index</literal>). The actual source directory name being <filename>&lt;sourceBase&gt;/&lt;source&gt;</filename>"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:109 configuration.xml:143
+#, no-c-format
+msgid "<literal>refresh</literal>: refresh period in second (the copy will take place every refresh seconds)."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:110 configuration.xml:144
+#, no-c-format
+msgid "<literal>buffer_size_on_copy</literal>: The amount of MegaBytes to move in a single low level copy instruction; defaults to 16MB."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:120
+#, no-c-format
+msgid "org.hibernate.search.store.FSSlaveDirectoryProvider"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:122
+#, no-c-format
+msgid "File system based directory. Like FSDirectoryProvider, but retrieves a master version (source) on a regular basis. To avoid locking and inconsistent search results, 2 local copies are kept."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:129
+#, no-c-format
+msgid "DirectoryProvider typically used on slave nodes using a JMS back end."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:156
+#, no-c-format
+msgid "If the built-in directory providers do not fit your needs, you can write your own directory provider by implementing the <classname>org.hibernate.store.DirectoryProvider</classname> interface."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:161
+#, no-c-format
+msgid "Each indexed entity is associated to a Lucene index (an index can be shared by several entities but this is not usually the case). You can configure the index through properties prefixed by <constant>hibernate.search.</constant><replaceable>indexname</replaceable> . Default properties inherited to all indexes can be defined using the prefix <constant>hibernate.search.default.</constant>"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:168
+#, no-c-format
+msgid "To define the directory provider of a given index, you use the <constant>hibernate.search.<replaceable>indexname</replaceable>.directory_provider </constant>"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:173
+#, no-c-format
+msgid "Configuring directory providers"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:175
+#, no-c-format
+msgid ""
+      "hibernate.search.default.directory_provider org.hibernate.search.store.FSDirectoryProvider\n"
+      "hibernate.search.default.indexBase=/usr/lucene/indexes\n"
+      "hibernate.search.Rules.directory_provider org.hibernate.search.store.RAMDirectoryProvider"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:178
+#, no-c-format
+msgid "applied on"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:181
+#, no-c-format
+msgid "Specifying the index name using the <literal>index</literal> parameter of <classname>@Indexed</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:184
+#, no-c-format
+msgid ""
+      "@Indexed(index=\"Status\")\n"
+      "public class Status { ... }\n"
+      "\n"
+      "@Indexed(index=\"Rules\")\n"
+      "public class Rule { ... }"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:187
+#, no-c-format
+msgid "will create a file system directory in <filename>/usr/lucene/indexes/Status</filename> where the Status entities will be indexed, and use an in memory directory named <literal>Rules</literal> where Rule entities will be indexed."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:192
+#, no-c-format
+msgid "You can easily define common rules like the directory provider and base directory, and override those defaults later on on a per index basis."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:196
+#, no-c-format
+msgid "Writing your own <classname>DirectoryProvider</classname>, you can utilize this configuration mechanism as well."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:201
+#, no-c-format
+msgid "Sharding indexes"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:203
+#, no-c-format
+msgid "In some extreme cases involving huge indexes (in size), it is necessary to split (shard) the indexing data of a given entity type into several Lucene indexes. This solution is not recommended until you reach significant index sizes and index update times are slowing the application down. The main drawback of index sharding is that searches will end up being slower since more files have to be opened for a single search. In other words don't do it until you have problems :)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:211
+#, no-c-format
+msgid "Despite this strong warning, Hibernate Search allows you to index a given entity type into several sub indexes. Data is sharded into the different sub indexes thanks to an <classname>IndexShardingStrategy</classname>. By default, no sharding strategy is enabled, unless the number of shards is configured. To configure the number of shards use the following property"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:219
+#, no-c-format
+msgid "Enabling index sharding by specifying nbr_of_shards for a specific index"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:222
+#, no-c-format
+msgid "hibernate.search.&lt;indexName&gt;.sharding_strategy.nbr_of_shards 5"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:225
+#, no-c-format
+msgid "This will use 5 different shards."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:227
+#, no-c-format
+msgid "The default sharding strategy, when shards are set up, splits the data according to the hash value of the id string representation (generated by the Field Bridge). This ensures a fairly balanced sharding. You can replace the strategy by implementing <literal>IndexShardingStrategy</literal> and by setting the following property"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:235
+#, no-c-format
+msgid "Specifying a custom sharding strategy"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:237
+#, no-c-format
+msgid "hibernate.search.&lt;indexName&gt;.sharding_strategy my.shardingstrategy.Implementation"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:240
+#, no-c-format
+msgid "Each shard has an independent directory provider configuration as described in <xref linkend=\"search-configuration-directory\"/>. The DirectoryProvider default name for the previous example are <literal>&lt;indexName&gt;.0</literal> to <literal>&lt;indexName&gt;.4</literal>. In other words, each shard has the name of it's owning index followed by <constant>.</constant> (dot) and its index number."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:249
+#, no-c-format
+msgid "Configuring the sharding configuration for an example entity <classname>Animal</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:252
+#, no-c-format
+msgid ""
+      "hibernate.search.default.indexBase /usr/lucene/indexes\n"
+      "\n"
+      "hibernate.search.Animal.sharding_strategy.nbr_of_shards 5\n"
+      "hibernate.search.Animal.directory_provider org.hibernate.search.store.FSDirectoryProvider\n"
+      "hibernate.search.Animal.0.indexName Animal00\n"
+      "hibernate.search.Animal.3.indexBase /usr/lucene/sharded\n"
+      "hibernate.search.Animal.3.indexName Animal03"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:255
+#, no-c-format
+msgid "This configuration uses the default id string hashing strategy and shards the Animal index into 5 subindexes. All subindexes are <classname>FSDirectoryProvider</classname> instances and the directory where each subindex is stored is as followed:"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:262
+#, no-c-format
+msgid "for subindex 0: /usr/lucene/indexes/Animal00 (shared indexBase but overridden indexName)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:267
+#, no-c-format
+msgid "for subindex 1: /usr/lucene/indexes/Animal.1 (shared indexBase, default indexName)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:272
+#, no-c-format
+msgid "for subindex 2: /usr/lucene/indexes/Animal.2 (shared indexBase, default indexName)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:277
+#, no-c-format
+msgid "for subindex 3: /usr/lucene/shared/Animal03 (overridden indexBase, overridden indexName)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:282
+#, no-c-format
+msgid "for subindex 4: /usr/lucene/indexes/Animal.4 (shared indexBase, default indexName)"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:289
+#, no-c-format
+msgid "Sharing indexes (two entities into the same directory)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:292
+#, no-c-format
+msgid "This is only presented here so that you know the option is available. There is really not much benefit in sharing indexes."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:296
+#, no-c-format
+msgid "It is technically possible to store the information of more than one entity into a single Lucene index. There are two ways to accomplish this:"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:302
+#, no-c-format
+msgid "Configuring the underlying directory providers to point to the same physical index directory. In practice, you set the property <literal>hibernate.search.[fully qualified entity name].indexName</literal> to the same value. As an example let’s use the same index (directory) for the <classname>Furniture</classname> and <classname>Animal</classname> entity. We just set <literal>indexName</literal> for both entities to for example “Animal”. Both entities will then be stored in the Animal directory"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:312
+#, no-c-format
+msgid ""
+      "<code>hibernate.search.org.hibernate.search.test.shards.Furniture.indexName = Animal\n"
+      "hibernate.search.org.hibernate.search.test.shards.Animal.indexName = Animal</code>"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:316
+#, no-c-format
+msgid "Setting the <code>@Indexed</code> annotation’s <methodname>index</methodname> attribute of the entities you want to merge to the same value. If we again wanted all <classname>Furniture</classname> instances to be indexed in the <classname>Animal</classname> index along with all instances of <classname>Animal</classname> we would specify <code>@Indexed(index=”Animal”)</code> on both <classname>Animal</classname> and <classname>Furniture</classname> classes."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:330
+#, no-c-format
+msgid "Worker configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:332
+#, no-c-format
+msgid "It is possible to refine how Hibernate Search interacts with Lucene through the worker configuration. The work can be executed to the Lucene directory or sent to a JMS queue for later processing. When processed to the Lucene directory, the work can be processed synchronously or asynchronously to the transaction commit."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:338
+#, no-c-format
+msgid "You can define the worker configuration using the following properties"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:342
+#, no-c-format
+msgid "worker configuration"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:347 configuration.xml:633
+#, no-c-format
+msgid "Property"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:353
+#, no-c-format
+msgid "hibernate.search.worker.backend"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:355
+#, no-c-format
+msgid "Out of the box support for the Apache Lucene back end and the JMS back end. Default to <literal>lucene</literal>. Supports also <literal>jms</literal> and <literal>blackhole</literal>."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:361
+#, no-c-format
+msgid "hibernate.search.worker.execution"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:363
+#, no-c-format
+msgid "Supports synchronous and asynchronous execution. Default to <literal><literal>sync</literal></literal>. Supports also <literal>async</literal>."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:369
+#, no-c-format
+msgid "hibernate.search.worker.thread_pool.size"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:371
+#, no-c-format
+msgid "Defines the number of threads in the pool. useful only for asynchronous execution. Default to 1."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:376
+#, no-c-format
+msgid "hibernate.search.worker.buffer_queue.max"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:378
+#, no-c-format
+msgid "Defines the maximal number of work queue if the thread poll is starved. Useful only for asynchronous execution. Default to infinite. If the limit is reached, the work is done by the main thread."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:385
+#, no-c-format
+msgid "hibernate.search.worker.jndi.*"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:387
+#, no-c-format
+msgid "Defines the JNDI properties to initiate the InitialContext (if needed). JNDI is only used by the JMS back end."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:392
+#, no-c-format
+msgid "hibernate.search.worker.jms.connection_factory"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:395
+#, no-c-format
+msgid "Mandatory for the JMS back end. Defines the JNDI name to lookup the JMS connection factory from (<literal>/ConnectionFactory</literal> by default in JBoss AS)"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:402
+#, no-c-format
+msgid "hibernate.search.worker.jms.queue"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:404
+#, no-c-format
+msgid "Mandatory for the JMS back end. Defines the JNDI name to lookup the JMS queue from. The queue will be used to post work messages."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:414
+#, no-c-format
+msgid "JMS Master/Slave configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:416
+#, no-c-format
+msgid "This section describes in greater detail how to configure the Master / Slaves Hibernate Search architecture."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:429
+#, no-c-format
+msgid "JMS back end configuration."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:433
+#, no-c-format
+msgid "Slave nodes"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:435
+#, no-c-format
+msgid "Every index update operation is sent to a JMS queue. Index querying operations are executed on a local index copy."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:439
+#, no-c-format
+msgid "JMS Slave configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:441
+#, no-c-format
+msgid ""
+      "### slave configuration\n"
+      "\n"
+      "## DirectoryProvider\n"
+      "# (remote) master location\n"
+      "hibernate.search.default.sourceBase = /mnt/mastervolume/lucenedirs/mastercopy\n"
+      "\n"
+      "# local copy location\n"
+      "hibernate.search.default.indexBase = /Users/prod/lucenedirs\n"
+      "\n"
+      "# refresh every half hour\n"
+      "hibernate.search.default.refresh = 1800\n"
+      "\n"
+      "# appropriate directory provider\n"
+      "hibernate.search.default.directory_provider = org.hibernate.search.store.FSSlaveDirectoryProvider\n"
+      "\n"
+      "## Backend configuration\n"
+      "hibernate.search.worker.backend = jms\n"
+      "hibernate.search.worker.jms.connection_factory = /ConnectionFactory\n"
+      "hibernate.search.worker.jms.queue = queue/hibernatesearch\n"
+      "#optional jndi configuration (check your JMS provider for more information)\n"
+      "\n"
+      "## Optional asynchronous execution strategy\n"
+      "# hibernate.search.worker.execution = async\n"
+      "# hibernate.search.worker.thread_pool.size = 2\n"
+      "# hibernate.search.worker.buffer_queue.max = 50"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:444
+#, no-c-format
+msgid "A file system local copy is recommended for faster search results."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:447 configuration.xml:463
+#, no-c-format
+msgid "The refresh period should be higher that the expected time copy."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:452
+#, no-c-format
+msgid "Master node"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:454
+#, no-c-format
+msgid "Every index update operation is taken from a JMS queue and executed. The master index is copied on a regular basis."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:458
+#, no-c-format
+msgid "JMS Master configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:460
+#, no-c-format
+msgid ""
+      "### master configuration\n"
+      "\n"
+      "## DirectoryProvider\n"
+      "# (remote) master location where information is copied to\n"
+      "hibernate.search.default.sourceBase = /mnt/mastervolume/lucenedirs/mastercopy\n"
+      "\n"
+      "# local master location\n"
+      "hibernate.search.default.indexBase = /Users/prod/lucenedirs\n"
+      "\n"
+      "# refresh every half hour\n"
+      "hibernate.search.default.refresh = 1800\n"
+      "\n"
+      "# appropriate directory provider\n"
+      "hibernate.search.default.directory_provider = org.hibernate.search.store.FSMasterDirectoryProvider\n"
+      "\n"
+      "## Backend configuration\n"
+      "#Backend is the default lucene one"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:466
+#, no-c-format
+msgid "In addition to the Hibernate Search framework configuration, a Message Driven Bean should be written and set up to process the index works queue through JMS."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:471
+#, no-c-format
+msgid "Message Driven Bean processing the indexing queue"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:473
+#, no-c-format
+msgid ""
+      "@MessageDriven(activationConfig = {\n"
+      "      @ActivationConfigProperty(propertyName=\"destinationType\", propertyValue=\"javax.jms.Queue\"),\n"
+      "      @ActivationConfigProperty(propertyName=\"destination\", propertyValue=\"queue/hibernatesearch\"),\n"
+      "      @ActivationConfigProperty(propertyName=\"DLQMaxResent\", propertyValue=\"1\")\n"
+      "   } )\n"
+      "public class MDBSearchController extends AbstractJMSHibernateSearchController implements MessageListener {\n"
+      "    @PersistenceContext EntityManager em;\n"
+      "    \n"
+      "    //method retrieving the appropriate session\n"
+      "    protected Session getSession() {\n"
+      "        return (Session) em.getDelegate();\n"
+      "    }\n"
+      "\n"
+      "    //potentially close the session opened in #getSession(), not needed here\n"
+      "    protected void cleanSessionIfNeeded(Session session) \n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:476
+#, no-c-format
+msgid "This example inherits from the abstract JMS controller class available in the Hibernate Search source code and implements a JavaEE 5 MDB. This implementation is given as an example and, while most likely be more complex, can be adjusted to make use of non Java EE Message Driven Beans. For more information about the <methodname>getSession()</methodname> and <methodname>cleanSessionIfNeeded()</methodname>, please check <classname>AbstractJMSHibernateSearchController</classname>'s javadoc."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:489
+#, no-c-format
+msgid "Reader strategy configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:491
+#, no-c-format
+msgid "The different reader strategies are described in <xref linkend=\"search-architecture-readerstrategy\"/>. Out of the box strategies are:"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:497
+#, no-c-format
+msgid "<literal>shared</literal>: share index readers across several queries. This strategy is the most efficient."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:502
+#, no-c-format
+msgid "<literal>not-shared</literal>: create an index reader for each individual query"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:507
+#, no-c-format
+msgid "The default reader strategy is <literal>shared</literal>. This can be adjusted:"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:510
+#, no-c-format
+msgid "hibernate.search.reader.strategy = not-shared"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:512
+#, no-c-format
+msgid "Adding this property switches to the <literal>not-shared</literal> strategy."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:515
+#, no-c-format
+msgid "Or if you have a custom reader strategy:"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:517
+#, no-c-format
+msgid "hibernate.search.reader.strategy = my.corp.myapp.CustomReaderProvider"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:519
+#, no-c-format
+msgid "where <classname>my.corp.myapp.CustomReaderProvider</classname> is the custom strategy implementation."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:524
+#, no-c-format
+msgid "Enabling Hibernate Search and automatic indexing"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:527
+#, no-c-format
+msgid "Enabling Hibernate Search"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:529
+#, no-c-format
+msgid "Hibernate Search is enabled out of the box when using Hibernate Annotations or Hibernate EntityManager. If, for some reason you need to disable it, set <literal>hibernate.search.autoregister_listeners</literal> to false. Note that there is no performance penalty when the listeners are enabled even though no entities are indexed."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:536
+#, no-c-format
+msgid "To enable Hibernate Search in Hibernate Core (ie. if you don't use Hibernate Annotations), add the <literal>FullTextIndexEventListener</literal> for the following six Hibernate events and also add it after the default <literal>DefaultFlushEventListener</literal>, as in the following example."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:543
+#, no-c-format
+msgid "Explicitly enabling Hibernate Search by configuring the <classname>FullTextIndexEventListener</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:546
+#, no-c-format
+msgid ""
+      "&lt;hibernate-configuration&gt;\n"
+      "     &lt;session-factory&gt;\n"
+      "        ...\n"
+      "        &lt;event type=\"post-update\"&gt;\n"
+      "            &lt;listener class=\"org.hibernate.search.event.FullTextIndexEventListener\"/&gt;\n"
+      "        &lt;/event&gt;\n"
+      "        &lt;event type=\"post-insert\"&gt;\n"
+      "            &lt;listener class=\"org.hibernate.search.event.FullTextIndexEventListener\"/&gt;\n"
+      "        &lt;/event&gt;\n"
+      "        &lt;event type=\"post-delete\"&gt;\n"
+      "            &lt;listener class=\"org.hibernate.search.event.FullTextIndexEventListener\"/&gt;\n"
+      "        &lt;/event&gt;\n"
+      "        &lt;event type=\"post-collection-recreate\"&gt;\n"
+      "            &lt;listener class=\"org.hibernate.search.event.FullTextIndexEventListener\"/&gt;\n"
+      "        &lt;/event&gt;\n"
+      "        &lt;event type=\"post-collection-remove\"&gt;\n"
+      "            &lt;listener class=\"org.hibernate.search.event.FullTextIndexEventListener\"/&gt;\n"
+      "        &lt;/event&gt;\n"
+      "        &lt;event type=\"post-collection-update\"&gt;\n"
+      "            &lt;listener class=\"org.hibernate.search.event.FullTextIndexEventListener\"/&gt;\n"
+      "        &lt;/event&gt;\n"
+      "        &lt;event type=\"flush\"&gt;\n"
+      "            &lt;listener class=\"org.hibernate.event.def.DefaultFlushEventListener\"/&gt;\n"
+      "            &lt;listener class=\"org.hibernate.search.event.FullTextIndexEventListener\"/&gt;\n"
+      "        &lt;/event&gt;\n"
+      "    &lt;/session-factory&gt;\n"
+      "&lt;/hibernate-configuration&gt;"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:551
+#, no-c-format
+msgid "Automatic indexing"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:553
+#, no-c-format
+msgid "By default, every time an object is inserted, updated or deleted through Hibernate, Hibernate Search updates the according Lucene index. It is sometimes desirable to disable that features if either your index is read-only or if index updates are done in a batch way (see <xref linkend=\"search-batchindex\"/>)."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:559
+#, no-c-format
+msgid "To disable event based indexing, set"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:561
+#, no-c-format
+msgid "hibernate.search.indexing_strategy manual"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:564
+#, no-c-format
+msgid "In most case, the JMS backend provides the best of both world, a lightweight event based system keeps track of all changes in the system, and the heavyweight indexing process is done by a separate process or machine."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:573
+#, no-c-format
+msgid "Tuning Lucene indexing performance"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:575
+#, no-c-format
+msgid "Hibernate Search allows you to tune the Lucene indexing performance by specifying a set of parameters which are passed through to underlying Lucene <literal>IndexWriter</literal> such as <literal>mergeFactor</literal>, <literal>maxMergeDocs</literal> and <literal>maxBufferedDocs</literal>. You can specify these parameters either as default values applying for all indexes, on a per index basis, or even per shard."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:583
+#, no-c-format
+msgid "There are two sets of parameters allowing for different performance settings depending on the use case. During indexing operations triggered by database modifications, the parameters are grouped by the <literal>transaction</literal> keyword: <programlisting>hibernate.search.[default|&lt;indexname&gt;].indexwriter.transaction.&lt;parameter_name&gt;</programlisting> When indexing occurs via <literal>FullTextSession.index()</literal> (see <xref linkend=\"search-batchindex\"/>), the used properties are those grouped under the <literal>batch</literal> keyword:"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:589
+#, no-c-format
+msgid "hibernate.search.[default|&lt;indexname&gt;].indexwriter.batch.&lt;parameter_name&gt;"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:591
+#, no-c-format
+msgid ""
+      "Unless the corresponding <literal>.batch</literal> property is explicitly set, the value will default to the <literal>.transaction</literal> property. If no value is set for a <literal>.batch</literal> value in a specific shard configuration, Hibernate Search will look at the index section, then at the default section and after that it will look for a <literal>.transaction</literal> in the same order: <programlisting>hibernate.search.Animals.2.indexwriter.transaction.max_merge_docs 10\n"
+      "hibernate.search.Animals.2.indexwriter.transaction.merge_factor 20\n"
+      "hibernate.search.default.indexwriter.batch.max_merge_docs 100</programlisting> This configuration will result in these settings applied to the second shard of Animals index:"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:603
+#, no-c-format
+msgid "<literal>transaction.max_merge_docs</literal> = 10"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:607
+#, no-c-format
+msgid "<literal>batch.max_merge_docs</literal> = 100"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:611
+#, no-c-format
+msgid "<literal>transaction.merge_factor</literal> = 20"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:615
+#, no-c-format
+msgid "<literal>batch.merge_factor</literal> = 20"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:619
+#, no-c-format
+msgid "All other values will use the defaults defined in Lucene."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:621
+#, no-c-format
+msgid "The default for all values is to leave them at Lucene's own default, so the listed values in the following table actually depend on the version of Lucene you are using; values shown are relative to version <literal>2.4</literal>. For more information about Lucene indexing performances, please refer to the Lucene documentation."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:628
+#, no-c-format
+msgid "List of indexing performance and behavior properties"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:637
+#, no-c-format
+msgid "Default Value"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:643
+#, no-c-format
+msgid "hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch].max_buffered_delete_terms"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:645
+#, no-c-format
+msgid "Determines the minimal number of delete terms required before the buffered in-memory delete terms are applied and flushed. If there are documents buffered in memory at the time, they are merged and a new segment is created."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:650 configuration.xml:660
+#, no-c-format
+msgid "Disabled (flushes by RAM usage)"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:654
+#, no-c-format
+msgid "hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch].max_buffered_docs"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:656
+#, no-c-format
+msgid "Controls the amount of documents buffered in memory during indexing. The bigger the more RAM is consumed."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:664
+#, no-c-format
+msgid "hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch].max_field_length"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:666
+#, no-c-format
+msgid "The maximum number of terms that will be indexed for a single field. This limits the amount of memory required for indexing so that very large data will not crash the indexing process by running out of memory. This setting refers to the number of running terms, not to the number of different terms."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:671
+#, no-c-format
+msgid "This silently truncates large documents, excluding from the index all terms that occur further in the document. If you know your source documents are large, be sure to set this value high enough to accommodate the expected size. If you set it to Integer.MAX_VALUE, then the only limit is your memory, but you should anticipate an OutOfMemoryError."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:676
+#, no-c-format
+msgid "If setting this value in <literal>batch</literal> differently than in <literal>transaction</literal> you may get different data (and results) in your index depending on the indexing mode."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:682
+#, no-c-format
+msgid "10000"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:686
+#, no-c-format
+msgid "hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch].max_merge_docs"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:688
+#, no-c-format
+msgid "Defines the largest number of documents allowed in a segment. Larger values are best for batched indexing and speedier searches. Small values are best for transaction indexing."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:693
+#, no-c-format
+msgid "Unlimited (Integer.MAX_VALUE)"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:697
+#, no-c-format
+msgid "hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch].merge_factor"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:699
+#, no-c-format
+msgid "Controls segment merge frequency and size."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:700
+#, no-c-format
+msgid "Determines how often segment indexes are merged when insertion occurs. With smaller values, less RAM is used while indexing, and searches on unoptimized indexes are faster, but indexing speed is slower. With larger values, more RAM is used during indexing, and while searches on unoptimized indexes are slower, indexing is faster. Thus larger values (&gt; 10) are best for batch index creation, and smaller values (&lt; 10) for indexes that are interactively maintained. The value must no be lower than 2."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:710
+#, no-c-format
+msgid "<entry>10</entry>"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:714
+#, no-c-format
+msgid "hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch].ram_buffer_size"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:716
+#, no-c-format
+msgid "Controls the amount of RAM in MB dedicated to document buffers. When used together max_buffered_docs a flush occurs for whichever event happens first."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:718
+#, no-c-format
+msgid "Generally for faster indexing performance it's best to flush by RAM usage instead of document count and use as large a RAM buffer as you can."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:723
+#, no-c-format
+msgid "16 MB"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:727
+#, no-c-format
+msgid "hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch].term_index_interval"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:729
+#, no-c-format
+msgid "Expert: Set the interval between indexed terms."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:730
+#, no-c-format
+msgid "Large values cause less memory to be used by IndexReader, but slow random-access to terms. Small values cause more memory to be used by an IndexReader, and speed random-access to terms. See Lucene documentation for more details."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:736
+#, no-c-format
+msgid "<entry>128</entry>"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:740
+#, no-c-format
+msgid "hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch].use_compound_file"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:742
+#, no-c-format
+msgid "The advantage of using the compound file format is that less file descriptors are used. The disadvantage is that indexing takes more time and temporary disk space. You can set this parameter to <literal>false</literal> in an attempt to improve the indexing time, but you could run out of file descriptors if <literal>mergeFactor</literal> is also large."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:748
+#, no-c-format
+msgid "Boolean parameter, use \"<literal>true</literal>\" or \"<literal>false</literal>\". The default value for this option is <literal>true</literal>."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:753
+#, no-c-format
+msgid "true"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:759
+#, no-c-format
+msgid "To tune the indexing speed it might be useful to time the object loading from database in isolation from the writes to the index. To achieve this set the <literal>blackhole</literal> as worker backend and start you indexing routines. This backend does not disable Hibernate Search: it will still generate the needed changesets to the index, but will discard them instead of flushing them to the index. As opposite to setting the <literal>hibernate.search.indexing_strategy</literal> to <literal>manual</literal> when using <literal>blackhole</literal> it will possibly load more data to rebuild the index from associated entities."
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:769
+#, no-c-format
+msgid "hibernate.search.worker.backend blackhole"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:771
+#, no-c-format
+msgid "The recommended approach is to focus first on optimizing the object loading, and then use the timings you achieve as a baseline to tune the indexing process."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:773
+#, no-c-format
+msgid "The <literal>blackhole</literal> backend is not meant to be used in production, only as a tool to identify indexing bottlenecks."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:781
+#, no-c-format
+msgid "LockFactory configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:785
+#, no-c-format
+msgid "Lucene Directories have default locking strategies which work well for most cases, but it's possible to specify for each index managed by Hibernate Search which LockingFactory you want to use."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:789
+#, no-c-format
+msgid "Some of these locking strategies require a filesystem level lock and may be used even on RAM based indexes, but this is not recommended and of no practical use."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:795
+#, no-c-format
+msgid "To select a locking factory, set the <literal>hibernate.search.&lt;index&gt;.locking_strategy</literal> option to one of <literal>simple</literal>, <literal>native</literal>, <literal>single</literal> or <literal>none</literal>, or set it to the fully qualified name of an implementation of <literal>org.hibernate.search.store.LockFactoryFactory</literal>; Implementing this interface you can provide a custom <literal>org.apache.lucene.store.LockFactory</literal>."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:804
+#, no-c-format
+msgid "List of available LockFactory implementations"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:809
+#, no-c-format
+msgid "name"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:819
+#, no-c-format
+msgid "simple"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:821
+#, no-c-format
+msgid "org.apache.lucene.store.SimpleFSLockFactory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:824
+#, no-c-format
+msgid "Safe implementation based on Java's File API, it marks the usage of the index by creating a marker file."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:827
+#, no-c-format
+msgid "If for some reason you had to kill your application, you will need to remove this file before restarting it."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:830
+#, no-c-format
+msgid "This is the default implementation for <literal>FSDirectoryProvider</literal>,<literal>FSMasterDirectoryProvider</literal> and <literal>FSSlaveDirectoryProvider</literal>."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:837
+#, no-c-format
+msgid "native"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:839
+#, no-c-format
+msgid "org.apache.lucene.store.NativeFSLockFactory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:842
+#, no-c-format
+msgid "As does <literal>simple</literal> this also marks the usage of the index by creating a marker file, but this one is using native OS file locks so that even if your application crashes the locks will be cleaned up."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:847
+#, no-c-format
+msgid "This implementation has known problems on NFS."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:852
+#, no-c-format
+msgid "single"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:854
+#, no-c-format
+msgid "org.apache.lucene.store.SingleInstanceLockFactory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:857
+#, no-c-format
+msgid "This LockFactory doesn't use a file marker but is a Java object lock held in memory; therefore it's possible to use it only when you are sure the index is not going to be shared by any other process."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:862
+#, no-c-format
+msgid "This is the default implementation for <literal>RAMDirectoryProvider</literal>."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:870
+#, no-c-format
+msgid "org.apache.lucene.store.NoLockFactory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:873
+#, no-c-format
+msgid "All changes to this index are not coordinated by any lock; test your application carefully and make sure you know what it means."
+msgstr ""
+
+#. Tag: section
+#: configuration.xml:880
+#, no-c-format
+msgid "Configuration example:"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:884
+#, no-c-format
+msgid ""
+      "hibernate.search.default.locking_strategy simple\n"
+      "hibernate.search.Animals.locking_strategy native\n"
+      "hibernate.search.Books.locking_strategy org.custom.components.MyLockingFactory"
+msgstr ""
+


Property changes on: search/trunk/src/main/docbook/pot/modules/configuration.pot
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/pot/modules/getting-started.pot
===================================================================
--- search/trunk/src/main/docbook/pot/modules/getting-started.pot	                        (rev 0)
+++ search/trunk/src/main/docbook/pot/modules/getting-started.pot	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,656 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: getting-started.xml:30
+#, no-c-format
+msgid "Getting started"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:32
+#, no-c-format
+msgid "Welcome to Hibernate Search! The following chapter will guide you through the initial steps required to integrate Hibernate Search into an existing Hibernate enabled application. In case you are a Hibernate new timer we recommend you start <ulink url=\"http://hibernate.org/152.html\">here</ulink>."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:39
+#, no-c-format
+msgid "System Requirements"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:42
+#, no-c-format
+msgid "System requirements"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:47
+#, no-c-format
+msgid "Java Runtime"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:49
+#, no-c-format
+msgid "A JDK or JRE version <emphasis>5</emphasis> or greater. You can download a Java Runtime for Windows/Linux/Solaris <ulink url=\"http://java.sun.com/javase/downloads/\">here</ulink>."
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:55
+#, no-c-format
+msgid "Hibernate Search"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:57
+#, no-c-format
+msgid "<literal>hibernate-search.jar</literal> and all runtime dependencies from the <literal>lib</literal> directory of the Hibernate Search distribution. Please refer to <filename>README.txt </filename>in the lib directory to understand which dependencies are required."
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:65
+#, no-c-format
+msgid "Hibernate Core"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:67
+#, no-c-format
+msgid "This instructions have been tested against Hibernate 3.3.x. You will need <literal>hibernate-core.jar</literal> and its transitive dependencies from the <literal>lib</literal> directory of the distribution. Refer to <literal>README.txt</literal> in the <literal>lib</literal> directory of the distribution to determine the minimum runtime requirements."
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:76
+#, no-c-format
+msgid "Hibernate Annotations"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:78
+#, no-c-format
+msgid "Even though Hibernate Search can be used without Hibernate Annotations the following instructions will use them for basic entity configuration (<emphasis>@Entity, @Id, @OneToMany,...</emphasis>). This part of the configuration could also be expressed in xml or code. However, Hibernate Search itself has its own set of annotations (<emphasis>@Indexed, @DocumentId, @Field,...</emphasis>) for which there exists so far no alternative configuration. The tutorial is tested against version 3.4.x of Hibernate Annotations."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:92
+#, no-c-format
+msgid "You can download all dependencies from the Hibernate <ulink url=\"http://www.hibernate.org/6.html\">download site</ulink>. You can also verify the dependency versions against the <ulink url=\"http://www.hibernate.org/6.html#A3\">Hibernate Compatibility Matrix</ulink>."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:100
+#, no-c-format
+msgid "Using Maven"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:102
+#, no-c-format
+msgid "Instead of managing all dependencies manually, maven users have the possibility to use the <ulink url=\"http://repository.jboss.com/maven2\">JBoss maven repository</ulink>. Just add the JBoss repository url to the <emphasis>repositories</emphasis> section of your <filename>pom.xml</filename> or <filename>settings.xml</filename>:"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:110
+#, no-c-format
+msgid "Adding the JBoss maven repository to <filename>settings.xml</filename>"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:113
+#, no-c-format
+msgid ""
+      "&lt;repository&gt;\n"
+      "  &lt;id&gt;repository.jboss.org&lt;/id&gt;\n"
+      "  &lt;name&gt;JBoss Maven Repository&lt;/name&gt;\n"
+      "  &lt;url&gt;http://repository.jboss.org/maven2&lt;/url&gt;\n"
+      "  &lt;layout&gt;default&lt;/layout&gt;\n"
+      "&lt;/repository&gt;"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:116
+#, no-c-format
+msgid "Then add the following dependencies to your pom.xml:"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:119
+#, no-c-format
+msgid "Maven dependencies for Hibernate Search"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:121
+#, no-c-format
+msgid ""
+      "&lt;dependency&gt;\n"
+      "   &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+      "   &lt;artifactId&gt;hibernate-search&lt;/artifactId&gt;\n"
+      "   &lt;version&gt;3.1.0.GA&lt;/version&gt;\n"
+      "&lt;/dependency&gt;\n"
+      "&lt;dependency&gt;\n"
+      "   &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+      "   &lt;artifactId&gt;hibernate-annotations&lt;/artifactId&gt;\n"
+      "   &lt;version&gt;3.4.0.GA&lt;/version&gt;\n"
+      "&lt;/dependency&gt;\n"
+      "&lt;dependency&gt;\n"
+      "   &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+      "   &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;\n"
+      "   &lt;version&gt;3.4.0.GA&lt;/version&gt;\n"
+      "&lt;/dependency&gt;\n"
+      "&lt;dependency&gt;\n"
+      "   &lt;groupId&gt;org.apache.solr&lt;/groupId&gt;\n"
+      "   &lt;artifactId&gt;solr-common&lt;/artifactId&gt;\n"
+      "   &lt;version&gt;1.3.0&lt;/version&gt;\n"
+      "&lt;/dependency&gt;\n"
+      "&lt;dependency&gt;\n"
+      "   &lt;groupId&gt;org.apache.solr&lt;/groupId&gt;\n"
+      "   &lt;artifactId&gt;solr-core&lt;/artifactId&gt;\n"
+      "   &lt;version&gt;1.3.0&lt;/version&gt;\n"
+      "&lt;/dependency&gt;\n"
+      "&lt;dependency&gt;\n"
+      "   &lt;groupId&gt;org.apache.lucene&lt;/groupId&gt;\n"
+      "   &lt;artifactId&gt;lucene-snowball&lt;/artifactId&gt;\n"
+      "   &lt;version&gt;2.4.0&lt;/version&gt;\n"
+      "&lt;/dependency&gt;"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:124
+#, no-c-format
+msgid "Not all dependencies are required. Only the <emphasis>hibernate-search</emphasis> dependency is mandatory. This dependency, together with its required transitive dependencies, contain all required classes needed to use Hibernate Search. <emphasis>hibernate-annotations</emphasis> is only needed if you want to use annotations to configure your domain model as we do in this tutorial. However, even if you choose not to use Hibernate Annotations you still have to use the Hibernate Search specific annotations, which are bundled with the hibernate-search jar file, to configure your Lucene index. Currently there is no XML configuration available for Hibernate Search. <emphasis>hibernate-entitymanager</emphasis> is required if you want to use Hibernate Search in conjunction with JPA. The Solr dependencies are needed if you want to utilize Solr's analyzer framework. More about this later. And finally, the <literal>lucene-snowball</literal> dependency is needed if you want to u!
 se Lucene's snowball stemmer."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:142
+#, no-c-format
+msgid "Configuration"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:144
+#, no-c-format
+msgid "Once you have downloaded and added all required dependencies to your application you have to add a couple of properties to your hibernate configuration file. If you are using Hibernate directly this can be done in <literal>hibernate.properties</literal> or <literal>hibernate.cfg.xml</literal>. If you are using Hibernate via JPA you can also add the properties to <literal>persistence.xml</literal>. The good news is that for standard use most properties offer a sensible default. An example <filename>persistence.xml</filename> configuration could look like this:"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:155
+#, no-c-format
+msgid "Basic configuration options to be added to <literal><filename>hibernate.properties</filename></literal>, <literal><filename>hibernate.cfg.xml</filename></literal> or <filename>persistence.xml</filename>"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:160
+#, no-c-format
+msgid ""
+      "...\n"
+      "&lt;property name=\"hibernate.search.default.directory_provider\" \n"
+      "   value=\"org.hibernate.search.store.FSDirectoryProvider\"/&gt; \n"
+      "\n"
+      "&lt;property name=\"hibernate.search.default.indexBase\" value=\"/var/lucene/indexes\"/&gt; \n"
+      "..."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:163
+#, no-c-format
+msgid "First you have to tell Hibernate Search which <classname>DirectoryProvider</classname> to use. This can be achieved by setting the <literal>hibernate.search.default.directory_provider</literal> property. Apache Lucene has the notion of a <literal>Directory</literal> to store the index files. Hibernate Search handles the initialization and configuration of a Lucene <literal>Directory</literal> instance via a <literal>DirectoryProvider</literal>. In this tutorial we will use a subclass of <literal>DirectoryProvider</literal> called <classname>FSDirectoryProvider</classname>. This will give us the ability to physically inspect the Lucene indexes created by Hibernate Search (eg via <ulink url=\"http://www.getopt.org/luke/\">Luke</ulink>). Once you have a working configuration you can start experimenting with other directory providers (see <xref linkend=\"search-configuration-directory\"/>). Next to the directory provider you also have to specify the default root director!
 y for all indexes via <literal>hibernate.search.default.indexBase</literal>."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:180
+#, no-c-format
+msgid "Lets assume that your application contains the Hibernate managed classes <classname>example.Book</classname> and <classname>example.Author</classname> and you want to add free text search capabilities to your application in order to search the books contained in your database."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:187
+#, no-c-format
+msgid "Example entities Book and Author before adding Hibernate Search specific annotations"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:190
+#, no-c-format
+msgid ""
+      "package example;\n"
+      "...\n"
+      "@Entity\n"
+      "public class Book {\n"
+      "\n"
+      "  @Id\n"
+      "  @GeneratedValue\n"
+      "  private Integer id; \n"
+      "\n"
+      "  private String title;  \n"
+      "\n"
+      "  private String subtitle; \n"
+      "\n"
+      "  @ManyToMany \n"
+      "  private Set&lt;Author&gt; authors = new HashSet&lt;Author&gt;();\n"
+      "\n"
+      "  private Date publicationDate;\n"
+      "  \n"
+      "  public Book() {\n"
+      "  } \n"
+      "  \n"
+      "  // standard getters/setters follow here\n"
+      "  ...\n"
+      "}"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:192
+#, no-c-format
+msgid ""
+      "package example;\n"
+      "...\n"
+      "@Entity\n"
+      "public class Author {\n"
+      "\n"
+      "  @Id\n"
+      "  @GeneratedValue\n"
+      "  private Integer id;\n"
+      "\n"
+      "  private String name;\n"
+      "\n"
+      "  public Author() {\n"
+      "  } \n"
+      " \n"
+      "  // standard getters/setters follow here\n"
+      "  ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:195
+#, no-c-format
+msgid "To achieve this you have to add a few annotations to the <classname>Book</classname> and <classname>Author</classname> class. The first annotation <literal>@Indexed</literal> marks <classname>Book</classname> as indexable. By design Hibernate Search needs to store an untokenized id in the index to ensure index unicity for a given entity. <literal>@DocumentId</literal> marks the property to use for this purpose and is in most cases the same as the database primary key. In fact since the 3.1.0 release of Hibernate Search <literal>@DocumentId</literal> is optional in the case where an <classname>@Id</classname> annotation exists."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:206
+#, no-c-format
+msgid "Next you have to mark the fields you want to make searchable. Let's start with <literal>title</literal> and <literal>subtitle</literal> and annotate both with <literal>@Field</literal>. The parameter <literal>index=Index.TOKENIZED</literal> will ensure that the text will be tokenized using the default Lucene analyzer. Usually, tokenizing means chunking a sentence into individual words and potentially excluding common words like <literal>'a'</literal> or '<literal>the</literal>'. We will talk more about analyzers a little later on. The second parameter we specify within <literal>@Field</literal>,<literal> store=Store.NO</literal>, ensures that the actual data will not be stored in the index. Whether this data is stored in the index or not has nothing to do with the ability to search for it. From Lucene's perspective it is not necessary to keep the data once the index is created. The benefit of storing it is the ability to retrieve it via projections (<xref linkend=\"p!
 rojections\"/>)."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:222
+#, no-c-format
+msgid "Without projections, Hibernate Search will per default execute a Lucene query in order to find the database identifiers of the entities matching the query critera and use these identifiers to retrieve managed objects from the database. The decision for or against projection has to be made on a case to case basis. The default behaviour - <literal>Store.NO</literal> - is recommended since it returns managed objects whereas projections only return object arrays."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:230
+#, no-c-format
+msgid "After this short look under the hood let's go back to annotating the <classname>Book</classname> class. Another annotation we have not yet discussed is <literal>@DateBridge</literal>. This annotation is one of the built-in field bridges in Hibernate Search. The Lucene index is purely string based. For this reason Hibernate Search must convert the data types of the indexed fields to strings and vice versa. A range of predefined bridges are provided, including the <classname>DateBridge</classname> which will convert a <classname>java.util.Date</classname> into a <classname>String</classname> with the specified resolution. For more details see <xref linkend=\"search-mapping-bridge\"/>."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:241
+#, no-c-format
+msgid "This leaves us with <literal>@IndexedEmbedded. </literal>This annotation is used to index associated entities (<literal>@ManyToMany</literal>, <literal>@*ToOne</literal> and <literal>@Embedded</literal>) as part of the owning entity. This is needed since a Lucene index document is a flat data structure which does not know anything about object relations. To ensure that the authors' name wil be searchable you have to make sure that the names are indexed as part of the book itself. On top of <literal>@IndexedEmbedded</literal> you will also have to mark all fields of the associated entity you want to have included in the index with <literal>@Indexed</literal>. For more details see <xref linkend=\"search-mapping-associated\"/>."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:253
+#, no-c-format
+msgid "These settings should be sufficient for now. For more details on entity mapping refer to <xref linkend=\"search-mapping-entity\"/>."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:257
+#, no-c-format
+msgid "Example entities after adding Hibernate Search annotations"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:260
+#, no-c-format
+msgid ""
+      "package example;\n"
+      "...\n"
+      "@Entity\n"
+      "<emphasis role=\"bold\">@Indexed</emphasis>\n"
+      "public class Book {\n"
+      "\n"
+      "  @Id\n"
+      "  @GeneratedValue\n"
+      "  <emphasis role=\"bold\">@DocumentId</emphasis>\n"
+      "  private Integer id;\n"
+      "  \n"
+      "  <emphasis role=\"bold\">@Field(index=Index.TOKENIZED, store=Store.NO)</emphasis>\n"
+      "  private String title;\n"
+      "  \n"
+      "  <emphasis role=\"bold\">@Field(index=Index.TOKENIZED, store=Store.NO)</emphasis>\n"
+      "  private String subtitle; \n"
+      "\n"
+      "  <emphasis role=\"bold\">@IndexedEmbedded</emphasis>\n"
+      "  @ManyToMany \n"
+      "  private Set&lt;Author&gt; authors = new HashSet&lt;Author&gt;();\n"
+      "\n"
+      "<emphasis role=\"bold\">  @Field(index = Index.UN_TOKENIZED, store = Store.YES)\n"
+      "  @DateBridge(resolution = Resolution.DAY)</emphasis>\n"
+      "  private Date publicationDate;\n"
+      "  \n"
+      "  public Book() {\n"
+      "  } \n"
+      "  \n"
+      "  // standard getters/setters follow here\n"
+      "  ... \n"
+      "}"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:262
+#, no-c-format
+msgid ""
+      "package example;\n"
+      "...\n"
+      "@Entity\n"
+      "public class Author {\n"
+      "\n"
+      "  @Id\n"
+      "  @GeneratedValue\n"
+      "  private Integer id;\n"
+      "\n"
+      "  <emphasis role=\"bold\">@Field(index=Index.TOKENIZED, store=Store.NO)</emphasis>\n"
+      "  private String name;\n"
+      "\n"
+      "  public Author() {\n"
+      "  } \n"
+      " \n"
+      "  // standard getters/setters follow here\n"
+      "  ...\n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:267
+#, no-c-format
+msgid "Indexing"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:269
+#, no-c-format
+msgid "Hibernate Search will transparently index every entity persisted, updated or removed through Hibernate Core. However, you have to trigger an initial indexing to populate the Lucene index with the data already present in your database. Once you have added the above properties and annotations it is time to trigger an initial batch index of your books. You can achieve this by using one of the following code snippets (see also <xref linkend=\"search-batchindex\"/>):"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:278
+#, no-c-format
+msgid "Using Hibernate Session to index data"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:280
+#, no-c-format
+msgid ""
+      "FullTextSession fullTextSession = Search.getFullTextSession(session);\n"
+      "Transaction tx = fullTextSession.beginTransaction();\n"
+      "\n"
+      "List books = session.createQuery(\"from Book as book\").list();\n"
+      "for (Book book : books) {\n"
+      "    <emphasis role=\"bold\">fullTextSession.index(book);</emphasis>\n"
+      "}\n"
+      "\n"
+      "tx.commit(); //index is written at commit time"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:284
+#, no-c-format
+msgid "Using JPA to index data"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:286
+#, no-c-format
+msgid ""
+      "EntityManager em = entityManagerFactory.createEntityManager();\n"
+      "FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(em);\n"
+      "em.getTransaction().begin();\n"
+      "\n"
+      "List books = em.createQuery(\"select book from Book as book\").getResultList();\n"
+      "for (Book book : books) {\n"
+      "    <emphasis role=\"bold\">fullTextEntityManager.index(book);</emphasis>\n"
+      "} \n"
+      "\n"
+      "em.getTransaction().commit();\n"
+      "em.close();"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:289
+#, no-c-format
+msgid "After executing the above code, you should be able to see a Lucene index under <literal>/var/lucene/indexes/example.Book</literal>. Go ahead an inspect this index with <ulink url=\"http://www.getopt.org/luke/\">Luke</ulink>. It will help you to understand how Hibernate Search works."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:297
+#, no-c-format
+msgid "Searching"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:299
+#, no-c-format
+msgid "Now it is time to execute a first search. The general approach is to create a native Lucene query and then wrap this query into a org.hibernate.Query in order to get all the functionality one is used to from the Hibernate API. The following code will prepare a query against the indexed fields, execute it and return a list of <classname>Book</classname>s."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:307
+#, no-c-format
+msgid "Using Hibernate Session to create and execute a search"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:309
+#, no-c-format
+msgid ""
+      "FullTextSession fullTextSession = Search.getFullTextSession(session);\n"
+      "Transaction tx = fullTextSession.beginTransaction();\n"
+      "\n"
+      "// create native Lucene query\n"
+      "String[] fields = new String[]{\"title\", \"subtitle\", \"authors.name\", \"publicationDate\"};\n"
+      "MultiFieldQueryParser parser = new MultiFieldQueryParser(fields, new StandardAnalyzer());\n"
+      "org.apache.lucene.search.Query query = parser.parse( \"Java rocks!\" );\n"
+      "\n"
+      "// wrap Lucene query in a org.hibernate.Query\n"
+      "org.hibernate.Query hibQuery = fullTextSession.createFullTextQuery(query, Book.class);\n"
+      "\n"
+      "// execute search\n"
+      "List result = hibQuery.list();\n"
+      "  \n"
+      "tx.commit();\n"
+      "session.close();"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:313
+#, no-c-format
+msgid "Using JPA to create and execute a search"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:315
+#, no-c-format
+msgid ""
+      "EntityManager em = entityManagerFactory.createEntityManager();\n"
+      "FullTextEntityManager fullTextEntityManager = \n"
+      "    org.hibernate.hibernate.search.jpa.Search.getFullTextEntityManager(em);\n"
+      "em.getTransaction().begin();\n"
+      "\n"
+      "// create native Lucene query\n"
+      "String[] fields = new String[]{\"title\", \"subtitle\", \"authors.name\", \"publicationDate\"};\n"
+      "MultiFieldQueryParser parser = new MultiFieldQueryParser(fields, new StandardAnalyzer());\n"
+      "org.apache.lucene.search.Query query = parser.parse( \"Java rocks!\" );\n"
+      "\n"
+      "// wrap Lucene query in a javax.persistence.Query\n"
+      "javax.persistence.Query persistenceQuery = fullTextEntityManager.createFullTextQuery(query, Book.class);\n"
+      "\n"
+      "// execute search\n"
+      "List result = persistenceQuery.getResultList();\n"
+      "\n"
+      "em.getTransaction().commit();\n"
+      "em.close();"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:320
+#, no-c-format
+msgid "Analyzer"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:322
+#, no-c-format
+msgid "Let's make things a little more interesting now. Assume that one of your indexed book entities has the title \"Refactoring: Improving the Design of Existing Code\" and you want to get hits for all of the following queries: \"refactor\", \"refactors\", \"refactored\" and \"refactoring\". In Lucene this can be achieved by choosing an analyzer class which applies word stemming during the indexing <emphasis role=\"bold\">as well as</emphasis> search process. Hibernate Search offers several ways to configure the analyzer to use (see <xref linkend=\"analyzer\"/>):"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:333
+#, no-c-format
+msgid "Setting the <literal>hibernate.search.analyzer</literal> property in the configuration file. The specified class will then be the default analyzer."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:339
+#, no-c-format
+msgid "Setting the <literal><literal>@Analyzer</literal></literal> annotation at the entity level."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:344
+#, no-c-format
+msgid "Setting the <literal>@<literal>Analyzer</literal></literal> annotation at the field level."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:349
+#, no-c-format
+msgid "When using the <literal>@Analyzer</literal> annotation one can either specify the fully qualified classname of the analyzer to use or one can refer to an analyzer definition defined by the <literal>@AnalyzerDef</literal> annotation. In the latter case the Solr analyzer framework with its factories approach is utilized. To find out more about the factory classes available you can either browse the Solr JavaDoc or read the corresponding section on the <ulink url=\"http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters\">Solr Wiki.</ulink> Note that depending on the chosen factory class additional libraries on top of the Solr dependencies might be required. For example, the <classname>PhoneticFilterFactory</classname> depends on <ulink url=\"http://commons.apache.org/codec\">commons-codec</ulink>."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:362
+#, no-c-format
+msgid "In the example below a <classname>StandardTokenizerFactory</classname> is used followed by two filter factories, <classname>LowerCaseFilterFactory</classname> and <classname>SnowballPorterFilterFactory</classname>. The standard tokenizer splits words at punctuation characters and hyphens while keeping email addresses and internet hostnames intact. It is a good general purpose tokenizer. The lowercase filter lowercases the letters in each token whereas the snowball filter finally applies language specific stemming."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:372
+#, no-c-format
+msgid "Generally, when using the Solr framework you have to start with a tokenizer followed by an arbitrary number of filters."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:376
+#, no-c-format
+msgid "Using <classname>@AnalyzerDef</classname> and the Solr framework to define and use an analyzer"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:379
+#, no-c-format
+msgid ""
+      "package example;\n"
+      "...\n"
+      "@Entity\n"
+      "@Indexed\n"
+      "<emphasis role=\"bold\">@AnalyzerDef(name = \"customanalyzer\",\n"
+      "  tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),\n"
+      "  filters = {\n"
+      "    @TokenFilterDef(factory = LowerCaseFilterFactory.class),\n"
+      "    @TokenFilterDef(factory = SnowballPorterFilterFactory.class, params = {\n"
+      "      @Parameter(name = \"language\", value = \"English\")\n"
+      "    })\n"
+      "  })</emphasis>\n"
+      "public class Book {\n"
+      "\n"
+      "  @Id\n"
+      "  @GeneratedValue\n"
+      "  @DocumentId\n"
+      "  private Integer id;\n"
+      "  \n"
+      "  @Field(index=Index.TOKENIZED, store=Store.NO)\n"
+      "  <emphasis role=\"bold\">@Analyzer(definition = \"customanalyzer\")</emphasis>\n"
+      "  private String title;\n"
+      "  \n"
+      "  @Field(index=Index.TOKENIZED, store=Store.NO)\n"
+      "  <emphasis role=\"bold\">@Analyzer(definition = \"customanalyzer\")</emphasis>\n"
+      "  private String subtitle; \n"
+      "\n"
+      "  @IndexedEmbedded\n"
+      "  @ManyToMany \n"
+      "  private Set&lt;Author&gt; authors = new HashSet&lt;Author&gt;();\n"
+      "\n"
+      "<emphasis role=\"bold\"> </emphasis> @Field(index = Index.UN_TOKENIZED, store = Store.YES)\n"
+      "  @DateBridge(resolution = Resolution.DAY)\n"
+      "  private Date publicationDate;\n"
+      "  \n"
+      "  public Book() {\n"
+      "  } \n"
+      "  \n"
+      "  // standard getters/setters follow here\n"
+      "  ... \n"
+      "}"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:384
+#, no-c-format
+msgid "What's next"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:386
+#, no-c-format
+msgid "The above paragraphs hopefully helped you getting an overview of Hibernate Search. Using the maven archetype plugin and the following command you can create an initial runnable maven project structure populated with the example code of this tutorial."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:392
+#, no-c-format
+msgid "Using the Maven archetype to create tutorial sources"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:394
+#, no-c-format
+msgid ""
+      "mvn archetype:create \\ \n"
+      "    -DarchetypeGroupId=org.hibernate \\\n"
+      "    -DarchetypeArtifactId=hibernate-search-quickstart \\ \n"
+      "    -DarchetypeVersion=3.1.0.GA \\\n"
+      "    -DgroupId=my.company -DartifactId=quickstart"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:397
+#, no-c-format
+msgid "Using the maven project you can execute the examples, inspect the file system based index and search and retrieve a list of managed objects. Just run <emphasis>mvn package</emphasis> to compile the sources and run the unit tests."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:402
+#, no-c-format
+msgid "The next step after this tutorial is to get more familiar with the overall architecture of Hibernate Search (<xref linkend=\"search-architecture\"/>) and explore the basic features in more detail. Two topics which were only briefly touched in this tutorial were analyzer configuration (<xref linkend=\"analyzer\"/>) and field bridges (<xref linkend=\"search-mapping-bridge\"/>), both important features required for more fine-grained indexing. More advanced topics cover clustering (<xref linkend=\"jms-backend\"/>) and large indexes handling (<xref linkend=\"search-configuration-directory-sharding\"/>)."
+msgstr ""
+


Property changes on: search/trunk/src/main/docbook/pot/modules/getting-started.pot
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/pot/modules/lucene-native.pot
===================================================================
--- search/trunk/src/main/docbook/pot/modules/lucene-native.pot	                        (rev 0)
+++ search/trunk/src/main/docbook/pot/modules/lucene-native.pot	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,260 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: lucene-native.xml:30
+#, no-c-format
+msgid "Advanced features"
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:33
+#, no-c-format
+msgid "SearchFactory"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:35
+#, no-c-format
+msgid "The <classname>SearchFactory</classname> object keeps track of the underlying Lucene resources for Hibernate Search, it's also a convenient way to access Lucene natively. The <classname>SearchFactory</classname> can be accessed from a <classname>FullTextSession</classname>:"
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:41
+#, no-c-format
+msgid "Accessing the <classname>SearchFactory</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: lucene-native.xml:43
+#, no-c-format
+msgid ""
+      "FullTextSession fullTextSession = Search.getFullTextSession(regularSession);\n"
+      "SearchFactory searchFactory = fullTextSession.getSearchFactory();"
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:48
+#, no-c-format
+msgid "Accessing a Lucene Directory"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:50
+#, no-c-format
+msgid "You can always access the Lucene directories through plain Lucene, the Directory structure is in no way different with or without Hibernate Search. However there are some more convenient ways to access a given Directory. The <classname>SearchFactory</classname> keeps track of the <classname>DirectoryProvider</classname>s per indexed class. One directory provider can be shared amongst several indexed classes if the classes share the same underlying index directory. While usually not the case, a given entity can have several <classname>DirectoryProvider</classname>s if the index is sharded (see <xref linkend=\"search-configuration-directory-sharding\"/>)."
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:62
+#, no-c-format
+msgid "Accessing the Lucene <classname>Directory</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: lucene-native.xml:64
+#, no-c-format
+msgid ""
+      "DirectoryProvider[] provider = searchFactory.getDirectoryProviders(Order.class);\n"
+      "org.apache.lucene.store.Directory directory = provider[0].getDirectory();"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:67
+#, no-c-format
+msgid "In this example, directory points to the lucene index storing <classname>Order</classname>s information. Note that the obtained Lucene directory must not be closed (this is Hibernate Search responsibility)."
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:74
+#, no-c-format
+msgid "Using an IndexReader"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:76
+#, no-c-format
+msgid "Queries in Lucene are executed on an <literal>IndexReader</literal>. Hibernate Search caches all index readers to maximize performance. Your code can access this cached resources, but you have to follow some \"good citizen\" rules."
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:82
+#, no-c-format
+msgid "Accessing an <classname>IndexReader</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: lucene-native.xml:84
+#, no-c-format
+msgid ""
+      "DirectoryProvider orderProvider = searchFactory.getDirectoryProviders(Order.class)[0];\n"
+      "DirectoryProvider clientProvider = searchFactory.getDirectoryProviders(Client.class)[0];\n"
+      "\n"
+      "ReaderProvider readerProvider = searchFactory.getReaderProvider();\n"
+      "IndexReader reader = readerProvider.openReader(orderProvider, clientProvider);\n"
+      "\n"
+      "try {\n"
+      "    //do read-only operations on the reader\n"
+      "}\n"
+      "finally {\n"
+      "    readerProvider.closeReader(reader);\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:87
+#, no-c-format
+msgid "The ReaderProvider (described in <xref linkend=\"search-architecture-readerstrategy\"/>), will open an IndexReader on top of the index(es) referenced by the directory providers. Because this <classname>IndexReader</classname> is shared amongst several clients, you must adhere to the following rules:"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:95
+#, no-c-format
+msgid "Never call indexReader.close(), but always call readerProvider.closeReader(reader), preferably in a finally block."
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:101
+#, no-c-format
+msgid "Don't use this <classname>IndexReader</classname> for modification operations (you would get an exception). If you want to use a read/write index reader, open one from the Lucene Directory object."
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:108
+#, no-c-format
+msgid "Aside from those rules, you can use the IndexReader freely, especially to do native queries. Using the shared <literal>IndexReader</literal>s will make most queries more efficient."
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:115
+#, no-c-format
+msgid "Customizing Lucene's scoring formula"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:117
+#, no-c-format
+msgid "Lucene allows the user to customize its scoring formula by extending <classname>org.apache.lucene.search.Similarity</classname>. The abstract methods defined in this class match the factors of the following formula calculating the score of query q for document d:"
+msgstr ""
+
+#. Tag: emphasis
+#: lucene-native.xml:122
+#, no-c-format
+msgid "score(q,d) = coord(q,d) · queryNorm(q) · ∑<subscript>t in q</subscript> ( tf(t in d) · idf(t)<superscript>2</superscript> · t.getBoost() · norm(t,d) )"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:131
+#, no-c-format
+msgid "Factor"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:133
+#, no-c-format
+msgid "Description"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:139
+#, no-c-format
+msgid "tf(t ind)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:141
+#, no-c-format
+msgid "Term frequency factor for the term (t) in the document (d)."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:146
+#, no-c-format
+msgid "idf(t)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:148
+#, no-c-format
+msgid "Inverse document frequency of the term."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:152
+#, no-c-format
+msgid "coord(q,d)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:154
+#, no-c-format
+msgid "Score factor based on how many of the query terms are found in the specified document."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:159
+#, no-c-format
+msgid "queryNorm(q)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:161
+#, no-c-format
+msgid "Normalizing factor used to make scores between queries comparable."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:166
+#, no-c-format
+msgid "t.getBoost()"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:168
+#, no-c-format
+msgid "Field boost."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:172
+#, no-c-format
+msgid "norm(t,d)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:174
+#, no-c-format
+msgid "Encapsulates a few (indexing time) boost and length factors."
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:178
+#, no-c-format
+msgid "It is beyond the scope of this manual to explain this formula in more detail. Please refer to <classname>Similarity</classname>'s Javadocs for more information."
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:183
+#, no-c-format
+msgid ""
+      "Hibernate Search provides two ways to modify Lucene's similarity calculation. First you can set the default similarity by specifying the fully specified classname of your <classname>Similarity</classname> implementation using the property <constant>hibernate.search.similarity</constant>. The default value is <classname>org.apache.lucene.search.DefaultSimilarity</classname>. Additionally you can override the default similarity on class level using the <literal>@Similarity</literal> annotation.<programlisting>@Entity\n"
+      "@Indexed\n"
+      "<emphasis role=\"bold\">@Similarity(impl = DummySimilarity.class)</emphasis>\n"
+      "public class Book {\n"
+      "   ...\n"
+      "}</programlisting>As an example, let's assume it is not important how often a term appears in a document. Documents with a single occurrence of the term should be scored the same as documents with multiple occurrences. In this case your custom implementation of the method <methodname>tf(float freq)</methodname> should return 1.0."
+msgstr ""
+


Property changes on: search/trunk/src/main/docbook/pot/modules/lucene-native.pot
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/pot/modules/mapping.pot
===================================================================
--- search/trunk/src/main/docbook/pot/modules/mapping.pot	                        (rev 0)
+++ search/trunk/src/main/docbook/pot/modules/mapping.pot	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,1637 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 16:41+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: mapping.xml:30
+#, no-c-format
+msgid "Mapping entities to the index structure"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:32
+#, no-c-format
+msgid "All the metadata information needed to index entities is described through annotations. There is no need for xml mapping files. In fact there is currently no xml configuration option available (see <ulink url=\"http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-210\">HSEARCH-210</ulink>). You can still use hibernate mapping files for the basic Hibernate configuration, but the Search specific configuration has to be expressed via annotations."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:41
+#, no-c-format
+msgid "Mapping an entity"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:44
+#, no-c-format
+msgid "Basic mapping"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:46
+#, no-c-format
+msgid "First, we must declare a persistent class as indexable. This is done by annotating the class with <literal>@Indexed</literal> (all entities not annotated with <literal>@Indexed</literal> will be ignored by the indexing process):"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:52
+#, no-c-format
+msgid "Making a class indexable using the <classname>@Indexed</classname> annotation"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:55
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "<emphasis role=\"bold\">@Indexed(index=\"indexes/essays\")</emphasis>\n"
+      "public class Essay {\n"
+      "    ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:58
+#, no-c-format
+msgid "The <literal>index</literal> attribute tells Hibernate what the Lucene directory name is (usually a directory on your file system). It is recommended to define a base directory for all Lucene indexes using the <literal>hibernate.search.default.indexBase</literal> property in your configuration file. Alternatively you can specify a base directory per indexed entity by specifying <literal>hibernate.search.&lt;index&gt;.indexBase, </literal>where <literal>&lt;index&gt;</literal> is the fully qualified classname of the indexed entity. Each entity instance will be represented by a Lucene <classname>Document</classname> inside the given index (aka Directory)."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:70
+#, no-c-format
+msgid "For each property (or attribute) of your entity, you have the ability to describe how it will be indexed. The default (no annotation present) means that the property is completely ignored by the indexing process. <literal>@Field</literal> does declare a property as indexed. When indexing an element to a Lucene document you can specify how it is indexed:"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:79
+#, no-c-format
+msgid "<literal>name</literal> : describe under which name, the property should be stored in the Lucene Document. The default value is the property name (following the JavaBeans convention)"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:85
+#, no-c-format
+msgid "<literal>store</literal> : describe whether or not the property is stored in the Lucene index. You can store the value <literal>Store.YES</literal> (consuming more space in the index but allowing projection, see <xref linkend=\"projections\"/> for more information), store it in a compressed way <literal>Store.COMPRESS</literal> (this does consume more CPU), or avoid any storage <literal>Store.NO</literal> (this is the default value). When a property is stored, you can retrieve its original value from the Lucene Document. This is not related to whether the element is indexed or not."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:98
+#, no-c-format
+msgid "index: describe how the element is indexed and the type of information store. The different values are <literal>Index.NO</literal> (no indexing, ie cannot be found by a query), <literal>Index.TOKENIZED</literal> (use an analyzer to process the property), <literal>Index.UN_TOKENIZED</literal> (no analyzer pre-processing), <literal>Index.NO_NORMS</literal> (do not store the normalization data). The default value is <literal>TOKENIZED</literal>."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:109
+#, no-c-format
+msgid "termVector: describes collections of term-frequency pairs. This attribute enables term vectors being stored during indexing so they are available within documents. The default value is TermVector.NO."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:114
+#, no-c-format
+msgid "The different values of this attribute are:"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:120
+#, no-c-format
+msgid "Value"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:122
+#, no-c-format
+msgid "Definition"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:128
+#, no-c-format
+msgid "TermVector.YES"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:130
+#, no-c-format
+msgid "Store the term vectors of each document. This produces two synchronized arrays, one contains document terms and the other contains the term's frequency."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:136
+#, no-c-format
+msgid "TermVector.NO"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:138
+#, no-c-format
+msgid "Do not store term vectors."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:142
+#, no-c-format
+msgid "TermVector.WITH_OFFSETS"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:144
+#, no-c-format
+msgid "Store the term vector and token offset information. This is the same as TermVector.YES plus it contains the starting and ending offset position information for the terms."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:151
+#, no-c-format
+msgid "TermVector.WITH_POSITIONS"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:153
+#, no-c-format
+msgid "Store the term vector and token position information. This is the same as TermVector.YES plus it contains the ordinal positions of each occurrence of a term in a document."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:160
+#, no-c-format
+msgid "TermVector.WITH_POSITION_OFFSETS"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:162
+#, no-c-format
+msgid "Store the term vector, token position and offset information. This is a combination of the YES, WITH_OFFSETS and WITH_POSITIONS."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:172
+#, no-c-format
+msgid "Whether or not you want to store the original data in the index depends on how you wish to use the index query result. For a regular Hibernate Search usage storing is not necessary. However you might want to store some fields to subsequently project them (see <xref linkend=\"projections\"/> for more information)."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:178
+#, no-c-format
+msgid "Whether or not you want to tokenize a property depends on whether you wish to search the element as is, or by the words it contains. It make sense to tokenize a text field, but tokenizing a date field probably not. Note that fields used for sorting must not be tokenized."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:184
+#, no-c-format
+msgid "Finally, the id property of an entity is a special property used by Hibernate Search to ensure index unicity of a given entity. By design, an id has to be stored and must not be tokenized. To mark a property as index id, use the <literal>@DocumentId</literal> annotation. If you are using Hibernate Annotations and you have specified @Id you can omit @DocumentId. The chosen entity id will also be used as document id."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:193
+#, no-c-format
+msgid "Adding <classname>@DocumentId</classname> ad <classname>@Field</classname> annotations to an indexed entity"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:196
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed(index=\"indexes/essays\")\n"
+      "public class Essay {\n"
+      "    ...\n"
+      "\n"
+      "    @Id\n"
+      "    <emphasis role=\"bold\">@DocumentId</emphasis>\n"
+      "    public Long getId() { return id; }\n"
+      "\n"
+      "    <emphasis role=\"bold\">@Field(name=\"Abstract\", index=Index.TOKENIZED, store=Store.YES)</emphasis>\n"
+      "    public String getSummary() { return summary; }\n"
+      "\n"
+      "    @Lob\n"
+      "    <emphasis role=\"bold\">@Field(index=Index.TOKENIZED)</emphasis>\n"
+      "    public String getText() { return text; }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:199
+#, no-c-format
+msgid "The above annotations define an index with three fields: <literal>id</literal> , <literal>Abstract</literal> and <literal>text</literal> . Note that by default the field name is decapitalized, following the JavaBean specification"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:206
+#, no-c-format
+msgid "Mapping properties multiple times"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:208
+#, no-c-format
+msgid "Sometimes one has to map a property multiple times per index, with slightly different indexing strategies. For example, sorting a query by field requires the field to be <literal>UN_TOKENIZED</literal>. If one wants to search by words in this property and still sort it, one need to index it twice - once tokenized and once untokenized. @Fields allows to achieve this goal."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:216
+#, no-c-format
+msgid "Using @Fields to map a property multiple times"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:218
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed(index = \"Book\" )\n"
+      "public class Book {\n"
+      "    <emphasis role=\"bold\">@Fields( {</emphasis>\n"
+      "            @Field(index = Index.TOKENIZED),\n"
+      "            @Field(name = \"summary_forSort\", index = Index.UN_TOKENIZED, store = Store.YES)\n"
+      "            <emphasis role=\"bold\">} )</emphasis>\n"
+      "    public String getSummary() {\n"
+      "        return summary;\n"
+      "    }\n"
+      "\n"
+      "    ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:221
+#, no-c-format
+msgid "The field <literal>summary</literal> is indexed twice, once as <literal>summary</literal> in a tokenized way, and once as <literal>summary_forSort</literal> in an untokenized way. @Field supports 2 attributes useful when @Fields is used:"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:228
+#, no-c-format
+msgid "analyzer: defines a @Analyzer annotation per field rather than per property"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:233
+#, no-c-format
+msgid "bridge: defines a @FieldBridge annotation per field rather than per property"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:238
+#, no-c-format
+msgid "See below for more information about analyzers and field bridges."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:243
+#, no-c-format
+msgid "Embedded and associated objects"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:245
+#, no-c-format
+msgid "Associated objects as well as embedded objects can be indexed as part of the root entity index. This is useful if you expect to search a given entity based on properties of associated objects. In the following example the aim is to return places where the associated city is Atlanta (In the Lucene query parser language, it would translate into <code>address.city:Atlanta</code>)."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:253
+#, no-c-format
+msgid "Using @IndexedEmbedded to index associations"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:255
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed\n"
+      "public class Place {\n"
+      "    @Id\n"
+      "    @GeneratedValue\n"
+      "    @DocumentId\n"
+      "    private Long id;\n"
+      "\n"
+      "    @Field( index = Index.TOKENIZED )\n"
+      "    private String name;\n"
+      "\n"
+      "    @OneToOne( cascade = { CascadeType.PERSIST, CascadeType.REMOVE } )\n"
+      "    <emphasis role=\"bold\">@IndexedEmbedded</emphasis>\n"
+      "    private Address address;\n"
+      "    ....\n"
+      "}\n"
+      "\n"
+      "@Entity\n"
+      "public class Address {\n"
+      "    @Id\n"
+      "    @GeneratedValue\n"
+      "    private Long id;\n"
+      "\n"
+      "    @Field(index=Index.TOKENIZED)\n"
+      "    private String street;\n"
+      "\n"
+      "    @Field(index=Index.TOKENIZED)\n"
+      "    private String city;\n"
+      "\n"
+      "    <emphasis role=\"bold\">@ContainedIn</emphasis>\n"
+      "    @OneToMany(mappedBy=\"address\")\n"
+      "    private Set&lt;Place&gt; places;\n"
+      "    ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:258
+#, no-c-format
+msgid "In this example, the place fields will be indexed in the <literal>Place</literal> index. The <literal>Place</literal> index documents will also contain the fields <literal>address.id</literal>, <literal>address.street</literal>, and <literal>address.city</literal> which you will be able to query. This is enabled by the <literal>@IndexedEmbedded</literal> annotation."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:265
+#, no-c-format
+msgid "Be careful. Because the data is denormalized in the Lucene index when using the <classname>@IndexedEmbedded</classname> technique, Hibernate Search needs to be aware of any change in the <classname>Place</classname> object and any change in the <classname>Address</classname> object to keep the index up to date. To make sure the <literal><classname>Place</classname></literal> Lucene document is updated when it's <classname>Address</classname> changes, you need to mark the other side of the bidirectional relationship with <classname>@ContainedIn</classname>."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:275
+#, no-c-format
+msgid "<literal>@ContainedIn</literal> is only useful on associations pointing to entities as opposed to embedded (collection of) objects."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:279
+#, no-c-format
+msgid "Let's make our example a bit more complex:"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:282
+#, no-c-format
+msgid "Nested usage of <classname>@IndexedEmbedded</classname> and <classname>@ContainedIn</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:285
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed\n"
+      "public class Place {\n"
+      "    @Id\n"
+      "    @GeneratedValue\n"
+      "    @DocumentId\n"
+      "    private Long id;\n"
+      "\n"
+      "    @Field( index = Index.TOKENIZED )\n"
+      "    private String name;\n"
+      "\n"
+      "    @OneToOne( cascade = { CascadeType.PERSIST, CascadeType.REMOVE } )\n"
+      "    <emphasis role=\"bold\">@IndexedEmbedded</emphasis>\n"
+      "    private Address address;\n"
+      "    ....\n"
+      "}\n"
+      "\n"
+      "@Entity\n"
+      "public class Address {\n"
+      "    @Id\n"
+      "    @GeneratedValue\n"
+      "    private Long id;\n"
+      "\n"
+      "    @Field(index=Index.TOKENIZED)\n"
+      "    private String street;\n"
+      "\n"
+      "    @Field(index=Index.TOKENIZED)\n"
+      "    private String city;\n"
+      "\n"
+      "    <emphasis role=\"bold\">@IndexedEmbedded(depth = 1, prefix = \"ownedBy_\")</emphasis>\n"
+      "    private Owner ownedBy;\n"
+      "\n"
+      "    <emphasis role=\"bold\">@ContainedIn</emphasis>\n"
+      "    @OneToMany(mappedBy=\"address\")\n"
+      "    private Set&lt;Place&gt; places;\n"
+      "    ...\n"
+      "}\n"
+      "\n"
+      "@Embeddable\n"
+      "public class Owner {\n"
+      "    @Field(index = Index.TOKENIZED)\n"
+      "    private String name;\n"
+      "   ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:288
+#, no-c-format
+msgid "Any <literal>@*ToMany, @*ToOne</literal> and <literal>@Embedded</literal> attribute can be annotated with <literal>@IndexedEmbedded</literal>. The attributes of the associated class will then be added to the main entity index. In the previous example, the index will contain the following fields"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:296
+#, no-c-format
+msgid "<para>id</para>"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:300
+#, no-c-format
+msgid "name"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:304
+#, no-c-format
+msgid "address.street"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:308
+#, no-c-format
+msgid "address.city"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:312
+#, no-c-format
+msgid "address.ownedBy_name"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:316
+#, no-c-format
+msgid "The default prefix is <literal>propertyName.</literal>, following the traditional object navigation convention. You can override it using the <literal>prefix</literal> attribute as it is shown on the <literal>ownedBy</literal> property."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:322
+#, no-c-format
+msgid "The prefix cannot be set to the empty string."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:325
+#, no-c-format
+msgid "The<literal> depth</literal> property is necessary when the object graph contains a cyclic dependency of classes (not instances). For example, if <classname>Owner</classname> points to <classname>Place</classname>. Hibernate Search will stop including Indexed embedded attributes after reaching the expected depth (or the object graph boundaries are reached). A class having a self reference is an example of cyclic dependency. In our example, because <literal>depth</literal> is set to 1, any <literal>@IndexedEmbedded</literal> attribute in Owner (if any) will be ignored."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:336
+#, no-c-format
+msgid "Using <literal>@IndexedEmbedded</literal> for object associations allows you to express queries such as:"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:341
+#, no-c-format
+msgid "Return places where name contains JBoss and where address city is Atlanta. In Lucene query this would be"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:344
+#, no-c-format
+msgid "+name:jboss +address.city:atlanta"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:348
+#, no-c-format
+msgid "Return places where name contains JBoss and where owner's name contain Joe. In Lucene query this would be"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:351
+#, no-c-format
+msgid "+name:jboss +address.orderBy_name:joe"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:355
+#, no-c-format
+msgid "In a way it mimics the relational join operation in a more efficient way (at the cost of data duplication). Remember that, out of the box, Lucene indexes have no notion of association, the join operation is simply non-existent. It might help to keep the relational model normalized while benefiting from the full text index speed and feature richness."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:363
+#, no-c-format
+msgid "An associated object can itself (but does not have to) be <literal>@Indexed</literal>"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:367
+#, no-c-format
+msgid "When @IndexedEmbedded points to an entity, the association has to be directional and the other side has to be annotated <literal>@ContainedIn</literal> (as seen in the previous example). If not, Hibernate Search has no way to update the root index when the associated entity is updated (in our example, a <literal>Place</literal> index document has to be updated when the associated <classname>Address</classname> instance is updated)."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:375
+#, no-c-format
+msgid "Sometimes, the object type annotated by <classname>@IndexedEmbedded</classname> is not the object type targeted by Hibernate and Hibernate Search. This is especially the case when interfaces are used in lieu of their implementation. For this reason you can override the object type targeted by Hibernate Search using the <methodname>targetElement</methodname> parameter."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:383
+#, no-c-format
+msgid "Using the <literal>targetElement</literal> property of <classname>@IndexedEmbedded</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:386
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed\n"
+      "public class Address {\n"
+      "    @Id\n"
+      "    @GeneratedValue\n"
+      "    @DocumentId\n"
+      "    private Long id;\n"
+      "\n"
+      "    @Field(index= Index.TOKENIZED)\n"
+      "    private String street;\n"
+      "\n"
+      "    @IndexedEmbedded(depth = 1, prefix = \"ownedBy_\", <emphasis role=\"bold\">targetElement = Owner.class</emphasis>)\n"
+      "    @Target(Owner.class)\n"
+      "    private Person ownedBy;\n"
+      "\n"
+      "\n"
+      "    ...\n"
+      "}\n"
+      "\n"
+      "@Embeddable\n"
+      "public class Owner implements Person { ... }"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:391
+#, no-c-format
+msgid "Boost factor"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:393
+#, no-c-format
+msgid "Lucene has the notion of <emphasis>boost factor</emphasis>. It's a way to give more weight to a field or to an indexed element over others during the indexation process. You can use <literal>@Boost</literal> at the @Field, method or class level."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:399
+#, no-c-format
+msgid "Using different ways of increasing the weight of an indexed element using a boost factor"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:402
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed(index=\"indexes/essays\")\n"
+      "<emphasis role=\"bold\">@Boost(1.7f)</emphasis>\n"
+      "public class Essay {\n"
+      "    ...\n"
+      "\n"
+      "    @Id\n"
+      "    @DocumentId\n"
+      "    public Long getId() { return id; }\n"
+      "\n"
+      "    @Field(name=\"Abstract\", index=Index.TOKENIZED, store=Store.YES, boost=<emphasis\n"
+      "            role=\"bold\">@Boost(2f)</emphasis>)\n"
+      "    <emphasis role=\"bold\">@Boost(1.5f)</emphasis>\n"
+      "    public String getSummary() { return summary; }\n"
+      "\n"
+      "    @Lob\n"
+      "    @Field(index=Index.TOKENIZED, boost=<emphasis role=\"bold\">@Boost(1.2f)</emphasis>)\n"
+      "    public String getText() { return text; }\n"
+      "\n"
+      "    @Field\n"
+      "    public String getISBN() { return isbn; }\n"
+      "\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:405
+#, no-c-format
+msgid "In our example, <classname>Essay</classname>'s probability to reach the top of the search list will be multiplied by 1.7. The <methodname>summary</methodname> field will be 3.0 (2 * 1.5 - <methodname>@Field.boost</methodname> and <classname>@Boost</classname> on a property are cumulative) more important than the <methodname>isbn</methodname> field. The <methodname>text</methodname> field will be 1.2 times more important than the <methodname>isbn</methodname> field. Note that this explanation in strictest terms is actually wrong, but it is simple and close enough to reality for all practical purposes. Please check the Lucene documentation or the excellent <citetitle>Lucene In Action </citetitle> from Otis Gospodnetic and Erik Hatcher."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:420
+#, no-c-format
+msgid "Analyzer"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:422
+#, no-c-format
+msgid "The default analyzer class used to index tokenized fields is configurable through the <literal>hibernate.search.analyzer</literal> property. The default value for this property is <classname>org.apache.lucene.analysis.standard.StandardAnalyzer</classname>."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:427
+#, no-c-format
+msgid "You can also define the analyzer class per entity, property and even per @Field (useful when multiple fields are indexed from a single property)."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:432
+#, no-c-format
+msgid "Different ways of specifying an analyzer"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:434
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed\n"
+      "<emphasis role=\"bold\">@Analyzer(impl = EntityAnalyzer.class)</emphasis>\n"
+      "public class MyEntity {\n"
+      "    @Id\n"
+      "    @GeneratedValue\n"
+      "    @DocumentId\n"
+      "    private Integer id;\n"
+      "\n"
+      "    @Field(index = Index.TOKENIZED)\n"
+      "    private String name;\n"
+      "\n"
+      "    @Field(index = Index.TOKENIZED)\n"
+      "    <emphasis role=\"bold\">@Analyzer(impl = PropertyAnalyzer.class)</emphasis>\n"
+      "    private String summary;\n"
+      "\n"
+      "    @Field(index = Index.TOKENIZED, <emphasis><emphasis role=\"bold\">analyzer = @Analyzer(impl = FieldAnalyzer.class</emphasis>)</emphasis>\n"
+      "    private String body;\n"
+      "\n"
+      "    ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:437
+#, no-c-format
+msgid "In this example, <classname>EntityAnalyzer</classname> is used to index all tokenized properties (eg. <literal>name</literal>), except <literal>summary</literal> and <literal>body</literal> which are indexed with <classname>PropertyAnalyzer</classname> and <classname>FieldAnalyzer</classname> respectively."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:444
+#, no-c-format
+msgid "Mixing different analyzers in the same entity is most of the time a bad practice. It makes query building more complex and results less predictable (for the novice), especially if you are using a QueryParser (which uses the same analyzer for the whole query). As a rule of thumb, for any given field the same analyzer should be used for indexing and querying."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:453
+#, no-c-format
+msgid "Analyzer definitions"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:455
+#, no-c-format
+msgid "Analyzers can become quite complex to deal with for which reason Hibernate Search introduces the notion of analyzer definitions. An analyzer definition can be reused by many <classname>@Analyzer</classname> declarations. An analyzer definition is composed of:"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:463
+#, no-c-format
+msgid "a name: the unique string used to refer to the definition"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:468
+#, no-c-format
+msgid "a tokenizer: responsible for tokenizing the input stream into individual words"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:473
+#, no-c-format
+msgid "a list of filters: each filter is responsible to remove, modify or sometimes even add words into the stream provided by the tokenizer"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:479
+#, no-c-format
+msgid "This separation of tasks - a tokenizer followed by a list of filters - allows for easy reuse of each individual component and let you build your customized analyzer in a very flexible way (just like Lego). Generally speaking the <classname>Tokenizer</classname> starts the analysis process by turning the character input into tokens which are then further processed by the <classname>TokenFilter</classname>s. Hibernate Search supports this infrastructure by utilizing the Solr analyzer framework. Make sure to add<filename> solr-core.jar and </filename><filename>solr-common.jar</filename> to your classpath to use analyzer definitions. In case you also want to utilizing a snowball stemmer also include the <filename>lucene-snowball.jar.</filename> Other Solr analyzers might depend on more libraries. For example, the <classname>PhoneticFilterFactory</classname> depends on <ulink url=\"http://commons.apache.org/codec\">commons-codec</ulink>. Your distribution of Hibernate Sea!
 rch provides these dependencies in its <filename>lib</filename> directory."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:498
+#, no-c-format
+msgid "<classname>@AnalyzerDef</classname> and the Solr framework"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:501
+#, no-c-format
+msgid ""
+      "@AnalyzerDef(name=\"customanalyzer\",\n"
+      "        tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),\n"
+      "        filters = {\n"
+      "                @TokenFilterDef(factory = ISOLatin1AccentFilterFactory.class),\n"
+      "                @TokenFilterDef(factory = LowerCaseFilterFactory.class),\n"
+      "                @TokenFilterDef(factory = StopFilterFactory.class, params = {\n"
+      "                    @Parameter(name=\"words\", value= \"org/hibernate/search/test/analyzer/solr/stoplist.properties\" ),\n"
+      "                    @Parameter(name=\"ignoreCase\", value=\"true\")\n"
+      "                })\n"
+      "})\n"
+      "public class Team {\n"
+      "    ...\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:504
+#, no-c-format
+msgid "A tokenizer is defined by its factory which is responsible for building the tokenizer and using the optional list of parameters. This example use the standard tokenizer. A filter is defined by its factory which is responsible for creating the filter instance using the optional parameters. In our example, the StopFilter filter is built reading the dedicated words property file and is expected to ignore case. The list of parameters is dependent on the tokenizer or filter factory."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:514
+#, no-c-format
+msgid "Filters are applied in the order they are defined in the <classname>@AnalyzerDef</classname> annotation. Make sure to think twice about this order."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:519
+#, no-c-format
+msgid "Once defined, an analyzer definition can be reused by an <classname>@Analyzer</classname> declaration using the definition name rather than declaring an implementation class."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:524
+#, no-c-format
+msgid "Referencing an analyzer by name"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:526
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed\n"
+      "@AnalyzerDef(name=\"customanalyzer\", ... )\n"
+      "public class Team {\n"
+      "    @Id\n"
+      "    @DocumentId\n"
+      "    @GeneratedValue\n"
+      "    private Integer id;\n"
+      "\n"
+      "    @Field\n"
+      "    private String name;\n"
+      "\n"
+      "    @Field\n"
+      "    private String location;\n"
+      "\n"
+      "    @Field <emphasis role=\"bold\">@Analyzer(definition = \"customanalyzer\")</emphasis>\n"
+      "    private String description;\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:529
+#, no-c-format
+msgid "Analyzer instances declared by <classname>@AnalyzerDef</classname> are available by their name in the <classname>SearchFactory</classname>."
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:533
+#, no-c-format
+msgid "Analyzer analyzer = fullTextSession.getSearchFactory().getAnalyzer(\"customanalyzer\");"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:535
+#, no-c-format
+msgid "This is quite useful wen building queries. Fields in queries should be analyzed with the same analyzer used to index the field so that they speak a common \"language\": the same tokens are reused between the query and the indexing process. This rule has some exceptions but is true most of the time. Respect it unless you know what you are doing."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:544
+#, no-c-format
+msgid "Available analyzers"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:546
+#, no-c-format
+msgid "Solr and Lucene come with a lot of useful default tokenizers and filters. You can find a complete list of tokenizer factories and filter factories at <ulink url=\"http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters\">http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters</ulink>. Let check a few of them."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:553
+#, no-c-format
+msgid "Some of the available tokenizers"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:558 mapping.xml:593
+#, no-c-format
+msgid "Factory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:560 mapping.xml:595
+#, no-c-format
+msgid "Description"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:562 mapping.xml:597
+#, no-c-format
+msgid "parameters"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:568
+#, no-c-format
+msgid "StandardTokenizerFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:570
+#, no-c-format
+msgid "Use the Lucene StandardTokenizer"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:572 mapping.xml:581 mapping.xml:607 mapping.xml:615 mapping.xml:647
+#, no-c-format
+msgid "none"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:576
+#, no-c-format
+msgid "HTMLStripStandardTokenizerFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:578
+#, no-c-format
+msgid "Remove HTML tags, keep the text and pass it to a StandardTokenizer"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:588
+#, no-c-format
+msgid "Some of the available filters"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:603
+#, no-c-format
+msgid "StandardFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:605
+#, no-c-format
+msgid "Remove dots from acronyms and 's from words"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:611
+#, no-c-format
+msgid "LowerCaseFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:613
+#, no-c-format
+msgid "Lowercase words"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:619
+#, no-c-format
+msgid "StopFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:621
+#, no-c-format
+msgid "remove words (tokens) matching a list of stop words"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:624
+#, no-c-format
+msgid "<literal>words</literal>: points to a resource file containing the stop words"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:625
+#, no-c-format
+msgid "ignoreCase: true if <literal>case</literal> should be ignore when comparing stop words, <literal>false</literal> otherwise"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:631
+#, no-c-format
+msgid "SnowballPorterFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:633
+#, no-c-format
+msgid "Reduces a word to it's root in a given language. (eg. protect, protects, protection share the same root). Using such a filter allows searches matching related words."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:637
+#, no-c-format
+msgid "<literal>language</literal>: Danish, Dutch, English, Finnish, French, German, Italian, Norwegian, Portuguese, Russian, Spanish, Swedish and a few more"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:643
+#, no-c-format
+msgid "ISOLatin1AccentFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:645
+#, no-c-format
+msgid "remove accents for languages like French"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:653
+#, no-c-format
+msgid "We recommend to check all the implementations of <classname>org.apache.solr.analysis.TokenizerFactory</classname> and <classname>org.apache.solr.analysis.TokenFilterFactory</classname> in your IDE to see the implementations available."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:660
+#, no-c-format
+msgid "Analyzer discriminator (experimental)"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:662
+#, no-c-format
+msgid "So far all the introduced ways to specify an analyzer were static. However, there are use cases where it is useful to select an analyzer depending on the current state of the entity to be indexed, for example in multilingual application. For an <classname>BlogEntry</classname> class for example the analyzer could depend on the language property of the entry. Depending on this property the correct language specific stemmer should be chosen to index the actual text."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:671
+#, no-c-format
+msgid "To enable this dynamic analyzer selection Hibernate Search introduces the <classname>AnalyzerDiscriminator</classname> annotation. The following example demonstrates the usage of this annotation:"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:677
+#, no-c-format
+msgid "Usage of @AnalyzerDiscriminator in order to select an analyzer depending on the entity state"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:680
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed\n"
+      "@AnalyzerDefs({\n"
+      "  @AnalyzerDef(name = \"en\",\n"
+      "    tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),\n"
+      "    filters = {\n"
+      "      @TokenFilterDef(factory = LowerCaseFilterFactory.class),\n"
+      "      @TokenFilterDef(factory = EnglishPorterFilterFactory.class\n"
+      "      )\n"
+      "    }),\n"
+      "  @AnalyzerDef(name = \"de\",\n"
+      "    tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),\n"
+      "    filters = {\n"
+      "      @TokenFilterDef(factory = LowerCaseFilterFactory.class),\n"
+      "      @TokenFilterDef(factory = GermanStemFilterFactory.class)\n"
+      "    })\n"
+      "})\n"
+      "public class BlogEntry {\n"
+      "\n"
+      "    @Id\n"
+      "    @GeneratedValue\n"
+      "    @DocumentId\n"
+      "    private Integer id;\n"
+      "\n"
+      "    @Field\n"
+      "    @AnalyzerDiscriminator(impl = LanguageDiscriminator.class)\n"
+      "    private String language;\n"
+      "    \n"
+      "    @Field\n"
+      "    private String text;\n"
+      "    \n"
+      "    private Set&lt;BlogEntry&gt; references;\n"
+      "\n"
+      "    // standard getter/setter\n"
+      "    ...\n"
+      "}"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:682
+#, no-c-format
+msgid ""
+      "public class LanguageDiscriminator implements Discriminator {\n"
+      "\n"
+      "    public String getAnalyzerDefinitionName(Object value, Object entity, String field) {\n"
+      "        if ( value == null || !( entity instanceof Article ) ) {\n"
+      "            return null;\n"
+      "        }\n"
+      "        return (String) value;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:685
+#, no-c-format
+msgid "The prerequisite for using <classname>@AnalyzerDiscriminator</classname> is that all analyzers which are going to be used are predefined via <classname>@AnalyzerDef</classname> definitions. If this is the case one can place the <classname>@AnalyzerDiscriminator</classname> annotation either on the class or on a specific property of the entity for which to dynamically select an analyzer. Via the <literal>impl</literal> parameter of the <classname>AnalyzerDiscriminator</classname> you specify a concrete implementation of the <classname>Discriminator</classname> interface. It is up to you to provide an implementation for this interface. The only method you have to implement is <classname>getAnalyzerDefinitionName()</classname> which gets called for each field added to the Lucene document. The entity which is getting indexed is also passed to the interface method. The <literal>value</literal> parameter is only set if the <classname>AnalyzerDiscriminator</classname> is pl!
 aced on property level instead of class level. In this case the value represents the current value of this property."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:705
+#, no-c-format
+msgid "An implemention of the <classname>Discriminator</classname> interface has to return the name of an existing analyzer definition if the analyzer should be set dynamically or <classname>null</classname> if the default analyzer should not be overridden. The given example assumes that the language parameter is either 'de' or 'en' which matches the specified names in the <classname>@AnalyzerDef</classname>s."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:714
+#, no-c-format
+msgid "The <classname>@AnalyzerDiscriminator</classname> is currently still experimental and the API might still change. We are hoping for some feedback from the community about the usefulness and usability of this feature."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:722
+#, no-c-format
+msgid "Retrieving an analyzer"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:724
+#, no-c-format
+msgid "During indexing time, Hibernate Search is using analyzers under the hood for you. In some situations, retrieving analyzers can be handy. If your domain model makes use of multiple analyzers (maybe to benefit from stemming, use phonetic approximation and so on), you need to make sure to use the same analyzers when you build your query."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:732
+#, no-c-format
+msgid "This rule can be broken but you need a good reason for it. If you are unsure, use the same analyzers."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:736
+#, no-c-format
+msgid "You can retrieve the scoped analyzer for a given entity used at indexing time by Hibernate Search. A scoped analyzer is an analyzer which applies the right analyzers depending on the field indexed: multiple analyzers can be defined on a given entity each one working on an individual field, a scoped analyzer unify all these analyzers into a context-aware analyzer. While the theory seems a bit complex, using the right analyzer in a query is very easy."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:745
+#, no-c-format
+msgid "Using the scoped analyzer when building a full-text query"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:748
+#, no-c-format
+msgid ""
+      "org.apache.lucene.queryParser.QueryParser parser = new QueryParser(\n"
+      "    \"title\", \n"
+      "    fullTextSession.getSearchFactory().getAnalyzer( Song.class )\n"
+      ");\n"
+      "\n"
+      "org.apache.lucene.search.Query luceneQuery = \n"
+      "    parser.parse( \"title:sky Or title_stemmed:diamond\" );\n"
+      "\n"
+      "org.hibernate.Query fullTextQuery = \n"
+      "    fullTextSession.createFullTextQuery( luceneQuery, Song.class );\n"
+      "\n"
+      "List result = fullTextQuery.list(); //return a list of managed objects"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:751
+#, no-c-format
+msgid "In the example above, the song title is indexed in two fields: the standard analyzer is used in the field <literal>title</literal> and a stemming analyzer is used in the field <literal>title_stemmed</literal>. By using the analyzer provided by the search factory, the query uses the appropriate analyzer depending on the field targeted."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:758
+#, no-c-format
+msgid "If your query targets more that one query and you wish to use your standard analyzer, make sure to describe it using an analyzer definition. You can retrieve analyzers by their definition name using <code>searchFactory.getAnalyzer(String)</code>."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:767
+#, no-c-format
+msgid "Property/Field Bridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:769
+#, no-c-format
+msgid "In Lucene all index fields have to be represented as Strings. For this reason all entity properties annotated with <literal>@Field</literal> have to be indexed in a String form. For most of your properties, Hibernate Search does the translation job for you thanks to a built-in set of bridges. In some cases, though you need a more fine grain control over the translation process."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:777
+#, no-c-format
+msgid "Built-in bridges"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:779
+#, no-c-format
+msgid "Hibernate Search comes bundled with a set of built-in bridges between a Java property type and its full text representation."
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:784
+#, no-c-format
+msgid "null"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:787
+#, no-c-format
+msgid "null elements are not indexed. Lucene does not support null elements and this does not make much sense either."
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:793
+#, no-c-format
+msgid "java.lang.String"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:796
+#, no-c-format
+msgid "String are indexed as is"
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:801
+#, no-c-format
+msgid "short, Short, integer, Integer, long, Long, float, Float, double, Double, BigInteger, BigDecimal"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:805
+#, no-c-format
+msgid "Numbers are converted in their String representation. Note that numbers cannot be compared by Lucene (ie used in ranged queries) out of the box: they have to be padded"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:808
+#, no-c-format
+msgid "Using a Range query is debatable and has drawbacks, an alternative approach is to use a Filter query which will filter the result query to the appropriate range."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:812
+#, no-c-format
+msgid "Hibernate Search will support a padding mechanism"
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:818
+#, no-c-format
+msgid "java.util.Date"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:821
+#, no-c-format
+msgid "Dates are stored as yyyyMMddHHmmssSSS in GMT time (200611072203012 for Nov 7th of 2006 4:03PM and 12ms EST). You shouldn't really bother with the internal format. What is important is that when using a DateRange Query, you should know that the dates have to be expressed in GMT time."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:827
+#, no-c-format
+msgid "Usually, storing the date up to the millisecond is not necessary. <literal>@DateBridge</literal> defines the appropriate resolution you are willing to store in the index ( <literal> <literal>@DateBridge(resolution=Resolution.DAY)</literal> </literal> ). The date pattern will then be truncated accordingly."
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:834
+#, no-c-format
+msgid ""
+      "@Entity \n"
+      "@Indexed\n"
+      "public class Meeting {\n"
+      "    @Field(index=Index.UN_TOKENIZED)\n"
+      "    <emphasis role=\"bold\">@DateBridge(resolution=Resolution.MINUTE)</emphasis>\n"
+      "    private Date date;\n"
+      "    ..."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:837
+#, no-c-format
+msgid "A Date whose resolution is lower than <literal>MILLISECOND</literal> cannot be a <literal>@DocumentId</literal>"
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:845
+#, no-c-format
+msgid "java.net.URI, java.net.URL"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:848
+#, no-c-format
+msgid "URI and URL are converted to their string representation"
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:854
+#, no-c-format
+msgid "java.lang.Class"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:857
+#, no-c-format
+msgid "Class are converted to their fully qualified class name. The thread context classloader is used when the class is rehydrated"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:866
+#, no-c-format
+msgid "Custom Bridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:868
+#, no-c-format
+msgid "Sometimes, the built-in bridges of Hibernate Search do not cover some of your property types, or the String representation used by the bridge does not meet your requirements. The following paragraphs describe several solutions to this problem."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:874
+#, no-c-format
+msgid "StringBridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:876
+#, no-c-format
+msgid "The simplest custom solution is to give Hibernate Search an implementation of your expected <emphasis><classname>Object</classname> </emphasis>to <classname>String</classname> bridge. To do so you need to implements the <literal>org.hibernate.search.bridge.StringBridge</literal> interface. All implementations have to be thread-safe as they are used concurrently."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:885
+#, no-c-format
+msgid "Implementing your own <classname>StringBridge</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:888
+#, no-c-format
+msgid ""
+      "/**\n"
+      " * Padding Integer bridge.\n"
+      " * All numbers will be padded with 0 to match 5 digits\n"
+      " *\n"
+      " * @author Emmanuel Bernard\n"
+      " */\n"
+      "public class PaddedIntegerBridge implements <emphasis role=\"bold\">StringBridge</emphasis> {\n"
+      "\n"
+      "    private int PADDING = 5;\n"
+      "\n"
+      "    <emphasis role=\"bold\">public String objectToString(Object object)</emphasis> {\n"
+      "        String rawInteger = ( (Integer) object ).toString();\n"
+      "        if (rawInteger.length() &gt; PADDING) \n"
+      "            throw new IllegalArgumentException( \"Try to pad on a number too big\" );\n"
+      "        StringBuilder paddedInteger = new StringBuilder( );\n"
+      "        for ( int padIndex = rawInteger.length() ; padIndex &lt; PADDING ; padIndex++ ) {\n"
+      "            paddedInteger.append('0');\n"
+      "        }\n"
+      "        return paddedInteger.append( rawInteger ).toString();\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:891
+#, no-c-format
+msgid "Then any property or field can use this bridge thanks to the <literal>@FieldBridge</literal> annotation"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:894
+#, no-c-format
+msgid ""
+      "<emphasis role=\"bold\">@FieldBridge(impl = PaddedIntegerBridge.class)</emphasis>\n"
+      "private Integer length;"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:896
+#, no-c-format
+msgid "Parameters can be passed to the Bridge implementation making it more flexible. The Bridge implementation implements a <classname>ParameterizedBridge</classname> interface, and the parameters are passed through the <literal>@FieldBridge</literal> annotation."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:903
+#, no-c-format
+msgid "Passing parameters to your bridge implementation"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:905
+#, no-c-format
+msgid ""
+      "public class PaddedIntegerBridge implements StringBridge, <emphasis\n"
+      "              role=\"bold\">ParameterizedBridge</emphasis> {\n"
+      "\n"
+      "    public static String PADDING_PROPERTY = \"padding\";\n"
+      "    private int padding = 5; //default\n"
+      "\n"
+      "    <emphasis role=\"bold\">public void setParameterValues(Map parameters)</emphasis> {\n"
+      "        Object padding = parameters.get( PADDING_PROPERTY );\n"
+      "        if (padding != null) this.padding = (Integer) padding;\n"
+      "    }\n"
+      "\n"
+      "    public String objectToString(Object object) {\n"
+      "        String rawInteger = ( (Integer) object ).toString();\n"
+      "        if (rawInteger.length() &gt; padding) \n"
+      "            throw new IllegalArgumentException( \"Try to pad on a number too big\" );\n"
+      "        StringBuilder paddedInteger = new StringBuilder( );\n"
+      "        for ( int padIndex = rawInteger.length() ; padIndex &lt; padding ; padIndex++ ) {\n"
+      "            paddedInteger.append('0');\n"
+      "        }\n"
+      "        return paddedInteger.append( rawInteger ).toString();\n"
+      "    }\n"
+      "}\n"
+      "\n"
+      "\n"
+      "//property\n"
+      "@FieldBridge(impl = PaddedIntegerBridge.class,\n"
+      "             <emphasis role=\"bold\">params = @Parameter(name=\"padding\", value=\"10\")</emphasis>\n"
+      "            )\n"
+      "private Integer length;"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:908
+#, no-c-format
+msgid "The <classname>ParameterizedBridge</classname> interface can be implemented by <classname>StringBridge</classname>, <classname>TwoWayStringBridge</classname>, <classname>FieldBridge</classname> implementations."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:913
+#, no-c-format
+msgid "All implementations have to be thread-safe, but the parameters are set during initialization and no special care is required at this stage."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:917
+#, no-c-format
+msgid "If you expect to use your bridge implementation on an id property (ie annotated with <literal>@DocumentId</literal> ), you need to use a slightly extended version of <literal>StringBridge</literal> named <classname>TwoWayStringBridge</classname>. Hibernate Search needs to read the string representation of the identifier and generate the object out of it. There is not difference in the way the <literal>@FieldBridge</literal> annotation is used."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:926
+#, no-c-format
+msgid "Implementing a TwoWayStringBridge which can for example be used for id properties"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:929
+#, no-c-format
+msgid ""
+      "public class PaddedIntegerBridge implements TwoWayStringBridge, ParameterizedBridge {\n"
+      "\n"
+      "    public static String PADDING_PROPERTY = \"padding\";\n"
+      "    private int padding = 5; //default\n"
+      "\n"
+      "    public void setParameterValues(Map parameters) {\n"
+      "        Object padding = parameters.get( PADDING_PROPERTY );\n"
+      "        if (padding != null) this.padding = (Integer) padding;\n"
+      "    }\n"
+      "\n"
+      "    public String objectToString(Object object) {\n"
+      "        String rawInteger = ( (Integer) object ).toString();\n"
+      "        if (rawInteger.length() &gt; padding) \n"
+      "            throw new IllegalArgumentException( \"Try to pad on a number too big\" );\n"
+      "        StringBuilder paddedInteger = new StringBuilder( );\n"
+      "        for ( int padIndex = rawInteger.length() ; padIndex &lt; padding ; padIndex++ ) {\n"
+      "            paddedInteger.append('0');\n"
+      "        }\n"
+      "        return paddedInteger.append( rawInteger ).toString();\n"
+      "    }\n"
+      "\n"
+      "    <emphasis role=\"bold\">public Object stringToObject(String stringValue)</emphasis> {\n"
+      "        return new Integer(stringValue);\n"
+      "    }\n"
+      "}\n"
+      "\n"
+      "\n"
+      "//id property\n"
+      "@DocumentId\n"
+      "@FieldBridge(impl = PaddedIntegerBridge.class,\n"
+      "             params = @Parameter(name=\"padding\", value=\"10\") \n"
+      "private Integer id;"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:932
+#, no-c-format
+msgid "It is critically important for the two-way process to be idempotent (ie object = stringToObject( objectToString( object ) ) )."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:938
+#, no-c-format
+msgid "FieldBridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:940
+#, no-c-format
+msgid "Some use cases require more than a simple object to string translation when mapping a property to a Lucene index. To give you the greatest possible flexibility you can also implement a bridge as a <classname>FieldBridge</classname>. This interface gives you a property value and let you map it the way you want in your Lucene <classname>Document</classname>.The interface is very similar in its concept to the Hibernate<classname> UserType</classname>s."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:948
+#, no-c-format
+msgid "You can for example store a given property in two different document fields:"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:952
+#, no-c-format
+msgid "Implementing the FieldBridge interface in order to a given property into multiple document fields"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:955
+#, no-c-format
+msgid ""
+      "/**\n"
+      " * Store the date in 3 different fields - year, month, day - to ease Range Query per\n"
+      " * year, month or day (eg get all the elements of December for the last 5 years).\n"
+      " * \n"
+      " * @author Emmanuel Bernard\n"
+      " */\n"
+      "public class DateSplitBridge implements FieldBridge {\n"
+      "    private final static TimeZone GMT = TimeZone.getTimeZone(\"GMT\");\n"
+      "\n"
+      "    <emphasis role=\"bold\">public void set(String name, Object value, Document document, \n"
+      "                    LuceneOptions luceneOptions)</emphasis> {\n"
+      "        Date date = (Date) value;\n"
+      "        Calendar cal = GregorianCalendar.getInstance(GMT);\n"
+      "        cal.setTime(date);\n"
+      "        int year = cal.get(Calendar.YEAR);\n"
+      "        int month = cal.get(Calendar.MONTH) + 1;\n"
+      "        int day = cal.get(Calendar.DAY_OF_MONTH);\n"
+      "  \n"
+      "        // set year\n"
+      "        Field field = new Field(name + \".year\", String.valueOf(year),\n"
+      "            luceneOptions.getStore(), luceneOptions.getIndex(),\n"
+      "            luceneOptions.getTermVector());\n"
+      "        field.setBoost(luceneOptions.getBoost());\n"
+      "        document.add(field);\n"
+      "  \n"
+      "        // set month and pad it if needed\n"
+      "        field = new Field(name + \".month\", month &lt; 10 ? \"0\" : \"\"\n"
+      "            + String.valueOf(month), luceneOptions.getStore(),\n"
+      "            luceneOptions.getIndex(), luceneOptions.getTermVector());\n"
+      "        field.setBoost(luceneOptions.getBoost());\n"
+      "        document.add(field);\n"
+      "  \n"
+      "        // set day and pad it if needed\n"
+      "        field = new Field(name + \".day\", day &lt; 10 ? \"0\" : \"\"\n"
+      "            + String.valueOf(day), luceneOptions.getStore(),\n"
+      "            luceneOptions.getIndex(), luceneOptions.getTermVector());\n"
+      "        field.setBoost(luceneOptions.getBoost());\n"
+      "        document.add(field);\n"
+      "    }\n"
+      "}\n"
+      "\n"
+      "//property\n"
+      "<emphasis role=\"bold\">@FieldBridge(impl = DateSplitBridge.class)</emphasis>\n"
+      "private Date date;"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:960
+#, no-c-format
+msgid "ClassBridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:962
+#, no-c-format
+msgid "It is sometimes useful to combine more than one property of a given entity and index this combination in a specific way into the Lucene index. The <classname>@ClassBridge</classname> and <classname>@ClassBridge</classname> annotations can be defined at the class level (as opposed to the property level). In this case the custom field bridge implementation receives the entity instance as the value parameter instead of a particular property. Though not shown in this example, <classname>@ClassBridge</classname> supports the <methodname>termVector</methodname> attribute discussed in section <xref linkend=\"basic-mapping\"/>."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:974
+#, no-c-format
+msgid "Implementing a class bridge"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:976
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed\n"
+      "<emphasis role=\"bold\">@ClassBridge</emphasis>(name=\"branchnetwork\",\n"
+      "             index=Index.TOKENIZED,\n"
+      "             store=Store.YES,\n"
+      "             impl = <emphasis role=\"bold\">CatFieldsClassBridge.class</emphasis>,\n"
+      "             params = @Parameter( name=\"sepChar\", value=\" \" ) )\n"
+      "public class Department {\n"
+      "    private int id;\n"
+      "    private String network;\n"
+      "    private String branchHead;\n"
+      "    private String branch;\n"
+      "    private Integer maxEmployees\n"
+      "    ...\n"
+      "}\n"
+      "\n"
+      "\n"
+      "public class CatFieldsClassBridge implements FieldBridge, ParameterizedBridge {\n"
+      "    private String sepChar;\n"
+      "\n"
+      "    public void setParameterValues(Map parameters) {\n"
+      "        this.sepChar = (String) parameters.get( \"sepChar\" );\n"
+      "    }\n"
+      "\n"
+      "    <emphasis role=\"bold\">public void set(String name, Object value, Document document, LuceneOptions luceneOptions)</emphasis> {\n"
+      "        // In this particular class the name of the new field was passed\n"
+      "        // from the name field of the ClassBridge Annotation. This is not\n"
+      "        // a requirement. It just works that way in this instance. The\n"
+      "        // actual name could be supplied by hard coding it below.\n"
+      "        Department dep = (Department) value;\n"
+      "        String fieldValue1 = dep.getBranch();\n"
+      "        if ( fieldValue1 == null ) {\n"
+      "            fieldValue1 = \"\";\n"
+      "        }\n"
+      "        String fieldValue2 = dep.getNetwork();\n"
+      "        if ( fieldValue2 == null ) {\n"
+      "            fieldValue2 = \"\";\n"
+      "        }\n"
+      "        String fieldValue = fieldValue1 + sepChar + fieldValue2;\n"
+      "        Field field = new Field( name, fieldValue, luceneOptions.getStore(), luceneOptions.getIndex(), luceneOptions.getTermVector() );\n"
+      "        field.setBoost( luceneOptions.getBoost() );\n"
+      "        document.add( field );\n"
+      "   }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:979
+#, no-c-format
+msgid "In this example, the particular <classname>CatFieldsClassBridge</classname> is applied to the <literal>department</literal> instance, the field bridge then concatenate both branch and network and index the concatenation."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:989 mapping.xml:1014
+#, no-c-format
+msgid "Providing your own id"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:992
+#, no-c-format
+msgid "This part of the documentation is a work in progress."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:995
+#, no-c-format
+msgid "You can provide your own id for Hibernate Search if you are extending the internals. You will have to generate a unique value so it can be given to Lucene to be indexed. This will have to be given to Hibernate Search when you create an org.hibernate.search.Work object - the document id is required in the constructor."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:1002
+#, no-c-format
+msgid "The ProvidedId annotation"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:1004
+#, no-c-format
+msgid "Unlike conventional Hibernate Search API and @DocumentId, this annotation is used on the class and not a field. You also can provide your own bridge implementation when you put in this annotation by calling the bridge() which is on @ProvidedId. Also, if you annotate a class with @ProvidedId, your subclasses will also get the annotation - but it is not done by using the java.lang.annotations. at Inherited. Be sure however, to <emphasis>not</emphasis> use this annotation with @DocumentId as your system will break."
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:1016
+#, no-c-format
+msgid ""
+      "@ProvidedId (bridge = org.my.own.package.MyCustomBridge)\n"
+      "@Indexed\n"
+      "public class MyClass{\n"
+      "    @Field\n"
+      "    String MyString;\n"
+      "    ...\n"
+      "}"
+msgstr ""
+


Property changes on: search/trunk/src/main/docbook/pot/modules/mapping.pot
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/pot/modules/optimize.pot
===================================================================
--- search/trunk/src/main/docbook/pot/modules/optimize.pot	                        (rev 0)
+++ search/trunk/src/main/docbook/pot/modules/optimize.pot	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,175 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: optimize.xml:30
+#, no-c-format
+msgid "Index Optimization"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:32
+#, no-c-format
+msgid "From time to time, the Lucene index needs to be optimized. The process is essentially a defragmentation. Until an optimization is triggered Lucene only marks deleted documents as such, no physical deletions are applied. During the optimization process the deletions will be applied which also effects the number of files in the Lucene Directory."
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:38
+#, no-c-format
+msgid "Optimizing the Lucene index speeds up searches but has no effect on the indexation (update) performance. During an optimization, searches can be performed, but will most likely be slowed down. All index updates will be stopped. It is recommended to schedule optimization:"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:45
+#, no-c-format
+msgid "on an idle system or when the searches are less frequent"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:49
+#, no-c-format
+msgid "after a lot of index modifications"
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:54
+#, no-c-format
+msgid "Automatic optimization"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:56
+#, no-c-format
+msgid "Hibernate Search can automatically optimize an index after:"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:60
+#, no-c-format
+msgid "a certain amount of operations (insertion, deletion)"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:64
+#, no-c-format
+msgid "or a certain amount of transactions"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:68
+#, no-c-format
+msgid "The configuration for automatic index optimization can be defined on a global level or per index:"
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:72
+#, no-c-format
+msgid "Defining automatic optimization parameters"
+msgstr ""
+
+#. Tag: programlisting
+#: optimize.xml:74
+#, no-c-format
+msgid ""
+      "hibernate.search.default.optimizer.operation_limit.max = 1000\n"
+      "hibernate.search.default.optimizer.transaction_limit.max = 100\n"
+      "hibernate.search.Animal.optimizer.transaction_limit.max = 50"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:77
+#, no-c-format
+msgid "An optimization will be triggered to the <literal>Animal</literal> index as soon as either:"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:82
+#, no-c-format
+msgid "the number of additions and deletions reaches 1000"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:86
+#, no-c-format
+msgid "the number of transactions reaches 50 (<constant>hibernate.search.Animal.optimizer.transaction_limit.max</constant> having priority over <constant>hibernate.search.default.optimizer.transaction_limit.max</constant>)"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:93
+#, no-c-format
+msgid "If none of these parameters are defined, no optimization is processed automatically."
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:98
+#, no-c-format
+msgid "Manual optimization"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:100
+#, no-c-format
+msgid "You can programmatically optimize (defragment) a Lucene index from Hibernate Search through the <classname>SearchFactory</classname>:"
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:104
+#, no-c-format
+msgid "Programmatic index optimization"
+msgstr ""
+
+#. Tag: programlisting
+#: optimize.xml:106
+#, no-c-format
+msgid ""
+      "FullTextSession fullTextSession = Search.getFullTextSession(regularSession);\n"
+      "SearchFactory searchFactory = fullTextSession.getSearchFactory();\n"
+      "\n"
+      "searchFactory.optimize(Order.class);\n"
+      "// or\n"
+      "searchFactory.optimize();"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:109
+#, no-c-format
+msgid "The first example optimizes the Lucene index holding <classname>Order</classname>s; the second, optimizes all indexes."
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:113
+#, no-c-format
+msgid "<literal>searchFactory.optimize()</literal> has no effect on a JMS backend. You must apply the optimize operation on the Master node."
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:120
+#, no-c-format
+msgid "Adjusting optimization"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:122
+#, no-c-format
+msgid "Apache Lucene has a few parameters to influence how optimization is performed. Hibernate Search exposes those parameters."
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:125
+#, no-c-format
+msgid "Further index optimization parameters include: <itemizedlist> <listitem> <literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|transaction].max_buffered_docs</literal> </listitem> <listitem> <literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|transaction].max_field_length</literal> </listitem> <listitem> <literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|transaction].max_merge_docs</literal> </listitem> <listitem> <literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|transaction].merge_factor</literal> </listitem> <listitem> <literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|transaction].ram_buffer_size</literal> </listitem> <listitem> <literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|transaction].term_index_interval</literal> </listitem> </itemizedlist> See <xref linkend=\"lucene-indexing-performance\"/> for more details."
+msgstr ""
+


Property changes on: search/trunk/src/main/docbook/pot/modules/optimize.pot
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/pot/modules/query.pot
===================================================================
--- search/trunk/src/main/docbook/pot/modules/query.pot	                        (rev 0)
+++ search/trunk/src/main/docbook/pot/modules/query.pot	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,1048 @@
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <kde-i18n-doc at kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: application/x-xml2pot; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: query.xml:30
+#, no-c-format
+msgid "Querying"
+msgstr ""
+
+#. Tag: para
+#: query.xml:32
+#, no-c-format
+msgid "The second most important capability of Hibernate Search is the ability to execute a Lucene query and retrieve entities managed by an Hibernate session, providing the power of Lucene without leaving the Hibernate paradigm, and giving another dimension to the Hibernate classic search mechanisms (HQL, Criteria query, native SQL query). Preparing and executing a query consists of four simple steps:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:41
+#, no-c-format
+msgid "Creating a <classname>FullTextSession</classname>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:45
+#, no-c-format
+msgid "<para>Creating a Lucene query</para>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:49
+#, no-c-format
+msgid "Wrapping the Lucene query using a <classname>org.hibernate.Query</classname>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:54
+#, no-c-format
+msgid "Executing the search by calling for example <methodname>list()</methodname> or <methodname>scroll()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:60
+#, no-c-format
+msgid "To access the querying facilities, you have to use an <classname>FullTextSession</classname>. This Search specific session wraps a regular <classname>org.hibernate.Session</classname> to provide query and indexing capabilities."
+msgstr ""
+
+#. Tag: title
+#: query.xml:66
+#, no-c-format
+msgid "Creating a FullTextSession"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:68
+#, no-c-format
+msgid ""
+      "Session session = sessionFactory.openSession();\n"
+      "...\n"
+      "FullTextSession fullTextSession = Search.getFullTextSession(session);"
+msgstr ""
+
+#. Tag: para
+#: query.xml:71
+#, no-c-format
+msgid "The actual search facility is built on native Lucene queries which the following example illustrates."
+msgstr ""
+
+#. Tag: title
+#: query.xml:75
+#, no-c-format
+msgid "<title>Creating a Lucene query</title>"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:77
+#, no-c-format
+msgid ""
+      "org.apache.lucene.queryParser.QueryParser parser = \n"
+      "    new QueryParser(\"title\", new StopAnalyzer() );\n"
+      "\n"
+      "org.apache.lucene.search.Query luceneQuery = parser.parse( \"summary:Festina Or brand:Seiko\" );\n"
+      "<emphasis role=\"bold\">org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery );\n"
+      "        </emphasis>\n"
+      "List result = fullTextQuery.list(); //return a list of managed objects"
+msgstr ""
+
+#. Tag: para
+#: query.xml:80
+#, no-c-format
+msgid "The Hibernate query built on top of the Lucene query is a regular <literal>org.hibernate.Query</literal>, which means you are in the same paradigm as the other Hibernate query facilities (HQL, Native or Criteria). The regular <literal>list()</literal> , <literal>uniqueResult()</literal>, <literal>iterate()</literal> and <literal>scroll()</literal> methods can be used."
+msgstr ""
+
+#. Tag: para
+#: query.xml:87
+#, no-c-format
+msgid "In case you are using the Java Persistence APIs of Hibernate (aka EJB 3.0 Persistence), the same extensions exist:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:91
+#, no-c-format
+msgid "Creating a Search query using the JPA API"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:93
+#, no-c-format
+msgid ""
+      "EntityManager em = entityManagerFactory.createEntityManager();\n"
+      "\n"
+      "FullTextEntityManager fullTextEntityManager = \n"
+      "    org.hibernate.hibernate.search.jpa.Search.getFullTextEntityManager(em);\n"
+      "\n"
+      "...\n"
+      "org.apache.lucene.queryParser.QueryParser parser = \n"
+      "    new QueryParser(\"title\", new StopAnalyzer() );\n"
+      "\n"
+      "org.apache.lucene.search.Query luceneQuery = parser.parse( \"summary:Festina Or brand:Seiko\" );\n"
+      "<emphasis role=\"bold\">javax.persistence.Query fullTextQuery = fullTextEntityManager.createFullTextQuery( luceneQuery );</emphasis>\n"
+      "\n"
+      "List result = fullTextQuery.getResultList(); //return a list of managed objects"
+msgstr ""
+
+#. Tag: para
+#: query.xml:96
+#, no-c-format
+msgid "The following examples we will use the Hibernate APIs but the same example can be easily rewritten with the Java Persistence API by just adjusting the way the <classname>FullTextQuery</classname> is retrieved."
+msgstr ""
+
+#. Tag: title
+#: query.xml:102
+#, no-c-format
+msgid "Building queries"
+msgstr ""
+
+#. Tag: para
+#: query.xml:104
+#, no-c-format
+msgid "Hibernate Search queries are built on top of Lucene queries which gives you total freedom on the type of Lucene query you want to execute. However, once built, Hibernate Search wraps further query processing using <classname>org.hibernate.Query</classname> as your primary query manipulation API."
+msgstr ""
+
+#. Tag: title
+#: query.xml:111
+#, no-c-format
+msgid "Building a Lucene query"
+msgstr ""
+
+#. Tag: para
+#: query.xml:113
+#, no-c-format
+msgid "It is out of the scope of this documentation on how to exactly build a Lucene query. Please refer to the online Lucene documentation or get hold of a copy of either Lucene In Action or Hibernate Search in Action."
+msgstr ""
+
+#. Tag: title
+#: query.xml:120
+#, no-c-format
+msgid "Building a Hibernate Search query"
+msgstr ""
+
+#. Tag: title
+#: query.xml:123
+#, no-c-format
+msgid "Generality"
+msgstr ""
+
+#. Tag: para
+#: query.xml:125
+#, no-c-format
+msgid "Once the Lucene query is built, it needs to be wrapped into an Hibernate Query."
+msgstr ""
+
+#. Tag: title
+#: query.xml:129
+#, no-c-format
+msgid "Wrapping a Lucene query into a Hibernate Query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:131
+#, no-c-format
+msgid ""
+      "FullTextSession fullTextSession = Search.getFullTextSession( session );\n"
+      "org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery );"
+msgstr ""
+
+#. Tag: para
+#: query.xml:134
+#, no-c-format
+msgid "If not specified otherwise, the query will be executed against all indexed entities, potentially returning all types of indexed classes. It is advised, from a performance point of view, to restrict the returned types:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:140
+#, no-c-format
+msgid "Filtering the search result by entity type"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:142
+#, no-c-format
+msgid ""
+      "org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery, Customer.class );\n"
+      "// or\n"
+      "fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery, Item.class, Actor.class );"
+msgstr ""
+
+#. Tag: para
+#: query.xml:145
+#, no-c-format
+msgid "The first example returns only matching <classname>Customer</classname>s, the second returns matching <classname>Actor</classname>s and <classname>Item</classname>s. The type restriction is fully polymorphic which means that if there are two indexed subclasses <classname>Salesman</classname> and <classname>Customer</classname> of the baseclass <classname>Person</classname>, it is possible to just specify <classname>Person.class</classname> in order to filter on result types."
+msgstr ""
+
+#. Tag: title
+#: query.xml:157
+#, no-c-format
+msgid "Pagination"
+msgstr ""
+
+#. Tag: para
+#: query.xml:159
+#, no-c-format
+msgid "Out of performance reasons it is recommended to restrict the number of returned objects per query. In fact is a very common use case anyway that the user navigates from one page to an other. The way to define pagination is exactly the way you would define pagination in a plain HQL or Criteria query."
+msgstr ""
+
+#. Tag: title
+#: query.xml:166
+#, no-c-format
+msgid "Defining pagination for a search query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:168
+#, no-c-format
+msgid ""
+      "org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery, Customer.class );\n"
+      "fullTextQuery.setFirstResult(15); //start from the 15th element\n"
+      "fullTextQuery.setMaxResults(10); //return 10 elements"
+msgstr ""
+
+#. Tag: para
+#: query.xml:172
+#, no-c-format
+msgid "It is still possible to get the total number of matching elements regardless of the pagination via <methodname>fulltextQuery.</methodname><methodname>getResultSize()</methodname>"
+msgstr ""
+
+#. Tag: title
+#: query.xml:179
+#, no-c-format
+msgid "Sorting"
+msgstr ""
+
+#. Tag: para
+#: query.xml:181
+#, no-c-format
+msgid "Apache Lucene provides a very flexible and powerful way to sort results. While the default sorting (by relevance) is appropriate most of the time, it can be interesting to sort by one or several other properties. In order to do so set the Lucene Sort object to apply a Lucene sorting strategy."
+msgstr ""
+
+#. Tag: title
+#: query.xml:188
+#, no-c-format
+msgid "Specifying a Lucene <classname>Sort</classname> in order to sort the results"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:191
+#, no-c-format
+msgid ""
+      "org.hibernate.search.FullTextQuery query = s.createFullTextQuery( query, Book.class );\n"
+      "org.apache.lucene.search.Sort sort = new Sort(new SortField(\"title\"));\n"
+      "<emphasis role=\"bold\">query.setSort(sort);</emphasis>\n"
+      "List results = query.list();"
+msgstr ""
+
+#. Tag: para
+#: query.xml:194
+#, no-c-format
+msgid "One can notice the <classname>FullTextQuery</classname> interface which is a sub interface of <classname>org.hibernate.Query</classname>. Be aware that fields used for sorting must not be tokenized."
+msgstr ""
+
+#. Tag: title
+#: query.xml:201
+#, no-c-format
+msgid "Fetching strategy"
+msgstr ""
+
+#. Tag: para
+#: query.xml:203
+#, no-c-format
+msgid "When you restrict the return types to one class, Hibernate Search loads the objects using a single query. It also respects the static fetching strategy defined in your domain model."
+msgstr ""
+
+#. Tag: para
+#: query.xml:207
+#, no-c-format
+msgid "It is often useful, however, to refine the fetching strategy for a specific use case."
+msgstr ""
+
+#. Tag: title
+#: query.xml:211
+#, no-c-format
+msgid "Specifying <classname>FetchMode</classname> on a query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:214
+#, no-c-format
+msgid ""
+      "Criteria criteria = s.createCriteria( Book.class ).setFetchMode( \"authors\", FetchMode.JOIN );\n"
+      "s.createFullTextQuery( luceneQuery ).setCriteriaQuery( criteria );"
+msgstr ""
+
+#. Tag: para
+#: query.xml:217
+#, no-c-format
+msgid "In this example, the query will return all Books matching the luceneQuery. The authors collection will be loaded from the same query using an SQL outer join."
+msgstr ""
+
+#. Tag: para
+#: query.xml:221
+#, no-c-format
+msgid "When defining a criteria query, it is not needed to restrict the entity types returned while creating the Hibernate Search query from the full text session: the type is guessed from the criteria query itself. Only fetch mode can be adjusted, refrain from applying any other restriction."
+msgstr ""
+
+#. Tag: para
+#: query.xml:227
+#, no-c-format
+msgid "One cannot use <methodname>setCriteriaQuery</methodname> if more than one entity type is expected to be returned."
+msgstr ""
+
+#. Tag: title
+#: query.xml:232
+#, no-c-format
+msgid "Projection"
+msgstr ""
+
+#. Tag: para
+#: query.xml:234
+#, no-c-format
+msgid "For some use cases, returning the domain object (graph) is overkill. Only a small subset of the properties is necessary. Hibernate Search allows you to return a subset of properties:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:239
+#, no-c-format
+msgid "Using projection instead of returning the full domain object"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:242
+#, no-c-format
+msgid ""
+      "org.hibernate.search.FullTextQuery query = s.createFullTextQuery( luceneQuery, Book.class );\n"
+      "query.<emphasis role=\"bold\">setProjection( \"id\", \"summary\", \"body\", \"mainAuthor.name\" )</emphasis>;\n"
+      "List results = query.list();\n"
+      "Object[] firstResult = (Object[]) results.get(0);\n"
+      "Integer id = firstResult[0];\n"
+      "String summary = firstResult[1];\n"
+      "String body = firstResult[2];\n"
+      "String authorName = firstResult[3];"
+msgstr ""
+
+#. Tag: para
+#: query.xml:245
+#, no-c-format
+msgid "Hibernate Search extracts the properties from the Lucene index and convert them back to their object representation, returning a list of <classname>Object[]</classname>. Projections avoid a potential database round trip (useful if the query response time is critical), but has some constraints:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:253
+#, no-c-format
+msgid "the properties projected must be stored in the index (<literal>@Field(store=Store.YES)</literal>), which increase the index size"
+msgstr ""
+
+#. Tag: para
+#: query.xml:259
+#, no-c-format
+msgid "the properties projected must use a <literal>FieldBridge</literal> implementing <classname>org.hibernate.search.bridge.TwoWayFieldBridge</classname> or <literal>org.hibernate.search.bridge.TwoWayStringBridge</literal>, the latter being the simpler version. All Hibernate Search built-in types are two-way."
+msgstr ""
+
+#. Tag: para
+#: query.xml:269
+#, no-c-format
+msgid "you can only project simple properties of the indexed entity or its embedded associations. This means you cannot project a whole embedded entity."
+msgstr ""
+
+#. Tag: para
+#: query.xml:275
+#, no-c-format
+msgid "projection does not work on collections or maps which are indexed via <classname>@IndexedEmbedded</classname>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:280
+#, no-c-format
+msgid "Projection is useful for another kind of use cases. Lucene provides some metadata information to the user about the results. By using some special placeholders, the projection mechanism can retrieve them:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:286
+#, no-c-format
+msgid "Using projection in order to retrieve meta data"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:288
+#, no-c-format
+msgid ""
+      "org.hibernate.search.FullTextQuery query = s.createFullTextQuery( luceneQuery, Book.class );\n"
+      "query.<emphasis role=\"bold\">setProjection( FullTextQuery.SCORE, FullTextQuery.THIS, \"mainAuthor.name\" )</emphasis>;\n"
+      "List results = query.list();\n"
+      "Object[] firstResult = (Object[]) results.get(0);\n"
+      "float score = firstResult[0];\n"
+      "Book book = firstResult[1];\n"
+      "String authorName = firstResult[2];"
+msgstr ""
+
+#. Tag: para
+#: query.xml:291
+#, no-c-format
+msgid "You can mix and match regular fields and special placeholders. Here is the list of available placeholders:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:296
+#, no-c-format
+msgid "FullTextQuery.THIS: returns the initialized and managed entity (as a non projected query would have done)."
+msgstr ""
+
+#. Tag: para
+#: query.xml:301
+#, no-c-format
+msgid "FullTextQuery.DOCUMENT: returns the Lucene Document related to the object projected."
+msgstr ""
+
+#. Tag: para
+#: query.xml:306
+#, no-c-format
+msgid "FullTextQuery.OBJECT_CLASS: returns the class of the indexed entity."
+msgstr ""
+
+#. Tag: para
+#: query.xml:311
+#, no-c-format
+msgid "FullTextQuery.SCORE: returns the document score in the query. Scores are handy to compare one result against an other for a given query but are useless when comparing the result of different queries."
+msgstr ""
+
+#. Tag: para
+#: query.xml:318
+#, no-c-format
+msgid "FullTextQuery.ID: the id property value of the projected object."
+msgstr ""
+
+#. Tag: para
+#: query.xml:323
+#, no-c-format
+msgid "FullTextQuery.DOCUMENT_ID: the Lucene document id. Careful, Lucene document id can change overtime between two different IndexReader opening (this feature is experimental)."
+msgstr ""
+
+#. Tag: para
+#: query.xml:329
+#, no-c-format
+msgid "FullTextQuery.EXPLANATION: returns the Lucene Explanation object for the matching object/document in the given query. Do not use if you retrieve a lot of data. Running explanation typically is as costly as running the whole Lucene query per matching element. Make sure you use projection!"
+msgstr ""
+
+#. Tag: title
+#: query.xml:341
+#, no-c-format
+msgid "Retrieving the results"
+msgstr ""
+
+#. Tag: para
+#: query.xml:343
+#, no-c-format
+msgid "Once the Hibernate Search query is built, executing it is in no way different than executing a HQL or Criteria query. The same paradigm and object semantic applies. All the common operations are available: <methodname>list()</methodname>, <methodname>uniqueResult()</methodname>, <methodname>iterate()</methodname>, <methodname>scroll()</methodname>."
+msgstr ""
+
+#. Tag: title
+#: query.xml:351
+#, no-c-format
+msgid "Performance considerations"
+msgstr ""
+
+#. Tag: para
+#: query.xml:353
+#, no-c-format
+msgid "If you expect a reasonable number of results (for example using pagination) and expect to work on all of them, <methodname>list()</methodname> or <methodname>uniqueResult()</methodname> are recommended. <methodname>list()</methodname> work best if the entity <literal>batch-size</literal> is set up properly. Note that Hibernate Search has to process all Lucene Hits elements (within the pagination) when using <methodname>list()</methodname> , <methodname>uniqueResult()</methodname> and <methodname>iterate()</methodname>."
+msgstr ""
+
+#. Tag: para
+#: query.xml:364
+#, no-c-format
+msgid "If you wish to minimize Lucene document loading, <methodname>scroll()</methodname> is more appropriate. Don't forget to close the <classname>ScrollableResults</classname> object when you're done, since it keeps Lucene resources. If you expect to use <methodname>scroll,</methodname> but wish to load objects in batch, you can use <methodname>query.setFetchSize()</methodname>. When an object is accessed, and if not already loaded, Hibernate Search will load the next <literal>fetchSize</literal> objects in one pass."
+msgstr ""
+
+#. Tag: para
+#: query.xml:373
+#, no-c-format
+msgid "Pagination is a preferred method over scrolling though."
+msgstr ""
+
+#. Tag: title
+#: query.xml:377
+#, no-c-format
+msgid "Result size"
+msgstr ""
+
+#. Tag: para
+#: query.xml:379
+#, no-c-format
+msgid "It is sometime useful to know the total number of matching documents:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:384
+#, no-c-format
+msgid "for the Google-like feature 1-10 of about 888,000,000"
+msgstr ""
+
+#. Tag: para
+#: query.xml:388
+#, no-c-format
+msgid "to implement a fast pagination navigation"
+msgstr ""
+
+#. Tag: para
+#: query.xml:392
+#, no-c-format
+msgid "to implement a multi step search engine (adding approximation if the restricted query return no or not enough results)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:397
+#, no-c-format
+msgid "Of course it would be too costly to retrieve all the matching documents. Hibernate Search allows you to retrieve the total number of matching documents regardless of the pagination parameters. Even more interesting, you can retrieve the number of matching elements without triggering a single object load."
+msgstr ""
+
+#. Tag: title
+#: query.xml:404
+#, no-c-format
+msgid "Determining the result size of a query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:406
+#, no-c-format
+msgid ""
+      "org.hibernate.search.FullTextQuery query = s.createFullTextQuery( luceneQuery, Book.class );\n"
+      "assert 3245 == <emphasis role=\"bold\">query.getResultSize()</emphasis>; //return the number of matching books without loading a single one\n"
+      "\n"
+      "org.hibernate.search.FullTextQuery query = s.createFullTextQuery( luceneQuery, Book.class );\n"
+      "query.setMaxResult(10);\n"
+      "List results = query.list();\n"
+      "assert 3245 == <emphasis role=\"bold\">query.getResultSize()</emphasis>; //return the total number of matching books regardless of pagination"
+msgstr ""
+
+#. Tag: para
+#: query.xml:410
+#, no-c-format
+msgid "Like Google, the number of results is approximative if the index is not fully up-to-date with the database (asynchronous cluster for example)."
+msgstr ""
+
+#. Tag: title
+#: query.xml:417
+#, no-c-format
+msgid "ResultTransformer"
+msgstr ""
+
+#. Tag: para
+#: query.xml:419
+#, no-c-format
+msgid "Especially when using projection, the data structure returned by a query (an object array in this case), is not always matching the application needs. It is possible to apply a <classname>ResultTransformer</classname> operation post query to match the targeted data structure:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:426
+#, no-c-format
+msgid "Using ResultTransformer in conjunction with projections"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:428
+#, no-c-format
+msgid ""
+      "org.hibernate.search.FullTextQuery query = s.createFullTextQuery( luceneQuery, Book.class );\n"
+      "query.setProjection( \"title\", \"mainAuthor.name\" );\n"
+      "\n"
+      "<emphasis role=\"bold\">query.setResultTransformer( \n"
+      "    new StaticAliasToBeanResultTransformer( BookView.class, \"title\", \"author\" ) \n"
+      ");</emphasis>\n"
+      "List&lt;BookView&gt; results = (List&lt;BookView&gt;) query.list();\n"
+      "for(BookView view : results) {\n"
+      "    log.info( \"Book: \" + view.getTitle() + \", \" + view.getAuthor() );\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:431
+#, no-c-format
+msgid "Examples of <classname>ResultTransformer</classname> implementations can be found in the Hibernate Core codebase."
+msgstr ""
+
+#. Tag: title
+#: query.xml:436
+#, no-c-format
+msgid "Understanding results"
+msgstr ""
+
+#. Tag: para
+#: query.xml:438
+#, no-c-format
+msgid "You will find yourself sometimes puzzled by a result showing up in a query or a result not showing up in a query. Luke is a great tool to understand those mysteries. However, Hibernate Search also gives you access to the Lucene <classname>Explanation</classname> object for a given result (in a given query). This class is considered fairly advanced to Lucene users but can provide a good understanding of the scoring of an object. You have two ways to access the Explanation object for a given result:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:449
+#, no-c-format
+msgid "Use the <methodname>fullTextQuery.explain(int)</methodname> method"
+msgstr ""
+
+#. Tag: para
+#: query.xml:454
+#, no-c-format
+msgid "Use projection"
+msgstr ""
+
+#. Tag: para
+#: query.xml:458
+#, no-c-format
+msgid "The first approach takes a document id as a parameter and return the Explanation object. The document id can be retrieved using projection and the <literal>FullTextQuery.DOCUMENT_ID</literal> constant."
+msgstr ""
+
+#. Tag: para
+#: query.xml:464
+#, no-c-format
+msgid "The Document id has nothing to do with the entity id. Do not mess up these two notions."
+msgstr ""
+
+#. Tag: para
+#: query.xml:468
+#, no-c-format
+msgid "The second approach let's you project the <classname>Explanation</classname> object using the <literal>FullTextQuery.EXPLANATION</literal> constant."
+msgstr ""
+
+#. Tag: title
+#: query.xml:473
+#, no-c-format
+msgid "Retrieving the Lucene Explanation object using projection"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:476
+#, no-c-format
+msgid ""
+      "FullTextQuery ftQuery = s.createFullTextQuery( luceneQuery, Dvd.class )\n"
+      "        .setProjection( FullTextQuery.DOCUMENT_ID, <emphasis role=\"bold\">FullTextQuery.EXPLANATION</emphasis>, FullTextQuery.THIS );\n"
+      "@SuppressWarnings(\"unchecked\") List&lt;Object[]&gt; results = ftQuery.list();\n"
+      "for (Object[] result : results) {\n"
+      "    Explanation e = (Explanation) result[1];\n"
+      "    display( e.toString() );\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:479
+#, no-c-format
+msgid "Be careful, building the explanation object is quite expensive, it is roughly as expensive as running the Lucene query again. Don't do it if you don't need the object"
+msgstr ""
+
+#. Tag: title
+#: query.xml:486
+#, no-c-format
+msgid "Filters"
+msgstr ""
+
+#. Tag: para
+#: query.xml:488
+#, no-c-format
+msgid "Apache Lucene has a powerful feature that allows to filter query results according to a custom filtering process. This is a very powerful way to apply additional data restrictions, especially since filters can be cached and reused. Some interesting use cases are:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:495
+#, no-c-format
+msgid "security"
+msgstr ""
+
+#. Tag: para
+#: query.xml:499
+#, no-c-format
+msgid "temporal data (eg. view only last month's data)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:503
+#, no-c-format
+msgid "population filter (eg. search limited to a given category)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:508
+#, no-c-format
+msgid "and many more"
+msgstr ""
+
+#. Tag: para
+#: query.xml:512
+#, no-c-format
+msgid "Hibernate Search pushes the concept further by introducing the notion of parameterizable named filters which are transparently cached. For people familiar with the notion of Hibernate Core filters, the API is very similar:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:518
+#, no-c-format
+msgid "Enabling fulltext filters for a given query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:520
+#, no-c-format
+msgid ""
+      "fullTextQuery = s.createFullTextQuery( query, Driver.class );\n"
+      "fullTextQuery.enableFullTextFilter(\"bestDriver\");\n"
+      "fullTextQuery.enableFullTextFilter(\"security\").setParameter( \"login\", \"andre\" );\n"
+      "fullTextQuery.list(); //returns only best drivers where andre has credentials"
+msgstr ""
+
+#. Tag: para
+#: query.xml:523
+#, no-c-format
+msgid "In this example we enabled two filters on top of the query. You can enable (or disable) as many filters as you like."
+msgstr ""
+
+#. Tag: para
+#: query.xml:526
+#, no-c-format
+msgid "Declaring filters is done through the <classname>@FullTextFilterDef</classname> annotation. This annotation can be on any <literal>@Indexed</literal> entity regardless of the query the filter is later applied to. This implies that filter definitions are global and their names must be unique. A <classname>SearchException</classname> is thrown in case two different <classname>@FullTextFilterDef</classname> annotations with the same name are defined. Each named filter has to specify its actual filter implementation."
+msgstr ""
+
+#. Tag: title
+#: query.xml:537
+#, no-c-format
+msgid "Defining and implementing a Filter"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:539
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed\n"
+      "@FullTextFilterDefs( {\n"
+      "    <emphasis role=\"bold\">@FullTextFilterDef(name = \"bestDriver\", impl = BestDriversFilter.class)</emphasis>, \n"
+      "    <emphasis role=\"bold\">@FullTextFilterDef(name = \"security\", impl = SecurityFilterFactory.class)</emphasis> \n"
+      "})\n"
+      "public class Driver { ... }"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:541
+#, no-c-format
+msgid ""
+      "public class BestDriversFilter extends <emphasis\n"
+      "          role=\"bold\">org.apache.lucene.search.Filter</emphasis> {\n"
+      "\n"
+      "    public DocIdSet getDocIdSet(IndexReader reader) throws IOException {\n"
+      "        OpenBitSet bitSet = new OpenBitSet( reader.maxDoc() );\n"
+      "        TermDocs termDocs = reader.termDocs( new Term( \"score\", \"5\" ) );\n"
+      "        while ( termDocs.next() ) {\n"
+      "            bitSet.set( termDocs.doc() );\n"
+      "        }\n"
+      "        return bitSet;\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:544
+#, no-c-format
+msgid "<classname>BestDriversFilter</classname> is an example of a simple Lucene filter which reduces the result set to drivers whose score is 5. In this example the specified filter implements the <literal>org.apache.lucene.search.Filter</literal> directly and contains a no-arg constructor."
+msgstr ""
+
+#. Tag: para
+#: query.xml:550
+#, no-c-format
+msgid "If your Filter creation requires additional steps or if the filter you want to use does not have a no-arg constructor, you can use the factory pattern:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:555
+#, no-c-format
+msgid "Creating a filter using the factory pattern"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:557
+#, no-c-format
+msgid ""
+      "@Entity\n"
+      "@Indexed\n"
+      "@FullTextFilterDef(name = \"bestDriver\", impl = BestDriversFilterFactory.class)\n"
+      "public class Driver { ... }\n"
+      "\n"
+      "public class BestDriversFilterFactory {\n"
+      "\n"
+      "    <emphasis role=\"bold\">@Factory</emphasis>\n"
+      "    public Filter getFilter() {\n"
+      "        //some additional steps to cache the filter results per IndexReader\n"
+      "        Filter bestDriversFilter = new BestDriversFilter();\n"
+      "        return new CachingWrapperFilter(bestDriversFilter);\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:560
+#, no-c-format
+msgid "Hibernate Search will look for a <literal>@Factory</literal> annotated method and use it to build the filter instance. The factory must have a no-arg constructor. For people familiar with JBoss Seam, this is similar to the component factory pattern, but the annotation is different!"
+msgstr ""
+
+#. Tag: para
+#: query.xml:566
+#, no-c-format
+msgid "Named filters come in handy where parameters have to be passed to the filter. For example a security filter might want to know which security level you want to apply:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:571
+#, no-c-format
+msgid "Passing parameters to a defined filter"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:573
+#, no-c-format
+msgid ""
+      "fullTextQuery = s.createFullTextQuery( query, Driver.class );\n"
+      "fullTextQuery.enableFullTextFilter(\"security\")<emphasis role=\"bold\">.setParameter( \"level\", 5 )</emphasis>;"
+msgstr ""
+
+#. Tag: para
+#: query.xml:576
+#, no-c-format
+msgid "Each parameter name should have an associated setter on either the filter or filter factory of the targeted named filter definition."
+msgstr ""
+
+#. Tag: title
+#: query.xml:580
+#, no-c-format
+msgid "Using parameters in the actual filter implementation"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:582
+#, no-c-format
+msgid ""
+      "public class SecurityFilterFactory {\n"
+      "    private Integer level;\n"
+      "\n"
+      "    /**\n"
+      "     * injected parameter\n"
+      "     */\n"
+      "    <emphasis role=\"bold\">public void setLevel(Integer level)</emphasis> {\n"
+      "        this.level = level;\n"
+      "    }\n"
+      "\n"
+      "    <emphasis role=\"bold\">@Key\n"
+      "    public FilterKey getKey()</emphasis> {\n"
+      "        StandardFilterKey key = new StandardFilterKey();\n"
+      "        key.addParameter( level );\n"
+      "        return key;\n"
+      "    }\n"
+      "\n"
+      "    @Factory\n"
+      "    public Filter getFilter() {\n"
+      "        Query query = new TermQuery( new Term(\"level\", level.toString() ) );\n"
+      "        return new CachingWrapperFilter( new QueryWrapperFilter(query) );\n"
+      "    }\n"
+      "}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:585
+#, no-c-format
+msgid "Note the method annotated <classname>@Key</classname> returning a <classname>FilterKey</classname> object. The returned object has a special contract: the key object must implement <methodname>equals()</methodname> / <methodname>hashCode()</methodname> so that 2 keys are equal if and only if the given <classname>Filter</classname> types are the same and the set of parameters are the same. In other words, 2 filter keys are equal if and only if the filters from which the keys are generated can be interchanged. The key object is used as a key in the cache mechanism."
+msgstr ""
+
+#. Tag: para
+#: query.xml:594
+#, no-c-format
+msgid "<classname>@Key</classname> methods are needed only if:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:598
+#, no-c-format
+msgid "you enabled the filter caching system (enabled by default)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:603
+#, no-c-format
+msgid "your filter has parameters"
+msgstr ""
+
+#. Tag: para
+#: query.xml:607
+#, no-c-format
+msgid "In most cases, using the <literal>StandardFilterKey</literal> implementation will be good enough. It delegates the <methodname>equals()</methodname> / <methodname>hashCode()</methodname> implementation to each of the parameters equals and hashcode methods."
+msgstr ""
+
+#. Tag: para
+#: query.xml:613
+#, no-c-format
+msgid "As mentioned before the defined filters are per default cached and the cache uses a combination of hard and soft references to allow disposal of memory when needed. The hard reference cache keeps track of the most recently used filters and transforms the ones least used to <classname>SoftReferences</classname> when needed. Once the limit of the hard reference cache is reached additional filters are cached as <classname>SoftReferences</classname>. To adjust the size of the hard reference cache, use <literal>hibernate.search.filter.cache_strategy.size</literal> (defaults to 128). For advanced use of filter caching, you can implement your own <classname>FilterCachingStrategy</classname>. The classname is defined by <literal>hibernate.search.filter.cache_strategy</literal>."
+msgstr ""
+
+#. Tag: para
+#: query.xml:626
+#, no-c-format
+msgid "This filter caching mechanism should not be confused with caching the actual filter results. In Lucene it is common practice to wrap filters using the <classname>IndexReader</classname> around a <classname>CachingWrapperFilter.</classname> The wrapper will cache the <classname>DocIdSet</classname> returned from the <methodname>getDocIdSet(IndexReader reader)</methodname> method to avoid expensive recomputation. It is important to mention that the computed <classname>DocIdSet</classname> is only cachable for the same <classname>IndexReader</classname> instance, because the reader effectively represents the state of the index at the moment it was opened. The document list cannot change within an opened <classname>IndexReader</classname>. A different/new<classname> IndexReader</classname> instance, however, works potentially on a different set of <classname>Document</classname>s (either from a different index or simply because the index has changed), hence the cached <c!
 lassname>DocIdSet</classname> has to be recomputed."
+msgstr ""
+
+#. Tag: para
+#: query.xml:643
+#, no-c-format
+msgid "Hibernate Search also helps with this aspect of caching. Per default the <literal>cache</literal> flag of <classname>@FullTextFilterDef </classname>is set to <literal>FilterCacheModeType.INSTANCE_AND_DOCIDSETRESULTS</literal> which will automatically cache the filter instance as well as wrap the specified filter around a Hibernate specific implementation of <classname>CachingWrapperFilter</classname> (<classname>org.hibernate.search.filter.CachingWrapperFilter</classname>). In contrast to Lucene's version of this class <classname>SoftReference</classname>s are used together with a hard reference count (see discussion about filter cache). The hard reference count can be adjusted using <literal>hibernate.search.filter.cache_docidresults.size</literal> (defaults to 5). The wrapping behaviour can be controlled using the <literal>@FullTextFilterDef.cache</literal> parameter. There are three different values for this parameter:"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:664
+#, no-c-format
+msgid "Value"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:666
+#, no-c-format
+msgid "Definition"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:672
+#, no-c-format
+msgid "FilterCacheModeType.NONE"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:674
+#, no-c-format
+msgid "No filter instance and no result is cached by Hibernate Search. For every filter call, a new filter instance is created. This setting might be useful for rapidly changing data sets or heavily memory constrained environments."
+msgstr ""
+
+#. Tag: entry
+#: query.xml:681
+#, no-c-format
+msgid "FilterCacheModeType.INSTANCE_ONLY"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:683
+#, no-c-format
+msgid "The filter instance is cached and reused across concurrent <methodname>Filter.getDocIdSet()</methodname> calls. <classname>DocIdSet</classname> results are not cached. This setting is useful when a filter uses its own specific caching mechanism or the filter results change dynamically due to application specific events making <classname>DocIdSet</classname> caching in both cases unnecessary."
+msgstr ""
+
+#. Tag: entry
+#: query.xml:695
+#, no-c-format
+msgid "FilterCacheModeType.INSTANCE_AND_DOCIDSETRESULTS"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:697
+#, no-c-format
+msgid "Both the filter instance and the <classname>DocIdSet</classname> results are cached. This is the default value."
+msgstr ""
+
+#. Tag: para
+#: query.xml:702
+#, no-c-format
+msgid "Last but not least - why should filters be cached? There are two areas where filter caching shines:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:708
+#, no-c-format
+msgid "the system does not update the targeted entity index often (in other words, the IndexReader is reused a lot)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:713
+#, no-c-format
+msgid "the Filter's DocIdSet is expensive to compute (compared to the time spent to execute the query)"
+msgstr ""
+
+#. Tag: title
+#: query.xml:720
+#, no-c-format
+msgid "Optimizing the query process"
+msgstr ""
+
+#. Tag: para
+#: query.xml:722
+#, no-c-format
+msgid "Query performance depends on several criteria:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:726
+#, no-c-format
+msgid "the Lucene query itself: read the literature on this subject"
+msgstr ""
+
+#. Tag: para
+#: query.xml:731
+#, no-c-format
+msgid "the number of object loaded: use pagination (always ;-) ) or index projection (if needed)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:736
+#, no-c-format
+msgid "the way Hibernate Search interacts with the Lucene readers: defines the appropriate <xref linkend=\"search-architecture-readerstrategy\"/>."
+msgstr ""
+
+#. Tag: title
+#: query.xml:744
+#, no-c-format
+msgid "Native Lucene Queries"
+msgstr ""
+
+#. Tag: para
+#: query.xml:746
+#, no-c-format
+msgid "If you wish to use some specific features of Lucene, you can always run Lucene specific queries. Check <xref linkend=\"search-lucene-native\"/> for more information."
+msgstr ""
+


Property changes on: search/trunk/src/main/docbook/pot/modules/query.pot
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/zh-CN/master.po
===================================================================


Property changes on: search/trunk/src/main/docbook/zh-CN/master.po
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/zh-CN/modules/architecture.po
===================================================================
--- search/trunk/src/main/docbook/zh-CN/modules/architecture.po	                        (rev 0)
+++ search/trunk/src/main/docbook/zh-CN/modules/architecture.po	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,373 @@
+# Chinese translations for PACKAGE package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: 2009-05-26 15:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: architecture.xml:30
+#, no-c-format
+msgid "Architecture"
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:33
+#, no-c-format
+msgid "Overview"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:35
+#, no-c-format
+msgid ""
+"Hibernate Search consists of an indexing component and an index search "
+"component. Both are backed by Apache Lucene."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:38
+#, no-c-format
+msgid ""
+"Each time an entity is inserted, updated or removed in/from the database, "
+"Hibernate Search keeps track of this event (through the Hibernate event "
+"system) and schedules an index update. All the index updates are handled "
+"without you having to use the Apache Lucene APIs (see <xref linkend=\"search-"
+"configuration-event\"/>)."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:44
+#, no-c-format
+msgid ""
+"To interact with Apache Lucene indexes, Hibernate Search has the notion of "
+"<classname>DirectoryProvider</classname>s. A directory provider will manage "
+"a given Lucene <classname>Directory</classname> type. You can configure "
+"directory providers to adjust the directory target (see <xref linkend="
+"\"search-configuration-directory\"/>)."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:50
+#, no-c-format
+msgid ""
+"Hibernate Search uses the Lucene index to search an entity and return a list "
+"of managed entities saving you the tedious object to Lucene document "
+"mapping. The same persistence context is shared between Hibernate and "
+"Hibernate Search. As a matter of fact, the <classname>FullTextSession</"
+"classname> is built on top of the Hibernate Session. so that the application "
+"code can use the unified <classname>org.hibernate.Query</classname> or "
+"<classname>javax.persistence.Query</classname> APIs exactly the way a HQL, "
+"JPA-QL or native queries would do."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:60
+#, no-c-format
+msgid ""
+"To be more efficient, Hibernate Search batches the write interactions with "
+"the Lucene index. There is currently two types of batching depending on the "
+"expected scope. Outside a transaction, the index update operation is "
+"executed right after the actual database operation. This scope is really a "
+"no scoping setup and no batching is performed. However, it is recommended - "
+"for both your database and Hibernate Search - to execute your operation in a "
+"transaction be it JDBC or JTA. When in a transaction, the index update "
+"operation is scheduled for the transaction commit phase and discarded in "
+"case of transaction rollback. The batching scope is the transaction. There "
+"are two immediate benefits:"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:73
+#, no-c-format
+msgid ""
+"Performance: Lucene indexing works better when operation are executed in "
+"batch."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:78
+#, no-c-format
+msgid ""
+"ACIDity: The work executed has the same scoping as the one executed by the "
+"database transaction and is executed if and only if the transaction is "
+"committed. This is not ACID in the strict sense of it, but ACID behavior is "
+"rarely useful for full text search indexes since they can be rebuilt from "
+"the source at any time."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:86
+#, no-c-format
+msgid ""
+"You can think of those two scopes (no scope vs transactional) as the "
+"equivalent of the (infamous) autocommit vs transactional behavior. From a "
+"performance perspective, the <emphasis>in transaction</emphasis> mode is "
+"recommended. The scoping choice is made transparently. Hibernate Search "
+"detects the presence of a transaction and adjust the scoping."
+msgstr ""
+
+#. Tag: note
+#: architecture.xml:92
+#, no-c-format
+msgid ""
+"Hibernate Search works perfectly fine in the Hibernate / EntityManager long "
+"conversation pattern aka. atomic conversation."
+msgstr ""
+
+#. Tag: note
+#: architecture.xml:96
+#, no-c-format
+msgid ""
+"Depending on user demand, additional scoping will be considered, the "
+"pluggability mechanism being already in place."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:102
+#, no-c-format
+msgid "Back end"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:104
+#, no-c-format
+msgid ""
+"Hibernate Search offers the ability to let the scoped work being processed "
+"by different back ends. Two back ends are provided out of the box for two "
+"different scenarios."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:109
+#, no-c-format
+msgid "Back end types"
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:112
+#, no-c-format
+msgid "Lucene"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:114
+#, no-c-format
+msgid ""
+"In this mode, all index update operations applied on a given node (JVM) will "
+"be executed to the Lucene directories (through the directory providers) by "
+"the same node. This mode is typically used in non clustered environment or "
+"in clustered environments where the directory store is shared."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:132
+#, no-c-format
+msgid "Lucene back end configuration."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:136
+#, no-c-format
+msgid ""
+"This mode targets non clustered applications, or clustered applications "
+"where the Directory is taking care of the locking strategy."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:140
+#, no-c-format
+msgid ""
+"The main advantage is simplicity and immediate visibility of the changes in "
+"Lucene queries (a requirement in some applications)."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:145
+#, no-c-format
+msgid "<title>JMS</title>"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:147
+#, no-c-format
+msgid ""
+"All index update operations applied on a given node are sent to a JMS queue. "
+"A unique reader will then process the queue and update the master index. The "
+"master index is then replicated on a regular basis to the slave copies. This "
+"is known as the master/slaves pattern. The master is the sole responsible "
+"for updating the Lucene index. The slaves can accept read as well as write "
+"operations. However, they only process the read operation on their local "
+"index copy and delegate the update operations to the master."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:167
+#, no-c-format
+msgid "JMS back end configuration."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:171
+#, no-c-format
+msgid ""
+"This mode targets clustered environments where throughput is critical, and "
+"index update delays are affordable. Reliability is ensured by the JMS "
+"provider and by having the slaves working on a local copy of the index."
+msgstr ""
+
+#. Tag: note
+#: architecture.xml:177
+#, no-c-format
+msgid ""
+"Hibernate Search is an extensible architecture. Feel free to drop ideas for "
+"other third party back ends to <literal>hibernate-dev at lists.jboss.org</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:183
+#, no-c-format
+msgid "Work execution"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:185
+#, no-c-format
+msgid ""
+"The indexing work (done by the back end) can be executed synchronously with "
+"the transaction commit (or update operation if out of transaction), or "
+"asynchronously."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:190
+#, no-c-format
+msgid "Synchronous"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:192
+#, no-c-format
+msgid ""
+"This is the safe mode where the back end work is executed in concert with "
+"the transaction commit. Under highly concurrent environment, this can lead "
+"to throughput limitations (due to the Apache Lucene lock mechanism) and it "
+"can increase the system response time if the backend is significantly slower "
+"than the transactional process and if a lot of IO operations are involved."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:201
+#, no-c-format
+msgid "Asynchronous"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:203
+#, no-c-format
+msgid ""
+"This mode delegates the work done by the back end to a different thread. "
+"That way, throughput and response time are (to a certain extend) "
+"decorrelated from the back end performance. The drawback is that a small "
+"delay appears between the transaction commit and the index update and a "
+"small overhead is introduced to deal with thread management."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:210
+#, no-c-format
+msgid ""
+"It is recommended to use synchronous execution first and evaluate "
+"asynchronous execution if performance problems occur and after having set up "
+"a proper benchmark (ie not a lonely cowboy hitting the system in a "
+"completely unrealistic way)."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:219
+#, no-c-format
+msgid "Reader strategy"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:221
+#, no-c-format
+msgid ""
+"When executing a query, Hibernate Search interacts with the Apache Lucene "
+"indexes through a reader strategy. Choosing a reader strategy will depend on "
+"the profile of the application (frequent updates, read mostly, asynchronous "
+"index update etc). See also"
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:228
+#, no-c-format
+msgid "Shared"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:230
+#, no-c-format
+msgid ""
+"With this strategy, Hibernate Search will share the same "
+"<classname>IndexReader</classname>, for a given Lucene index, across "
+"multiple queries and threads provided that the <classname>IndexReader</"
+"classname> is still up-to-date. If the <classname>IndexReader</classname> is "
+"not up-to-date, a new one is opened and provided. Each "
+"<classname>IndexReader</classname> is made of several "
+"<classname>SegmentReader</classname>s. This strategy only reopens segments "
+"that have been modified or created after last opening and shares the already "
+"loaded segments from the previous instance. This strategy is the default."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:241
+#, no-c-format
+msgid "The name of this strategy is <literal>shared</literal>."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:245
+#, no-c-format
+msgid "Not-shared"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:247
+#, no-c-format
+msgid ""
+"Every time a query is executed, a Lucene <classname>IndexReader</classname> "
+"is opened. This strategy is not the most efficient since opening and warming "
+"up an <classname>IndexReader</classname> can be a relatively expensive "
+"operation."
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:253
+#, no-c-format
+msgid "The name of this strategy is <literal>not-shared</literal>."
+msgstr ""
+
+#. Tag: title
+#: architecture.xml:257
+#, no-c-format
+msgid "Custom"
+msgstr ""
+
+#. Tag: para
+#: architecture.xml:259
+#, no-c-format
+msgid ""
+"You can write your own reader strategy that suits your application needs by "
+"implementing <classname>org.hibernate.search.reader.ReaderProvider</"
+"classname>. The implementation must be thread safe."
+msgstr ""


Property changes on: search/trunk/src/main/docbook/zh-CN/modules/architecture.po
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/zh-CN/modules/batchindex.po
===================================================================


Property changes on: search/trunk/src/main/docbook/zh-CN/modules/batchindex.po
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/zh-CN/modules/configuration.po
===================================================================
--- search/trunk/src/main/docbook/zh-CN/modules/configuration.po	                        (rev 0)
+++ search/trunk/src/main/docbook/zh-CN/modules/configuration.po	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,1605 @@
+# Chinese translations for PACKAGE package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: 2009-05-26 15:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: configuration.xml:30
+#, no-c-format
+msgid "Configuration"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:33
+#, no-c-format
+msgid "Directory configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:35
+#, no-c-format
+msgid ""
+"Apache Lucene has a notion of <literal>Directory</literal> to store the "
+"index files. The <classname>Directory</classname> implementation can be "
+"customized, but Lucene comes bundled with a file system "
+"(<literal>FSDirectoryProvider</literal>) and an in memory "
+"(<literal>RAMDirectoryProvider</literal>) implementation. "
+"<literal>DirectoryProvider</literal>s are the Hibernate Search abstraction "
+"around a Lucene <classname>Directory</classname> and handle the "
+"configuration and the initialization of the underlying Lucene resources. "
+"<xref linkend=\"directory-provider-table\"/> shows the list of the directory "
+"providers bundled with Hibernate Search."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:47
+#, no-c-format
+msgid "List of built-in Directory Providers"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:52 configuration.xml:811
+#, no-c-format
+msgid "Class"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:54 configuration.xml:349 configuration.xml:635
+#: configuration.xml:813
+#, no-c-format
+msgid "Description"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:56
+#, no-c-format
+msgid "Properties"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:62
+#, no-c-format
+msgid "org.hibernate.search.store.RAMDirectoryProvider"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:64
+#, no-c-format
+msgid ""
+"Memory based directory, the directory will be uniquely identified (in the "
+"same deployment unit) by the <literal>@Indexed.index</literal> element"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:68 configuration.xml:868
+#, no-c-format
+msgid "none"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:72
+#, no-c-format
+msgid "org.hibernate.search.store.FSDirectoryProvider"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:74
+#, no-c-format
+msgid ""
+"File system based directory. The directory used will be &lt;indexBase&gt;/"
+"&lt; indexName &gt;"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:77
+#, no-c-format
+msgid "<literal>indexBase</literal> : Base directory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:78 configuration.xml:102 configuration.xml:136
+#, no-c-format
+msgid ""
+"<literal>indexName</literal>: override @Indexed.index (useful for sharded "
+"indexes)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:79 configuration.xml:113 configuration.xml:147
+#, no-c-format
+msgid "<literal> locking_strategy</literal> : optional, see"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:86
+#, no-c-format
+msgid "org.hibernate.search.store.FSMasterDirectoryProvider"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:88
+#, no-c-format
+msgid ""
+"File system based directory. Like FSDirectoryProvider. It also copies the "
+"index to a source directory (aka copy directory) on a regular basis."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:91 configuration.xml:125
+#, no-c-format
+msgid ""
+"The recommended value for the refresh period is (at least) 50% higher that "
+"the time to copy the information (default 3600 seconds - 60 minutes)."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:93 configuration.xml:127
+#, no-c-format
+msgid ""
+"Note that the copy is based on an incremental copy mechanism reducing the "
+"average copy time."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:95
+#, no-c-format
+msgid ""
+"DirectoryProvider typically used on the master node in a JMS back end "
+"cluster."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:96 configuration.xml:130
+#, no-c-format
+msgid ""
+"The <literal> buffer_size_on_copy</literal> optimum depends on your "
+"operating system and available RAM; most people reported good results using "
+"values between 16 and 64MB."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:101 configuration.xml:135
+#, no-c-format
+msgid "<literal>indexBase</literal>: Base directory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:104 configuration.xml:138
+#, no-c-format
+msgid "<literal>sourceBase</literal>: Source (copy) base directory."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:105 configuration.xml:139
+#, no-c-format
+msgid ""
+"<literal>source</literal>: Source directory suffix (default to "
+"<literal>@Indexed.index</literal>). The actual source directory name being "
+"<filename>&lt;sourceBase&gt;/&lt;source&gt;</filename>"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:109 configuration.xml:143
+#, no-c-format
+msgid ""
+"<literal>refresh</literal>: refresh period in second (the copy will take "
+"place every refresh seconds)."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:110 configuration.xml:144
+#, no-c-format
+msgid ""
+"<literal>buffer_size_on_copy</literal>: The amount of MegaBytes to move in a "
+"single low level copy instruction; defaults to 16MB."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:120
+#, no-c-format
+msgid "org.hibernate.search.store.FSSlaveDirectoryProvider"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:122
+#, no-c-format
+msgid ""
+"File system based directory. Like FSDirectoryProvider, but retrieves a "
+"master version (source) on a regular basis. To avoid locking and "
+"inconsistent search results, 2 local copies are kept."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:129
+#, no-c-format
+msgid "DirectoryProvider typically used on slave nodes using a JMS back end."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:156
+#, no-c-format
+msgid ""
+"If the built-in directory providers do not fit your needs, you can write "
+"your own directory provider by implementing the <classname>org.hibernate."
+"store.DirectoryProvider</classname> interface."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:161
+#, no-c-format
+msgid ""
+"Each indexed entity is associated to a Lucene index (an index can be shared "
+"by several entities but this is not usually the case). You can configure the "
+"index through properties prefixed by <constant>hibernate.search.</"
+"constant><replaceable>indexname</replaceable> . Default properties inherited "
+"to all indexes can be defined using the prefix <constant>hibernate.search."
+"default.</constant>"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:168
+#, no-c-format
+msgid ""
+"To define the directory provider of a given index, you use the "
+"<constant>hibernate.search.<replaceable>indexname</replaceable>."
+"directory_provider </constant>"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:173
+#, no-c-format
+msgid "Configuring directory providers"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:175
+#, no-c-format
+msgid ""
+"hibernate.search.default.directory_provider org.hibernate.search.store."
+"FSDirectoryProvider\n"
+"hibernate.search.default.indexBase=/usr/lucene/indexes\n"
+"hibernate.search.Rules.directory_provider org.hibernate.search.store."
+"RAMDirectoryProvider"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:178
+#, no-c-format
+msgid "applied on"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:181
+#, no-c-format
+msgid ""
+"Specifying the index name using the <literal>index</literal> parameter of "
+"<classname>@Indexed</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:184
+#, no-c-format
+msgid ""
+"@Indexed(index=\"Status\")\n"
+"public class Status { ... }\n"
+"\n"
+"@Indexed(index=\"Rules\")\n"
+"public class Rule { ... }"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:187
+#, no-c-format
+msgid ""
+"will create a file system directory in <filename>/usr/lucene/indexes/Status</"
+"filename> where the Status entities will be indexed, and use an in memory "
+"directory named <literal>Rules</literal> where Rule entities will be indexed."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:192
+#, no-c-format
+msgid ""
+"You can easily define common rules like the directory provider and base "
+"directory, and override those defaults later on on a per index basis."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:196
+#, no-c-format
+msgid ""
+"Writing your own <classname>DirectoryProvider</classname>, you can utilize "
+"this configuration mechanism as well."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:201
+#, no-c-format
+msgid "Sharding indexes"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:203
+#, no-c-format
+msgid ""
+"In some extreme cases involving huge indexes (in size), it is necessary to "
+"split (shard) the indexing data of a given entity type into several Lucene "
+"indexes. This solution is not recommended until you reach significant index "
+"sizes and index update times are slowing the application down. The main "
+"drawback of index sharding is that searches will end up being slower since "
+"more files have to be opened for a single search. In other words don't do it "
+"until you have problems :)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:211
+#, no-c-format
+msgid ""
+"Despite this strong warning, Hibernate Search allows you to index a given "
+"entity type into several sub indexes. Data is sharded into the different sub "
+"indexes thanks to an <classname>IndexShardingStrategy</classname>. By "
+"default, no sharding strategy is enabled, unless the number of shards is "
+"configured. To configure the number of shards use the following property"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:219
+#, no-c-format
+msgid ""
+"Enabling index sharding by specifying nbr_of_shards for a specific index"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:222
+#, no-c-format
+msgid "hibernate.search.&lt;indexName&gt;.sharding_strategy.nbr_of_shards 5"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:225
+#, no-c-format
+msgid "This will use 5 different shards."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:227
+#, no-c-format
+msgid ""
+"The default sharding strategy, when shards are set up, splits the data "
+"according to the hash value of the id string representation (generated by "
+"the Field Bridge). This ensures a fairly balanced sharding. You can replace "
+"the strategy by implementing <literal>IndexShardingStrategy</literal> and by "
+"setting the following property"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:235
+#, no-c-format
+msgid "Specifying a custom sharding strategy"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:237
+#, no-c-format
+msgid ""
+"hibernate.search.&lt;indexName&gt;.sharding_strategy my.shardingstrategy."
+"Implementation"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:240
+#, no-c-format
+msgid ""
+"Each shard has an independent directory provider configuration as described "
+"in <xref linkend=\"search-configuration-directory\"/>. The DirectoryProvider "
+"default name for the previous example are <literal>&lt;indexName&gt;.0</"
+"literal> to <literal>&lt;indexName&gt;.4</literal>. In other words, each "
+"shard has the name of it's owning index followed by <constant>.</constant> "
+"(dot) and its index number."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:249
+#, no-c-format
+msgid ""
+"Configuring the sharding configuration for an example entity "
+"<classname>Animal</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:252
+#, no-c-format
+msgid ""
+"hibernate.search.default.indexBase /usr/lucene/indexes\n"
+"\n"
+"hibernate.search.Animal.sharding_strategy.nbr_of_shards 5\n"
+"hibernate.search.Animal.directory_provider org.hibernate.search.store."
+"FSDirectoryProvider\n"
+"hibernate.search.Animal.0.indexName Animal00\n"
+"hibernate.search.Animal.3.indexBase /usr/lucene/sharded\n"
+"hibernate.search.Animal.3.indexName Animal03"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:255
+#, no-c-format
+msgid ""
+"This configuration uses the default id string hashing strategy and shards "
+"the Animal index into 5 subindexes. All subindexes are "
+"<classname>FSDirectoryProvider</classname> instances and the directory where "
+"each subindex is stored is as followed:"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:262
+#, no-c-format
+msgid ""
+"for subindex 0: /usr/lucene/indexes/Animal00 (shared indexBase but "
+"overridden indexName)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:267
+#, no-c-format
+msgid ""
+"for subindex 1: /usr/lucene/indexes/Animal.1 (shared indexBase, default "
+"indexName)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:272
+#, no-c-format
+msgid ""
+"for subindex 2: /usr/lucene/indexes/Animal.2 (shared indexBase, default "
+"indexName)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:277
+#, no-c-format
+msgid ""
+"for subindex 3: /usr/lucene/shared/Animal03 (overridden indexBase, "
+"overridden indexName)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:282
+#, no-c-format
+msgid ""
+"for subindex 4: /usr/lucene/indexes/Animal.4 (shared indexBase, default "
+"indexName)"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:289
+#, no-c-format
+msgid "Sharing indexes (two entities into the same directory)"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:292
+#, no-c-format
+msgid ""
+"This is only presented here so that you know the option is available. There "
+"is really not much benefit in sharing indexes."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:296
+#, no-c-format
+msgid ""
+"It is technically possible to store the information of more than one entity "
+"into a single Lucene index. There are two ways to accomplish this:"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:302
+#, no-c-format
+msgid ""
+"Configuring the underlying directory providers to point to the same physical "
+"index directory. In practice, you set the property <literal>hibernate.search."
+"[fully qualified entity name].indexName</literal> to the same value. As an "
+"example let’s use the same index (directory) for the <classname>Furniture</"
+"classname> and <classname>Animal</classname> entity. We just set "
+"<literal>indexName</literal> for both entities to for example “Animal”. Both "
+"entities will then be stored in the Animal directory"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:312
+#, no-c-format
+msgid ""
+"<code>hibernate.search.org.hibernate.search.test.shards.Furniture.indexName "
+"= Animal\n"
+"hibernate.search.org.hibernate.search.test.shards.Animal.indexName = Animal</"
+"code>"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:316
+#, no-c-format
+msgid ""
+"Setting the <code>@Indexed</code> annotation’s <methodname>index</"
+"methodname> attribute of the entities you want to merge to the same value. "
+"If we again wanted all <classname>Furniture</classname> instances to be "
+"indexed in the <classname>Animal</classname> index along with all instances "
+"of <classname>Animal</classname> we would specify <code>@Indexed"
+"(index=”Animal”)</code> on both <classname>Animal</classname> and "
+"<classname>Furniture</classname> classes."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:330
+#, no-c-format
+msgid "Worker configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:332
+#, no-c-format
+msgid ""
+"It is possible to refine how Hibernate Search interacts with Lucene through "
+"the worker configuration. The work can be executed to the Lucene directory "
+"or sent to a JMS queue for later processing. When processed to the Lucene "
+"directory, the work can be processed synchronously or asynchronously to the "
+"transaction commit."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:338
+#, no-c-format
+msgid "You can define the worker configuration using the following properties"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:342
+#, no-c-format
+msgid "worker configuration"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:347 configuration.xml:633
+#, no-c-format
+msgid "Property"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:353
+#, no-c-format
+msgid "hibernate.search.worker.backend"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:355
+#, no-c-format
+msgid ""
+"Out of the box support for the Apache Lucene back end and the JMS back end. "
+"Default to <literal>lucene</literal>. Supports also <literal>jms</literal> "
+"and <literal>blackhole</literal>."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:361
+#, no-c-format
+msgid "hibernate.search.worker.execution"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:363
+#, no-c-format
+msgid ""
+"Supports synchronous and asynchronous execution. Default to "
+"<literal><literal>sync</literal></literal>. Supports also <literal>async</"
+"literal>."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:369
+#, no-c-format
+msgid "hibernate.search.worker.thread_pool.size"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:371
+#, no-c-format
+msgid ""
+"Defines the number of threads in the pool. useful only for asynchronous "
+"execution. Default to 1."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:376
+#, no-c-format
+msgid "hibernate.search.worker.buffer_queue.max"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:378
+#, no-c-format
+msgid ""
+"Defines the maximal number of work queue if the thread poll is starved. "
+"Useful only for asynchronous execution. Default to infinite. If the limit is "
+"reached, the work is done by the main thread."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:385
+#, no-c-format
+msgid "hibernate.search.worker.jndi.*"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:387
+#, no-c-format
+msgid ""
+"Defines the JNDI properties to initiate the InitialContext (if needed). JNDI "
+"is only used by the JMS back end."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:392
+#, no-c-format
+msgid "hibernate.search.worker.jms.connection_factory"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:395
+#, no-c-format
+msgid ""
+"Mandatory for the JMS back end. Defines the JNDI name to lookup the JMS "
+"connection factory from (<literal>/ConnectionFactory</literal> by default in "
+"JBoss AS)"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:402
+#, no-c-format
+msgid "hibernate.search.worker.jms.queue"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:404
+#, no-c-format
+msgid ""
+"Mandatory for the JMS back end. Defines the JNDI name to lookup the JMS "
+"queue from. The queue will be used to post work messages."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:414
+#, no-c-format
+msgid "JMS Master/Slave configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:416
+#, no-c-format
+msgid ""
+"This section describes in greater detail how to configure the Master / "
+"Slaves Hibernate Search architecture."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:429
+#, no-c-format
+msgid "JMS back end configuration."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:433
+#, no-c-format
+msgid "Slave nodes"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:435
+#, no-c-format
+msgid ""
+"Every index update operation is sent to a JMS queue. Index querying "
+"operations are executed on a local index copy."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:439
+#, no-c-format
+msgid "JMS Slave configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:441
+#, no-c-format
+msgid ""
+"### slave configuration\n"
+"\n"
+"## DirectoryProvider\n"
+"# (remote) master location\n"
+"hibernate.search.default.sourceBase = /mnt/mastervolume/lucenedirs/"
+"mastercopy\n"
+"\n"
+"# local copy location\n"
+"hibernate.search.default.indexBase = /Users/prod/lucenedirs\n"
+"\n"
+"# refresh every half hour\n"
+"hibernate.search.default.refresh = 1800\n"
+"\n"
+"# appropriate directory provider\n"
+"hibernate.search.default.directory_provider = org.hibernate.search.store."
+"FSSlaveDirectoryProvider\n"
+"\n"
+"## Backend configuration\n"
+"hibernate.search.worker.backend = jms\n"
+"hibernate.search.worker.jms.connection_factory = /ConnectionFactory\n"
+"hibernate.search.worker.jms.queue = queue/hibernatesearch\n"
+"#optional jndi configuration (check your JMS provider for more information)\n"
+"\n"
+"## Optional asynchronous execution strategy\n"
+"# hibernate.search.worker.execution = async\n"
+"# hibernate.search.worker.thread_pool.size = 2\n"
+"# hibernate.search.worker.buffer_queue.max = 50"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:444
+#, no-c-format
+msgid "A file system local copy is recommended for faster search results."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:447 configuration.xml:463
+#, no-c-format
+msgid "The refresh period should be higher that the expected time copy."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:452
+#, no-c-format
+msgid "Master node"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:454
+#, no-c-format
+msgid ""
+"Every index update operation is taken from a JMS queue and executed. The "
+"master index is copied on a regular basis."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:458
+#, no-c-format
+msgid "JMS Master configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:460
+#, no-c-format
+msgid ""
+"### master configuration\n"
+"\n"
+"## DirectoryProvider\n"
+"# (remote) master location where information is copied to\n"
+"hibernate.search.default.sourceBase = /mnt/mastervolume/lucenedirs/"
+"mastercopy\n"
+"\n"
+"# local master location\n"
+"hibernate.search.default.indexBase = /Users/prod/lucenedirs\n"
+"\n"
+"# refresh every half hour\n"
+"hibernate.search.default.refresh = 1800\n"
+"\n"
+"# appropriate directory provider\n"
+"hibernate.search.default.directory_provider = org.hibernate.search.store."
+"FSMasterDirectoryProvider\n"
+"\n"
+"## Backend configuration\n"
+"#Backend is the default lucene one"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:466
+#, no-c-format
+msgid ""
+"In addition to the Hibernate Search framework configuration, a Message "
+"Driven Bean should be written and set up to process the index works queue "
+"through JMS."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:471
+#, no-c-format
+msgid "Message Driven Bean processing the indexing queue"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:473
+#, no-c-format
+msgid ""
+"@MessageDriven(activationConfig = {\n"
+"      @ActivationConfigProperty(propertyName=\"destinationType\", "
+"propertyValue=\"javax.jms.Queue\"),\n"
+"      @ActivationConfigProperty(propertyName=\"destination\", propertyValue="
+"\"queue/hibernatesearch\"),\n"
+"      @ActivationConfigProperty(propertyName=\"DLQMaxResent\", propertyValue="
+"\"1\")\n"
+"   } )\n"
+"public class MDBSearchController extends "
+"AbstractJMSHibernateSearchController implements MessageListener {\n"
+"    @PersistenceContext EntityManager em;\n"
+"    \n"
+"    //method retrieving the appropriate session\n"
+"    protected Session getSession() {\n"
+"        return (Session) em.getDelegate();\n"
+"    }\n"
+"\n"
+"    //potentially close the session opened in #getSession(), not needed "
+"here\n"
+"    protected void cleanSessionIfNeeded(Session session) \n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:476
+#, no-c-format
+msgid ""
+"This example inherits from the abstract JMS controller class available in "
+"the Hibernate Search source code and implements a JavaEE 5 MDB. This "
+"implementation is given as an example and, while most likely be more "
+"complex, can be adjusted to make use of non Java EE Message Driven Beans. "
+"For more information about the <methodname>getSession()</methodname> and "
+"<methodname>cleanSessionIfNeeded()</methodname>, please check "
+"<classname>AbstractJMSHibernateSearchController</classname>'s javadoc."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:489
+#, no-c-format
+msgid "Reader strategy configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:491
+#, no-c-format
+msgid ""
+"The different reader strategies are described in <xref linkend=\"search-"
+"architecture-readerstrategy\"/>. Out of the box strategies are:"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:497
+#, no-c-format
+msgid ""
+"<literal>shared</literal>: share index readers across several queries. This "
+"strategy is the most efficient."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:502
+#, no-c-format
+msgid ""
+"<literal>not-shared</literal>: create an index reader for each individual "
+"query"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:507
+#, no-c-format
+msgid ""
+"The default reader strategy is <literal>shared</literal>. This can be "
+"adjusted:"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:510
+#, no-c-format
+msgid "hibernate.search.reader.strategy = not-shared"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:512
+#, no-c-format
+msgid ""
+"Adding this property switches to the <literal>not-shared</literal> strategy."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:515
+#, no-c-format
+msgid "Or if you have a custom reader strategy:"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:517
+#, no-c-format
+msgid "hibernate.search.reader.strategy = my.corp.myapp.CustomReaderProvider"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:519
+#, no-c-format
+msgid ""
+"where <classname>my.corp.myapp.CustomReaderProvider</classname> is the "
+"custom strategy implementation."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:524
+#, no-c-format
+msgid "Enabling Hibernate Search and automatic indexing"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:527
+#, no-c-format
+msgid "Enabling Hibernate Search"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:529
+#, no-c-format
+msgid ""
+"Hibernate Search is enabled out of the box when using Hibernate Annotations "
+"or Hibernate EntityManager. If, for some reason you need to disable it, set "
+"<literal>hibernate.search.autoregister_listeners</literal> to false. Note "
+"that there is no performance penalty when the listeners are enabled even "
+"though no entities are indexed."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:536
+#, no-c-format
+msgid ""
+"To enable Hibernate Search in Hibernate Core (ie. if you don't use Hibernate "
+"Annotations), add the <literal>FullTextIndexEventListener</literal> for the "
+"following six Hibernate events and also add it after the default "
+"<literal>DefaultFlushEventListener</literal>, as in the following example."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:543
+#, no-c-format
+msgid ""
+"Explicitly enabling Hibernate Search by configuring the "
+"<classname>FullTextIndexEventListener</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:546
+#, no-c-format
+msgid ""
+"&lt;hibernate-configuration&gt;\n"
+"     &lt;session-factory&gt;\n"
+"        ...\n"
+"        &lt;event type=\"post-update\"&gt;\n"
+"            &lt;listener class=\"org.hibernate.search.event."
+"FullTextIndexEventListener\"/&gt;\n"
+"        &lt;/event&gt;\n"
+"        &lt;event type=\"post-insert\"&gt;\n"
+"            &lt;listener class=\"org.hibernate.search.event."
+"FullTextIndexEventListener\"/&gt;\n"
+"        &lt;/event&gt;\n"
+"        &lt;event type=\"post-delete\"&gt;\n"
+"            &lt;listener class=\"org.hibernate.search.event."
+"FullTextIndexEventListener\"/&gt;\n"
+"        &lt;/event&gt;\n"
+"        &lt;event type=\"post-collection-recreate\"&gt;\n"
+"            &lt;listener class=\"org.hibernate.search.event."
+"FullTextIndexEventListener\"/&gt;\n"
+"        &lt;/event&gt;\n"
+"        &lt;event type=\"post-collection-remove\"&gt;\n"
+"            &lt;listener class=\"org.hibernate.search.event."
+"FullTextIndexEventListener\"/&gt;\n"
+"        &lt;/event&gt;\n"
+"        &lt;event type=\"post-collection-update\"&gt;\n"
+"            &lt;listener class=\"org.hibernate.search.event."
+"FullTextIndexEventListener\"/&gt;\n"
+"        &lt;/event&gt;\n"
+"        &lt;event type=\"flush\"&gt;\n"
+"            &lt;listener class=\"org.hibernate.event.def."
+"DefaultFlushEventListener\"/&gt;\n"
+"            &lt;listener class=\"org.hibernate.search.event."
+"FullTextIndexEventListener\"/&gt;\n"
+"        &lt;/event&gt;\n"
+"    &lt;/session-factory&gt;\n"
+"&lt;/hibernate-configuration&gt;"
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:551
+#, no-c-format
+msgid "Automatic indexing"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:553
+#, no-c-format
+msgid ""
+"By default, every time an object is inserted, updated or deleted through "
+"Hibernate, Hibernate Search updates the according Lucene index. It is "
+"sometimes desirable to disable that features if either your index is read-"
+"only or if index updates are done in a batch way (see <xref linkend=\"search-"
+"batchindex\"/>)."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:559
+#, no-c-format
+msgid "To disable event based indexing, set"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:561
+#, no-c-format
+msgid "hibernate.search.indexing_strategy manual"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:564
+#, no-c-format
+msgid ""
+"In most case, the JMS backend provides the best of both world, a lightweight "
+"event based system keeps track of all changes in the system, and the "
+"heavyweight indexing process is done by a separate process or machine."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:573
+#, no-c-format
+msgid "Tuning Lucene indexing performance"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:575
+#, no-c-format
+msgid ""
+"Hibernate Search allows you to tune the Lucene indexing performance by "
+"specifying a set of parameters which are passed through to underlying Lucene "
+"<literal>IndexWriter</literal> such as <literal>mergeFactor</literal>, "
+"<literal>maxMergeDocs</literal> and <literal>maxBufferedDocs</literal>. You "
+"can specify these parameters either as default values applying for all "
+"indexes, on a per index basis, or even per shard."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:583
+#, no-c-format
+msgid ""
+"There are two sets of parameters allowing for different performance settings "
+"depending on the use case. During indexing operations triggered by database "
+"modifications, the parameters are grouped by the <literal>transaction</"
+"literal> keyword: <programlisting>hibernate.search.[default|&lt;"
+"indexname&gt;].indexwriter.transaction.&lt;parameter_name&gt;</"
+"programlisting> When indexing occurs via <literal>FullTextSession.index()</"
+"literal> (see <xref linkend=\"search-batchindex\"/>), the used properties "
+"are those grouped under the <literal>batch</literal> keyword:"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:589
+#, no-c-format
+msgid ""
+"hibernate.search.[default|&lt;indexname&gt;].indexwriter.batch.&lt;"
+"parameter_name&gt;"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:591
+#, no-c-format
+msgid ""
+"Unless the corresponding <literal>.batch</literal> property is explicitly "
+"set, the value will default to the <literal>.transaction</literal> property. "
+"If no value is set for a <literal>.batch</literal> value in a specific shard "
+"configuration, Hibernate Search will look at the index section, then at the "
+"default section and after that it will look for a <literal>.transaction</"
+"literal> in the same order: <programlisting>hibernate.search.Animals.2."
+"indexwriter.transaction.max_merge_docs 10\n"
+"hibernate.search.Animals.2.indexwriter.transaction.merge_factor 20\n"
+"hibernate.search.default.indexwriter.batch.max_merge_docs 100</"
+"programlisting> This configuration will result in these settings applied to "
+"the second shard of Animals index:"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:603
+#, no-c-format
+msgid "<literal>transaction.max_merge_docs</literal> = 10"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:607
+#, no-c-format
+msgid "<literal>batch.max_merge_docs</literal> = 100"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:611
+#, no-c-format
+msgid "<literal>transaction.merge_factor</literal> = 20"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:615
+#, no-c-format
+msgid "<literal>batch.merge_factor</literal> = 20"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:619
+#, no-c-format
+msgid "All other values will use the defaults defined in Lucene."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:621
+#, no-c-format
+msgid ""
+"The default for all values is to leave them at Lucene's own default, so the "
+"listed values in the following table actually depend on the version of "
+"Lucene you are using; values shown are relative to version <literal>2.4</"
+"literal>. For more information about Lucene indexing performances, please "
+"refer to the Lucene documentation."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:628
+#, no-c-format
+msgid "List of indexing performance and behavior properties"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:637
+#, no-c-format
+msgid "Default Value"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:643
+#, no-c-format
+msgid ""
+"hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch]."
+"max_buffered_delete_terms"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:645
+#, no-c-format
+msgid ""
+"Determines the minimal number of delete terms required before the buffered "
+"in-memory delete terms are applied and flushed. If there are documents "
+"buffered in memory at the time, they are merged and a new segment is created."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:650 configuration.xml:660
+#, no-c-format
+msgid "Disabled (flushes by RAM usage)"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:654
+#, no-c-format
+msgid ""
+"hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch]."
+"max_buffered_docs"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:656
+#, no-c-format
+msgid ""
+"Controls the amount of documents buffered in memory during indexing. The "
+"bigger the more RAM is consumed."
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:664
+#, no-c-format
+msgid ""
+"hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch]."
+"max_field_length"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:666
+#, no-c-format
+msgid ""
+"The maximum number of terms that will be indexed for a single field. This "
+"limits the amount of memory required for indexing so that very large data "
+"will not crash the indexing process by running out of memory. This setting "
+"refers to the number of running terms, not to the number of different terms."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:671
+#, no-c-format
+msgid ""
+"This silently truncates large documents, excluding from the index all terms "
+"that occur further in the document. If you know your source documents are "
+"large, be sure to set this value high enough to accommodate the expected "
+"size. If you set it to Integer.MAX_VALUE, then the only limit is your "
+"memory, but you should anticipate an OutOfMemoryError."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:676
+#, no-c-format
+msgid ""
+"If setting this value in <literal>batch</literal> differently than in "
+"<literal>transaction</literal> you may get different data (and results) in "
+"your index depending on the indexing mode."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:682
+#, no-c-format
+msgid "10000"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:686
+#, no-c-format
+msgid ""
+"hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch]."
+"max_merge_docs"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:688
+#, no-c-format
+msgid ""
+"Defines the largest number of documents allowed in a segment. Larger values "
+"are best for batched indexing and speedier searches. Small values are best "
+"for transaction indexing."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:693
+#, no-c-format
+msgid "Unlimited (Integer.MAX_VALUE)"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:697
+#, no-c-format
+msgid ""
+"hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch]."
+"merge_factor"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:699
+#, no-c-format
+msgid "Controls segment merge frequency and size."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:700
+#, no-c-format
+msgid ""
+"Determines how often segment indexes are merged when insertion occurs. With "
+"smaller values, less RAM is used while indexing, and searches on unoptimized "
+"indexes are faster, but indexing speed is slower. With larger values, more "
+"RAM is used during indexing, and while searches on unoptimized indexes are "
+"slower, indexing is faster. Thus larger values (&gt; 10) are best for batch "
+"index creation, and smaller values (&lt; 10) for indexes that are "
+"interactively maintained. The value must no be lower than 2."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:710
+#, no-c-format
+msgid "<entry>10</entry>"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:714
+#, no-c-format
+msgid ""
+"hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch]."
+"ram_buffer_size"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:716
+#, no-c-format
+msgid ""
+"Controls the amount of RAM in MB dedicated to document buffers. When used "
+"together max_buffered_docs a flush occurs for whichever event happens first."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:718
+#, no-c-format
+msgid ""
+"Generally for faster indexing performance it's best to flush by RAM usage "
+"instead of document count and use as large a RAM buffer as you can."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:723
+#, no-c-format
+msgid "16 MB"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:727
+#, no-c-format
+msgid ""
+"hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch]."
+"term_index_interval"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:729
+#, no-c-format
+msgid "Expert: Set the interval between indexed terms."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:730
+#, no-c-format
+msgid ""
+"Large values cause less memory to be used by IndexReader, but slow random-"
+"access to terms. Small values cause more memory to be used by an "
+"IndexReader, and speed random-access to terms. See Lucene documentation for "
+"more details."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:736
+#, no-c-format
+msgid "<entry>128</entry>"
+msgstr ""
+
+#. Tag: literal
+#: configuration.xml:740
+#, no-c-format
+msgid ""
+"hibernate.search.[default|&lt;indexname&gt;].indexwriter.[transaction|batch]."
+"use_compound_file"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:742
+#, no-c-format
+msgid ""
+"The advantage of using the compound file format is that less file "
+"descriptors are used. The disadvantage is that indexing takes more time and "
+"temporary disk space. You can set this parameter to <literal>false</literal> "
+"in an attempt to improve the indexing time, but you could run out of file "
+"descriptors if <literal>mergeFactor</literal> is also large."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:748
+#, no-c-format
+msgid ""
+"Boolean parameter, use \"<literal>true</literal>\" or \"<literal>false</"
+"literal>\". The default value for this option is <literal>true</literal>."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:753
+#, no-c-format
+msgid "true"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:759
+#, no-c-format
+msgid ""
+"To tune the indexing speed it might be useful to time the object loading "
+"from database in isolation from the writes to the index. To achieve this set "
+"the <literal>blackhole</literal> as worker backend and start you indexing "
+"routines. This backend does not disable Hibernate Search: it will still "
+"generate the needed changesets to the index, but will discard them instead "
+"of flushing them to the index. As opposite to setting the <literal>hibernate."
+"search.indexing_strategy</literal> to <literal>manual</literal> when using "
+"<literal>blackhole</literal> it will possibly load more data to rebuild the "
+"index from associated entities."
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:769
+#, no-c-format
+msgid "hibernate.search.worker.backend blackhole"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:771
+#, no-c-format
+msgid ""
+"The recommended approach is to focus first on optimizing the object loading, "
+"and then use the timings you achieve as a baseline to tune the indexing "
+"process."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:773
+#, no-c-format
+msgid ""
+"The <literal>blackhole</literal> backend is not meant to be used in "
+"production, only as a tool to identify indexing bottlenecks."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:781
+#, no-c-format
+msgid "LockFactory configuration"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:785
+#, no-c-format
+msgid ""
+"Lucene Directories have default locking strategies which work well for most "
+"cases, but it's possible to specify for each index managed by Hibernate "
+"Search which LockingFactory you want to use."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:789
+#, no-c-format
+msgid ""
+"Some of these locking strategies require a filesystem level lock and may be "
+"used even on RAM based indexes, but this is not recommended and of no "
+"practical use."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:795
+#, no-c-format
+msgid ""
+"To select a locking factory, set the <literal>hibernate.search.&lt;index&gt;."
+"locking_strategy</literal> option to one of <literal>simple</literal>, "
+"<literal>native</literal>, <literal>single</literal> or <literal>none</"
+"literal>, or set it to the fully qualified name of an implementation of "
+"<literal>org.hibernate.search.store.LockFactoryFactory</literal>; "
+"Implementing this interface you can provide a custom <literal>org.apache."
+"lucene.store.LockFactory</literal>."
+msgstr ""
+
+#. Tag: title
+#: configuration.xml:804
+#, no-c-format
+msgid "List of available LockFactory implementations"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:809
+#, no-c-format
+msgid "name"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:819
+#, no-c-format
+msgid "simple"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:821
+#, no-c-format
+msgid "org.apache.lucene.store.SimpleFSLockFactory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:824
+#, no-c-format
+msgid ""
+"Safe implementation based on Java's File API, it marks the usage of the "
+"index by creating a marker file."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:827
+#, no-c-format
+msgid ""
+"If for some reason you had to kill your application, you will need to remove "
+"this file before restarting it."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:830
+#, no-c-format
+msgid ""
+"This is the default implementation for <literal>FSDirectoryProvider</"
+"literal>,<literal>FSMasterDirectoryProvider</literal> and "
+"<literal>FSSlaveDirectoryProvider</literal>."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:837
+#, no-c-format
+msgid "native"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:839
+#, no-c-format
+msgid "org.apache.lucene.store.NativeFSLockFactory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:842
+#, no-c-format
+msgid ""
+"As does <literal>simple</literal> this also marks the usage of the index by "
+"creating a marker file, but this one is using native OS file locks so that "
+"even if your application crashes the locks will be cleaned up."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:847
+#, no-c-format
+msgid "This implementation has known problems on NFS."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:852
+#, no-c-format
+msgid "single"
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:854
+#, no-c-format
+msgid "org.apache.lucene.store.SingleInstanceLockFactory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:857
+#, no-c-format
+msgid ""
+"This LockFactory doesn't use a file marker but is a Java object lock held in "
+"memory; therefore it's possible to use it only when you are sure the index "
+"is not going to be shared by any other process."
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:862
+#, no-c-format
+msgid ""
+"This is the default implementation for <literal>RAMDirectoryProvider</"
+"literal>."
+msgstr ""
+
+#. Tag: entry
+#: configuration.xml:870
+#, no-c-format
+msgid "org.apache.lucene.store.NoLockFactory"
+msgstr ""
+
+#. Tag: para
+#: configuration.xml:873
+#, no-c-format
+msgid ""
+"All changes to this index are not coordinated by any lock; test your "
+"application carefully and make sure you know what it means."
+msgstr ""
+
+#. Tag: section
+#: configuration.xml:880
+#, no-c-format
+msgid "Configuration example:"
+msgstr ""
+
+#. Tag: programlisting
+#: configuration.xml:884
+#, no-c-format
+msgid ""
+"hibernate.search.default.locking_strategy simple\n"
+"hibernate.search.Animals.locking_strategy native\n"
+"hibernate.search.Books.locking_strategy org.custom.components."
+"MyLockingFactory"
+msgstr ""


Property changes on: search/trunk/src/main/docbook/zh-CN/modules/configuration.po
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/zh-CN/modules/getting-started.po
===================================================================
--- search/trunk/src/main/docbook/zh-CN/modules/getting-started.po	                        (rev 0)
+++ search/trunk/src/main/docbook/zh-CN/modules/getting-started.po	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,873 @@
+# Chinese translations for PACKAGE package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: 2009-05-26 15:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: getting-started.xml:30
+#, no-c-format
+msgid "Getting started"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:32
+#, no-c-format
+msgid ""
+"Welcome to Hibernate Search! The following chapter will guide you through "
+"the initial steps required to integrate Hibernate Search into an existing "
+"Hibernate enabled application. In case you are a Hibernate new timer we "
+"recommend you start <ulink url=\"http://hibernate.org/152.html\">here</"
+"ulink>."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:39
+#, no-c-format
+msgid "System Requirements"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:42
+#, no-c-format
+msgid "System requirements"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:47
+#, no-c-format
+msgid "Java Runtime"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:49
+#, no-c-format
+msgid ""
+"A JDK or JRE version <emphasis>5</emphasis> or greater. You can download a "
+"Java Runtime for Windows/Linux/Solaris <ulink url=\"http://java.sun.com/"
+"javase/downloads/\">here</ulink>."
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:55
+#, no-c-format
+msgid "Hibernate Search"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:57
+#, no-c-format
+msgid ""
+"<literal>hibernate-search.jar</literal> and all runtime dependencies from "
+"the <literal>lib</literal> directory of the Hibernate Search distribution. "
+"Please refer to <filename>README.txt </filename>in the lib directory to "
+"understand which dependencies are required."
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:65
+#, no-c-format
+msgid "Hibernate Core"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:67
+#, no-c-format
+msgid ""
+"This instructions have been tested against Hibernate 3.3.x. You will need "
+"<literal>hibernate-core.jar</literal> and its transitive dependencies from "
+"the <literal>lib</literal> directory of the distribution. Refer to "
+"<literal>README.txt</literal> in the <literal>lib</literal> directory of the "
+"distribution to determine the minimum runtime requirements."
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:76
+#, no-c-format
+msgid "Hibernate Annotations"
+msgstr ""
+
+#. Tag: entry
+#: getting-started.xml:78
+#, no-c-format
+msgid ""
+"Even though Hibernate Search can be used without Hibernate Annotations the "
+"following instructions will use them for basic entity configuration "
+"(<emphasis>@Entity, @Id, @OneToMany,...</emphasis>). This part of the "
+"configuration could also be expressed in xml or code. However, Hibernate "
+"Search itself has its own set of annotations (<emphasis>@Indexed, "
+"@DocumentId, @Field,...</emphasis>) for which there exists so far no "
+"alternative configuration. The tutorial is tested against version 3.4.x of "
+"Hibernate Annotations."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:92
+#, no-c-format
+msgid ""
+"You can download all dependencies from the Hibernate <ulink url=\"http://www."
+"hibernate.org/6.html\">download site</ulink>. You can also verify the "
+"dependency versions against the <ulink url=\"http://www.hibernate.org/6."
+"html#A3\">Hibernate Compatibility Matrix</ulink>."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:100
+#, no-c-format
+msgid "Using Maven"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:102
+#, no-c-format
+msgid ""
+"Instead of managing all dependencies manually, maven users have the "
+"possibility to use the <ulink url=\"http://repository.jboss.com/maven2"
+"\">JBoss maven repository</ulink>. Just add the JBoss repository url to the "
+"<emphasis>repositories</emphasis> section of your <filename>pom.xml</"
+"filename> or <filename>settings.xml</filename>:"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:110
+#, no-c-format
+msgid "Adding the JBoss maven repository to <filename>settings.xml</filename>"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:113
+#, no-c-format
+msgid ""
+"&lt;repository&gt;\n"
+"  &lt;id&gt;repository.jboss.org&lt;/id&gt;\n"
+"  &lt;name&gt;JBoss Maven Repository&lt;/name&gt;\n"
+"  &lt;url&gt;http://repository.jboss.org/maven2&lt;/url&gt;\n"
+"  &lt;layout&gt;default&lt;/layout&gt;\n"
+"&lt;/repository&gt;"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:116
+#, no-c-format
+msgid "Then add the following dependencies to your pom.xml:"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:119
+#, no-c-format
+msgid "Maven dependencies for Hibernate Search"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:121
+#, no-c-format
+msgid ""
+"&lt;dependency&gt;\n"
+"   &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+"   &lt;artifactId&gt;hibernate-search&lt;/artifactId&gt;\n"
+"   &lt;version&gt;3.1.0.GA&lt;/version&gt;\n"
+"&lt;/dependency&gt;\n"
+"&lt;dependency&gt;\n"
+"   &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+"   &lt;artifactId&gt;hibernate-annotations&lt;/artifactId&gt;\n"
+"   &lt;version&gt;3.4.0.GA&lt;/version&gt;\n"
+"&lt;/dependency&gt;\n"
+"&lt;dependency&gt;\n"
+"   &lt;groupId&gt;org.hibernate&lt;/groupId&gt;\n"
+"   &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;\n"
+"   &lt;version&gt;3.4.0.GA&lt;/version&gt;\n"
+"&lt;/dependency&gt;\n"
+"&lt;dependency&gt;\n"
+"   &lt;groupId&gt;org.apache.solr&lt;/groupId&gt;\n"
+"   &lt;artifactId&gt;solr-common&lt;/artifactId&gt;\n"
+"   &lt;version&gt;1.3.0&lt;/version&gt;\n"
+"&lt;/dependency&gt;\n"
+"&lt;dependency&gt;\n"
+"   &lt;groupId&gt;org.apache.solr&lt;/groupId&gt;\n"
+"   &lt;artifactId&gt;solr-core&lt;/artifactId&gt;\n"
+"   &lt;version&gt;1.3.0&lt;/version&gt;\n"
+"&lt;/dependency&gt;\n"
+"&lt;dependency&gt;\n"
+"   &lt;groupId&gt;org.apache.lucene&lt;/groupId&gt;\n"
+"   &lt;artifactId&gt;lucene-snowball&lt;/artifactId&gt;\n"
+"   &lt;version&gt;2.4.0&lt;/version&gt;\n"
+"&lt;/dependency&gt;"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:124
+#, no-c-format
+msgid ""
+"Not all dependencies are required. Only the <emphasis>hibernate-search</"
+"emphasis> dependency is mandatory. This dependency, together with its "
+"required transitive dependencies, contain all required classes needed to use "
+"Hibernate Search. <emphasis>hibernate-annotations</emphasis> is only needed "
+"if you want to use annotations to configure your domain model as we do in "
+"this tutorial. However, even if you choose not to use Hibernate Annotations "
+"you still have to use the Hibernate Search specific annotations, which are "
+"bundled with the hibernate-search jar file, to configure your Lucene index. "
+"Currently there is no XML configuration available for Hibernate Search. "
+"<emphasis>hibernate-entitymanager</emphasis> is required if you want to use "
+"Hibernate Search in conjunction with JPA. The Solr dependencies are needed "
+"if you want to utilize Solr's analyzer framework. More about this later. And "
+"finally, the <literal>lucene-snowball</literal> dependency is needed if you "
+"want to use Lucene's snowball stemmer."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:142
+#, no-c-format
+msgid "Configuration"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:144
+#, no-c-format
+msgid ""
+"Once you have downloaded and added all required dependencies to your "
+"application you have to add a couple of properties to your hibernate "
+"configuration file. If you are using Hibernate directly this can be done in "
+"<literal>hibernate.properties</literal> or <literal>hibernate.cfg.xml</"
+"literal>. If you are using Hibernate via JPA you can also add the properties "
+"to <literal>persistence.xml</literal>. The good news is that for standard "
+"use most properties offer a sensible default. An example "
+"<filename>persistence.xml</filename> configuration could look like this:"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:155
+#, no-c-format
+msgid ""
+"Basic configuration options to be added to <literal><filename>hibernate."
+"properties</filename></literal>, <literal><filename>hibernate.cfg.xml</"
+"filename></literal> or <filename>persistence.xml</filename>"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:160
+#, no-c-format
+msgid ""
+"...\n"
+"&lt;property name=\"hibernate.search.default.directory_provider\" \n"
+"   value=\"org.hibernate.search.store.FSDirectoryProvider\"/&gt; \n"
+"\n"
+"&lt;property name=\"hibernate.search.default.indexBase\" value=\"/var/lucene/"
+"indexes\"/&gt; \n"
+"..."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:163
+#, no-c-format
+msgid ""
+"First you have to tell Hibernate Search which <classname>DirectoryProvider</"
+"classname> to use. This can be achieved by setting the <literal>hibernate."
+"search.default.directory_provider</literal> property. Apache Lucene has the "
+"notion of a <literal>Directory</literal> to store the index files. Hibernate "
+"Search handles the initialization and configuration of a Lucene "
+"<literal>Directory</literal> instance via a <literal>DirectoryProvider</"
+"literal>. In this tutorial we will use a subclass of "
+"<literal>DirectoryProvider</literal> called <classname>FSDirectoryProvider</"
+"classname>. This will give us the ability to physically inspect the Lucene "
+"indexes created by Hibernate Search (eg via <ulink url=\"http://www.getopt."
+"org/luke/\">Luke</ulink>). Once you have a working configuration you can "
+"start experimenting with other directory providers (see <xref linkend="
+"\"search-configuration-directory\"/>). Next to the directory provider you "
+"also have to specify the default root directory for all indexes via "
+"<literal>hibernate.search.default.indexBase</literal>."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:180
+#, no-c-format
+msgid ""
+"Lets assume that your application contains the Hibernate managed classes "
+"<classname>example.Book</classname> and <classname>example.Author</"
+"classname> and you want to add free text search capabilities to your "
+"application in order to search the books contained in your database."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:187
+#, no-c-format
+msgid ""
+"Example entities Book and Author before adding Hibernate Search specific "
+"annotations"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:190
+#, no-c-format
+msgid ""
+"package example;\n"
+"...\n"
+"@Entity\n"
+"public class Book {\n"
+"\n"
+"  @Id\n"
+"  @GeneratedValue\n"
+"  private Integer id; \n"
+"\n"
+"  private String title;  \n"
+"\n"
+"  private String subtitle; \n"
+"\n"
+"  @ManyToMany \n"
+"  private Set&lt;Author&gt; authors = new HashSet&lt;Author&gt;();\n"
+"\n"
+"  private Date publicationDate;\n"
+"  \n"
+"  public Book() {\n"
+"  } \n"
+"  \n"
+"  // standard getters/setters follow here\n"
+"  ...\n"
+"}"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:192
+#, no-c-format
+msgid ""
+"package example;\n"
+"...\n"
+"@Entity\n"
+"public class Author {\n"
+"\n"
+"  @Id\n"
+"  @GeneratedValue\n"
+"  private Integer id;\n"
+"\n"
+"  private String name;\n"
+"\n"
+"  public Author() {\n"
+"  } \n"
+" \n"
+"  // standard getters/setters follow here\n"
+"  ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:195
+#, no-c-format
+msgid ""
+"To achieve this you have to add a few annotations to the <classname>Book</"
+"classname> and <classname>Author</classname> class. The first annotation "
+"<literal>@Indexed</literal> marks <classname>Book</classname> as indexable. "
+"By design Hibernate Search needs to store an untokenized id in the index to "
+"ensure index unicity for a given entity. <literal>@DocumentId</literal> "
+"marks the property to use for this purpose and is in most cases the same as "
+"the database primary key. In fact since the 3.1.0 release of Hibernate "
+"Search <literal>@DocumentId</literal> is optional in the case where an "
+"<classname>@Id</classname> annotation exists."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:206
+#, no-c-format
+msgid ""
+"Next you have to mark the fields you want to make searchable. Let's start "
+"with <literal>title</literal> and <literal>subtitle</literal> and annotate "
+"both with <literal>@Field</literal>. The parameter <literal>index=Index."
+"TOKENIZED</literal> will ensure that the text will be tokenized using the "
+"default Lucene analyzer. Usually, tokenizing means chunking a sentence into "
+"individual words and potentially excluding common words like <literal>'a'</"
+"literal> or '<literal>the</literal>'. We will talk more about analyzers a "
+"little later on. The second parameter we specify within <literal>@Field</"
+"literal>,<literal> store=Store.NO</literal>, ensures that the actual data "
+"will not be stored in the index. Whether this data is stored in the index or "
+"not has nothing to do with the ability to search for it. From Lucene's "
+"perspective it is not necessary to keep the data once the index is created. "
+"The benefit of storing it is the ability to retrieve it via projections "
+"(<xref linkend=\"projections\"/>)."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:222
+#, no-c-format
+msgid ""
+"Without projections, Hibernate Search will per default execute a Lucene "
+"query in order to find the database identifiers of the entities matching the "
+"query critera and use these identifiers to retrieve managed objects from the "
+"database. The decision for or against projection has to be made on a case to "
+"case basis. The default behaviour - <literal>Store.NO</literal> - is "
+"recommended since it returns managed objects whereas projections only return "
+"object arrays."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:230
+#, no-c-format
+msgid ""
+"After this short look under the hood let's go back to annotating the "
+"<classname>Book</classname> class. Another annotation we have not yet "
+"discussed is <literal>@DateBridge</literal>. This annotation is one of the "
+"built-in field bridges in Hibernate Search. The Lucene index is purely "
+"string based. For this reason Hibernate Search must convert the data types "
+"of the indexed fields to strings and vice versa. A range of predefined "
+"bridges are provided, including the <classname>DateBridge</classname> which "
+"will convert a <classname>java.util.Date</classname> into a "
+"<classname>String</classname> with the specified resolution. For more "
+"details see <xref linkend=\"search-mapping-bridge\"/>."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:241
+#, no-c-format
+msgid ""
+"This leaves us with <literal>@IndexedEmbedded. </literal>This annotation is "
+"used to index associated entities (<literal>@ManyToMany</literal>, "
+"<literal>@*ToOne</literal> and <literal>@Embedded</literal>) as part of the "
+"owning entity. This is needed since a Lucene index document is a flat data "
+"structure which does not know anything about object relations. To ensure "
+"that the authors' name wil be searchable you have to make sure that the "
+"names are indexed as part of the book itself. On top of "
+"<literal>@IndexedEmbedded</literal> you will also have to mark all fields of "
+"the associated entity you want to have included in the index with "
+"<literal>@Indexed</literal>. For more details see <xref linkend=\"search-"
+"mapping-associated\"/>."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:253
+#, no-c-format
+msgid ""
+"These settings should be sufficient for now. For more details on entity "
+"mapping refer to <xref linkend=\"search-mapping-entity\"/>."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:257
+#, no-c-format
+msgid "Example entities after adding Hibernate Search annotations"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:260
+#, no-c-format
+msgid ""
+"package example;\n"
+"...\n"
+"@Entity\n"
+"<emphasis role=\"bold\">@Indexed</emphasis>\n"
+"public class Book {\n"
+"\n"
+"  @Id\n"
+"  @GeneratedValue\n"
+"  <emphasis role=\"bold\">@DocumentId</emphasis>\n"
+"  private Integer id;\n"
+"  \n"
+"  <emphasis role=\"bold\">@Field(index=Index.TOKENIZED, store=Store.NO)</"
+"emphasis>\n"
+"  private String title;\n"
+"  \n"
+"  <emphasis role=\"bold\">@Field(index=Index.TOKENIZED, store=Store.NO)</"
+"emphasis>\n"
+"  private String subtitle; \n"
+"\n"
+"  <emphasis role=\"bold\">@IndexedEmbedded</emphasis>\n"
+"  @ManyToMany \n"
+"  private Set&lt;Author&gt; authors = new HashSet&lt;Author&gt;();\n"
+"\n"
+"<emphasis role=\"bold\">  @Field(index = Index.UN_TOKENIZED, store = Store."
+"YES)\n"
+"  @DateBridge(resolution = Resolution.DAY)</emphasis>\n"
+"  private Date publicationDate;\n"
+"  \n"
+"  public Book() {\n"
+"  } \n"
+"  \n"
+"  // standard getters/setters follow here\n"
+"  ... \n"
+"}"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:262
+#, no-c-format
+msgid ""
+"package example;\n"
+"...\n"
+"@Entity\n"
+"public class Author {\n"
+"\n"
+"  @Id\n"
+"  @GeneratedValue\n"
+"  private Integer id;\n"
+"\n"
+"  <emphasis role=\"bold\">@Field(index=Index.TOKENIZED, store=Store.NO)</"
+"emphasis>\n"
+"  private String name;\n"
+"\n"
+"  public Author() {\n"
+"  } \n"
+" \n"
+"  // standard getters/setters follow here\n"
+"  ...\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:267
+#, no-c-format
+msgid "Indexing"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:269
+#, no-c-format
+msgid ""
+"Hibernate Search will transparently index every entity persisted, updated or "
+"removed through Hibernate Core. However, you have to trigger an initial "
+"indexing to populate the Lucene index with the data already present in your "
+"database. Once you have added the above properties and annotations it is "
+"time to trigger an initial batch index of your books. You can achieve this "
+"by using one of the following code snippets (see also <xref linkend=\"search-"
+"batchindex\"/>):"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:278
+#, no-c-format
+msgid "Using Hibernate Session to index data"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:280
+#, no-c-format
+msgid ""
+"FullTextSession fullTextSession = Search.getFullTextSession(session);\n"
+"Transaction tx = fullTextSession.beginTransaction();\n"
+"\n"
+"List books = session.createQuery(\"from Book as book\").list();\n"
+"for (Book book : books) {\n"
+"    <emphasis role=\"bold\">fullTextSession.index(book);</emphasis>\n"
+"}\n"
+"\n"
+"tx.commit(); //index is written at commit time"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:284
+#, no-c-format
+msgid "Using JPA to index data"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:286
+#, no-c-format
+msgid ""
+"EntityManager em = entityManagerFactory.createEntityManager();\n"
+"FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager"
+"(em);\n"
+"em.getTransaction().begin();\n"
+"\n"
+"List books = em.createQuery(\"select book from Book as book\").getResultList"
+"();\n"
+"for (Book book : books) {\n"
+"    <emphasis role=\"bold\">fullTextEntityManager.index(book);</emphasis>\n"
+"} \n"
+"\n"
+"em.getTransaction().commit();\n"
+"em.close();"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:289
+#, no-c-format
+msgid ""
+"After executing the above code, you should be able to see a Lucene index "
+"under <literal>/var/lucene/indexes/example.Book</literal>. Go ahead an "
+"inspect this index with <ulink url=\"http://www.getopt.org/luke/\">Luke</"
+"ulink>. It will help you to understand how Hibernate Search works."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:297
+#, no-c-format
+msgid "Searching"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:299
+#, no-c-format
+msgid ""
+"Now it is time to execute a first search. The general approach is to create "
+"a native Lucene query and then wrap this query into a org.hibernate.Query in "
+"order to get all the functionality one is used to from the Hibernate API. "
+"The following code will prepare a query against the indexed fields, execute "
+"it and return a list of <classname>Book</classname>s."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:307
+#, no-c-format
+msgid "Using Hibernate Session to create and execute a search"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:309
+#, no-c-format
+msgid ""
+"FullTextSession fullTextSession = Search.getFullTextSession(session);\n"
+"Transaction tx = fullTextSession.beginTransaction();\n"
+"\n"
+"// create native Lucene query\n"
+"String[] fields = new String[]{\"title\", \"subtitle\", \"authors.name\", "
+"\"publicationDate\"};\n"
+"MultiFieldQueryParser parser = new MultiFieldQueryParser(fields, new "
+"StandardAnalyzer());\n"
+"org.apache.lucene.search.Query query = parser.parse( \"Java rocks!\" );\n"
+"\n"
+"// wrap Lucene query in a org.hibernate.Query\n"
+"org.hibernate.Query hibQuery = fullTextSession.createFullTextQuery(query, "
+"Book.class);\n"
+"\n"
+"// execute search\n"
+"List result = hibQuery.list();\n"
+"  \n"
+"tx.commit();\n"
+"session.close();"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:313
+#, no-c-format
+msgid "Using JPA to create and execute a search"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:315
+#, no-c-format
+msgid ""
+"EntityManager em = entityManagerFactory.createEntityManager();\n"
+"FullTextEntityManager fullTextEntityManager = \n"
+"    org.hibernate.hibernate.search.jpa.Search.getFullTextEntityManager(em);\n"
+"em.getTransaction().begin();\n"
+"\n"
+"// create native Lucene query\n"
+"String[] fields = new String[]{\"title\", \"subtitle\", \"authors.name\", "
+"\"publicationDate\"};\n"
+"MultiFieldQueryParser parser = new MultiFieldQueryParser(fields, new "
+"StandardAnalyzer());\n"
+"org.apache.lucene.search.Query query = parser.parse( \"Java rocks!\" );\n"
+"\n"
+"// wrap Lucene query in a javax.persistence.Query\n"
+"javax.persistence.Query persistenceQuery = fullTextEntityManager."
+"createFullTextQuery(query, Book.class);\n"
+"\n"
+"// execute search\n"
+"List result = persistenceQuery.getResultList();\n"
+"\n"
+"em.getTransaction().commit();\n"
+"em.close();"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:320
+#, no-c-format
+msgid "Analyzer"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:322
+#, no-c-format
+msgid ""
+"Let's make things a little more interesting now. Assume that one of your "
+"indexed book entities has the title \"Refactoring: Improving the Design of "
+"Existing Code\" and you want to get hits for all of the following queries: "
+"\"refactor\", \"refactors\", \"refactored\" and \"refactoring\". In Lucene "
+"this can be achieved by choosing an analyzer class which applies word "
+"stemming during the indexing <emphasis role=\"bold\">as well as</emphasis> "
+"search process. Hibernate Search offers several ways to configure the "
+"analyzer to use (see <xref linkend=\"analyzer\"/>):"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:333
+#, no-c-format
+msgid ""
+"Setting the <literal>hibernate.search.analyzer</literal> property in the "
+"configuration file. The specified class will then be the default analyzer."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:339
+#, no-c-format
+msgid ""
+"Setting the <literal><literal>@Analyzer</literal></literal> annotation at "
+"the entity level."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:344
+#, no-c-format
+msgid ""
+"Setting the <literal>@<literal>Analyzer</literal></literal> annotation at "
+"the field level."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:349
+#, no-c-format
+msgid ""
+"When using the <literal>@Analyzer</literal> annotation one can either "
+"specify the fully qualified classname of the analyzer to use or one can "
+"refer to an analyzer definition defined by the <literal>@AnalyzerDef</"
+"literal> annotation. In the latter case the Solr analyzer framework with its "
+"factories approach is utilized. To find out more about the factory classes "
+"available you can either browse the Solr JavaDoc or read the corresponding "
+"section on the <ulink url=\"http://wiki.apache.org/solr/"
+"AnalyzersTokenizersTokenFilters\">Solr Wiki.</ulink> Note that depending on "
+"the chosen factory class additional libraries on top of the Solr "
+"dependencies might be required. For example, the "
+"<classname>PhoneticFilterFactory</classname> depends on <ulink url=\"http://"
+"commons.apache.org/codec\">commons-codec</ulink>."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:362
+#, no-c-format
+msgid ""
+"In the example below a <classname>StandardTokenizerFactory</classname> is "
+"used followed by two filter factories, <classname>LowerCaseFilterFactory</"
+"classname> and <classname>SnowballPorterFilterFactory</classname>. The "
+"standard tokenizer splits words at punctuation characters and hyphens while "
+"keeping email addresses and internet hostnames intact. It is a good general "
+"purpose tokenizer. The lowercase filter lowercases the letters in each token "
+"whereas the snowball filter finally applies language specific stemming."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:372
+#, no-c-format
+msgid ""
+"Generally, when using the Solr framework you have to start with a tokenizer "
+"followed by an arbitrary number of filters."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:376
+#, no-c-format
+msgid ""
+"Using <classname>@AnalyzerDef</classname> and the Solr framework to define "
+"and use an analyzer"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:379
+#, no-c-format
+msgid ""
+"package example;\n"
+"...\n"
+"@Entity\n"
+"@Indexed\n"
+"<emphasis role=\"bold\">@AnalyzerDef(name = \"customanalyzer\",\n"
+"  tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),\n"
+"  filters = {\n"
+"    @TokenFilterDef(factory = LowerCaseFilterFactory.class),\n"
+"    @TokenFilterDef(factory = SnowballPorterFilterFactory.class, params = {\n"
+"      @Parameter(name = \"language\", value = \"English\")\n"
+"    })\n"
+"  })</emphasis>\n"
+"public class Book {\n"
+"\n"
+"  @Id\n"
+"  @GeneratedValue\n"
+"  @DocumentId\n"
+"  private Integer id;\n"
+"  \n"
+"  @Field(index=Index.TOKENIZED, store=Store.NO)\n"
+"  <emphasis role=\"bold\">@Analyzer(definition = \"customanalyzer\")</"
+"emphasis>\n"
+"  private String title;\n"
+"  \n"
+"  @Field(index=Index.TOKENIZED, store=Store.NO)\n"
+"  <emphasis role=\"bold\">@Analyzer(definition = \"customanalyzer\")</"
+"emphasis>\n"
+"  private String subtitle; \n"
+"\n"
+"  @IndexedEmbedded\n"
+"  @ManyToMany \n"
+"  private Set&lt;Author&gt; authors = new HashSet&lt;Author&gt;();\n"
+"\n"
+"<emphasis role=\"bold\"> </emphasis> @Field(index = Index.UN_TOKENIZED, "
+"store = Store.YES)\n"
+"  @DateBridge(resolution = Resolution.DAY)\n"
+"  private Date publicationDate;\n"
+"  \n"
+"  public Book() {\n"
+"  } \n"
+"  \n"
+"  // standard getters/setters follow here\n"
+"  ... \n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:384
+#, no-c-format
+msgid "What's next"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:386
+#, no-c-format
+msgid ""
+"The above paragraphs hopefully helped you getting an overview of Hibernate "
+"Search. Using the maven archetype plugin and the following command you can "
+"create an initial runnable maven project structure populated with the "
+"example code of this tutorial."
+msgstr ""
+
+#. Tag: title
+#: getting-started.xml:392
+#, no-c-format
+msgid "Using the Maven archetype to create tutorial sources"
+msgstr ""
+
+#. Tag: programlisting
+#: getting-started.xml:394
+#, no-c-format
+msgid ""
+"mvn archetype:create \\ \n"
+"    -DarchetypeGroupId=org.hibernate \\\n"
+"    -DarchetypeArtifactId=hibernate-search-quickstart \\ \n"
+"    -DarchetypeVersion=3.1.0.GA \\\n"
+"    -DgroupId=my.company -DartifactId=quickstart"
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:397
+#, no-c-format
+msgid ""
+"Using the maven project you can execute the examples, inspect the file "
+"system based index and search and retrieve a list of managed objects. Just "
+"run <emphasis>mvn package</emphasis> to compile the sources and run the unit "
+"tests."
+msgstr ""
+
+#. Tag: para
+#: getting-started.xml:402
+#, no-c-format
+msgid ""
+"The next step after this tutorial is to get more familiar with the overall "
+"architecture of Hibernate Search (<xref linkend=\"search-architecture\"/>) "
+"and explore the basic features in more detail. Two topics which were only "
+"briefly touched in this tutorial were analyzer configuration (<xref linkend="
+"\"analyzer\"/>) and field bridges (<xref linkend=\"search-mapping-bridge\"/"
+">), both important features required for more fine-grained indexing. More "
+"advanced topics cover clustering (<xref linkend=\"jms-backend\"/>) and large "
+"indexes handling (<xref linkend=\"search-configuration-directory-sharding\"/"
+">)."
+msgstr ""


Property changes on: search/trunk/src/main/docbook/zh-CN/modules/getting-started.po
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/zh-CN/modules/lucene-native.po
===================================================================
--- search/trunk/src/main/docbook/zh-CN/modules/lucene-native.po	                        (rev 0)
+++ search/trunk/src/main/docbook/zh-CN/modules/lucene-native.po	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,320 @@
+# Chinese translations for PACKAGE package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: 2009-05-26 15:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: lucene-native.xml:30
+#, no-c-format
+msgid "Advanced features"
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:33
+#, no-c-format
+msgid "SearchFactory"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:35
+#, no-c-format
+msgid ""
+"The <classname>SearchFactory</classname> object keeps track of the "
+"underlying Lucene resources for Hibernate Search, it's also a convenient way "
+"to access Lucene natively. The <classname>SearchFactory</classname> can be "
+"accessed from a <classname>FullTextSession</classname>:"
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:41
+#, no-c-format
+msgid "Accessing the <classname>SearchFactory</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: lucene-native.xml:43
+#, no-c-format
+msgid ""
+"FullTextSession fullTextSession = Search.getFullTextSession"
+"(regularSession);\n"
+"SearchFactory searchFactory = fullTextSession.getSearchFactory();"
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:48
+#, no-c-format
+msgid "Accessing a Lucene Directory"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:50
+#, no-c-format
+msgid ""
+"You can always access the Lucene directories through plain Lucene, the "
+"Directory structure is in no way different with or without Hibernate Search. "
+"However there are some more convenient ways to access a given Directory. The "
+"<classname>SearchFactory</classname> keeps track of the "
+"<classname>DirectoryProvider</classname>s per indexed class. One directory "
+"provider can be shared amongst several indexed classes if the classes share "
+"the same underlying index directory. While usually not the case, a given "
+"entity can have several <classname>DirectoryProvider</classname>s if the "
+"index is sharded (see <xref linkend=\"search-configuration-directory-sharding"
+"\"/>)."
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:62
+#, no-c-format
+msgid "Accessing the Lucene <classname>Directory</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: lucene-native.xml:64
+#, no-c-format
+msgid ""
+"DirectoryProvider[] provider = searchFactory.getDirectoryProviders(Order."
+"class);\n"
+"org.apache.lucene.store.Directory directory = provider[0].getDirectory();"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:67
+#, no-c-format
+msgid ""
+"In this example, directory points to the lucene index storing "
+"<classname>Order</classname>s information. Note that the obtained Lucene "
+"directory must not be closed (this is Hibernate Search responsibility)."
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:74
+#, no-c-format
+msgid "Using an IndexReader"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:76
+#, no-c-format
+msgid ""
+"Queries in Lucene are executed on an <literal>IndexReader</literal>. "
+"Hibernate Search caches all index readers to maximize performance. Your code "
+"can access this cached resources, but you have to follow some \"good citizen"
+"\" rules."
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:82
+#, no-c-format
+msgid "Accessing an <classname>IndexReader</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: lucene-native.xml:84
+#, no-c-format
+msgid ""
+"DirectoryProvider orderProvider = searchFactory.getDirectoryProviders(Order."
+"class)[0];\n"
+"DirectoryProvider clientProvider = searchFactory.getDirectoryProviders"
+"(Client.class)[0];\n"
+"\n"
+"ReaderProvider readerProvider = searchFactory.getReaderProvider();\n"
+"IndexReader reader = readerProvider.openReader(orderProvider, "
+"clientProvider);\n"
+"\n"
+"try {\n"
+"    //do read-only operations on the reader\n"
+"}\n"
+"finally {\n"
+"    readerProvider.closeReader(reader);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:87
+#, no-c-format
+msgid ""
+"The ReaderProvider (described in <xref linkend=\"search-architecture-"
+"readerstrategy\"/>), will open an IndexReader on top of the index(es) "
+"referenced by the directory providers. Because this <classname>IndexReader</"
+"classname> is shared amongst several clients, you must adhere to the "
+"following rules:"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:95
+#, no-c-format
+msgid ""
+"Never call indexReader.close(), but always call readerProvider.closeReader"
+"(reader), preferably in a finally block."
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:101
+#, no-c-format
+msgid ""
+"Don't use this <classname>IndexReader</classname> for modification "
+"operations (you would get an exception). If you want to use a read/write "
+"index reader, open one from the Lucene Directory object."
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:108
+#, no-c-format
+msgid ""
+"Aside from those rules, you can use the IndexReader freely, especially to do "
+"native queries. Using the shared <literal>IndexReader</literal>s will make "
+"most queries more efficient."
+msgstr ""
+
+#. Tag: title
+#: lucene-native.xml:115
+#, no-c-format
+msgid "Customizing Lucene's scoring formula"
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:117
+#, no-c-format
+msgid ""
+"Lucene allows the user to customize its scoring formula by extending "
+"<classname>org.apache.lucene.search.Similarity</classname>. The abstract "
+"methods defined in this class match the factors of the following formula "
+"calculating the score of query q for document d:"
+msgstr ""
+
+#. Tag: emphasis
+#: lucene-native.xml:122
+#, no-c-format
+msgid ""
+"score(q,d) = coord(q,d) · queryNorm(q) · ∑<subscript>t in q</subscript> ( tf"
+"(t in d) · idf(t)<superscript>2</superscript> · t.getBoost() · norm(t,d) )"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:131
+#, no-c-format
+msgid "Factor"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:133
+#, no-c-format
+msgid "Description"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:139
+#, no-c-format
+msgid "tf(t ind)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:141
+#, no-c-format
+msgid "Term frequency factor for the term (t) in the document (d)."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:146
+#, no-c-format
+msgid "idf(t)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:148
+#, no-c-format
+msgid "Inverse document frequency of the term."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:152
+#, no-c-format
+msgid "coord(q,d)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:154
+#, no-c-format
+msgid ""
+"Score factor based on how many of the query terms are found in the specified "
+"document."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:159
+#, no-c-format
+msgid "queryNorm(q)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:161
+#, no-c-format
+msgid "Normalizing factor used to make scores between queries comparable."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:166
+#, no-c-format
+msgid "t.getBoost()"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:168
+#, no-c-format
+msgid "Field boost."
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:172
+#, no-c-format
+msgid "norm(t,d)"
+msgstr ""
+
+#. Tag: entry
+#: lucene-native.xml:174
+#, no-c-format
+msgid "Encapsulates a few (indexing time) boost and length factors."
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:178
+#, no-c-format
+msgid ""
+"It is beyond the scope of this manual to explain this formula in more "
+"detail. Please refer to <classname>Similarity</classname>'s Javadocs for "
+"more information."
+msgstr ""
+
+#. Tag: para
+#: lucene-native.xml:183
+#, no-c-format
+msgid ""
+"Hibernate Search provides two ways to modify Lucene's similarity "
+"calculation. First you can set the default similarity by specifying the "
+"fully specified classname of your <classname>Similarity</classname> "
+"implementation using the property <constant>hibernate.search.similarity</"
+"constant>. The default value is <classname>org.apache.lucene.search."
+"DefaultSimilarity</classname>. Additionally you can override the default "
+"similarity on class level using the <literal>@Similarity</literal> "
+"annotation.<programlisting>@Entity\n"
+"@Indexed\n"
+"<emphasis role=\"bold\">@Similarity(impl = DummySimilarity.class)</"
+"emphasis>\n"
+"public class Book {\n"
+"   ...\n"
+"}</programlisting>As an example, let's assume it is not important how often "
+"a term appears in a document. Documents with a single occurrence of the term "
+"should be scored the same as documents with multiple occurrences. In this "
+"case your custom implementation of the method <methodname>tf(float freq)</"
+"methodname> should return 1.0."
+msgstr ""


Property changes on: search/trunk/src/main/docbook/zh-CN/modules/lucene-native.po
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/zh-CN/modules/mapping.po
===================================================================
--- search/trunk/src/main/docbook/zh-CN/modules/mapping.po	                        (rev 0)
+++ search/trunk/src/main/docbook/zh-CN/modules/mapping.po	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,2081 @@
+# Chinese translations for PACKAGE package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 16:41+0000\n"
+"PO-Revision-Date: 2009-05-26 15:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: mapping.xml:30
+#, no-c-format
+msgid "Mapping entities to the index structure"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:32
+#, no-c-format
+msgid ""
+"All the metadata information needed to index entities is described through "
+"annotations. There is no need for xml mapping files. In fact there is "
+"currently no xml configuration option available (see <ulink url=\"http://"
+"opensource.atlassian.com/projects/hibernate/browse/HSEARCH-210\">HSEARCH-"
+"210</ulink>). You can still use hibernate mapping files for the basic "
+"Hibernate configuration, but the Search specific configuration has to be "
+"expressed via annotations."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:41
+#, no-c-format
+msgid "Mapping an entity"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:44
+#, no-c-format
+msgid "Basic mapping"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:46
+#, no-c-format
+msgid ""
+"First, we must declare a persistent class as indexable. This is done by "
+"annotating the class with <literal>@Indexed</literal> (all entities not "
+"annotated with <literal>@Indexed</literal> will be ignored by the indexing "
+"process):"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:52
+#, no-c-format
+msgid ""
+"Making a class indexable using the <classname>@Indexed</classname> annotation"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:55
+#, no-c-format
+msgid ""
+"@Entity\n"
+"<emphasis role=\"bold\">@Indexed(index=\"indexes/essays\")</emphasis>\n"
+"public class Essay {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:58
+#, no-c-format
+msgid ""
+"The <literal>index</literal> attribute tells Hibernate what the Lucene "
+"directory name is (usually a directory on your file system). It is "
+"recommended to define a base directory for all Lucene indexes using the "
+"<literal>hibernate.search.default.indexBase</literal> property in your "
+"configuration file. Alternatively you can specify a base directory per "
+"indexed entity by specifying <literal>hibernate.search.&lt;index&gt;."
+"indexBase, </literal>where <literal>&lt;index&gt;</literal> is the fully "
+"qualified classname of the indexed entity. Each entity instance will be "
+"represented by a Lucene <classname>Document</classname> inside the given "
+"index (aka Directory)."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:70
+#, no-c-format
+msgid ""
+"For each property (or attribute) of your entity, you have the ability to "
+"describe how it will be indexed. The default (no annotation present) means "
+"that the property is completely ignored by the indexing process. "
+"<literal>@Field</literal> does declare a property as indexed. When indexing "
+"an element to a Lucene document you can specify how it is indexed:"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:79
+#, no-c-format
+msgid ""
+"<literal>name</literal> : describe under which name, the property should be "
+"stored in the Lucene Document. The default value is the property name "
+"(following the JavaBeans convention)"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:85
+#, no-c-format
+msgid ""
+"<literal>store</literal> : describe whether or not the property is stored in "
+"the Lucene index. You can store the value <literal>Store.YES</literal> "
+"(consuming more space in the index but allowing projection, see <xref "
+"linkend=\"projections\"/> for more information), store it in a compressed "
+"way <literal>Store.COMPRESS</literal> (this does consume more CPU), or avoid "
+"any storage <literal>Store.NO</literal> (this is the default value). When a "
+"property is stored, you can retrieve its original value from the Lucene "
+"Document. This is not related to whether the element is indexed or not."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:98
+#, no-c-format
+msgid ""
+"index: describe how the element is indexed and the type of information "
+"store. The different values are <literal>Index.NO</literal> (no indexing, ie "
+"cannot be found by a query), <literal>Index.TOKENIZED</literal> (use an "
+"analyzer to process the property), <literal>Index.UN_TOKENIZED</literal> (no "
+"analyzer pre-processing), <literal>Index.NO_NORMS</literal> (do not store "
+"the normalization data). The default value is <literal>TOKENIZED</literal>."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:109
+#, no-c-format
+msgid ""
+"termVector: describes collections of term-frequency pairs. This attribute "
+"enables term vectors being stored during indexing so they are available "
+"within documents. The default value is TermVector.NO."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:114
+#, no-c-format
+msgid "The different values of this attribute are:"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:120
+#, no-c-format
+msgid "Value"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:122
+#, no-c-format
+msgid "Definition"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:128
+#, no-c-format
+msgid "TermVector.YES"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:130
+#, no-c-format
+msgid ""
+"Store the term vectors of each document. This produces two synchronized "
+"arrays, one contains document terms and the other contains the term's "
+"frequency."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:136
+#, no-c-format
+msgid "TermVector.NO"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:138
+#, no-c-format
+msgid "Do not store term vectors."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:142
+#, no-c-format
+msgid "TermVector.WITH_OFFSETS"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:144
+#, no-c-format
+msgid ""
+"Store the term vector and token offset information. This is the same as "
+"TermVector.YES plus it contains the starting and ending offset position "
+"information for the terms."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:151
+#, no-c-format
+msgid "TermVector.WITH_POSITIONS"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:153
+#, no-c-format
+msgid ""
+"Store the term vector and token position information. This is the same as "
+"TermVector.YES plus it contains the ordinal positions of each occurrence of "
+"a term in a document."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:160
+#, no-c-format
+msgid "TermVector.WITH_POSITION_OFFSETS"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:162
+#, no-c-format
+msgid ""
+"Store the term vector, token position and offset information. This is a "
+"combination of the YES, WITH_OFFSETS and WITH_POSITIONS."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:172
+#, no-c-format
+msgid ""
+"Whether or not you want to store the original data in the index depends on "
+"how you wish to use the index query result. For a regular Hibernate Search "
+"usage storing is not necessary. However you might want to store some fields "
+"to subsequently project them (see <xref linkend=\"projections\"/> for more "
+"information)."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:178
+#, no-c-format
+msgid ""
+"Whether or not you want to tokenize a property depends on whether you wish "
+"to search the element as is, or by the words it contains. It make sense to "
+"tokenize a text field, but tokenizing a date field probably not. Note that "
+"fields used for sorting must not be tokenized."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:184
+#, no-c-format
+msgid ""
+"Finally, the id property of an entity is a special property used by "
+"Hibernate Search to ensure index unicity of a given entity. By design, an id "
+"has to be stored and must not be tokenized. To mark a property as index id, "
+"use the <literal>@DocumentId</literal> annotation. If you are using "
+"Hibernate Annotations and you have specified @Id you can omit @DocumentId. "
+"The chosen entity id will also be used as document id."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:193
+#, no-c-format
+msgid ""
+"Adding <classname>@DocumentId</classname> ad <classname>@Field</classname> "
+"annotations to an indexed entity"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:196
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed(index=\"indexes/essays\")\n"
+"public class Essay {\n"
+"    ...\n"
+"\n"
+"    @Id\n"
+"    <emphasis role=\"bold\">@DocumentId</emphasis>\n"
+"    public Long getId() { return id; }\n"
+"\n"
+"    <emphasis role=\"bold\">@Field(name=\"Abstract\", index=Index.TOKENIZED, "
+"store=Store.YES)</emphasis>\n"
+"    public String getSummary() { return summary; }\n"
+"\n"
+"    @Lob\n"
+"    <emphasis role=\"bold\">@Field(index=Index.TOKENIZED)</emphasis>\n"
+"    public String getText() { return text; }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:199
+#, no-c-format
+msgid ""
+"The above annotations define an index with three fields: <literal>id</"
+"literal> , <literal>Abstract</literal> and <literal>text</literal> . Note "
+"that by default the field name is decapitalized, following the JavaBean "
+"specification"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:206
+#, no-c-format
+msgid "Mapping properties multiple times"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:208
+#, no-c-format
+msgid ""
+"Sometimes one has to map a property multiple times per index, with slightly "
+"different indexing strategies. For example, sorting a query by field "
+"requires the field to be <literal>UN_TOKENIZED</literal>. If one wants to "
+"search by words in this property and still sort it, one need to index it "
+"twice - once tokenized and once untokenized. @Fields allows to achieve this "
+"goal."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:216
+#, no-c-format
+msgid "Using @Fields to map a property multiple times"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:218
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed(index = \"Book\" )\n"
+"public class Book {\n"
+"    <emphasis role=\"bold\">@Fields( {</emphasis>\n"
+"            @Field(index = Index.TOKENIZED),\n"
+"            @Field(name = \"summary_forSort\", index = Index.UN_TOKENIZED, "
+"store = Store.YES)\n"
+"            <emphasis role=\"bold\">} )</emphasis>\n"
+"    public String getSummary() {\n"
+"        return summary;\n"
+"    }\n"
+"\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:221
+#, no-c-format
+msgid ""
+"The field <literal>summary</literal> is indexed twice, once as "
+"<literal>summary</literal> in a tokenized way, and once as "
+"<literal>summary_forSort</literal> in an untokenized way. @Field supports 2 "
+"attributes useful when @Fields is used:"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:228
+#, no-c-format
+msgid ""
+"analyzer: defines a @Analyzer annotation per field rather than per property"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:233
+#, no-c-format
+msgid ""
+"bridge: defines a @FieldBridge annotation per field rather than per property"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:238
+#, no-c-format
+msgid "See below for more information about analyzers and field bridges."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:243
+#, no-c-format
+msgid "Embedded and associated objects"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:245
+#, no-c-format
+msgid ""
+"Associated objects as well as embedded objects can be indexed as part of the "
+"root entity index. This is useful if you expect to search a given entity "
+"based on properties of associated objects. In the following example the aim "
+"is to return places where the associated city is Atlanta (In the Lucene "
+"query parser language, it would translate into <code>address.city:Atlanta</"
+"code>)."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:253
+#, no-c-format
+msgid "Using @IndexedEmbedded to index associations"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:255
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed\n"
+"public class Place {\n"
+"    @Id\n"
+"    @GeneratedValue\n"
+"    @DocumentId\n"
+"    private Long id;\n"
+"\n"
+"    @Field( index = Index.TOKENIZED )\n"
+"    private String name;\n"
+"\n"
+"    @OneToOne( cascade = { CascadeType.PERSIST, CascadeType.REMOVE } )\n"
+"    <emphasis role=\"bold\">@IndexedEmbedded</emphasis>\n"
+"    private Address address;\n"
+"    ....\n"
+"}\n"
+"\n"
+"@Entity\n"
+"public class Address {\n"
+"    @Id\n"
+"    @GeneratedValue\n"
+"    private Long id;\n"
+"\n"
+"    @Field(index=Index.TOKENIZED)\n"
+"    private String street;\n"
+"\n"
+"    @Field(index=Index.TOKENIZED)\n"
+"    private String city;\n"
+"\n"
+"    <emphasis role=\"bold\">@ContainedIn</emphasis>\n"
+"    @OneToMany(mappedBy=\"address\")\n"
+"    private Set&lt;Place&gt; places;\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:258
+#, no-c-format
+msgid ""
+"In this example, the place fields will be indexed in the <literal>Place</"
+"literal> index. The <literal>Place</literal> index documents will also "
+"contain the fields <literal>address.id</literal>, <literal>address.street</"
+"literal>, and <literal>address.city</literal> which you will be able to "
+"query. This is enabled by the <literal>@IndexedEmbedded</literal> annotation."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:265
+#, no-c-format
+msgid ""
+"Be careful. Because the data is denormalized in the Lucene index when using "
+"the <classname>@IndexedEmbedded</classname> technique, Hibernate Search "
+"needs to be aware of any change in the <classname>Place</classname> object "
+"and any change in the <classname>Address</classname> object to keep the "
+"index up to date. To make sure the <literal><classname>Place</classname></"
+"literal> Lucene document is updated when it's <classname>Address</classname> "
+"changes, you need to mark the other side of the bidirectional relationship "
+"with <classname>@ContainedIn</classname>."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:275
+#, no-c-format
+msgid ""
+"<literal>@ContainedIn</literal> is only useful on associations pointing to "
+"entities as opposed to embedded (collection of) objects."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:279
+#, no-c-format
+msgid "Let's make our example a bit more complex:"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:282
+#, no-c-format
+msgid ""
+"Nested usage of <classname>@IndexedEmbedded</classname> and "
+"<classname>@ContainedIn</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:285
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed\n"
+"public class Place {\n"
+"    @Id\n"
+"    @GeneratedValue\n"
+"    @DocumentId\n"
+"    private Long id;\n"
+"\n"
+"    @Field( index = Index.TOKENIZED )\n"
+"    private String name;\n"
+"\n"
+"    @OneToOne( cascade = { CascadeType.PERSIST, CascadeType.REMOVE } )\n"
+"    <emphasis role=\"bold\">@IndexedEmbedded</emphasis>\n"
+"    private Address address;\n"
+"    ....\n"
+"}\n"
+"\n"
+"@Entity\n"
+"public class Address {\n"
+"    @Id\n"
+"    @GeneratedValue\n"
+"    private Long id;\n"
+"\n"
+"    @Field(index=Index.TOKENIZED)\n"
+"    private String street;\n"
+"\n"
+"    @Field(index=Index.TOKENIZED)\n"
+"    private String city;\n"
+"\n"
+"    <emphasis role=\"bold\">@IndexedEmbedded(depth = 1, prefix = \"ownedBy_"
+"\")</emphasis>\n"
+"    private Owner ownedBy;\n"
+"\n"
+"    <emphasis role=\"bold\">@ContainedIn</emphasis>\n"
+"    @OneToMany(mappedBy=\"address\")\n"
+"    private Set&lt;Place&gt; places;\n"
+"    ...\n"
+"}\n"
+"\n"
+"@Embeddable\n"
+"public class Owner {\n"
+"    @Field(index = Index.TOKENIZED)\n"
+"    private String name;\n"
+"   ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:288
+#, no-c-format
+msgid ""
+"Any <literal>@*ToMany, @*ToOne</literal> and <literal>@Embedded</literal> "
+"attribute can be annotated with <literal>@IndexedEmbedded</literal>. The "
+"attributes of the associated class will then be added to the main entity "
+"index. In the previous example, the index will contain the following fields"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:296
+#, no-c-format
+msgid "<para>id</para>"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:300
+#, no-c-format
+msgid "name"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:304
+#, no-c-format
+msgid "address.street"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:308
+#, no-c-format
+msgid "address.city"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:312
+#, no-c-format
+msgid "address.ownedBy_name"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:316
+#, no-c-format
+msgid ""
+"The default prefix is <literal>propertyName.</literal>, following the "
+"traditional object navigation convention. You can override it using the "
+"<literal>prefix</literal> attribute as it is shown on the <literal>ownedBy</"
+"literal> property."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:322
+#, no-c-format
+msgid "The prefix cannot be set to the empty string."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:325
+#, no-c-format
+msgid ""
+"The<literal> depth</literal> property is necessary when the object graph "
+"contains a cyclic dependency of classes (not instances). For example, if "
+"<classname>Owner</classname> points to <classname>Place</classname>. "
+"Hibernate Search will stop including Indexed embedded attributes after "
+"reaching the expected depth (or the object graph boundaries are reached). A "
+"class having a self reference is an example of cyclic dependency. In our "
+"example, because <literal>depth</literal> is set to 1, any "
+"<literal>@IndexedEmbedded</literal> attribute in Owner (if any) will be "
+"ignored."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:336
+#, no-c-format
+msgid ""
+"Using <literal>@IndexedEmbedded</literal> for object associations allows you "
+"to express queries such as:"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:341
+#, no-c-format
+msgid ""
+"Return places where name contains JBoss and where address city is Atlanta. "
+"In Lucene query this would be"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:344
+#, no-c-format
+msgid "+name:jboss +address.city:atlanta"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:348
+#, no-c-format
+msgid ""
+"Return places where name contains JBoss and where owner's name contain Joe. "
+"In Lucene query this would be"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:351
+#, no-c-format
+msgid "+name:jboss +address.orderBy_name:joe"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:355
+#, no-c-format
+msgid ""
+"In a way it mimics the relational join operation in a more efficient way (at "
+"the cost of data duplication). Remember that, out of the box, Lucene indexes "
+"have no notion of association, the join operation is simply non-existent. It "
+"might help to keep the relational model normalized while benefiting from the "
+"full text index speed and feature richness."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:363
+#, no-c-format
+msgid ""
+"An associated object can itself (but does not have to) be <literal>@Indexed</"
+"literal>"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:367
+#, no-c-format
+msgid ""
+"When @IndexedEmbedded points to an entity, the association has to be "
+"directional and the other side has to be annotated <literal>@ContainedIn</"
+"literal> (as seen in the previous example). If not, Hibernate Search has no "
+"way to update the root index when the associated entity is updated (in our "
+"example, a <literal>Place</literal> index document has to be updated when "
+"the associated <classname>Address</classname> instance is updated)."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:375
+#, no-c-format
+msgid ""
+"Sometimes, the object type annotated by <classname>@IndexedEmbedded</"
+"classname> is not the object type targeted by Hibernate and Hibernate "
+"Search. This is especially the case when interfaces are used in lieu of "
+"their implementation. For this reason you can override the object type "
+"targeted by Hibernate Search using the <methodname>targetElement</"
+"methodname> parameter."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:383
+#, no-c-format
+msgid ""
+"Using the <literal>targetElement</literal> property of "
+"<classname>@IndexedEmbedded</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:386
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed\n"
+"public class Address {\n"
+"    @Id\n"
+"    @GeneratedValue\n"
+"    @DocumentId\n"
+"    private Long id;\n"
+"\n"
+"    @Field(index= Index.TOKENIZED)\n"
+"    private String street;\n"
+"\n"
+"    @IndexedEmbedded(depth = 1, prefix = \"ownedBy_\", <emphasis role=\"bold"
+"\">targetElement = Owner.class</emphasis>)\n"
+"    @Target(Owner.class)\n"
+"    private Person ownedBy;\n"
+"\n"
+"\n"
+"    ...\n"
+"}\n"
+"\n"
+"@Embeddable\n"
+"public class Owner implements Person { ... }"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:391
+#, no-c-format
+msgid "Boost factor"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:393
+#, no-c-format
+msgid ""
+"Lucene has the notion of <emphasis>boost factor</emphasis>. It's a way to "
+"give more weight to a field or to an indexed element over others during the "
+"indexation process. You can use <literal>@Boost</literal> at the @Field, "
+"method or class level."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:399
+#, no-c-format
+msgid ""
+"Using different ways of increasing the weight of an indexed element using a "
+"boost factor"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:402
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed(index=\"indexes/essays\")\n"
+"<emphasis role=\"bold\">@Boost(1.7f)</emphasis>\n"
+"public class Essay {\n"
+"    ...\n"
+"\n"
+"    @Id\n"
+"    @DocumentId\n"
+"    public Long getId() { return id; }\n"
+"\n"
+"    @Field(name=\"Abstract\", index=Index.TOKENIZED, store=Store.YES, "
+"boost=<emphasis\n"
+"            role=\"bold\">@Boost(2f)</emphasis>)\n"
+"    <emphasis role=\"bold\">@Boost(1.5f)</emphasis>\n"
+"    public String getSummary() { return summary; }\n"
+"\n"
+"    @Lob\n"
+"    @Field(index=Index.TOKENIZED, boost=<emphasis role=\"bold\">@Boost(1.2f)"
+"</emphasis>)\n"
+"    public String getText() { return text; }\n"
+"\n"
+"    @Field\n"
+"    public String getISBN() { return isbn; }\n"
+"\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:405
+#, no-c-format
+msgid ""
+"In our example, <classname>Essay</classname>'s probability to reach the top "
+"of the search list will be multiplied by 1.7. The <methodname>summary</"
+"methodname> field will be 3.0 (2 * 1.5 - <methodname>@Field.boost</"
+"methodname> and <classname>@Boost</classname> on a property are cumulative) "
+"more important than the <methodname>isbn</methodname> field. The "
+"<methodname>text</methodname> field will be 1.2 times more important than "
+"the <methodname>isbn</methodname> field. Note that this explanation in "
+"strictest terms is actually wrong, but it is simple and close enough to "
+"reality for all practical purposes. Please check the Lucene documentation or "
+"the excellent <citetitle>Lucene In Action </citetitle> from Otis Gospodnetic "
+"and Erik Hatcher."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:420
+#, no-c-format
+msgid "Analyzer"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:422
+#, no-c-format
+msgid ""
+"The default analyzer class used to index tokenized fields is configurable "
+"through the <literal>hibernate.search.analyzer</literal> property. The "
+"default value for this property is <classname>org.apache.lucene.analysis."
+"standard.StandardAnalyzer</classname>."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:427
+#, no-c-format
+msgid ""
+"You can also define the analyzer class per entity, property and even per "
+"@Field (useful when multiple fields are indexed from a single property)."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:432
+#, no-c-format
+msgid "Different ways of specifying an analyzer"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:434
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed\n"
+"<emphasis role=\"bold\">@Analyzer(impl = EntityAnalyzer.class)</emphasis>\n"
+"public class MyEntity {\n"
+"    @Id\n"
+"    @GeneratedValue\n"
+"    @DocumentId\n"
+"    private Integer id;\n"
+"\n"
+"    @Field(index = Index.TOKENIZED)\n"
+"    private String name;\n"
+"\n"
+"    @Field(index = Index.TOKENIZED)\n"
+"    <emphasis role=\"bold\">@Analyzer(impl = PropertyAnalyzer.class)</"
+"emphasis>\n"
+"    private String summary;\n"
+"\n"
+"    @Field(index = Index.TOKENIZED, <emphasis><emphasis role=\"bold"
+"\">analyzer = @Analyzer(impl = FieldAnalyzer.class</emphasis>)</emphasis>\n"
+"    private String body;\n"
+"\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:437
+#, no-c-format
+msgid ""
+"In this example, <classname>EntityAnalyzer</classname> is used to index all "
+"tokenized properties (eg. <literal>name</literal>), except <literal>summary</"
+"literal> and <literal>body</literal> which are indexed with "
+"<classname>PropertyAnalyzer</classname> and <classname>FieldAnalyzer</"
+"classname> respectively."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:444
+#, no-c-format
+msgid ""
+"Mixing different analyzers in the same entity is most of the time a bad "
+"practice. It makes query building more complex and results less predictable "
+"(for the novice), especially if you are using a QueryParser (which uses the "
+"same analyzer for the whole query). As a rule of thumb, for any given field "
+"the same analyzer should be used for indexing and querying."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:453
+#, no-c-format
+msgid "Analyzer definitions"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:455
+#, no-c-format
+msgid ""
+"Analyzers can become quite complex to deal with for which reason Hibernate "
+"Search introduces the notion of analyzer definitions. An analyzer definition "
+"can be reused by many <classname>@Analyzer</classname> declarations. An "
+"analyzer definition is composed of:"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:463
+#, no-c-format
+msgid "a name: the unique string used to refer to the definition"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:468
+#, no-c-format
+msgid ""
+"a tokenizer: responsible for tokenizing the input stream into individual "
+"words"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:473
+#, no-c-format
+msgid ""
+"a list of filters: each filter is responsible to remove, modify or sometimes "
+"even add words into the stream provided by the tokenizer"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:479
+#, no-c-format
+msgid ""
+"This separation of tasks - a tokenizer followed by a list of filters - "
+"allows for easy reuse of each individual component and let you build your "
+"customized analyzer in a very flexible way (just like Lego). Generally "
+"speaking the <classname>Tokenizer</classname> starts the analysis process by "
+"turning the character input into tokens which are then further processed by "
+"the <classname>TokenFilter</classname>s. Hibernate Search supports this "
+"infrastructure by utilizing the Solr analyzer framework. Make sure to "
+"add<filename> solr-core.jar and </filename><filename>solr-common.jar</"
+"filename> to your classpath to use analyzer definitions. In case you also "
+"want to utilizing a snowball stemmer also include the <filename>lucene-"
+"snowball.jar.</filename> Other Solr analyzers might depend on more "
+"libraries. For example, the <classname>PhoneticFilterFactory</classname> "
+"depends on <ulink url=\"http://commons.apache.org/codec\">commons-codec</"
+"ulink>. Your distribution of Hibernate Search provides these dependencies in "
+"its <filename>lib</filename> directory."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:498
+#, no-c-format
+msgid "<classname>@AnalyzerDef</classname> and the Solr framework"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:501
+#, no-c-format
+msgid ""
+"@AnalyzerDef(name=\"customanalyzer\",\n"
+"        tokenizer = @TokenizerDef(factory = StandardTokenizerFactory."
+"class),\n"
+"        filters = {\n"
+"                @TokenFilterDef(factory = ISOLatin1AccentFilterFactory."
+"class),\n"
+"                @TokenFilterDef(factory = LowerCaseFilterFactory.class),\n"
+"                @TokenFilterDef(factory = StopFilterFactory.class, params = "
+"{\n"
+"                    @Parameter(name=\"words\", value= \"org/hibernate/search/"
+"test/analyzer/solr/stoplist.properties\" ),\n"
+"                    @Parameter(name=\"ignoreCase\", value=\"true\")\n"
+"                })\n"
+"})\n"
+"public class Team {\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:504
+#, no-c-format
+msgid ""
+"A tokenizer is defined by its factory which is responsible for building the "
+"tokenizer and using the optional list of parameters. This example use the "
+"standard tokenizer. A filter is defined by its factory which is responsible "
+"for creating the filter instance using the optional parameters. In our "
+"example, the StopFilter filter is built reading the dedicated words property "
+"file and is expected to ignore case. The list of parameters is dependent on "
+"the tokenizer or filter factory."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:514
+#, no-c-format
+msgid ""
+"Filters are applied in the order they are defined in the "
+"<classname>@AnalyzerDef</classname> annotation. Make sure to think twice "
+"about this order."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:519
+#, no-c-format
+msgid ""
+"Once defined, an analyzer definition can be reused by an "
+"<classname>@Analyzer</classname> declaration using the definition name "
+"rather than declaring an implementation class."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:524
+#, no-c-format
+msgid "Referencing an analyzer by name"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:526
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed\n"
+"@AnalyzerDef(name=\"customanalyzer\", ... )\n"
+"public class Team {\n"
+"    @Id\n"
+"    @DocumentId\n"
+"    @GeneratedValue\n"
+"    private Integer id;\n"
+"\n"
+"    @Field\n"
+"    private String name;\n"
+"\n"
+"    @Field\n"
+"    private String location;\n"
+"\n"
+"    @Field <emphasis role=\"bold\">@Analyzer(definition = \"customanalyzer\")"
+"</emphasis>\n"
+"    private String description;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:529
+#, no-c-format
+msgid ""
+"Analyzer instances declared by <classname>@AnalyzerDef</classname> are "
+"available by their name in the <classname>SearchFactory</classname>."
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:533
+#, no-c-format
+msgid ""
+"Analyzer analyzer = fullTextSession.getSearchFactory().getAnalyzer"
+"(\"customanalyzer\");"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:535
+#, no-c-format
+msgid ""
+"This is quite useful wen building queries. Fields in queries should be "
+"analyzed with the same analyzer used to index the field so that they speak a "
+"common \"language\": the same tokens are reused between the query and the "
+"indexing process. This rule has some exceptions but is true most of the "
+"time. Respect it unless you know what you are doing."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:544
+#, no-c-format
+msgid "Available analyzers"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:546
+#, no-c-format
+msgid ""
+"Solr and Lucene come with a lot of useful default tokenizers and filters. "
+"You can find a complete list of tokenizer factories and filter factories at "
+"<ulink url=\"http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters"
+"\">http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters</ulink>. Let "
+"check a few of them."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:553
+#, no-c-format
+msgid "Some of the available tokenizers"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:558 mapping.xml:593
+#, no-c-format
+msgid "Factory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:560 mapping.xml:595
+#, no-c-format
+msgid "Description"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:562 mapping.xml:597
+#, no-c-format
+msgid "parameters"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:568
+#, no-c-format
+msgid "StandardTokenizerFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:570
+#, no-c-format
+msgid "Use the Lucene StandardTokenizer"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:572 mapping.xml:581 mapping.xml:607 mapping.xml:615
+#: mapping.xml:647
+#, no-c-format
+msgid "none"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:576
+#, no-c-format
+msgid "HTMLStripStandardTokenizerFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:578
+#, no-c-format
+msgid "Remove HTML tags, keep the text and pass it to a StandardTokenizer"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:588
+#, no-c-format
+msgid "Some of the available filters"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:603
+#, no-c-format
+msgid "StandardFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:605
+#, no-c-format
+msgid "Remove dots from acronyms and 's from words"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:611
+#, no-c-format
+msgid "LowerCaseFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:613
+#, no-c-format
+msgid "Lowercase words"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:619
+#, no-c-format
+msgid "StopFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:621
+#, no-c-format
+msgid "remove words (tokens) matching a list of stop words"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:624
+#, no-c-format
+msgid ""
+"<literal>words</literal>: points to a resource file containing the stop words"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:625
+#, no-c-format
+msgid ""
+"ignoreCase: true if <literal>case</literal> should be ignore when comparing "
+"stop words, <literal>false</literal> otherwise"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:631
+#, no-c-format
+msgid "SnowballPorterFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:633
+#, no-c-format
+msgid ""
+"Reduces a word to it's root in a given language. (eg. protect, protects, "
+"protection share the same root). Using such a filter allows searches "
+"matching related words."
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:637
+#, no-c-format
+msgid ""
+"<literal>language</literal>: Danish, Dutch, English, Finnish, French, "
+"German, Italian, Norwegian, Portuguese, Russian, Spanish, Swedish and a few "
+"more"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:643
+#, no-c-format
+msgid "ISOLatin1AccentFilterFactory"
+msgstr ""
+
+#. Tag: entry
+#: mapping.xml:645
+#, no-c-format
+msgid "remove accents for languages like French"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:653
+#, no-c-format
+msgid ""
+"We recommend to check all the implementations of <classname>org.apache.solr."
+"analysis.TokenizerFactory</classname> and <classname>org.apache.solr."
+"analysis.TokenFilterFactory</classname> in your IDE to see the "
+"implementations available."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:660
+#, no-c-format
+msgid "Analyzer discriminator (experimental)"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:662
+#, no-c-format
+msgid ""
+"So far all the introduced ways to specify an analyzer were static. However, "
+"there are use cases where it is useful to select an analyzer depending on "
+"the current state of the entity to be indexed, for example in multilingual "
+"application. For an <classname>BlogEntry</classname> class for example the "
+"analyzer could depend on the language property of the entry. Depending on "
+"this property the correct language specific stemmer should be chosen to "
+"index the actual text."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:671
+#, no-c-format
+msgid ""
+"To enable this dynamic analyzer selection Hibernate Search introduces the "
+"<classname>AnalyzerDiscriminator</classname> annotation. The following "
+"example demonstrates the usage of this annotation:"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:677
+#, no-c-format
+msgid ""
+"Usage of @AnalyzerDiscriminator in order to select an analyzer depending on "
+"the entity state"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:680
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed\n"
+"@AnalyzerDefs({\n"
+"  @AnalyzerDef(name = \"en\",\n"
+"    tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),\n"
+"    filters = {\n"
+"      @TokenFilterDef(factory = LowerCaseFilterFactory.class),\n"
+"      @TokenFilterDef(factory = EnglishPorterFilterFactory.class\n"
+"      )\n"
+"    }),\n"
+"  @AnalyzerDef(name = \"de\",\n"
+"    tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),\n"
+"    filters = {\n"
+"      @TokenFilterDef(factory = LowerCaseFilterFactory.class),\n"
+"      @TokenFilterDef(factory = GermanStemFilterFactory.class)\n"
+"    })\n"
+"})\n"
+"public class BlogEntry {\n"
+"\n"
+"    @Id\n"
+"    @GeneratedValue\n"
+"    @DocumentId\n"
+"    private Integer id;\n"
+"\n"
+"    @Field\n"
+"    @AnalyzerDiscriminator(impl = LanguageDiscriminator.class)\n"
+"    private String language;\n"
+"    \n"
+"    @Field\n"
+"    private String text;\n"
+"    \n"
+"    private Set&lt;BlogEntry&gt; references;\n"
+"\n"
+"    // standard getter/setter\n"
+"    ...\n"
+"}"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:682
+#, no-c-format
+msgid ""
+"public class LanguageDiscriminator implements Discriminator {\n"
+"\n"
+"    public String getAnalyzerDefinitionName(Object value, Object entity, "
+"String field) {\n"
+"        if ( value == null || !( entity instanceof Article ) ) {\n"
+"            return null;\n"
+"        }\n"
+"        return (String) value;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:685
+#, no-c-format
+msgid ""
+"The prerequisite for using <classname>@AnalyzerDiscriminator</classname> is "
+"that all analyzers which are going to be used are predefined via "
+"<classname>@AnalyzerDef</classname> definitions. If this is the case one can "
+"place the <classname>@AnalyzerDiscriminator</classname> annotation either on "
+"the class or on a specific property of the entity for which to dynamically "
+"select an analyzer. Via the <literal>impl</literal> parameter of the "
+"<classname>AnalyzerDiscriminator</classname> you specify a concrete "
+"implementation of the <classname>Discriminator</classname> interface. It is "
+"up to you to provide an implementation for this interface. The only method "
+"you have to implement is <classname>getAnalyzerDefinitionName()</classname> "
+"which gets called for each field added to the Lucene document. The entity "
+"which is getting indexed is also passed to the interface method. The "
+"<literal>value</literal> parameter is only set if the "
+"<classname>AnalyzerDiscriminator</classname> is placed on property level "
+"instead of class level. In this case the value represents the current value "
+"of this property."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:705
+#, no-c-format
+msgid ""
+"An implemention of the <classname>Discriminator</classname> interface has to "
+"return the name of an existing analyzer definition if the analyzer should be "
+"set dynamically or <classname>null</classname> if the default analyzer "
+"should not be overridden. The given example assumes that the language "
+"parameter is either 'de' or 'en' which matches the specified names in the "
+"<classname>@AnalyzerDef</classname>s."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:714
+#, no-c-format
+msgid ""
+"The <classname>@AnalyzerDiscriminator</classname> is currently still "
+"experimental and the API might still change. We are hoping for some feedback "
+"from the community about the usefulness and usability of this feature."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:722
+#, no-c-format
+msgid "Retrieving an analyzer"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:724
+#, no-c-format
+msgid ""
+"During indexing time, Hibernate Search is using analyzers under the hood for "
+"you. In some situations, retrieving analyzers can be handy. If your domain "
+"model makes use of multiple analyzers (maybe to benefit from stemming, use "
+"phonetic approximation and so on), you need to make sure to use the same "
+"analyzers when you build your query."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:732
+#, no-c-format
+msgid ""
+"This rule can be broken but you need a good reason for it. If you are "
+"unsure, use the same analyzers."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:736
+#, no-c-format
+msgid ""
+"You can retrieve the scoped analyzer for a given entity used at indexing "
+"time by Hibernate Search. A scoped analyzer is an analyzer which applies the "
+"right analyzers depending on the field indexed: multiple analyzers can be "
+"defined on a given entity each one working on an individual field, a scoped "
+"analyzer unify all these analyzers into a context-aware analyzer. While the "
+"theory seems a bit complex, using the right analyzer in a query is very easy."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:745
+#, no-c-format
+msgid "Using the scoped analyzer when building a full-text query"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:748
+#, no-c-format
+msgid ""
+"org.apache.lucene.queryParser.QueryParser parser = new QueryParser(\n"
+"    \"title\", \n"
+"    fullTextSession.getSearchFactory().getAnalyzer( Song.class )\n"
+");\n"
+"\n"
+"org.apache.lucene.search.Query luceneQuery = \n"
+"    parser.parse( \"title:sky Or title_stemmed:diamond\" );\n"
+"\n"
+"org.hibernate.Query fullTextQuery = \n"
+"    fullTextSession.createFullTextQuery( luceneQuery, Song.class );\n"
+"\n"
+"List result = fullTextQuery.list(); //return a list of managed objects"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:751
+#, no-c-format
+msgid ""
+"In the example above, the song title is indexed in two fields: the standard "
+"analyzer is used in the field <literal>title</literal> and a stemming "
+"analyzer is used in the field <literal>title_stemmed</literal>. By using the "
+"analyzer provided by the search factory, the query uses the appropriate "
+"analyzer depending on the field targeted."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:758
+#, no-c-format
+msgid ""
+"If your query targets more that one query and you wish to use your standard "
+"analyzer, make sure to describe it using an analyzer definition. You can "
+"retrieve analyzers by their definition name using <code>searchFactory."
+"getAnalyzer(String)</code>."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:767
+#, no-c-format
+msgid "Property/Field Bridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:769
+#, no-c-format
+msgid ""
+"In Lucene all index fields have to be represented as Strings. For this "
+"reason all entity properties annotated with <literal>@Field</literal> have "
+"to be indexed in a String form. For most of your properties, Hibernate "
+"Search does the translation job for you thanks to a built-in set of bridges. "
+"In some cases, though you need a more fine grain control over the "
+"translation process."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:777
+#, no-c-format
+msgid "Built-in bridges"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:779
+#, no-c-format
+msgid ""
+"Hibernate Search comes bundled with a set of built-in bridges between a Java "
+"property type and its full text representation."
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:784
+#, no-c-format
+msgid "null"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:787
+#, no-c-format
+msgid ""
+"null elements are not indexed. Lucene does not support null elements and "
+"this does not make much sense either."
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:793
+#, no-c-format
+msgid "java.lang.String"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:796
+#, no-c-format
+msgid "String are indexed as is"
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:801
+#, no-c-format
+msgid ""
+"short, Short, integer, Integer, long, Long, float, Float, double, Double, "
+"BigInteger, BigDecimal"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:805
+#, no-c-format
+msgid ""
+"Numbers are converted in their String representation. Note that numbers "
+"cannot be compared by Lucene (ie used in ranged queries) out of the box: "
+"they have to be padded"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:808
+#, no-c-format
+msgid ""
+"Using a Range query is debatable and has drawbacks, an alternative approach "
+"is to use a Filter query which will filter the result query to the "
+"appropriate range."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:812
+#, no-c-format
+msgid "Hibernate Search will support a padding mechanism"
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:818
+#, no-c-format
+msgid "java.util.Date"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:821
+#, no-c-format
+msgid ""
+"Dates are stored as yyyyMMddHHmmssSSS in GMT time (200611072203012 for Nov "
+"7th of 2006 4:03PM and 12ms EST). You shouldn't really bother with the "
+"internal format. What is important is that when using a DateRange Query, you "
+"should know that the dates have to be expressed in GMT time."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:827
+#, no-c-format
+msgid ""
+"Usually, storing the date up to the millisecond is not necessary. "
+"<literal>@DateBridge</literal> defines the appropriate resolution you are "
+"willing to store in the index ( <literal> <literal>@DateBridge"
+"(resolution=Resolution.DAY)</literal> </literal> ). The date pattern will "
+"then be truncated accordingly."
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:834
+#, no-c-format
+msgid ""
+"@Entity \n"
+"@Indexed\n"
+"public class Meeting {\n"
+"    @Field(index=Index.UN_TOKENIZED)\n"
+"    <emphasis role=\"bold\">@DateBridge(resolution=Resolution.MINUTE)</"
+"emphasis>\n"
+"    private Date date;\n"
+"    ..."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:837
+#, no-c-format
+msgid ""
+"A Date whose resolution is lower than <literal>MILLISECOND</literal> cannot "
+"be a <literal>@DocumentId</literal>"
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:845
+#, no-c-format
+msgid "java.net.URI, java.net.URL"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:848
+#, no-c-format
+msgid "URI and URL are converted to their string representation"
+msgstr ""
+
+#. Tag: term
+#: mapping.xml:854
+#, no-c-format
+msgid "java.lang.Class"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:857
+#, no-c-format
+msgid ""
+"Class are converted to their fully qualified class name. The thread context "
+"classloader is used when the class is rehydrated"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:866
+#, no-c-format
+msgid "Custom Bridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:868
+#, no-c-format
+msgid ""
+"Sometimes, the built-in bridges of Hibernate Search do not cover some of "
+"your property types, or the String representation used by the bridge does "
+"not meet your requirements. The following paragraphs describe several "
+"solutions to this problem."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:874
+#, no-c-format
+msgid "StringBridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:876
+#, no-c-format
+msgid ""
+"The simplest custom solution is to give Hibernate Search an implementation "
+"of your expected <emphasis><classname>Object</classname> </emphasis>to "
+"<classname>String</classname> bridge. To do so you need to implements the "
+"<literal>org.hibernate.search.bridge.StringBridge</literal> interface. All "
+"implementations have to be thread-safe as they are used concurrently."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:885
+#, no-c-format
+msgid "Implementing your own <classname>StringBridge</classname>"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:888
+#, no-c-format
+msgid ""
+"/**\n"
+" * Padding Integer bridge.\n"
+" * All numbers will be padded with 0 to match 5 digits\n"
+" *\n"
+" * @author Emmanuel Bernard\n"
+" */\n"
+"public class PaddedIntegerBridge implements <emphasis role=\"bold"
+"\">StringBridge</emphasis> {\n"
+"\n"
+"    private int PADDING = 5;\n"
+"\n"
+"    <emphasis role=\"bold\">public String objectToString(Object object)</"
+"emphasis> {\n"
+"        String rawInteger = ( (Integer) object ).toString();\n"
+"        if (rawInteger.length() &gt; PADDING) \n"
+"            throw new IllegalArgumentException( \"Try to pad on a number too "
+"big\" );\n"
+"        StringBuilder paddedInteger = new StringBuilder( );\n"
+"        for ( int padIndex = rawInteger.length() ; padIndex &lt; PADDING ; "
+"padIndex++ ) {\n"
+"            paddedInteger.append('0');\n"
+"        }\n"
+"        return paddedInteger.append( rawInteger ).toString();\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:891
+#, no-c-format
+msgid ""
+"Then any property or field can use this bridge thanks to the "
+"<literal>@FieldBridge</literal> annotation"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:894
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">@FieldBridge(impl = PaddedIntegerBridge.class)</"
+"emphasis>\n"
+"private Integer length;"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:896
+#, no-c-format
+msgid ""
+"Parameters can be passed to the Bridge implementation making it more "
+"flexible. The Bridge implementation implements a "
+"<classname>ParameterizedBridge</classname> interface, and the parameters are "
+"passed through the <literal>@FieldBridge</literal> annotation."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:903
+#, no-c-format
+msgid "Passing parameters to your bridge implementation"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:905
+#, no-c-format
+msgid ""
+"public class PaddedIntegerBridge implements StringBridge, <emphasis\n"
+"              role=\"bold\">ParameterizedBridge</emphasis> {\n"
+"\n"
+"    public static String PADDING_PROPERTY = \"padding\";\n"
+"    private int padding = 5; //default\n"
+"\n"
+"    <emphasis role=\"bold\">public void setParameterValues(Map parameters)</"
+"emphasis> {\n"
+"        Object padding = parameters.get( PADDING_PROPERTY );\n"
+"        if (padding != null) this.padding = (Integer) padding;\n"
+"    }\n"
+"\n"
+"    public String objectToString(Object object) {\n"
+"        String rawInteger = ( (Integer) object ).toString();\n"
+"        if (rawInteger.length() &gt; padding) \n"
+"            throw new IllegalArgumentException( \"Try to pad on a number too "
+"big\" );\n"
+"        StringBuilder paddedInteger = new StringBuilder( );\n"
+"        for ( int padIndex = rawInteger.length() ; padIndex &lt; padding ; "
+"padIndex++ ) {\n"
+"            paddedInteger.append('0');\n"
+"        }\n"
+"        return paddedInteger.append( rawInteger ).toString();\n"
+"    }\n"
+"}\n"
+"\n"
+"\n"
+"//property\n"
+"@FieldBridge(impl = PaddedIntegerBridge.class,\n"
+"             <emphasis role=\"bold\">params = @Parameter(name=\"padding\", "
+"value=\"10\")</emphasis>\n"
+"            )\n"
+"private Integer length;"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:908
+#, no-c-format
+msgid ""
+"The <classname>ParameterizedBridge</classname> interface can be implemented "
+"by <classname>StringBridge</classname>, <classname>TwoWayStringBridge</"
+"classname>, <classname>FieldBridge</classname> implementations."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:913
+#, no-c-format
+msgid ""
+"All implementations have to be thread-safe, but the parameters are set "
+"during initialization and no special care is required at this stage."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:917
+#, no-c-format
+msgid ""
+"If you expect to use your bridge implementation on an id property (ie "
+"annotated with <literal>@DocumentId</literal> ), you need to use a slightly "
+"extended version of <literal>StringBridge</literal> named "
+"<classname>TwoWayStringBridge</classname>. Hibernate Search needs to read "
+"the string representation of the identifier and generate the object out of "
+"it. There is not difference in the way the <literal>@FieldBridge</literal> "
+"annotation is used."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:926
+#, no-c-format
+msgid ""
+"Implementing a TwoWayStringBridge which can for example be used for id "
+"properties"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:929
+#, no-c-format
+msgid ""
+"public class PaddedIntegerBridge implements TwoWayStringBridge, "
+"ParameterizedBridge {\n"
+"\n"
+"    public static String PADDING_PROPERTY = \"padding\";\n"
+"    private int padding = 5; //default\n"
+"\n"
+"    public void setParameterValues(Map parameters) {\n"
+"        Object padding = parameters.get( PADDING_PROPERTY );\n"
+"        if (padding != null) this.padding = (Integer) padding;\n"
+"    }\n"
+"\n"
+"    public String objectToString(Object object) {\n"
+"        String rawInteger = ( (Integer) object ).toString();\n"
+"        if (rawInteger.length() &gt; padding) \n"
+"            throw new IllegalArgumentException( \"Try to pad on a number too "
+"big\" );\n"
+"        StringBuilder paddedInteger = new StringBuilder( );\n"
+"        for ( int padIndex = rawInteger.length() ; padIndex &lt; padding ; "
+"padIndex++ ) {\n"
+"            paddedInteger.append('0');\n"
+"        }\n"
+"        return paddedInteger.append( rawInteger ).toString();\n"
+"    }\n"
+"\n"
+"    <emphasis role=\"bold\">public Object stringToObject(String stringValue)"
+"</emphasis> {\n"
+"        return new Integer(stringValue);\n"
+"    }\n"
+"}\n"
+"\n"
+"\n"
+"//id property\n"
+"@DocumentId\n"
+"@FieldBridge(impl = PaddedIntegerBridge.class,\n"
+"             params = @Parameter(name=\"padding\", value=\"10\") \n"
+"private Integer id;"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:932
+#, no-c-format
+msgid ""
+"It is critically important for the two-way process to be idempotent (ie "
+"object = stringToObject( objectToString( object ) ) )."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:938
+#, no-c-format
+msgid "FieldBridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:940
+#, no-c-format
+msgid ""
+"Some use cases require more than a simple object to string translation when "
+"mapping a property to a Lucene index. To give you the greatest possible "
+"flexibility you can also implement a bridge as a <classname>FieldBridge</"
+"classname>. This interface gives you a property value and let you map it the "
+"way you want in your Lucene <classname>Document</classname>.The interface is "
+"very similar in its concept to the Hibernate<classname> UserType</"
+"classname>s."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:948
+#, no-c-format
+msgid ""
+"You can for example store a given property in two different document fields:"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:952
+#, no-c-format
+msgid ""
+"Implementing the FieldBridge interface in order to a given property into "
+"multiple document fields"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:955
+#, no-c-format
+msgid ""
+"/**\n"
+" * Store the date in 3 different fields - year, month, day - to ease Range "
+"Query per\n"
+" * year, month or day (eg get all the elements of December for the last 5 "
+"years).\n"
+" * \n"
+" * @author Emmanuel Bernard\n"
+" */\n"
+"public class DateSplitBridge implements FieldBridge {\n"
+"    private final static TimeZone GMT = TimeZone.getTimeZone(\"GMT\");\n"
+"\n"
+"    <emphasis role=\"bold\">public void set(String name, Object value, "
+"Document document, \n"
+"                    LuceneOptions luceneOptions)</emphasis> {\n"
+"        Date date = (Date) value;\n"
+"        Calendar cal = GregorianCalendar.getInstance(GMT);\n"
+"        cal.setTime(date);\n"
+"        int year = cal.get(Calendar.YEAR);\n"
+"        int month = cal.get(Calendar.MONTH) + 1;\n"
+"        int day = cal.get(Calendar.DAY_OF_MONTH);\n"
+"  \n"
+"        // set year\n"
+"        Field field = new Field(name + \".year\", String.valueOf(year),\n"
+"            luceneOptions.getStore(), luceneOptions.getIndex(),\n"
+"            luceneOptions.getTermVector());\n"
+"        field.setBoost(luceneOptions.getBoost());\n"
+"        document.add(field);\n"
+"  \n"
+"        // set month and pad it if needed\n"
+"        field = new Field(name + \".month\", month &lt; 10 ? \"0\" : \"\"\n"
+"            + String.valueOf(month), luceneOptions.getStore(),\n"
+"            luceneOptions.getIndex(), luceneOptions.getTermVector());\n"
+"        field.setBoost(luceneOptions.getBoost());\n"
+"        document.add(field);\n"
+"  \n"
+"        // set day and pad it if needed\n"
+"        field = new Field(name + \".day\", day &lt; 10 ? \"0\" : \"\"\n"
+"            + String.valueOf(day), luceneOptions.getStore(),\n"
+"            luceneOptions.getIndex(), luceneOptions.getTermVector());\n"
+"        field.setBoost(luceneOptions.getBoost());\n"
+"        document.add(field);\n"
+"    }\n"
+"}\n"
+"\n"
+"//property\n"
+"<emphasis role=\"bold\">@FieldBridge(impl = DateSplitBridge.class)</"
+"emphasis>\n"
+"private Date date;"
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:960
+#, no-c-format
+msgid "ClassBridge"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:962
+#, no-c-format
+msgid ""
+"It is sometimes useful to combine more than one property of a given entity "
+"and index this combination in a specific way into the Lucene index. The "
+"<classname>@ClassBridge</classname> and <classname>@ClassBridge</classname> "
+"annotations can be defined at the class level (as opposed to the property "
+"level). In this case the custom field bridge implementation receives the "
+"entity instance as the value parameter instead of a particular property. "
+"Though not shown in this example, <classname>@ClassBridge</classname> "
+"supports the <methodname>termVector</methodname> attribute discussed in "
+"section <xref linkend=\"basic-mapping\"/>."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:974
+#, no-c-format
+msgid "Implementing a class bridge"
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:976
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed\n"
+"<emphasis role=\"bold\">@ClassBridge</emphasis>(name=\"branchnetwork\",\n"
+"             index=Index.TOKENIZED,\n"
+"             store=Store.YES,\n"
+"             impl = <emphasis role=\"bold\">CatFieldsClassBridge.class</"
+"emphasis>,\n"
+"             params = @Parameter( name=\"sepChar\", value=\" \" ) )\n"
+"public class Department {\n"
+"    private int id;\n"
+"    private String network;\n"
+"    private String branchHead;\n"
+"    private String branch;\n"
+"    private Integer maxEmployees\n"
+"    ...\n"
+"}\n"
+"\n"
+"\n"
+"public class CatFieldsClassBridge implements FieldBridge, "
+"ParameterizedBridge {\n"
+"    private String sepChar;\n"
+"\n"
+"    public void setParameterValues(Map parameters) {\n"
+"        this.sepChar = (String) parameters.get( \"sepChar\" );\n"
+"    }\n"
+"\n"
+"    <emphasis role=\"bold\">public void set(String name, Object value, "
+"Document document, LuceneOptions luceneOptions)</emphasis> {\n"
+"        // In this particular class the name of the new field was passed\n"
+"        // from the name field of the ClassBridge Annotation. This is not\n"
+"        // a requirement. It just works that way in this instance. The\n"
+"        // actual name could be supplied by hard coding it below.\n"
+"        Department dep = (Department) value;\n"
+"        String fieldValue1 = dep.getBranch();\n"
+"        if ( fieldValue1 == null ) {\n"
+"            fieldValue1 = \"\";\n"
+"        }\n"
+"        String fieldValue2 = dep.getNetwork();\n"
+"        if ( fieldValue2 == null ) {\n"
+"            fieldValue2 = \"\";\n"
+"        }\n"
+"        String fieldValue = fieldValue1 + sepChar + fieldValue2;\n"
+"        Field field = new Field( name, fieldValue, luceneOptions.getStore(), "
+"luceneOptions.getIndex(), luceneOptions.getTermVector() );\n"
+"        field.setBoost( luceneOptions.getBoost() );\n"
+"        document.add( field );\n"
+"   }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:979
+#, no-c-format
+msgid ""
+"In this example, the particular <classname>CatFieldsClassBridge</classname> "
+"is applied to the <literal>department</literal> instance, the field bridge "
+"then concatenate both branch and network and index the concatenation."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:989 mapping.xml:1014
+#, no-c-format
+msgid "Providing your own id"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:992
+#, no-c-format
+msgid "This part of the documentation is a work in progress."
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:995
+#, no-c-format
+msgid ""
+"You can provide your own id for Hibernate Search if you are extending the "
+"internals. You will have to generate a unique value so it can be given to "
+"Lucene to be indexed. This will have to be given to Hibernate Search when "
+"you create an org.hibernate.search.Work object - the document id is required "
+"in the constructor."
+msgstr ""
+
+#. Tag: title
+#: mapping.xml:1002
+#, no-c-format
+msgid "The ProvidedId annotation"
+msgstr ""
+
+#. Tag: para
+#: mapping.xml:1004
+#, no-c-format
+msgid ""
+"Unlike conventional Hibernate Search API and @DocumentId, this annotation is "
+"used on the class and not a field. You also can provide your own bridge "
+"implementation when you put in this annotation by calling the bridge() which "
+"is on @ProvidedId. Also, if you annotate a class with @ProvidedId, your "
+"subclasses will also get the annotation - but it is not done by using the "
+"java.lang.annotations. at Inherited. Be sure however, to <emphasis>not</"
+"emphasis> use this annotation with @DocumentId as your system will break."
+msgstr ""
+
+#. Tag: programlisting
+#: mapping.xml:1016
+#, no-c-format
+msgid ""
+"@ProvidedId (bridge = org.my.own.package.MyCustomBridge)\n"
+"@Indexed\n"
+"public class MyClass{\n"
+"    @Field\n"
+"    String MyString;\n"
+"    ...\n"
+"}"
+msgstr ""


Property changes on: search/trunk/src/main/docbook/zh-CN/modules/mapping.po
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/zh-CN/modules/optimize.po
===================================================================
--- search/trunk/src/main/docbook/zh-CN/modules/optimize.po	                        (rev 0)
+++ search/trunk/src/main/docbook/zh-CN/modules/optimize.po	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,215 @@
+# Chinese translations for PACKAGE package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: 2009-05-26 15:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: optimize.xml:30
+#, no-c-format
+msgid "Index Optimization"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:32
+#, no-c-format
+msgid ""
+"From time to time, the Lucene index needs to be optimized. The process is "
+"essentially a defragmentation. Until an optimization is triggered Lucene "
+"only marks deleted documents as such, no physical deletions are applied. "
+"During the optimization process the deletions will be applied which also "
+"effects the number of files in the Lucene Directory."
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:38
+#, no-c-format
+msgid ""
+"Optimizing the Lucene index speeds up searches but has no effect on the "
+"indexation (update) performance. During an optimization, searches can be "
+"performed, but will most likely be slowed down. All index updates will be "
+"stopped. It is recommended to schedule optimization:"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:45
+#, no-c-format
+msgid "on an idle system or when the searches are less frequent"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:49
+#, no-c-format
+msgid "after a lot of index modifications"
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:54
+#, no-c-format
+msgid "Automatic optimization"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:56
+#, no-c-format
+msgid "Hibernate Search can automatically optimize an index after:"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:60
+#, no-c-format
+msgid "a certain amount of operations (insertion, deletion)"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:64
+#, no-c-format
+msgid "or a certain amount of transactions"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:68
+#, no-c-format
+msgid ""
+"The configuration for automatic index optimization can be defined on a "
+"global level or per index:"
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:72
+#, no-c-format
+msgid "Defining automatic optimization parameters"
+msgstr ""
+
+#. Tag: programlisting
+#: optimize.xml:74
+#, no-c-format
+msgid ""
+"hibernate.search.default.optimizer.operation_limit.max = 1000\n"
+"hibernate.search.default.optimizer.transaction_limit.max = 100\n"
+"hibernate.search.Animal.optimizer.transaction_limit.max = 50"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:77
+#, no-c-format
+msgid ""
+"An optimization will be triggered to the <literal>Animal</literal> index as "
+"soon as either:"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:82
+#, no-c-format
+msgid "the number of additions and deletions reaches 1000"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:86
+#, no-c-format
+msgid ""
+"the number of transactions reaches 50 (<constant>hibernate.search.Animal."
+"optimizer.transaction_limit.max</constant> having priority over "
+"<constant>hibernate.search.default.optimizer.transaction_limit.max</"
+"constant>)"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:93
+#, no-c-format
+msgid ""
+"If none of these parameters are defined, no optimization is processed "
+"automatically."
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:98
+#, no-c-format
+msgid "Manual optimization"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:100
+#, no-c-format
+msgid ""
+"You can programmatically optimize (defragment) a Lucene index from Hibernate "
+"Search through the <classname>SearchFactory</classname>:"
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:104
+#, no-c-format
+msgid "Programmatic index optimization"
+msgstr ""
+
+#. Tag: programlisting
+#: optimize.xml:106
+#, no-c-format
+msgid ""
+"FullTextSession fullTextSession = Search.getFullTextSession"
+"(regularSession);\n"
+"SearchFactory searchFactory = fullTextSession.getSearchFactory();\n"
+"\n"
+"searchFactory.optimize(Order.class);\n"
+"// or\n"
+"searchFactory.optimize();"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:109
+#, no-c-format
+msgid ""
+"The first example optimizes the Lucene index holding <classname>Order</"
+"classname>s; the second, optimizes all indexes."
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:113
+#, no-c-format
+msgid ""
+"<literal>searchFactory.optimize()</literal> has no effect on a JMS backend. "
+"You must apply the optimize operation on the Master node."
+msgstr ""
+
+#. Tag: title
+#: optimize.xml:120
+#, no-c-format
+msgid "Adjusting optimization"
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:122
+#, no-c-format
+msgid ""
+"Apache Lucene has a few parameters to influence how optimization is "
+"performed. Hibernate Search exposes those parameters."
+msgstr ""
+
+#. Tag: para
+#: optimize.xml:125
+#, no-c-format
+msgid ""
+"Further index optimization parameters include: <itemizedlist> <listitem> "
+"<literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|"
+"transaction].max_buffered_docs</literal> </listitem> <listitem> "
+"<literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|"
+"transaction].max_field_length</literal> </listitem> <listitem> "
+"<literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|"
+"transaction].max_merge_docs</literal> </listitem> <listitem> "
+"<literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|"
+"transaction].merge_factor</literal> </listitem> <listitem> "
+"<literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|"
+"transaction].ram_buffer_size</literal> </listitem> <listitem> "
+"<literal>hibernate.search.[default|&lt;indexname&gt;].indexwriter.[batch|"
+"transaction].term_index_interval</literal> </listitem> </itemizedlist> See "
+"<xref linkend=\"lucene-indexing-performance\"/> for more details."
+msgstr ""


Property changes on: search/trunk/src/main/docbook/zh-CN/modules/optimize.po
___________________________________________________________________
Name: svn:eol-style
   + native

Added: search/trunk/src/main/docbook/zh-CN/modules/query.po
===================================================================
--- search/trunk/src/main/docbook/zh-CN/modules/query.po	                        (rev 0)
+++ search/trunk/src/main/docbook/zh-CN/modules/query.po	2009-05-26 17:04:16 UTC (rev 16621)
@@ -0,0 +1,1349 @@
+# Chinese translations for PACKAGE package.
+# Automatically generated, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-05-26 15:46+0000\n"
+"PO-Revision-Date: 2009-05-26 15:46+0000\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: query.xml:30
+#, no-c-format
+msgid "Querying"
+msgstr ""
+
+#. Tag: para
+#: query.xml:32
+#, no-c-format
+msgid ""
+"The second most important capability of Hibernate Search is the ability to "
+"execute a Lucene query and retrieve entities managed by an Hibernate "
+"session, providing the power of Lucene without leaving the Hibernate "
+"paradigm, and giving another dimension to the Hibernate classic search "
+"mechanisms (HQL, Criteria query, native SQL query). Preparing and executing "
+"a query consists of four simple steps:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:41
+#, no-c-format
+msgid "Creating a <classname>FullTextSession</classname>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:45
+#, no-c-format
+msgid "<para>Creating a Lucene query</para>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:49
+#, no-c-format
+msgid ""
+"Wrapping the Lucene query using a <classname>org.hibernate.Query</classname>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:54
+#, no-c-format
+msgid ""
+"Executing the search by calling for example <methodname>list()</methodname> "
+"or <methodname>scroll()</methodname>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:60
+#, no-c-format
+msgid ""
+"To access the querying facilities, you have to use an "
+"<classname>FullTextSession</classname>. This Search specific session wraps a "
+"regular <classname>org.hibernate.Session</classname> to provide query and "
+"indexing capabilities."
+msgstr ""
+
+#. Tag: title
+#: query.xml:66
+#, no-c-format
+msgid "Creating a FullTextSession"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:68
+#, no-c-format
+msgid ""
+"Session session = sessionFactory.openSession();\n"
+"...\n"
+"FullTextSession fullTextSession = Search.getFullTextSession(session);"
+msgstr ""
+
+#. Tag: para
+#: query.xml:71
+#, no-c-format
+msgid ""
+"The actual search facility is built on native Lucene queries which the "
+"following example illustrates."
+msgstr ""
+
+#. Tag: title
+#: query.xml:75
+#, no-c-format
+msgid "<title>Creating a Lucene query</title>"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:77
+#, no-c-format
+msgid ""
+"org.apache.lucene.queryParser.QueryParser parser = \n"
+"    new QueryParser(\"title\", new StopAnalyzer() );\n"
+"\n"
+"org.apache.lucene.search.Query luceneQuery = parser.parse( \"summary:Festina "
+"Or brand:Seiko\" );\n"
+"<emphasis role=\"bold\">org.hibernate.Query fullTextQuery = fullTextSession."
+"createFullTextQuery( luceneQuery );\n"
+"        </emphasis>\n"
+"List result = fullTextQuery.list(); //return a list of managed objects"
+msgstr ""
+
+#. Tag: para
+#: query.xml:80
+#, no-c-format
+msgid ""
+"The Hibernate query built on top of the Lucene query is a regular "
+"<literal>org.hibernate.Query</literal>, which means you are in the same "
+"paradigm as the other Hibernate query facilities (HQL, Native or Criteria). "
+"The regular <literal>list()</literal> , <literal>uniqueResult()</literal>, "
+"<literal>iterate()</literal> and <literal>scroll()</literal> methods can be "
+"used."
+msgstr ""
+
+#. Tag: para
+#: query.xml:87
+#, no-c-format
+msgid ""
+"In case you are using the Java Persistence APIs of Hibernate (aka EJB 3.0 "
+"Persistence), the same extensions exist:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:91
+#, no-c-format
+msgid "Creating a Search query using the JPA API"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:93
+#, no-c-format
+msgid ""
+"EntityManager em = entityManagerFactory.createEntityManager();\n"
+"\n"
+"FullTextEntityManager fullTextEntityManager = \n"
+"    org.hibernate.hibernate.search.jpa.Search.getFullTextEntityManager(em);\n"
+"\n"
+"...\n"
+"org.apache.lucene.queryParser.QueryParser parser = \n"
+"    new QueryParser(\"title\", new StopAnalyzer() );\n"
+"\n"
+"org.apache.lucene.search.Query luceneQuery = parser.parse( \"summary:Festina "
+"Or brand:Seiko\" );\n"
+"<emphasis role=\"bold\">javax.persistence.Query fullTextQuery = "
+"fullTextEntityManager.createFullTextQuery( luceneQuery );</emphasis>\n"
+"\n"
+"List result = fullTextQuery.getResultList(); //return a list of managed "
+"objects"
+msgstr ""
+
+#. Tag: para
+#: query.xml:96
+#, no-c-format
+msgid ""
+"The following examples we will use the Hibernate APIs but the same example "
+"can be easily rewritten with the Java Persistence API by just adjusting the "
+"way the <classname>FullTextQuery</classname> is retrieved."
+msgstr ""
+
+#. Tag: title
+#: query.xml:102
+#, no-c-format
+msgid "Building queries"
+msgstr ""
+
+#. Tag: para
+#: query.xml:104
+#, no-c-format
+msgid ""
+"Hibernate Search queries are built on top of Lucene queries which gives you "
+"total freedom on the type of Lucene query you want to execute. However, once "
+"built, Hibernate Search wraps further query processing using <classname>org."
+"hibernate.Query</classname> as your primary query manipulation API."
+msgstr ""
+
+#. Tag: title
+#: query.xml:111
+#, no-c-format
+msgid "Building a Lucene query"
+msgstr ""
+
+#. Tag: para
+#: query.xml:113
+#, no-c-format
+msgid ""
+"It is out of the scope of this documentation on how to exactly build a "
+"Lucene query. Please refer to the online Lucene documentation or get hold of "
+"a copy of either Lucene In Action or Hibernate Search in Action."
+msgstr ""
+
+#. Tag: title
+#: query.xml:120
+#, no-c-format
+msgid "Building a Hibernate Search query"
+msgstr ""
+
+#. Tag: title
+#: query.xml:123
+#, no-c-format
+msgid "Generality"
+msgstr ""
+
+#. Tag: para
+#: query.xml:125
+#, no-c-format
+msgid ""
+"Once the Lucene query is built, it needs to be wrapped into an Hibernate "
+"Query."
+msgstr ""
+
+#. Tag: title
+#: query.xml:129
+#, no-c-format
+msgid "Wrapping a Lucene query into a Hibernate Query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:131
+#, no-c-format
+msgid ""
+"FullTextSession fullTextSession = Search.getFullTextSession( session );\n"
+"org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery"
+"( luceneQuery );"
+msgstr ""
+
+#. Tag: para
+#: query.xml:134
+#, no-c-format
+msgid ""
+"If not specified otherwise, the query will be executed against all indexed "
+"entities, potentially returning all types of indexed classes. It is advised, "
+"from a performance point of view, to restrict the returned types:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:140
+#, no-c-format
+msgid "Filtering the search result by entity type"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:142
+#, no-c-format
+msgid ""
+"org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery"
+"( luceneQuery, Customer.class );\n"
+"// or\n"
+"fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery, Item."
+"class, Actor.class );"
+msgstr ""
+
+#. Tag: para
+#: query.xml:145
+#, no-c-format
+msgid ""
+"The first example returns only matching <classname>Customer</classname>s, "
+"the second returns matching <classname>Actor</classname>s and "
+"<classname>Item</classname>s. The type restriction is fully polymorphic "
+"which means that if there are two indexed subclasses <classname>Salesman</"
+"classname> and <classname>Customer</classname> of the baseclass "
+"<classname>Person</classname>, it is possible to just specify "
+"<classname>Person.class</classname> in order to filter on result types."
+msgstr ""
+
+#. Tag: title
+#: query.xml:157
+#, no-c-format
+msgid "Pagination"
+msgstr ""
+
+#. Tag: para
+#: query.xml:159
+#, no-c-format
+msgid ""
+"Out of performance reasons it is recommended to restrict the number of "
+"returned objects per query. In fact is a very common use case anyway that "
+"the user navigates from one page to an other. The way to define pagination "
+"is exactly the way you would define pagination in a plain HQL or Criteria "
+"query."
+msgstr ""
+
+#. Tag: title
+#: query.xml:166
+#, no-c-format
+msgid "Defining pagination for a search query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:168
+#, no-c-format
+msgid ""
+"org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery"
+"( luceneQuery, Customer.class );\n"
+"fullTextQuery.setFirstResult(15); //start from the 15th element\n"
+"fullTextQuery.setMaxResults(10); //return 10 elements"
+msgstr ""
+
+#. Tag: para
+#: query.xml:172
+#, no-c-format
+msgid ""
+"It is still possible to get the total number of matching elements regardless "
+"of the pagination via <methodname>fulltextQuery.</"
+"methodname><methodname>getResultSize()</methodname>"
+msgstr ""
+
+#. Tag: title
+#: query.xml:179
+#, no-c-format
+msgid "Sorting"
+msgstr ""
+
+#. Tag: para
+#: query.xml:181
+#, no-c-format
+msgid ""
+"Apache Lucene provides a very flexible and powerful way to sort results. "
+"While the default sorting (by relevance) is appropriate most of the time, it "
+"can be interesting to sort by one or several other properties. In order to "
+"do so set the Lucene Sort object to apply a Lucene sorting strategy."
+msgstr ""
+
+#. Tag: title
+#: query.xml:188
+#, no-c-format
+msgid ""
+"Specifying a Lucene <classname>Sort</classname> in order to sort the results"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:191
+#, no-c-format
+msgid ""
+"org.hibernate.search.FullTextQuery query = s.createFullTextQuery( query, "
+"Book.class );\n"
+"org.apache.lucene.search.Sort sort = new Sort(new SortField(\"title\"));\n"
+"<emphasis role=\"bold\">query.setSort(sort);</emphasis>\n"
+"List results = query.list();"
+msgstr ""
+
+#. Tag: para
+#: query.xml:194
+#, no-c-format
+msgid ""
+"One can notice the <classname>FullTextQuery</classname> interface which is a "
+"sub interface of <classname>org.hibernate.Query</classname>. Be aware that "
+"fields used for sorting must not be tokenized."
+msgstr ""
+
+#. Tag: title
+#: query.xml:201
+#, no-c-format
+msgid "Fetching strategy"
+msgstr ""
+
+#. Tag: para
+#: query.xml:203
+#, no-c-format
+msgid ""
+"When you restrict the return types to one class, Hibernate Search loads the "
+"objects using a single query. It also respects the static fetching strategy "
+"defined in your domain model."
+msgstr ""
+
+#. Tag: para
+#: query.xml:207
+#, no-c-format
+msgid ""
+"It is often useful, however, to refine the fetching strategy for a specific "
+"use case."
+msgstr ""
+
+#. Tag: title
+#: query.xml:211
+#, no-c-format
+msgid "Specifying <classname>FetchMode</classname> on a query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:214
+#, no-c-format
+msgid ""
+"Criteria criteria = s.createCriteria( Book.class ).setFetchMode( \"authors"
+"\", FetchMode.JOIN );\n"
+"s.createFullTextQuery( luceneQuery ).setCriteriaQuery( criteria );"
+msgstr ""
+
+#. Tag: para
+#: query.xml:217
+#, no-c-format
+msgid ""
+"In this example, the query will return all Books matching the luceneQuery. "
+"The authors collection will be loaded from the same query using an SQL outer "
+"join."
+msgstr ""
+
+#. Tag: para
+#: query.xml:221
+#, no-c-format
+msgid ""
+"When defining a criteria query, it is not needed to restrict the entity "
+"types returned while creating the Hibernate Search query from the full text "
+"session: the type is guessed from the criteria query itself. Only fetch mode "
+"can be adjusted, refrain from applying any other restriction."
+msgstr ""
+
+#. Tag: para
+#: query.xml:227
+#, no-c-format
+msgid ""
+"One cannot use <methodname>setCriteriaQuery</methodname> if more than one "
+"entity type is expected to be returned."
+msgstr ""
+
+#. Tag: title
+#: query.xml:232
+#, no-c-format
+msgid "Projection"
+msgstr ""
+
+#. Tag: para
+#: query.xml:234
+#, no-c-format
+msgid ""
+"For some use cases, returning the domain object (graph) is overkill. Only a "
+"small subset of the properties is necessary. Hibernate Search allows you to "
+"return a subset of properties:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:239
+#, no-c-format
+msgid "Using projection instead of returning the full domain object"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:242
+#, no-c-format
+msgid ""
+"org.hibernate.search.FullTextQuery query = s.createFullTextQuery"
+"( luceneQuery, Book.class );\n"
+"query.<emphasis role=\"bold\">setProjection( \"id\", \"summary\", \"body\", "
+"\"mainAuthor.name\" )</emphasis>;\n"
+"List results = query.list();\n"
+"Object[] firstResult = (Object[]) results.get(0);\n"
+"Integer id = firstResult[0];\n"
+"String summary = firstResult[1];\n"
+"String body = firstResult[2];\n"
+"String authorName = firstResult[3];"
+msgstr ""
+
+#. Tag: para
+#: query.xml:245
+#, no-c-format
+msgid ""
+"Hibernate Search extracts the properties from the Lucene index and convert "
+"them back to their object representation, returning a list of "
+"<classname>Object[]</classname>. Projections avoid a potential database "
+"round trip (useful if the query response time is critical), but has some "
+"constraints:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:253
+#, no-c-format
+msgid ""
+"the properties projected must be stored in the index (<literal>@Field"
+"(store=Store.YES)</literal>), which increase the index size"
+msgstr ""
+
+#. Tag: para
+#: query.xml:259
+#, no-c-format
+msgid ""
+"the properties projected must use a <literal>FieldBridge</literal> "
+"implementing <classname>org.hibernate.search.bridge.TwoWayFieldBridge</"
+"classname> or <literal>org.hibernate.search.bridge.TwoWayStringBridge</"
+"literal>, the latter being the simpler version. All Hibernate Search built-"
+"in types are two-way."
+msgstr ""
+
+#. Tag: para
+#: query.xml:269
+#, no-c-format
+msgid ""
+"you can only project simple properties of the indexed entity or its embedded "
+"associations. This means you cannot project a whole embedded entity."
+msgstr ""
+
+#. Tag: para
+#: query.xml:275
+#, no-c-format
+msgid ""
+"projection does not work on collections or maps which are indexed via "
+"<classname>@IndexedEmbedded</classname>"
+msgstr ""
+
+#. Tag: para
+#: query.xml:280
+#, no-c-format
+msgid ""
+"Projection is useful for another kind of use cases. Lucene provides some "
+"metadata information to the user about the results. By using some special "
+"placeholders, the projection mechanism can retrieve them:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:286
+#, no-c-format
+msgid "Using projection in order to retrieve meta data"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:288
+#, no-c-format
+msgid ""
+"org.hibernate.search.FullTextQuery query = s.createFullTextQuery"
+"( luceneQuery, Book.class );\n"
+"query.<emphasis role=\"bold\">setProjection( FullTextQuery.SCORE, "
+"FullTextQuery.THIS, \"mainAuthor.name\" )</emphasis>;\n"
+"List results = query.list();\n"
+"Object[] firstResult = (Object[]) results.get(0);\n"
+"float score = firstResult[0];\n"
+"Book book = firstResult[1];\n"
+"String authorName = firstResult[2];"
+msgstr ""
+
+#. Tag: para
+#: query.xml:291
+#, no-c-format
+msgid ""
+"You can mix and match regular fields and special placeholders. Here is the "
+"list of available placeholders:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:296
+#, no-c-format
+msgid ""
+"FullTextQuery.THIS: returns the initialized and managed entity (as a non "
+"projected query would have done)."
+msgstr ""
+
+#. Tag: para
+#: query.xml:301
+#, no-c-format
+msgid ""
+"FullTextQuery.DOCUMENT: returns the Lucene Document related to the object "
+"projected."
+msgstr ""
+
+#. Tag: para
+#: query.xml:306
+#, no-c-format
+msgid "FullTextQuery.OBJECT_CLASS: returns the class of the indexed entity."
+msgstr ""
+
+#. Tag: para
+#: query.xml:311
+#, no-c-format
+msgid ""
+"FullTextQuery.SCORE: returns the document score in the query. Scores are "
+"handy to compare one result against an other for a given query but are "
+"useless when comparing the result of different queries."
+msgstr ""
+
+#. Tag: para
+#: query.xml:318
+#, no-c-format
+msgid "FullTextQuery.ID: the id property value of the projected object."
+msgstr ""
+
+#. Tag: para
+#: query.xml:323
+#, no-c-format
+msgid ""
+"FullTextQuery.DOCUMENT_ID: the Lucene document id. Careful, Lucene document "
+"id can change overtime between two different IndexReader opening (this "
+"feature is experimental)."
+msgstr ""
+
+#. Tag: para
+#: query.xml:329
+#, no-c-format
+msgid ""
+"FullTextQuery.EXPLANATION: returns the Lucene Explanation object for the "
+"matching object/document in the given query. Do not use if you retrieve a "
+"lot of data. Running explanation typically is as costly as running the whole "
+"Lucene query per matching element. Make sure you use projection!"
+msgstr ""
+
+#. Tag: title
+#: query.xml:341
+#, no-c-format
+msgid "Retrieving the results"
+msgstr ""
+
+#. Tag: para
+#: query.xml:343
+#, no-c-format
+msgid ""
+"Once the Hibernate Search query is built, executing it is in no way "
+"different than executing a HQL or Criteria query. The same paradigm and "
+"object semantic applies. All the common operations are available: "
+"<methodname>list()</methodname>, <methodname>uniqueResult()</methodname>, "
+"<methodname>iterate()</methodname>, <methodname>scroll()</methodname>."
+msgstr ""
+
+#. Tag: title
+#: query.xml:351
+#, no-c-format
+msgid "Performance considerations"
+msgstr ""
+
+#. Tag: para
+#: query.xml:353
+#, no-c-format
+msgid ""
+"If you expect a reasonable number of results (for example using pagination) "
+"and expect to work on all of them, <methodname>list()</methodname> or "
+"<methodname>uniqueResult()</methodname> are recommended. <methodname>list()</"
+"methodname> work best if the entity <literal>batch-size</literal> is set up "
+"properly. Note that Hibernate Search has to process all Lucene Hits elements "
+"(within the pagination) when using <methodname>list()</methodname> , "
+"<methodname>uniqueResult()</methodname> and <methodname>iterate()</"
+"methodname>."
+msgstr ""
+
+#. Tag: para
+#: query.xml:364
+#, no-c-format
+msgid ""
+"If you wish to minimize Lucene document loading, <methodname>scroll()</"
+"methodname> is more appropriate. Don't forget to close the "
+"<classname>ScrollableResults</classname> object when you're done, since it "
+"keeps Lucene resources. If you expect to use <methodname>scroll,</"
+"methodname> but wish to load objects in batch, you can use <methodname>query."
+"setFetchSize()</methodname>. When an object is accessed, and if not already "
+"loaded, Hibernate Search will load the next <literal>fetchSize</literal> "
+"objects in one pass."
+msgstr ""
+
+#. Tag: para
+#: query.xml:373
+#, no-c-format
+msgid "Pagination is a preferred method over scrolling though."
+msgstr ""
+
+#. Tag: title
+#: query.xml:377
+#, no-c-format
+msgid "Result size"
+msgstr ""
+
+#. Tag: para
+#: query.xml:379
+#, no-c-format
+msgid "It is sometime useful to know the total number of matching documents:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:384
+#, no-c-format
+msgid "for the Google-like feature 1-10 of about 888,000,000"
+msgstr ""
+
+#. Tag: para
+#: query.xml:388
+#, no-c-format
+msgid "to implement a fast pagination navigation"
+msgstr ""
+
+#. Tag: para
+#: query.xml:392
+#, no-c-format
+msgid ""
+"to implement a multi step search engine (adding approximation if the "
+"restricted query return no or not enough results)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:397
+#, no-c-format
+msgid ""
+"Of course it would be too costly to retrieve all the matching documents. "
+"Hibernate Search allows you to retrieve the total number of matching "
+"documents regardless of the pagination parameters. Even more interesting, "
+"you can retrieve the number of matching elements without triggering a single "
+"object load."
+msgstr ""
+
+#. Tag: title
+#: query.xml:404
+#, no-c-format
+msgid "Determining the result size of a query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:406
+#, no-c-format
+msgid ""
+"org.hibernate.search.FullTextQuery query = s.createFullTextQuery"
+"( luceneQuery, Book.class );\n"
+"assert 3245 == <emphasis role=\"bold\">query.getResultSize()</emphasis>; //"
+"return the number of matching books without loading a single one\n"
+"\n"
+"org.hibernate.search.FullTextQuery query = s.createFullTextQuery"
+"( luceneQuery, Book.class );\n"
+"query.setMaxResult(10);\n"
+"List results = query.list();\n"
+"assert 3245 == <emphasis role=\"bold\">query.getResultSize()</emphasis>; //"
+"return the total number of matching books regardless of pagination"
+msgstr ""
+
+#. Tag: para
+#: query.xml:410
+#, no-c-format
+msgid ""
+"Like Google, the number of results is approximative if the index is not "
+"fully up-to-date with the database (asynchronous cluster for example)."
+msgstr ""
+
+#. Tag: title
+#: query.xml:417
+#, no-c-format
+msgid "ResultTransformer"
+msgstr ""
+
+#. Tag: para
+#: query.xml:419
+#, no-c-format
+msgid ""
+"Especially when using projection, the data structure returned by a query (an "
+"object array in this case), is not always matching the application needs. It "
+"is possible to apply a <classname>ResultTransformer</classname> operation "
+"post query to match the targeted data structure:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:426
+#, no-c-format
+msgid "Using ResultTransformer in conjunction with projections"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:428
+#, no-c-format
+msgid ""
+"org.hibernate.search.FullTextQuery query = s.createFullTextQuery"
+"( luceneQuery, Book.class );\n"
+"query.setProjection( \"title\", \"mainAuthor.name\" );\n"
+"\n"
+"<emphasis role=\"bold\">query.setResultTransformer( \n"
+"    new StaticAliasToBeanResultTransformer( BookView.class, \"title\", "
+"\"author\" ) \n"
+");</emphasis>\n"
+"List&lt;BookView&gt; results = (List&lt;BookView&gt;) query.list();\n"
+"for(BookView view : results) {\n"
+"    log.info( \"Book: \" + view.getTitle() + \", \" + view.getAuthor() );\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:431
+#, no-c-format
+msgid ""
+"Examples of <classname>ResultTransformer</classname> implementations can be "
+"found in the Hibernate Core codebase."
+msgstr ""
+
+#. Tag: title
+#: query.xml:436
+#, no-c-format
+msgid "Understanding results"
+msgstr ""
+
+#. Tag: para
+#: query.xml:438
+#, no-c-format
+msgid ""
+"You will find yourself sometimes puzzled by a result showing up in a query "
+"or a result not showing up in a query. Luke is a great tool to understand "
+"those mysteries. However, Hibernate Search also gives you access to the "
+"Lucene <classname>Explanation</classname> object for a given result (in a "
+"given query). This class is considered fairly advanced to Lucene users but "
+"can provide a good understanding of the scoring of an object. You have two "
+"ways to access the Explanation object for a given result:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:449
+#, no-c-format
+msgid "Use the <methodname>fullTextQuery.explain(int)</methodname> method"
+msgstr ""
+
+#. Tag: para
+#: query.xml:454
+#, no-c-format
+msgid "Use projection"
+msgstr ""
+
+#. Tag: para
+#: query.xml:458
+#, no-c-format
+msgid ""
+"The first approach takes a document id as a parameter and return the "
+"Explanation object. The document id can be retrieved using projection and "
+"the <literal>FullTextQuery.DOCUMENT_ID</literal> constant."
+msgstr ""
+
+#. Tag: para
+#: query.xml:464
+#, no-c-format
+msgid ""
+"The Document id has nothing to do with the entity id. Do not mess up these "
+"two notions."
+msgstr ""
+
+#. Tag: para
+#: query.xml:468
+#, no-c-format
+msgid ""
+"The second approach let's you project the <classname>Explanation</classname> "
+"object using the <literal>FullTextQuery.EXPLANATION</literal> constant."
+msgstr ""
+
+#. Tag: title
+#: query.xml:473
+#, no-c-format
+msgid "Retrieving the Lucene Explanation object using projection"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:476
+#, no-c-format
+msgid ""
+"FullTextQuery ftQuery = s.createFullTextQuery( luceneQuery, Dvd.class )\n"
+"        .setProjection( FullTextQuery.DOCUMENT_ID, <emphasis role=\"bold"
+"\">FullTextQuery.EXPLANATION</emphasis>, FullTextQuery.THIS );\n"
+"@SuppressWarnings(\"unchecked\") List&lt;Object[]&gt; results = ftQuery.list"
+"();\n"
+"for (Object[] result : results) {\n"
+"    Explanation e = (Explanation) result[1];\n"
+"    display( e.toString() );\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:479
+#, no-c-format
+msgid ""
+"Be careful, building the explanation object is quite expensive, it is "
+"roughly as expensive as running the Lucene query again. Don't do it if you "
+"don't need the object"
+msgstr ""
+
+#. Tag: title
+#: query.xml:486
+#, no-c-format
+msgid "Filters"
+msgstr ""
+
+#. Tag: para
+#: query.xml:488
+#, no-c-format
+msgid ""
+"Apache Lucene has a powerful feature that allows to filter query results "
+"according to a custom filtering process. This is a very powerful way to "
+"apply additional data restrictions, especially since filters can be cached "
+"and reused. Some interesting use cases are:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:495
+#, no-c-format
+msgid "security"
+msgstr ""
+
+#. Tag: para
+#: query.xml:499
+#, no-c-format
+msgid "temporal data (eg. view only last month's data)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:503
+#, no-c-format
+msgid "population filter (eg. search limited to a given category)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:508
+#, no-c-format
+msgid "and many more"
+msgstr ""
+
+#. Tag: para
+#: query.xml:512
+#, no-c-format
+msgid ""
+"Hibernate Search pushes the concept further by introducing the notion of "
+"parameterizable named filters which are transparently cached. For people "
+"familiar with the notion of Hibernate Core filters, the API is very similar:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:518
+#, no-c-format
+msgid "Enabling fulltext filters for a given query"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:520
+#, no-c-format
+msgid ""
+"fullTextQuery = s.createFullTextQuery( query, Driver.class );\n"
+"fullTextQuery.enableFullTextFilter(\"bestDriver\");\n"
+"fullTextQuery.enableFullTextFilter(\"security\").setParameter( \"login\", "
+"\"andre\" );\n"
+"fullTextQuery.list(); //returns only best drivers where andre has credentials"
+msgstr ""
+
+#. Tag: para
+#: query.xml:523
+#, no-c-format
+msgid ""
+"In this example we enabled two filters on top of the query. You can enable "
+"(or disable) as many filters as you like."
+msgstr ""
+
+#. Tag: para
+#: query.xml:526
+#, no-c-format
+msgid ""
+"Declaring filters is done through the <classname>@FullTextFilterDef</"
+"classname> annotation. This annotation can be on any <literal>@Indexed</"
+"literal> entity regardless of the query the filter is later applied to. This "
+"implies that filter definitions are global and their names must be unique. A "
+"<classname>SearchException</classname> is thrown in case two different "
+"<classname>@FullTextFilterDef</classname> annotations with the same name are "
+"defined. Each named filter has to specify its actual filter implementation."
+msgstr ""
+
+#. Tag: title
+#: query.xml:537
+#, no-c-format
+msgid "Defining and implementing a Filter"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:539
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed\n"
+"@FullTextFilterDefs( {\n"
+"    <emphasis role=\"bold\">@FullTextFilterDef(name = \"bestDriver\", impl = "
+"BestDriversFilter.class)</emphasis>, \n"
+"    <emphasis role=\"bold\">@FullTextFilterDef(name = \"security\", impl = "
+"SecurityFilterFactory.class)</emphasis> \n"
+"})\n"
+"public class Driver { ... }"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:541
+#, no-c-format
+msgid ""
+"public class BestDriversFilter extends <emphasis\n"
+"          role=\"bold\">org.apache.lucene.search.Filter</emphasis> {\n"
+"\n"
+"    public DocIdSet getDocIdSet(IndexReader reader) throws IOException {\n"
+"        OpenBitSet bitSet = new OpenBitSet( reader.maxDoc() );\n"
+"        TermDocs termDocs = reader.termDocs( new Term( \"score\", \"5"
+"\" ) );\n"
+"        while ( termDocs.next() ) {\n"
+"            bitSet.set( termDocs.doc() );\n"
+"        }\n"
+"        return bitSet;\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:544
+#, no-c-format
+msgid ""
+"<classname>BestDriversFilter</classname> is an example of a simple Lucene "
+"filter which reduces the result set to drivers whose score is 5. In this "
+"example the specified filter implements the <literal>org.apache.lucene."
+"search.Filter</literal> directly and contains a no-arg constructor."
+msgstr ""
+
+#. Tag: para
+#: query.xml:550
+#, no-c-format
+msgid ""
+"If your Filter creation requires additional steps or if the filter you want "
+"to use does not have a no-arg constructor, you can use the factory pattern:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:555
+#, no-c-format
+msgid "Creating a filter using the factory pattern"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:557
+#, no-c-format
+msgid ""
+"@Entity\n"
+"@Indexed\n"
+"@FullTextFilterDef(name = \"bestDriver\", impl = BestDriversFilterFactory."
+"class)\n"
+"public class Driver { ... }\n"
+"\n"
+"public class BestDriversFilterFactory {\n"
+"\n"
+"    <emphasis role=\"bold\">@Factory</emphasis>\n"
+"    public Filter getFilter() {\n"
+"        //some additional steps to cache the filter results per IndexReader\n"
+"        Filter bestDriversFilter = new BestDriversFilter();\n"
+"        return new CachingWrapperFilter(bestDriversFilter);\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:560
+#, no-c-format
+msgid ""
+"Hibernate Search will look for a <literal>@Factory</literal> annotated "
+"method and use it to build the filter instance. The factory must have a no-"
+"arg constructor. For people familiar with JBoss Seam, this is similar to the "
+"component factory pattern, but the annotation is different!"
+msgstr ""
+
+#. Tag: para
+#: query.xml:566
+#, no-c-format
+msgid ""
+"Named filters come in handy where parameters have to be passed to the "
+"filter. For example a security filter might want to know which security "
+"level you want to apply:"
+msgstr ""
+
+#. Tag: title
+#: query.xml:571
+#, no-c-format
+msgid "Passing parameters to a defined filter"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:573
+#, no-c-format
+msgid ""
+"fullTextQuery = s.createFullTextQuery( query, Driver.class );\n"
+"fullTextQuery.enableFullTextFilter(\"security\")<emphasis role=\"bold\">."
+"setParameter( \"level\", 5 )</emphasis>;"
+msgstr ""
+
+#. Tag: para
+#: query.xml:576
+#, no-c-format
+msgid ""
+"Each parameter name should have an associated setter on either the filter or "
+"filter factory of the targeted named filter definition."
+msgstr ""
+
+#. Tag: title
+#: query.xml:580
+#, no-c-format
+msgid "Using parameters in the actual filter implementation"
+msgstr ""
+
+#. Tag: programlisting
+#: query.xml:582
+#, no-c-format
+msgid ""
+"public class SecurityFilterFactory {\n"
+"    private Integer level;\n"
+"\n"
+"    /**\n"
+"     * injected parameter\n"
+"     */\n"
+"    <emphasis role=\"bold\">public void setLevel(Integer level)</emphasis> "
+"{\n"
+"        this.level = level;\n"
+"    }\n"
+"\n"
+"    <emphasis role=\"bold\">@Key\n"
+"    public FilterKey getKey()</emphasis> {\n"
+"        StandardFilterKey key = new StandardFilterKey();\n"
+"        key.addParameter( level );\n"
+"        return key;\n"
+"    }\n"
+"\n"
+"    @Factory\n"
+"    public Filter getFilter() {\n"
+"        Query query = new TermQuery( new Term(\"level\", level.toString"
+"() ) );\n"
+"        return new CachingWrapperFilter( new QueryWrapperFilter(query) );\n"
+"    }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: query.xml:585
+#, no-c-format
+msgid ""
+"Note the method annotated <classname>@Key</classname> returning a "
+"<classname>FilterKey</classname> object. The returned object has a special "
+"contract: the key object must implement <methodname>equals()</methodname> / "
+"<methodname>hashCode()</methodname> so that 2 keys are equal if and only if "
+"the given <classname>Filter</classname> types are the same and the set of "
+"parameters are the same. In other words, 2 filter keys are equal if and only "
+"if the filters from which the keys are generated can be interchanged. The "
+"key object is used as a key in the cache mechanism."
+msgstr ""
+
+#. Tag: para
+#: query.xml:594
+#, no-c-format
+msgid "<classname>@Key</classname> methods are needed only if:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:598
+#, no-c-format
+msgid "you enabled the filter caching system (enabled by default)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:603
+#, no-c-format
+msgid "your filter has parameters"
+msgstr ""
+
+#. Tag: para
+#: query.xml:607
+#, no-c-format
+msgid ""
+"In most cases, using the <literal>StandardFilterKey</literal> implementation "
+"will be good enough. It delegates the <methodname>equals()</methodname> / "
+"<methodname>hashCode()</methodname> implementation to each of the parameters "
+"equals and hashcode methods."
+msgstr ""
+
+#. Tag: para
+#: query.xml:613
+#, no-c-format
+msgid ""
+"As mentioned before the defined filters are per default cached and the cache "
+"uses a combination of hard and soft references to allow disposal of memory "
+"when needed. The hard reference cache keeps track of the most recently used "
+"filters and transforms the ones least used to <classname>SoftReferences</"
+"classname> when needed. Once the limit of the hard reference cache is "
+"reached additional filters are cached as <classname>SoftReferences</"
+"classname>. To adjust the size of the hard reference cache, use "
+"<literal>hibernate.search.filter.cache_strategy.size</literal> (defaults to "
+"128). For advanced use of filter caching, you can implement your own "
+"<classname>FilterCachingStrategy</classname>. The classname is defined by "
+"<literal>hibernate.search.filter.cache_strategy</literal>."
+msgstr ""
+
+#. Tag: para
+#: query.xml:626
+#, no-c-format
+msgid ""
+"This filter caching mechanism should not be confused with caching the actual "
+"filter results. In Lucene it is common practice to wrap filters using the "
+"<classname>IndexReader</classname> around a <classname>CachingWrapperFilter."
+"</classname> The wrapper will cache the <classname>DocIdSet</classname> "
+"returned from the <methodname>getDocIdSet(IndexReader reader)</methodname> "
+"method to avoid expensive recomputation. It is important to mention that the "
+"computed <classname>DocIdSet</classname> is only cachable for the same "
+"<classname>IndexReader</classname> instance, because the reader effectively "
+"represents the state of the index at the moment it was opened. The document "
+"list cannot change within an opened <classname>IndexReader</classname>. A "
+"different/new<classname> IndexReader</classname> instance, however, works "
+"potentially on a different set of <classname>Document</classname>s (either "
+"from a different index or simply because the index has changed), hence the "
+"cached <classname>DocIdSet</classname> has to be recomputed."
+msgstr ""
+
+#. Tag: para
+#: query.xml:643
+#, no-c-format
+msgid ""
+"Hibernate Search also helps with this aspect of caching. Per default the "
+"<literal>cache</literal> flag of <classname>@FullTextFilterDef </"
+"classname>is set to <literal>FilterCacheModeType."
+"INSTANCE_AND_DOCIDSETRESULTS</literal> which will automatically cache the "
+"filter instance as well as wrap the specified filter around a Hibernate "
+"specific implementation of <classname>CachingWrapperFilter</classname> "
+"(<classname>org.hibernate.search.filter.CachingWrapperFilter</classname>). "
+"In contrast to Lucene's version of this class <classname>SoftReference</"
+"classname>s are used together with a hard reference count (see discussion "
+"about filter cache). The hard reference count can be adjusted using "
+"<literal>hibernate.search.filter.cache_docidresults.size</literal> (defaults "
+"to 5). The wrapping behaviour can be controlled using the "
+"<literal>@FullTextFilterDef.cache</literal> parameter. There are three "
+"different values for this parameter:"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:664
+#, no-c-format
+msgid "Value"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:666
+#, no-c-format
+msgid "Definition"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:672
+#, no-c-format
+msgid "FilterCacheModeType.NONE"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:674
+#, no-c-format
+msgid ""
+"No filter instance and no result is cached by Hibernate Search. For every "
+"filter call, a new filter instance is created. This setting might be useful "
+"for rapidly changing data sets or heavily memory constrained environments."
+msgstr ""
+
+#. Tag: entry
+#: query.xml:681
+#, no-c-format
+msgid "FilterCacheModeType.INSTANCE_ONLY"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:683
+#, no-c-format
+msgid ""
+"The filter instance is cached and reused across concurrent "
+"<methodname>Filter.getDocIdSet()</methodname> calls. <classname>DocIdSet</"
+"classname> results are not cached. This setting is useful when a filter uses "
+"its own specific caching mechanism or the filter results change dynamically "
+"due to application specific events making <classname>DocIdSet</classname> "
+"caching in both cases unnecessary."
+msgstr ""
+
+#. Tag: entry
+#: query.xml:695
+#, no-c-format
+msgid "FilterCacheModeType.INSTANCE_AND_DOCIDSETRESULTS"
+msgstr ""
+
+#. Tag: entry
+#: query.xml:697
+#, no-c-format
+msgid ""
+"Both the filter instance and the <classname>DocIdSet</classname> results are "
+"cached. This is the default value."
+msgstr ""
+
+#. Tag: para
+#: query.xml:702
+#, no-c-format
+msgid ""
+"Last but not least - why should filters be cached? There are two areas where "
+"filter caching shines:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:708
+#, no-c-format
+msgid ""
+"the system does not update the targeted entity index often (in other words, "
+"the IndexReader is reused a lot)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:713
+#, no-c-format
+msgid ""
+"the Filter's DocIdSet is expensive to compute (compared to the time spent to "
+"execute the query)"
+msgstr ""
+
+#. Tag: title
+#: query.xml:720
+#, no-c-format
+msgid "Optimizing the query process"
+msgstr ""
+
+#. Tag: para
+#: query.xml:722
+#, no-c-format
+msgid "Query performance depends on several criteria:"
+msgstr ""
+
+#. Tag: para
+#: query.xml:726
+#, no-c-format
+msgid "the Lucene query itself: read the literature on this subject"
+msgstr ""
+
+#. Tag: para
+#: query.xml:731
+#, no-c-format
+msgid ""
+"the number of object loaded: use pagination (always ;-) ) or index "
+"projection (if needed)"
+msgstr ""
+
+#. Tag: para
+#: query.xml:736
+#, no-c-format
+msgid ""
+"the way Hibernate Search interacts with the Lucene readers: defines the "
+"appropriate <xref linkend=\"search-architecture-readerstrategy\"/>."
+msgstr ""
+
+#. Tag: title
+#: query.xml:744
+#, no-c-format
+msgid "Native Lucene Queries"
+msgstr ""
+
+#. Tag: para
+#: query.xml:746
+#, no-c-format
+msgid ""
+"If you wish to use some specific features of Lucene, you can always run "
+"Lucene specific queries. Check <xref linkend=\"search-lucene-native\"/> for "
+"more information."
+msgstr ""


Property changes on: search/trunk/src/main/docbook/zh-CN/modules/query.po
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the hibernate-commits mailing list