incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r157587 - in incubator/graffito/trunk: api/src/java/org/apache/portals/graffito/search/Filter.java components/src/java/org/apache/portals/graffito/search/impl/FilterImpl.java
Date Tue, 15 Mar 2005 20:55:58 GMT
Author: taylor
Date: Tue Mar 15 12:55:55 2005
New Revision: 157587

URL: http://svn.apache.org/viewcvs?view=rev&rev=157587
Log:
add ability to filter to search over a particular field for a full-text search

Modified:
    incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/search/Filter.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/search/impl/FilterImpl.java

Modified: incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/search/Filter.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/search/Filter.java?view=diff&r1=157586&r2=157587
==============================================================================
--- incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/search/Filter.java (original)
+++ incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/search/Filter.java Tue
Mar 15 12:55:55 2005
@@ -51,6 +51,15 @@
      * @param fullTextSearch The full text search string  
      */
     public void addFullTextSearch(String fullTextSearch);
+
+    /**
+     * Search content based on a fullTextSearch. 
+     * Depending on the full text search engine, you can also filter on properties.
+     * 
+     * @param fullTextSearch The full text search string
+     * @param field The field to be searched  
+     */    
+    public void addFullTextSearch(String fullTextSearch, String field);
     
 	/**
 	 * @see org.apache.ojb.broker.query.Criteria#addBetween(java.lang.String, java.lang.Object,
java.lang.Object)

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/search/impl/FilterImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/search/impl/FilterImpl.java?view=diff&r1=157586&r2=157587
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/search/impl/FilterImpl.java
(original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/search/impl/FilterImpl.java
Tue Mar 15 12:55:55 2005
@@ -36,6 +36,7 @@
 {
     private Criteria criteria;
     private String fullTextSearch; 
+    private String field;
     private String scope;
 
     /**
@@ -46,11 +47,19 @@
         this.fullTextSearch = fullTextSearch;
     }
 
+    /**
+     * @see org.apache.portals.graffito.search.Filter#addFullTextSearch(java.lang.String)
+     */
+    public void addFullTextSearch(String fullTextSearch, String field)
+    {
+        this.fullTextSearch = fullTextSearch;
+        this.field = field;
+    }
+
+    
     public FilterImpl()
     {
-        criteria = new Criteria(); 
-        
-        
+        criteria = new Criteria();                 
     }
     
            
@@ -203,5 +212,9 @@
         return this.fullTextSearch;
     }
     
+    public String getField()
+    {
+        return this.field;
+    }
    
 }



Mime
View raw message