portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r1087618 - in /portals/jetspeed-2/portal/trunk: ./ components/jetspeed-search/src/main/java/org/apache/jetspeed/search/lucene/ components/jetspeed-search/src/main/java/org/apache/jetspeed/search/solr/
Date Fri, 01 Apr 2011 07:59:47 GMT
Author: woonsan
Date: Fri Apr  1 07:59:46 2011
New Revision: 1087618

URL: http://svn.apache.org/viewvc?rev=1087618&view=rev
Log:
JS2-1246: Upgrading solr to 3.1.0 and lucene 3.1.0

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/lucene/SearchEngineImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/solr/SolrSearchEngineImpl.java
    portals/jetspeed-2/portal/trunk/pom.xml

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/lucene/SearchEngineImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/lucene/SearchEngineImpl.java?rev=1087618&r1=1087617&r2=1087618&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/lucene/SearchEngineImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/lucene/SearchEngineImpl.java
Fri Apr  1 07:59:46 2011
@@ -121,7 +121,7 @@ public class SearchEngineImpl implements
         
         if (analyzer == null) 
         {
-            analyzer = new StandardAnalyzer(Version.LUCENE_29);
+            analyzer = new StandardAnalyzer(Version.LUCENE_30);
         }
         
         this.optimizeAfterUpdate = optimzeAfterUpdate;
@@ -321,7 +321,7 @@ public class SearchEngineImpl implements
             indexReader = IndexReader.open(directory);
             searcher = new IndexSearcher(indexReader);
             
-            QueryParser queryParser = new QueryParser(Version.LUCENE_29, defaultFieldName,
analyzer);
+            QueryParser queryParser = new QueryParser(Version.LUCENE_30, defaultFieldName,
analyzer);
             Query query = queryParser.parse(queryString);
             TopDocs topDocs = searcher.search(query, topHitsCount);
             
@@ -547,9 +547,8 @@ public class SearchEngineImpl implements
                 addFieldsToDocument(doc, fields, TEXT);
                 
                 List<String> syntheticField = new ArrayList<String>();
-                for (Object obj : doc.getFields())
+                for (Fieldable fieldable : doc.getFields())
                 {
-                    Fieldable fieldable = (Fieldable) obj;
                     String value = fieldable.stringValue();
                     if (value != null)
                     {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/solr/SolrSearchEngineImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/solr/SolrSearchEngineImpl.java?rev=1087618&r1=1087617&r2=1087618&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/solr/SolrSearchEngineImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/solr/SolrSearchEngineImpl.java
Fri Apr  1 07:59:46 2011
@@ -210,49 +210,49 @@ public class SolrSearchEngineImpl implem
                 
                 addFieldsToParsedObject(doc, result);
                 
-                Object type = doc.getFieldValue(ParsedObject.FIELDNAME_TYPE);
+                Object type = doc.getFirstValue(ParsedObject.FIELDNAME_TYPE);
                 if(type != null)
                 {
                     result.setType(type.toString());
                 }
                 
-                Object key = doc.getFieldValue(ParsedObject.FIELDNAME_KEY);
+                Object key = doc.getFirstValue(ParsedObject.FIELDNAME_KEY);
                 if(key != null)
                 {
                     result.setKey(key.toString());
                 }
                 
-                Object description = doc.getFieldValue(ParsedObject.FIELDNAME_DESCRIPTION);
+                Object description = doc.getFirstValue(ParsedObject.FIELDNAME_DESCRIPTION);
                 if(description != null)
                 {
                     result.setDescription(description.toString());
                 }
                 
-                Object title = doc.getFieldValue(ParsedObject.FIELDNAME_TITLE);
+                Object title = doc.getFirstValue(ParsedObject.FIELDNAME_TITLE);
                 if(title != null)
                 {
                     result.setTitle(title.toString());
                 }
                 
-                Object content = doc.getFieldValue(ParsedObject.FIELDNAME_CONTENT);
+                Object content = doc.getFirstValue(ParsedObject.FIELDNAME_CONTENT);
                 if(content != null)
                 {
                     result.setContent(content.toString());
                 }
                 
-                Object language = doc.getFieldValue(ParsedObject.FIELDNAME_LANGUAGE);
+                Object language = doc.getFirstValue(ParsedObject.FIELDNAME_LANGUAGE);
                 if (language != null)
                 {
                     result.setLanguage(language.toString());
                 }
                 
-                Object classname = doc.getFieldValue(ParsedObject.FIELDNAME_CLASSNAME);
+                Object classname = doc.getFirstValue(ParsedObject.FIELDNAME_CLASSNAME);
                 if (classname != null)
                 {
                     result.setClassName(classname.toString());
                 }
                 
-                Object url = doc.getFieldValue(ParsedObject.FIELDNAME_URL);
+                Object url = doc.getFirstValue(ParsedObject.FIELDNAME_URL);
                 if (url != null)
                 {
                     result.setURL(new URL(url.toString()));
@@ -498,7 +498,7 @@ public class SolrSearchEngineImpl implem
             MultiMap multiFields = new MultiValueMap();
             HashMap fieldMap = new HashMap();
             
-            Object classNameField = doc.getFieldValue(ParsedObject.FIELDNAME_CLASSNAME);
+            Object classNameField = doc.getFirstValue(ParsedObject.FIELDNAME_CLASSNAME);
             
             if(classNameField != null)
             {

Modified: portals/jetspeed-2/portal/trunk/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/pom.xml?rev=1087618&r1=1087617&r2=1087618&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/pom.xml Fri Apr  1 07:59:46 2011
@@ -264,12 +264,12 @@
     
     <jdom.version>1.1</jdom.version>
     <log4j.version>1.2.14</log4j.version>
-    <lucene.version>2.9.3</lucene.version>
-    <solr.version>1.4.1</solr.version>
+    <lucene.version>3.1.0</lucene.version>
+    <solr.version>3.1.0</solr.version>
     <myfaces.version>1.1.5</myfaces.version>
     <ojb.version>1.0.3</ojb.version>
     <org.apache.derby.version>10.3.2.1</org.apache.derby.version>
-        <org.apache.pluto.version>2.0.3-SNAPSHOT</org.apache.pluto.version>
+    <org.apache.pluto.version>2.0.3-SNAPSHOT</org.apache.pluto.version>
     <org.apache.portals.bridges.common.version>2.0</org.apache.portals.bridges.common.version>
     <org.apache.portals.bridges.frameworks.version>1.0.4</org.apache.portals.bridges.frameworks.version>
     <org.apache.portals.bridges.velocity.version>2.0</org.apache.portals.bridges.velocity.version>
@@ -792,6 +792,12 @@
         <groupId>org.apache.solr</groupId>
         <artifactId>solr-core</artifactId>
         <version>${solr.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-jdk14</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       
       <dependency>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message