Package org.apache.solr.schema

Examples of org.apache.solr.schema.EmbeddedIndexedIntField


            // update logic
            if(schema != null){
              SchemaField sfield = schema.getFieldOrNull(fieldName);
             
              if (sfield.getType() instanceof EmbeddedIndexedIntField) {
                EmbeddedIndexedIntField eiif = (EmbeddedIndexedIntField)sfield.getType();
               
                EmbeddedSortField sf = new EmbeddedSortField(fieldName,
                                      tok.nextToken(),
                                      Field.Store.YES,
                                      Field.Index.NO,
                                      eiif.getFieldNumber());
                document.add(sf);
              } else {
                Field f = sfield.createField(tok.nextToken(), 1.0f);
                if (f != null) { // null fields are not added
                  document.add(f);
                }
              }
             
            } else {
              field = new Field(fieldName, tok.nextToken(), Store.YES, Index.ANALYZED);
              document.add(field);
            }
          }
        } else {
          // update logic
          if(schema != null){
            SchemaField sfield = schema.getFieldOrNull(fieldName);
           
            if (sfield.getType() instanceof EmbeddedIndexedIntField) {
              EmbeddedIndexedIntField eiif = (EmbeddedIndexedIntField)sfield.getType();
             
              EmbeddedSortField sf = new EmbeddedSortField(fieldName,
                                    fieldString,
                                    Field.Store.YES,
                                    Field.Index.NO,
                                    eiif.getFieldNumber());
              document.add(sf);
            } else {
              Field f = sfield.createField(fieldString, 1.0f);
              if (f != null) { // null fields are not added
                document.add(f);
View Full Code Here

TOP

Related Classes of org.apache.solr.schema.EmbeddedIndexedIntField

Copyright © 2018 www.massapicom. 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.