Skip to content

Commit 302b0c5

Browse files
committed
Update README.md
1 parent c97d9bc commit 302b0c5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
4041
Publish the config file into your project by running:
4142

4243
```bash
4344
php artisan config:publish nqxcode/laravel-lucene-search
4445
```
45-
46+
###Basic
4647
In 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
7072
You 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:
100102
In 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

115118
This filters can be deleted or replaced with others.
116119
```php

0 commit comments

Comments
 (0)