Skip to content

Commit 398a191

Browse files
committed
- docs update
1 parent bbb684e commit 398a191

11 files changed

+81
-5
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,6 @@ $searchResults = $finder->findSearchTermByFields($searchTerm, ['title']);
115115
6. [Suggestions](Resources/doc/suggestions.md)
116116
7. [Query building](Resources/doc/query_building.md)
117117
8. [Console command to index entities](Resources/doc/console.md)
118-
9. [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)
119-
10. [Roadmap](https://github.com/mdiyakov/DoctrineSolrBundle/wiki/Roadmap-for-April,-2018)
118+
9. [Console command to delete entities ](Resources/doc/console_delete.md)
119+
10. [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)
120+
11. [Roadmap](https://github.com/mdiyakov/DoctrineSolrBundle/wiki/Roadmap-for-April,-2018)

Resources/doc/console.md

+2
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@ Beside this you can specify the "id" of particular enitity:
5555
* [Schema search over multiple entities classes](schema_search.md)
5656
* [Suggestions](suggestions.md)
5757
* [Query building](query_building.md)
58+
* [Console command to delete entities ](Resources/doc/console_delete.md)
59+
* [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)

Resources/doc/console_delete.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Console command to index entities
2+
3+
**DoctrineSolrBundle** provides a console command for removing of entities. It can be useful if you need to remove a bunch entities of particular entity class.
4+
To run use the following command:
5+
```
6+
app/console doctrine-solr:clear-index
7+
```
8+
9+
By default if no any arguments specified the command will remove all instances of entity classes specified in config.yml at "indexed_entities" section.
10+
11+
You can specify which entity class exactly you want to be removed. For example if you have the following config:
12+
```
13+
mdiyakov_doctrine_solr:
14+
indexed_entities:
15+
article:
16+
class: AppBundle\Entity\Page
17+
...
18+
news:
19+
class: AppBundle\Entity\News
20+
...
21+
```
22+
You can run:
23+
```
24+
app/console doctrine-solr:clear-index article
25+
```
26+
or
27+
```
28+
app/console doctrine-solr:clear-index news
29+
```
30+
So in first case the all "AppBundle\Entity\Page" instances will be removed. In the second example all "AppBundle\Entity\News" instances will be removed
31+
32+
Also you can take a look at "help" of this command to see all possible entity options.
33+
34+
Beside this you can specify the "id" of particular enitity:
35+
```
36+
app/console doctrine-solr:clear-index news 2
37+
```
38+
39+
40+
## Pages
41+
* [Getting started with DoctrineSolrBundle](getting_started.md)
42+
* [ Regular, fuzzy, wildcard, range and negative search](fuzzy_wildcard_range_negative_search.md)
43+
* [ Custom finder class ](custom_finder_class.md)
44+
* [ Filters ](filters.md)
45+
* [Schema search over multiple entities classes](schema_search.md)
46+
* [Suggestions](suggestions.md)
47+
* [Query building](query_building.md)
48+
* [Console command to index entities](Resources/doc/console.md)
49+
* [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)

Resources/doc/custom_finder_class.md

+2
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ So PageFinder can be a collection of entity-specific searching methods like Doct
4242
* [Suggestions](suggestions.md)
4343
* [Query building](query_building.md)
4444
* [Console command to index entities](console.md)
45+
* [Console command to delete entities ](Resources/doc/console_delete.md)
46+
* [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)

Resources/doc/entity_manager.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,16 @@ In this case if any exception will be thrown (for example in entity listener cha
1818

1919

2020
> Pay attention 'ds.entity_manager' doesn't have interface like \Doctrine\ORM\EntityManager. It has only "flush"" method with mandatory argument.
21-
> Also you don't need to call 'persist' method
21+
> Also you don't need to call 'persist' method
22+
23+
24+
## Pages
25+
* [Getting started with DoctrineSolrBundle](getting_started.md)
26+
* [ Regular, fuzzy, wildcard, range and negative search](fuzzy_wildcard_range_negative_search.md)
27+
* [ Custom finder class ](custom_finder_class.md)
28+
* [ Filters ](filters.md)
29+
* [Schema search over multiple entities classes](schema_search.md)
30+
* [Suggestions](suggestions.md)
31+
* [Query building](query_building.md)
32+
* [Console command to index entities](console.md)
33+
* [Console command to delete entities ](Resources/doc/console_delete.md)

Resources/doc/filters.md

+2
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,5 @@ You also can implement your own symfony service as a filter applicable for whole
132132
* [Suggestions](suggestions.md)
133133
* [Query building](query_building.md)
134134
* [Console command to index entities](console.md)
135+
* [Console command to delete entities ](Resources/doc/console_delete.md)
136+
* [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)

Resources/doc/fuzzy_wildcard_range_negative_search.md

+2
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,5 @@ For wildcard and fuzzy searches you also can use **"$splitPhrase = false"** in t
137137
* [Suggestions](suggestions.md)
138138
* [Query building](query_building.md)
139139
* [Console command to index entities](console.md)
140+
* [Console command to delete entities ](Resources/doc/console_delete.md)
141+
* [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)

Resources/doc/getting_started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,5 +236,5 @@ Beside this you can use default client defined in "nelmio_solarium" without any
236236
* [Suggestions](suggestions.md)
237237
* [Query building](query_building.md)
238238
* [Console command to index entities](console.md)
239-
240-
239+
* [Console command to delete entities ](Resources/doc/console_delete.md)
240+
* [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)

Resources/doc/query_building.md

+2
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,5 @@ $suggestQuery = $this->get('mdiyakov_doctrine_solr.query.suggester_builder')->bu
164164
* [Schema search over multiple entities classes](schema_search.md)
165165
* [Suggestions](suggestions.md)
166166
* [Console command to index entities](console.md)
167+
* [Console command to delete entities ](Resources/doc/console_delete.md)
168+
* [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)

Resources/doc/schema_search.md

+2
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,5 @@ For SchemeFinder "findByRange" and "findFuzzyTerm" methods are available. Also y
6666
* [Suggestions](suggestions.md)
6767
* [Query building](query_building.md)
6868
* [Console command to index entities](console.md)
69+
* [Console command to delete entities ](Resources/doc/console_delete.md)
70+
* [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)

Resources/doc/suggestions.md

+2
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,5 @@ In this case all entity classes will be used not depending on "ContextFiltering"
110110
* [Schema search over multiple entities classes](schema_search.md)
111111
* [Query building](query_building.md)
112112
* [Console command to index entities](console.md)
113+
* [Console command to delete entities ](Resources/doc/console_delete.md)
114+
* [EntityManager. How to flush an entity safe ](Resources/doc/entity_manager.md)

0 commit comments

Comments
 (0)