Blame view

src/site/markdown/search_component.md 1.33 KB
Matthijs Brouwer authored
1
# Search Component
Matthijs Brouwer authored
2
Matthijs Brouwer authored
3
To perform specific Mtas queries in Solr requests, the following parameter should be used.
Matthijs Brouwer authored
4
Matthijs Brouwer authored
5
6
7
8
| Parameter   |  Value | Obligatory  |
|-------------|--------|-------------|
| mtas        | true   | yes         |
Matthijs Brouwer authored
9
10
See [statistics](search_component_stats.html), 
[kwic](search_component_kwic.html), [list](search_component_list.html), [document](search_component_document.html), [termvector](search_component_termvector.html), [facet](search_component_facet.html), [group](search_component_group.html), [prefix](search_component_prefix.html) and [collection](search_component_collection.html) for more details and examples.
Matthijs Brouwer authored
11
12
13
14

---

**Regular queries**
Matthijs Brouwer authored
15
Matthijs Brouwer authored
16
Besides from specific Mtas queries in Solr requests, also [CQL](search_cql.html) can be used in regular queries by [configuring](search_configuration.html) the Mtas query parser in solrconfig.xml. 
Matthijs Brouwer authored
17
Matthijs Brouwer authored
18
*Example 1*
Matthijs Brouwer authored
19
20
21

Search for documents containing the word "de" with a query.
Matthijs Brouwer authored
22
`q={!mtas_cql+field%3D"text"+query%3D"[t%3D\"de\"]"}&fl=*&start=0&rows=0&wt=json&indent=true`
Matthijs Brouwer authored
23
24
25
26
27
28

``` json
"response":{"numFound":1664241,"start":0,"docs":[]
  }
```
Matthijs Brouwer authored
29
*Example 2*
Matthijs Brouwer authored
30
31
32

Search for documents containing the word "de" with a filter query.
Matthijs Brouwer authored
33
`fq={!mtas_cql+field%3D"text"+query%3D"[t%3D\"de\"]"}&q=*%3A*&fl=*&start=0&rows=0&wt=json&indent=true`
Matthijs Brouwer authored
34
35
36
37
38
39
40
41

``` json
"response":{"numFound":1664241,"start":0,"docs":[]
  }
```