Examples of indexed()


Examples of org.apache.solr.schema.SchemaField.indexed()

      result.add(document.getFieldValue(uniqueKeyField.getName()).toString(), theTokens);
      for (String name : document.getFieldNames()) {

        // there's no point of providing analysis to unindexed fields.
        SchemaField field = schema.getField(name);
        if (!field.indexed()) {
          continue;
        }

        NamedList<Object> fieldTokens = new SimpleOrderedMap<Object>();
        theTokens.add(name, fieldTokens);
View Full Code Here

Examples of org.apache.solr.schema.SchemaField.indexed()

          if (schemaField != null) {
            f.multiValued = schemaField.multiValued();
            f.allAttributes.put(MULTI_VALUED, Boolean.toString(schemaField
                    .multiValued()));
            f.allAttributes.put(TYPE, schemaField.getType().getTypeName());
            f.allAttributes.put("indexed", Boolean.toString(schemaField.indexed()));
            f.allAttributes.put("stored", Boolean.toString(schemaField.stored()));
            f.allAttributes.put("defaultValue", schemaField.getDefaultValue());
          } else {
            f.toWrite = false;
          }
View Full Code Here

Examples of org.apache.solr.schema.SchemaField.indexed()

          f = schema.getField(part);
        }
        catch( SolrException e ){
          throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "can not sort on undefined field: "+part, e );
        }
        if (f == null || !f.indexed()){
          throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "can not sort on unindexed field: "+part );
        }
        lst[i] = f.getType().getSortField(f,top);
      }
    }
View Full Code Here

Examples of org.apache.solr.schema.SchemaField.indexed()

      if (sfield != null && schema.getDynamicPattern(sfield.getName()) != null) {
        f.add("dynamicBase", schema.getDynamicPattern(sfield.getName()));
      }

      // If numTerms==0, the call is just asking for a quick field list
      if( ttinfo != null && sfield != null && sfield.indexed() ) {
        Query q = qp.parse( fieldName+":[* TO *]" );
        int docCount = searcher.numDocs( q, matchAllDocs );
        if( docCount > 0 ) {
          // Find a document with this field
          DocList ds = searcher.getDocList( q, (Query)null, (Sort)null, 0, 1 );
View Full Code Here

Examples of org.apache.solr.schema.SchemaField.indexed()

          f.multiValued = schemaField.multiValued();
          f.allAttributes.put(MULTI_VALUED, Boolean.toString(schemaField
                  .multiValued()));
          f.allAttributes.put(TYPE, schemaField.getType().getTypeName());
          f.allAttributes.put("indexed", Boolean
                  .toString(schemaField.indexed()));
          f.allAttributes.put("stored", Boolean.toString(schemaField.stored()));
          f.allAttributes.put("defaultValue", schemaField.getDefaultValue());
        } else {

          try {
View Full Code Here

Examples of org.apache.solr.schema.SchemaField.indexed()

          if (schemaField != null) {
            f.multiValued = schemaField.multiValued();
            f.allAttributes.put(MULTI_VALUED, Boolean.toString(schemaField
                    .multiValued()));
            f.allAttributes.put(TYPE, schemaField.getType().getTypeName());
            f.allAttributes.put("indexed", Boolean.toString(schemaField.indexed()));
            f.allAttributes.put("stored", Boolean.toString(schemaField.stored()));
            f.allAttributes.put("defaultValue", schemaField.getDefaultValue());
          } else {
            f.toWrite = false;
          }
View Full Code Here

Examples of org.apache.solr.schema.SchemaField.indexed()

      result.add(document.getFieldValue(uniqueKeyField.getName()).toString(), theTokens);
      for (String name : document.getFieldNames()) {

        // there's no point of providing analysis to unindexed fields.
        SchemaField field = schema.getField(name);
        if (!field.indexed()) {
          continue;
        }

        NamedList<Object> fieldTokens = new SimpleOrderedMap<Object>();
        theTokens.add(name, fieldTokens);
View Full Code Here

Examples of org.apache.solr.schema.SchemaField.indexed()

          f = schema.getField(part);
        }
        catch( SolrException e ){
          throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "can not sort on undefined field: "+part, e );
        }
        if (f == null || !f.indexed()){
          throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "can not sort on unindexed field: "+part );
        }
        lst[i] = f.getType().getSortField(f,top);
      }
    }
View Full Code Here

Examples of org.apache.solr.schema.SchemaField.indexed()

      if (sfield != null && schema.isDynamicField(sfield.getName()) && schema.getDynamicPattern(sfield.getName()) != null) {
        f.add("dynamicBase", schema.getDynamicPattern(sfield.getName()));
      }

      // If numTerms==0, the call is just asking for a quick field list
      if( ttinfo != null && sfield != null && sfield.indexed() ) {
        Query q = new ConstantScoreRangeQuery(fieldName,null,null,false,false);
        TopDocs top = searcher.search( q, 1 );
        if( top.totalHits > 0 ) {
          // Find a document with this field
          try {
View Full Code Here

Examples of org.apache.solr.schema.SchemaField.indexed()

        }
      } else {
        // getField could throw an exception if the name isn't found
        try {
          SchemaField f = schema.getField(fn);
          if (f == null || !f.indexed()) return null;
          lst.add(f.getType().getSortField(f,top));
        } catch (Exception e) {
          return null;
        }
      }
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.