Package org.apache.lucene.document.Field

Examples of org.apache.lucene.document.Field.Index


    private Field readField()
        throws IOException
    {
        int flags = dis.read();

        Index index = Index.NO;
        if ( ( flags & IndexDataWriter.F_INDEXED ) > 0 )
        {
            boolean isTokenized = ( flags & IndexDataWriter.F_TOKENIZED ) > 0;
            index = isTokenized ? Index.ANALYZED : Index.NOT_ANALYZED;
        }
View Full Code Here


      return false;
    }

    TypeMetadata metadata = getLeafTypeMetadata( type, propertyPath );

    Index index = metadata.getPropertyMetadataForProperty( propertyPath[propertyPath.length - 1] ).getFieldMetadata().iterator().next().getIndex();
    return EnumSet.of( Field.Index.ANALYZED, Field.Index.ANALYZED_NO_NORMS ).contains( index );
  }
View Full Code Here

    for (int i = 0; i < NUM_DOCS; i++) {
      Document doc = new Document();
      for (int k = 0; k < fieldNames.length; k++) {
        Field f;
        Store s;
        Index ix;
        String val = null;
        if (fieldNames[k].equals("id")) {
          s = Store.YES;
          ix = Index.UN_TOKENIZED;
          val = String.valueOf(i);
View Full Code Here

      TokenStream tokenStream, Store fieldStore, String delimiter,
      Boolean unique, Index fieldIndex, Boolean omitTF)
      throws FieldBuildingException {
    Collection<Field> fields = new ArrayList<Field>();
    // Only do indexing if we need a unique, indexed AND stored field.
    Index index = unique ? fieldIndex : Field.Index.NO;
    try {
      Field field;
      if (delimiter != null) {
        String value = tokenStreamStringConcatenator
            .tokenStreamToStringWithDelimiter(tokenStream,
View Full Code Here

    for (int i = 0; i < NUM_DOCS; i++) {
      Document doc = new Document();
      for (int k = 0; k < fieldNames.length; k++) {
        Field f;
        Store s;
        Index ix;
        String val = null;
        if (fieldNames[k].equals("id")) {
          s = Store.YES;
          ix = Index.NOT_ANALYZED;
          val = String.valueOf(i);
View Full Code Here

      return false;
    }

    TypeMetadata metadata = getLeafTypeMetadata( type, propertyPath );

    Index index = metadata.getPropertyMetadataForProperty( propertyPath[propertyPath.length - 1] ).getFieldMetadata().iterator().next().getIndex();
    return EnumSet.of( Field.Index.ANALYZED, Field.Index.ANALYZED_NO_NORMS ).contains( index );
  }
View Full Code Here

      return false;
    }

    TypeMetadata metadata = getLeafTypeMetadata( type, propertyPath );

    Index index = metadata.getPropertyMetadataForProperty( propertyPath[propertyPath.length - 1] ).getFieldMetadata().iterator().next().getIndex();
    return EnumSet.of( Field.Index.ANALYZED, Field.Index.ANALYZED_NO_NORMS ).contains( index );
  }
View Full Code Here

    protected final void addIndexRule( IndexRules.Builder builder,
                                       JcrPropertyDefinition defn,
                                       String type,
                                       TypeSystem typeSystem ) {
        Store store = Store.YES;
        Index index = defn.isFullTextSearchable() ? Index.ANALYZED : Index.NO;
        if (typeSystem.getStringFactory().getTypeName().equals(type)) {
            builder.stringField(defn.getInternalName(), store, index);
        } else if (typeSystem.getDateTimeFactory().getTypeName().equals(type)) {
            Long minimum = typeSystem.getLongFactory().create(defn.getMinimumValue());
            Long maximum = typeSystem.getLongFactory().create(defn.getMaximumValue());
View Full Code Here

        String name=textAnnotation.name();
      if ("".equals(name)){
      name = f.getName();
      }
     
      Index idx = INDEX_VAL_MAP.get(textAnnotation.index());
      Store store = STORE_VAL_MAP.get(textAnnotation.store());
      TermVector tv = TV_VAL_MAP.get(textAnnotation.termVector());
   
      if (idx==null || store==null || tv==null){
      throw new RuntimeException("Invalid indexing parameter specification");
View Full Code Here

                } else if (t.equals("text")) {
                    fdef.isMeta = false;
                    String idxString = column.optString("index", null);
                    String storeString = column.optString("store", null);
                    String tvString = column.optString("termvector", null);
                    Index idx = idxString == null ? Index.ANALYZED : DefaultSenseiInterpreter.INDEX_VAL_MAP.get(idxString.toUpperCase());
                    Store store = storeString == null ? Store.NO : DefaultSenseiInterpreter.STORE_VAL_MAP.get(storeString.toUpperCase());
                    TermVector tv = tvString == null ? TermVector.NO : DefaultSenseiInterpreter.TV_VAL_MAP.get(tvString.toUpperCase());

                    if (idx == null || store == null || tv == null) {
                        throw new ConfigurationException("Invalid indexing parameter specification");
View Full Code Here

TOP

Related Classes of org.apache.lucene.document.Field.Index

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.