Skip to content
Browse files

More comments

  • Loading branch information...
1 parent 16bbfbe commit ccc13ff1f00e0fb7be104ddbd826e8444969a834 @wdalmut committed Apr 1, 2012
Showing with 52 additions and 1 deletion.
  1. +52 −1 README.md
View
53 README.md
@@ -44,17 +44,66 @@ using ```search()``` method.
```php
<?php
$searchQuery = $manager->search()
+ ->relevancy() //Force date relevancy
->query("Text to search")
->facet("category");
->range() //maybe much more complex
->filterBy("category", "Web")
->network("a-partner-sitekey")
- ->network("a-partner-sitekey")
;
$results = $manager->get($searchQuery);
```
+### Query
+
+The query is what you want to search, it could be a sentence or
+simple a word but not empty.
+
+### Relevancy
+
+Relevancy is the boost operator that indicates that this query
+must works with a relevancy on a particular rule. Possible
+values actually are only: date and default.
+
+ * Date indicates that are better new contents (using ```publish_date```
+field)
+ * Default for a natural query execution.
+
+### Filter By
+
+This method indicates that you want to reduce your result set. You
+can chain this operator.
+
+```php
+<?php
+$search->filterBy("a", "b")->filterBy("c", "d");
+```
+
+### Facet
+
+Facet operator is the "group by" and "count". You can chain this
+operator.
+
+```php
+<?php
+$search->facet("category")->facet("author");
+```
+
+### Network
+
+If you have a network of sites that you query not only your
+repository but involves other partner indexes for having more
+results. You can chain this operator
+
+```php
+<?php
+$search->network("first")->network("second");
+```
+
+Is not useful including your sitekey because the sistem involve
+it by itself.
+
### Ranges
Here the range method prototype
@@ -84,6 +133,8 @@ $searchQuery = $manager->search()
$results = $manager->get($searchQuery);
```
+You can chain this operator.
+
## Library autoloader
This library provides a simple autoloader. You can

0 comments on commit ccc13ff

Please sign in to comment.
Something went wrong with that request. Please try again.