Examples of LuceneOptions


Examples of org.hibernate.search.bridge.LuceneOptions

         addFieldToDocument(fieldName, type, tagValue);
      }
   }

   private void addFieldToDocument(String fieldName, Descriptors.FieldDescriptor.Type type, Object value) {
      LuceneOptions luceneOptions = defaultLuceneOptions;
      LuceneOptions numericLuceneOptions = STORED_NOT_ANALYZED;
      if (value == null) {
         value = QueryFacadeImpl.NULL_TOKEN;  //todo [anistor] do we need a specific null token for numeric fields?
         luceneOptions = NOT_STORED_NOT_ANALYZED;
         numericLuceneOptions = NOT_STORED_NOT_ANALYZED;
      }

      String fn = getFullFieldName(fieldName); //todo [anistor] should we index with fieldNumber instead of fieldName?
      //todo [anistor] string vs numeric. use a proper way to transform to string
      switch (type) {
         case DOUBLE:
         case FLOAT:
         case INT64:
         case UINT64:
         case INT32:
         case FIXED64:
         case FIXED32:
         case UINT32:
         case SFIXED32:
         case SFIXED64:
         case SINT32:
         case SINT64:
         case ENUM:
            numericLuceneOptions.addNumericFieldToDocument(fn, value, document);
            break;
         case BOOL:
            numericLuceneOptions.addNumericFieldToDocument(fn, ((Boolean) value) ? TRUE_INT : FALSE_INT, document);
            break;
         default:
            luceneOptions.addFieldToDocument(fn, String.valueOf(value), document);
      }
   }
View Full Code Here

Examples of org.hibernate.search.bridge.LuceneOptions

          classIndexes.get( i ), classTermVectors.get( i ), classBoosts.get( i )
      );
    }

    protected LuceneOptions getFieldLuceneOptions(int i, Object value) {
      LuceneOptions options;
      options = new LuceneOptionsImpl(
          fieldStore.get( i ),
          fieldIndex.get( i ),
          fieldTermVectors.get( i ),
          fieldBoosts.get( i ) * dynamicFieldBoosts.get( i ).defineBoost( value )
View Full Code Here

Examples of org.hibernate.search.bridge.LuceneOptions

            Field.TermVector.NO
        );
    doc.add( classField );

    // now add the entity id to the document
    LuceneOptions luceneOptions = new LuceneOptionsImpl(
        Store.YES,
        Field.Index.NOT_ANALYZED_NO_NORMS,
        Field.TermVector.NO,
        idBoost
    );
View Full Code Here

Examples of org.hibernate.search.bridge.LuceneOptions

          classBoosts.get( i )
      );
    }

    protected LuceneOptions getFieldLuceneOptions(int i, Object value) {
      LuceneOptions options;
      options = new LuceneOptionsImpl(
          fieldStore.get( i ),
          fieldIndex.get( i ),
          fieldTermVectors.get( i ),
          fieldBoosts.get( i ) * dynamicFieldBoosts.get( i ).defineBoost( value ),
View Full Code Here

Examples of org.hibernate.search.bridge.LuceneOptions

    doc.add( classField );

    // now add the entity id to the document
    DocumentFieldMetadata idFieldMetaData = idPropertyMetadata.getFieldMetadata( idFieldName );

    LuceneOptions luceneOptions = new LuceneOptionsImpl( idFieldMetaData );
    final FieldBridge contextualizedBridge = conversionContext.oneWayConversionContext( getIdBridge() );
    conversionContext.setClass( entityType );
    conversionContext.pushProperty( idFieldMetaData.getName() );

    try {
View Full Code Here

Examples of org.hibernate.search.bridge.LuceneOptions

            Field.TermVector.NO
        );
    doc.add( classField );

    // now add the entity id to the document
    LuceneOptions luceneOptions = new LuceneOptionsImpl(
        Store.YES,
        Field.Index.NOT_ANALYZED_NO_NORMS,
        Field.TermVector.NO,
        idBoost
    );
View Full Code Here

Examples of org.hibernate.search.bridge.LuceneOptions

          classBoosts.get( i )
      );
    }

    protected LuceneOptions getFieldLuceneOptions(int i, Object value) {
      LuceneOptions options;
      options = new LuceneOptionsImpl(
          fieldStore.get( i ),
          fieldIndex.get( i ),
          fieldTermVectors.get( i ),
          fieldBoosts.get( i ) * dynamicFieldBoosts.get( i ).defineBoost( value ),
View Full Code Here

Examples of org.hibernate.search.bridge.LuceneOptions

          classBoosts.get( i )
      );
    }

    protected LuceneOptions getFieldLuceneOptions(int i, Object value) {
      LuceneOptions options;
      options = new LuceneOptionsImpl(
          fieldStore.get( i ),
          fieldIndex.get( i ),
          fieldTermVectors.get( i ),
          fieldBoosts.get( i ) * dynamicFieldBoosts.get( i ).defineBoost( value ),
View Full Code Here

Examples of org.hibernate.search.bridge.LuceneOptions

            Field.TermVector.NO
        );
    doc.add( classField );

    // now add the entity id to the document
    LuceneOptions luceneOptions = new LuceneOptionsImpl(
        Store.YES,
        Field.Index.NOT_ANALYZED_NO_NORMS,
        Field.TermVector.NO,
        idBoost
    );
View Full Code Here

Examples of org.hibernate.search.bridge.LuceneOptions

          classIndexes.get( i ), classTermVectors.get( i ), classBoosts.get( i )
      );
    }

    protected LuceneOptions getFieldLuceneOptions(int i, Object value) {
      LuceneOptions options;
      options = new LuceneOptionsImpl(
          fieldStore.get( i ),
          fieldIndex.get( i ),
          fieldTermVectors.get( i ),
          fieldBoosts.get( i ) * dynamicFieldBoosts.get( i ).defineBoost( value )
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.