X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=source%2Fmircoders%2Fsearch%2FTextSearchTerm.java;h=04c9f13c6ca93280b34d67092f7804dfa0a10f26;hb=aa507bfd18e723d21e63454a26af3320bb8c27f2;hp=c64145cbfcd808c6a3fce14324e5c9fd212530c5;hpb=a459f111d85598df56c6ab711cec11632676b39c;p=mir.git diff --git a/source/mircoders/search/TextSearchTerm.java b/source/mircoders/search/TextSearchTerm.java index c64145cb..04c9f13c 100755 --- a/source/mircoders/search/TextSearchTerm.java +++ b/source/mircoders/search/TextSearchTerm.java @@ -18,13 +18,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * In addition, as a special exception, The Mir-coders gives permission to link - * the code of this program with any library licensed under the Apache Software License, - * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library - * (or with modified versions of the above that use the same license as the above), - * and distribute linked combinations including the two. You must obey the - * GNU General Public License in all respects for all of the code used other than - * the above mentioned libraries. If you modify this file, you may extend this - * exception to your version of the file, but you are not obligated to do so. + * the code of this program with any library licensed under the Apache Software License, + * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library + * (or with modified versions of the above that use the same license as the above), + * and distribute linked combinations including the two. You must obey the + * GNU General Public License in all respects for all of the code used other than + * the above mentioned libraries. If you modify this file, you may extend this + * exception to your version of the file, but you are not obligated to do so. * If you do not wish to do so, delete this exception statement from your version. */ @@ -58,7 +58,11 @@ public class TextSearchTerm extends SearchTerm{ } public void index(Document doc, Entity entity){ - doc.add(Field.Text(matchField,entity.getValue(partOfEntity))); + String value =entity.getValue(partOfEntity); + + if (value==null) value=""; + + doc.add(Field.Text(matchField,value)); } public void indexValue(Document doc, String value){