-
Notifications
You must be signed in to change notification settings - Fork 10
Technologysolr
See setupZookeeperHadoopHbaseTomcatSolrNutch for an advanced setup.
Starting from release 4.4.0
there will be a Solr Reference Guide for every minor release. We are currently using 4.3.1
. But it should be helpful anyway.
Solr's basic unit of information is a document. Documents are composed of fields. Each field has a field type which defines what kind of data a field can contain. It also tells Solr how to interpret the field and how it can be queried. [Solr Ref Guide: Overview of Documents, Fields and Schema Design].
This is the basic structure of a Solr schema.xml
file [Solr Ref Guide: Putting the Pieces Together]:
<schema>
<types>
<fields>
<uniqueKey>
<defaultSearchField>
<solrQueryParser defaultOperator>
<copyField>
</schema>
Debug information can be appended to a query by adding &debugQuery=on
to the request.
Solr can parse Queries with multiple QueryParsers:
- Dismax Query Parser: Features a query syntax similar to the one Google uses. Is relatively simple and highly fault tolerant. It is designed, to make it possible to forward user queries directly to Solr.
- Standard Query Parser: A query syntax enabling more complicated and precise queries. However user input would have to be escaped/parsed heavily to be forwarded to Solr.
Currently I favor Dismax Query Parser because it's probably easier to implement. An implementation of Standard Query Parse would most likely result in trying to emulate Dismax' syntax, but not reaching its quality.
Solr supports a feature called MoreLikeThis which can return all documents similiar to another one. This is different from fuzzy searching. Note: I don't know where we would use this quire yet, but it seems interesting.