Package org.apache.lucene.document.Field

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


        {
            boolean isTokenized = ( flags & IndexDataWriter.F_TOKENIZED ) > 0;
            index = isTokenized ? Index.ANALYZED : Index.NOT_ANALYZED;
        }

        Store store = Store.NO;
        if ( ( flags & IndexDataWriter.F_STORED ) > 0 )
        {
            store = Store.YES;
        }
View Full Code Here


        newDoc.add(new Field(idAttribute, value.toString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
      } else if (value != null) {
        if (filled) {
          newDoc.removeField(attributeName);
        }
        Store storeFieldStore;
        if (storeField) {
          storeFieldStore = Store.YES;
        } else {
          storeFieldStore = Store.NO;
        }
View Full Code Here

    // create test documents
    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;
View Full Code Here

    private Document createDocument(Row row) {
        Document document = new Document();
        Set<String> fields = luceneConfiguration.getPerFieldInfo().keySet();
        for (String fieldName : fields) {
            boolean isStore = luceneConfiguration.getPerFieldInfo().get(fieldName).isStore();
            Store store = getStore(isStore);
            Field field = new Field(fieldName, row.get(fieldName), store, Index.ANALYZED, TermVector.NO);
            document.add(field);
        }
        return document;
    }
View Full Code Here

        }
        return document;
    }

    private Store getStore(boolean isStore) {
        Store store = Store.NO;
        if (isStore) {
            store = Store.YES;
        }
        return store;
    }
View Full Code Here

    // create test documents
    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;
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());
View Full Code Here

      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

                    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

                    fdef.isMeta = false;
                    String idxString = column.getAttribute("index");
                    String storeString = column.getAttribute("store");
                    String tvString = column.getAttribute("termvector");
                    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.Store

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.