@@ -37,12 +37,13 @@ If you want to use the facade to search, add this to your facades in `app/config
3737],
3838```
3939## Configuration
40+
4041Publish the config file into your project by running:
4142
4243``` bash
4344php artisan config:publish nqxcode/laravel-lucene-search
4445```
45-
46+ ###Basic
4647In published config file add descriptions for models which need to be indexed, for example:
4748
4849``` php
@@ -67,6 +68,7 @@ In published config file add descriptions for models which need to be indexed, f
6768],
6869
6970```
71+ ###Indexing of dynamic fields
7072You can also index values of ** optional fields** (dynamic fields). For enable indexing for optional fields:
7173
7274- In config for each necessary model add following option:
@@ -100,17 +102,18 @@ In config file:
100102In model add following accessor:
101103
102104``` php
103- publc function getOptionalAttributesAttribute()
105+ public function getOptionalAttributesAttribute()
104106 {
105107 return [
106108 'optional_attribute1' => "value1",
107109 'optional_attribute2' => "value2",
108110 ];
109111 }
110112```
111- By default the following filters are used by search:
112- - Stemming filter for english/russian words,
113- - Stopword filters for english/russian words.
113+ ###Stemming and stopwords
114+ For reducing words to their root form by default the following filters are used in search:
115+ - Stemming filter for ** english/russian** words (for reducing words to their root form),
116+ - Stopword filters for ** english/russian** words (for exclude some words from search index).
114117
115118This filters can be deleted or replaced with others.
116119``` php
0 commit comments