Package com.cloudant.index

Examples of com.cloudant.index.SingleDocumentIndex.addField()


            final IndexType type = fo.getType();
            final float boost = (float)fo.getBoost();
            String luceneName = fo.getFieldName();
            if (luceneName == null) luceneName = field;
            switch (type) {
            case STRING: index.addField(luceneName, IndexUtilities.ObjectToString(o), analyzer, boost);break;
            case KEYWORD: index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;
            case BOOLEAN: index.addField(luceneName, o, boost);break;
            // JSON doesn't distinguish between int and long, always returns long
            case INT: index.addField(luceneName, (Long)o, boost);break;
            case LONG: index.addField(luceneName, (Long)o, boost);break;
View Full Code Here


            final float boost = (float)fo.getBoost();
            String luceneName = fo.getFieldName();
            if (luceneName == null) luceneName = field;
            switch (type) {
            case STRING: index.addField(luceneName, IndexUtilities.ObjectToString(o), analyzer, boost);break;
            case KEYWORD: index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;
            case BOOLEAN: index.addField(luceneName, o, boost);break;
            // JSON doesn't distinguish between int and long, always returns long
            case INT: index.addField(luceneName, (Long)o, boost);break;
            case LONG: index.addField(luceneName, (Long)o, boost);break;
            case FLOAT: index.addField(luceneName, (Float)o, boost);break;
View Full Code Here

            String luceneName = fo.getFieldName();
            if (luceneName == null) luceneName = field;
            switch (type) {
            case STRING: index.addField(luceneName, IndexUtilities.ObjectToString(o), analyzer, boost);break;
            case KEYWORD: index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;
            case BOOLEAN: index.addField(luceneName, o, boost);break;
            // JSON doesn't distinguish between int and long, always returns long
            case INT: index.addField(luceneName, (Long)o, boost);break;
            case LONG: index.addField(luceneName, (Long)o, boost);break;
            case FLOAT: index.addField(luceneName, (Float)o, boost);break;
            case DOUBLE: index.addField(luceneName, (Double)o, boost);break;
View Full Code Here

            switch (type) {
            case STRING: index.addField(luceneName, IndexUtilities.ObjectToString(o), analyzer, boost);break;
            case KEYWORD: index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;
            case BOOLEAN: index.addField(luceneName, o, boost);break;
            // JSON doesn't distinguish between int and long, always returns long
            case INT: index.addField(luceneName, (Long)o, boost);break;
            case LONG: index.addField(luceneName, (Long)o, boost);break;
            case FLOAT: index.addField(luceneName, (Float)o, boost);break;
            case DOUBLE: index.addField(luceneName, (Double)o, boost);break;
            case DATE: {
              Date d = null;
View Full Code Here

            case STRING: index.addField(luceneName, IndexUtilities.ObjectToString(o), analyzer, boost);break;
            case KEYWORD: index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;
            case BOOLEAN: index.addField(luceneName, o, boost);break;
            // JSON doesn't distinguish between int and long, always returns long
            case INT: index.addField(luceneName, (Long)o, boost);break;
            case LONG: index.addField(luceneName, (Long)o, boost);break;
            case FLOAT: index.addField(luceneName, (Float)o, boost);break;
            case DOUBLE: index.addField(luceneName, (Double)o, boost);break;
            case DATE: {
              Date d = null;
              d = parseDate((String)o);
View Full Code Here

            case KEYWORD: index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;
            case BOOLEAN: index.addField(luceneName, o, boost);break;
            // JSON doesn't distinguish between int and long, always returns long
            case INT: index.addField(luceneName, (Long)o, boost);break;
            case LONG: index.addField(luceneName, (Long)o, boost);break;
            case FLOAT: index.addField(luceneName, (Float)o, boost);break;
            case DOUBLE: index.addField(luceneName, (Double)o, boost);break;
            case DATE: {
              Date d = null;
              d = parseDate((String)o);
              if (d != null) {
View Full Code Here

            case BOOLEAN: index.addField(luceneName, o, boost);break;
            // JSON doesn't distinguish between int and long, always returns long
            case INT: index.addField(luceneName, (Long)o, boost);break;
            case LONG: index.addField(luceneName, (Long)o, boost);break;
            case FLOAT: index.addField(luceneName, (Float)o, boost);break;
            case DOUBLE: index.addField(luceneName, (Double)o, boost);break;
            case DATE: {
              Date d = null;
              d = parseDate((String)o);
              if (d != null) {
                index.addField(luceneName, d.getTime(), boost);break;
View Full Code Here

            case DOUBLE: index.addField(luceneName, (Double)o, boost);break;
            case DATE: {
              Date d = null;
              d = parseDate((String)o);
              if (d != null) {
                index.addField(luceneName, d.getTime(), boost);break;
              } else {
                index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;               
              }
            }
            case JSONOBJECT: index.addField(luceneName, o, boost);break;
View Full Code Here

              Date d = null;
              d = parseDate((String)o);
              if (d != null) {
                index.addField(luceneName, d.getTime(), boost);break;
              } else {
                index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;               
              }
            }
            case JSONOBJECT: index.addField(luceneName, o, boost);break;
            case NULL: index.addField(luceneName, (Object)JSONObject.NULL, boost);break;
            }
View Full Code Here

                index.addField(luceneName, d.getTime(), boost);break;
              } else {
                index.addField(luceneName, IndexUtilities.ObjectToString(o), boost);break;               
              }
            }
            case JSONOBJECT: index.addField(luceneName, o, boost);break;
            case NULL: index.addField(luceneName, (Object)JSONObject.NULL, boost);break;
            }
          }
        } catch (Exception e) {
          /* probably a casting exception */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.