Example Solr Queries: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
This page has examples of various kinds of queries possible on the GO Solr document store (GOlr), | This page has examples of various kinds of queries possible on the GO Solr document store (GOlr), | ||
Preliminary schema information can be found in the [http://geneontology.svn.sourceforge.net/viewvc/geneontology/java/gold/solr/conf/schema.xml?content-type=text%2Fplain repo]. | |||
=Usage= | =Usage= |
Revision as of 05:06, 1 December 2011
Overview
This page has examples of various kinds of queries possible on the GO Solr document store (GOlr), Preliminary schema information can be found in the repo.
Usage
The current testing ground for GOlr is:
http://skewer.lbl.gov:8080/solr/
This is a naked Solr server; you can access it with any http client, including a web browser. In addition, there is an experimental version of GOOSE that can talk to Solr (select a Solr mirror from the list):
http://amigo2.berkeleybop.org/cgi-bin/amigo2/goose
This method is currently a little slower, but may make learning a little bit easier.
Example Queries
All documents (first 10)
URL
http://skewer.lbl.gov:8080/solr/select?qt=standard&fl=*%2Cscore&version=2.2&wt=json&rows=10&indent=on&q=*:*&start=0
GOOSE
q=*:*
All documents (first 20)
URL
http://skewer.lbl.gov:8080/solr/select?qt=standard&fl=*%2Cscore&version=2.2&wt=json&rows=20&indent=on&q=*:*&start=0
GOOSE
q=*:* rows=20
IEA Annotations from TAIR (first 10)
URL
http://skewer.lbl.gov:8080/solr/select?qt=standard&fl=*%2Cscore&version=2.2&wt=json&rows=10&indent=on&q=*:*&fq=document_category:annotation&start=0
GOOSE
q=*:* fq=document_category:annotation fq=source:"TAIR" fq=evidence_type:"IEA"
Annotations to both "macromolecule biosynthetic process" and "cellular response to stress" (first 10)
URL (facets displayed)
http://skewer.lbl.gov:8080/solr/select?qt=standard&indent=on&wt=json&version=2.2&rows=10&start=0&fl=*%2Cscore&facet=true&facet.field=document_category&facet.field=type&facet.field=evidence_type&facet.field=evidence_closure&facet.field=source&facet.field=taxon&facet.field=isa_partof_label_closure&facet.field=annotation_extension_class_label_closure&fq=&q=*:*&fq=document_category:"annotation"&fq=isa_partof_label_closure:"macromolecule biosynthetic process"&fq=isa_partof_label_closure:"cellular response to stress"
GOOSE (no facets shown)
q=*:* fq=document_category:"annotation" fq=isa_partof_label_closure:"macromolecule biosynthetic process" fq=isa_partof_label_closure:"cellular response to stress"