Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 69 lines (58 sloc) 1.973 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
#!/usr/bin/perl

use strict;
use warnings;

our $test_class = 'FieldTest::String';

our @mapping = (
    'basic' => { type => 'string' },

    'options' => {
        type => 'string',
        index => 'not_analyzed',
        index_name => 'foo',
        store => 'yes',
        term_vector => 'with_positions_offsets',
        boost => 2,
        null_value => 'nothing',
        omit_norms => 1,
        omit_term_freq_and_positions => 1,
        index_analyzer => 'my_index_analyzer',
        search_analyzer => 'my_search_analyzer',
        search_quote_analyzer => 'my_quoted_analyzer',
        include_in_all => 0
    },

    index_analyzer => {
        type => 'string',
        index_analyzer => 'my_index_analyzer',
        analyzer => 'my_analyzer'
    },

    search_analyzer => {
        type => 'string',
        search_analyzer => 'my_search_analyzer',
        analyzer => 'my_analyzer'
    },

    multi => {
        type => "multi_field",
        fields => {
            multi_attr => {
                analyzer => "foo",
                boost => 2,
                index_analyzer => "bar",
                type => "string"
            },
            one => {
                boost => 1,
                index_analyzer => "bar",
                search_analyzer => "baz",
                type => "string",
            },
            two => {
                precision_step => 2,
                type => "date"
            },
        },
    },

    mapping => { type => 'integer', store => 1 },
    bad_opt => qr/doesn't understand 'precision_step'/,
    bad_multi => qr/doesn't understand 'format'/

);

do 't/10_typemaps/test_field.pl' or die $!;

1;
Something went wrong with that request. Please try again.