Interface LuceneIndexFactory

    • Method Detail

      • addField

        LuceneIndexFactory addField​(java.lang.String name)
        Add a field to be indexed
        Parameters:
        name - A field of the object to index. Only fields listed here will be stored in the index. Fields should map to PDX fieldNames if the object is serialized with PDX, or to java fields on the object otherwise. The special field name LuceneService.REGION_VALUE_FIELD indicates that the entire value should be stored as a single field in the index.
        Returns:
        this factory
      • setFields

        LuceneIndexFactory setFields​(java.lang.String... fields)
        Set the list of fields to be indexed.
        Parameters:
        fields - Fields of the object to index. Only fields listed here will be stored in the index. Fields should map to PDX fieldNames if the object is serialized with PDX, or to java fields on the object otherwise. The special field name LuceneService.REGION_VALUE_FIELD indicates that the entire value should be stored as a single field in the index.
        Returns:
        this factory
      • addField

        LuceneIndexFactory addField​(java.lang.String name,
                                    org.apache.lucene.analysis.Analyzer analyzer)
        Add a field to be indexed, using the specified analyzer.
        Parameters:
        name - A field of the object to index. Only fields listed here will be stored in the index. Fields should map to PDX fieldNames if the object is serialized with PDX, or to java fields on the object otherwise. The special field name LuceneService.REGION_VALUE_FIELD indicates that the entire value should be stored as a single field in the index.
        analyzer - The analyzer to use for this this field. Analyzers are used by Lucene to tokenize your field into individual words.
        Returns:
        this factory
      • setFields

        LuceneIndexFactory setFields​(java.util.Map<java.lang.String,​org.apache.lucene.analysis.Analyzer> fieldMap)
        Set the list of fields to be indexed.
        Parameters:
        fieldMap - Fields of the object to index, with the analyzer to be used for each field. Only fields listed here will be stored in the index. Fields should map to PDX fieldNames if the object is serialized with PDX, or to java fields on the object otherwise. The special field name LuceneService.REGION_VALUE_FIELD indicates that the entire value should be stored as a single field in the index.
        Returns:
        this factory
      • create

        void create​(java.lang.String indexName,
                    java.lang.String regionPath)
        Create the index on this member.
        Parameters:
        indexName - name of the index.
        regionPath - The region to index. The entries added to this region will be indexes.
      • setLuceneSerializer

        LuceneIndexFactory setLuceneSerializer​(LuceneSerializer luceneSerializer)
        Configure the way objects are converted to lucene documents for this lucene index
        Parameters:
        luceneSerializer - A callback which converts a region value to a lucene document or documents to be stored in the index.
        Returns:
        this factory
        Since:
        Geode 1.4