Lines 12-22
$indexer->drop_index;
Link Here
|
12 |
|
12 |
|
13 |
my $patrons = Koha::Patrons->search; |
13 |
my $patrons = Koha::Patrons->search; |
14 |
|
14 |
|
|
|
15 |
|
15 |
my ( @id_buffer, @commit_buffer ); |
16 |
my ( @id_buffer, @commit_buffer ); |
16 |
while ( my $patron = $patrons->next ) { |
17 |
while ( my $patron = $patrons->next ) { |
17 |
my $id = $patron->borrowernumber; |
18 |
my $id = $patron->borrowernumber; |
18 |
my $record = $patron->unblessed; |
19 |
my $record = $patron->unblessed; |
19 |
$record->{_id} = $id; |
20 |
$record->{es_id} = $id; |
20 |
$record->{category_type} = $patron->category->category_type; |
21 |
$record->{category_type} = $patron->category->category_type; |
21 |
push @id_buffer, $id; |
22 |
push @id_buffer, $id; |
22 |
push @commit_buffer, $record; |
23 |
push @commit_buffer, $record; |
Lines 31-49
if ( !$indexer->store ) {
Link Here
|
31 |
data => { |
32 |
data => { |
32 |
properties => { |
33 |
properties => { |
33 |
borrowernumber => { |
34 |
borrowernumber => { |
34 |
type => 'string', |
35 |
type => 'text', |
35 |
search_analyzer => 'analyser_standard', |
36 |
search_analyzer => 'analyser_standard', |
36 |
index_analyzer => 'analyser_standard', |
37 |
analyzer => 'analyser_standard', |
|
|
38 |
fielddata => 'true' |
37 |
}, |
39 |
}, |
38 |
cardnumber => { |
40 |
cardnumber => { |
39 |
type => 'string', |
41 |
type => 'text', |
40 |
search_analyzer => 'analyser_standard', |
42 |
search_analyzer => 'analyser_standard', |
41 |
index_analyzer => 'analyser_standard', |
43 |
analyzer => 'analyser_standard', |
|
|
44 |
fielddata => 'true' |
42 |
}, |
45 |
}, |
43 |
surname => { |
46 |
surname => { |
44 |
type => 'string', |
47 |
type => 'text', |
|
|
48 |
search_analyzer => 'analyser_standard', |
49 |
analyzer => 'analyser_standard', |
50 |
fielddata => 'true' |
51 |
}, |
52 |
firstname => { |
53 |
type => 'text', |
45 |
search_analyzer => 'analyser_standard', |
54 |
search_analyzer => 'analyser_standard', |
46 |
index_analyzer => 'analyser_standard', |
55 |
analyzer => 'analyser_standard', |
|
|
56 |
fielddata => 'true' |
47 |
}, |
57 |
}, |
48 |
} |
58 |
} |
49 |
} |
59 |
} |
50 |
- |
|
|