Browse Source

add lang_field

Shinsuke Sugaya 9 years ago
parent
commit
c1b1254ec2

+ 3 - 3
plugin.xml

@@ -53,11 +53,11 @@
 		</antcall>
 		</antcall>
 		<!-- langfield -->
 		<!-- langfield -->
 		<antcall target="install.plugin">
 		<antcall target="install.plugin">
-			<param name="repo.url" value="${maven.release.repo.url}" />
+			<param name="repo.url" value="${maven.snapshot.repo.url}" />
 			<param name="plugin.groupId" value="org/codelibs" />
 			<param name="plugin.groupId" value="org/codelibs" />
 			<param name="plugin.name" value="langfield" />
 			<param name="plugin.name" value="langfield" />
-			<param name="plugin.version" value="2.1.1" />
-			<param name="plugin.zip.version" value="2.1.1" />
+			<param name="plugin.version" value="2.1.2-SNAPSHOT" />
+			<param name="plugin.zip.version" value="2.1.2-20160114.121355-2" />
 		</antcall>
 		</antcall>
 		<!-- kopf -->
 		<!-- kopf -->
 		<get dest="${target.dir}">
 		<get dest="${target.dir}">

+ 2 - 1
src/main/java/org/codelibs/fess/crawler/transformer/FessXpathTransformer.java

@@ -25,6 +25,7 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.HashSet;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 import java.util.Set;
 import java.util.Set;
@@ -123,7 +124,7 @@ public class FessXpathTransformer extends XpathTransformer implements FessTransf
 
 
             final Document document = parser.getDocument();
             final Document document = parser.getDocument();
 
 
-            final Map<String, Object> dataMap = new HashMap<String, Object>();
+            final Map<String, Object> dataMap = new LinkedHashMap<String, Object>();
             for (final Map.Entry<String, String> entry : fieldRuleMap.entrySet()) {
             for (final Map.Entry<String, String> entry : fieldRuleMap.entrySet()) {
                 final String path = entry.getValue();
                 final String path = entry.getValue();
                 try {
                 try {

+ 2 - 0
src/main/resources/fess_indices/fess/doc.json

@@ -448,6 +448,7 @@
       },
       },
       "content": {
       "content": {
         "type": "langstring",
         "type": "langstring",
+        "lang_field": "lang",
         "analyzer": "standard_analyzer",
         "analyzer": "standard_analyzer",
         "term_vector": "with_positions_offsets"
         "term_vector": "with_positions_offsets"
       },
       },
@@ -514,6 +515,7 @@
       },
       },
       "title": {
       "title": {
         "type": "langstring",
         "type": "langstring",
+        "lang_field": "lang",
         "analyzer": "standard_analyzer",
         "analyzer": "standard_analyzer",
         "term_vector": "with_positions_offsets"
         "term_vector": "with_positions_offsets"
       },
       },