(Quick Reference) h3.Search

Select

  • Path : /api/search/select
  • Parameters :
    • query : any string. Solr/Lucene query syntax is supported here.
    • max : limit of number of results. default 12
    • offset : offset in to the result set. default 0
    • sort : score|lastRevised|createdOn|visitCount. default score desc
  • Filter options

object_type=Species+OR+Resource+OR+Observation+OR+Document+OR+Checklists+OR+UserGroup+OR+SUser

  • Advance Search Common Options
    • aq.object_type : All | Species | Observation | Document | SUser | UserGroup | Resource . Default : All
    • aq.name : filters results by species name given to the objects. Specific object related details are given in respective object_type options below.
    • aq.location : filters results by where the respective object are located
    • aq.text : will find all objects containing this text
    • aq.tag : filters objects to those having this tag
    • aq.contributor : filters objects where the given name is the contributor
    • aq.attribution : filters objects where attribution is given the mentioned person
    • aq.members : filters objects where the given user has participated
    • aq.license : filters objects by licenses given to them
    • daterangepicker_start : searches by uploadedOn from date. Default from beginning of time
    • daterangepicker_end : : searches by uploadedOn to date. Default to now
    • uGroup : ALL | userGroup id
  • Advance Search Species Module Options
    • aq.name : filters species by species name or any synonym name or common name
    • aq.taxon : filters species by taxon concept either present in the hierarchy
    • aq.sp_overview : searches in species overview
    • aq.sp_nc : searches in species nomenculature and classification
    • aq.sp_nh : searches in species natural history
    • aq.sp_hd : searches in species habitat and distribution
  • Advance Search Observation Module Options
    • aq.name : filters observations by recommendation name given to them
    • observedon_start : searches by observedOn from date. Default to beginning of time
    • observedon_end : searches by observedOn to date. Default to now
  • Advance Search Document Module Options
    • aq.name : nothing is indexed as document name
    • aq.title : searches by title
    • aq.type : searches by document type. Possible values are Report | Poster | Proposal | Miscellaneous
  • Advance Search User Module Options
    • aq.name : filters users by name
    • aq.user : searches by name, username, email or id
  • Advance Search UserGroup Module Options
    • aq.name : nothing is indexed as document name
    • aq.title : searched by title
    • aq.pages : searches by content in pages of the group
  • Advance Search Media Module Options
    • aq.name : filters resources by species name given to the resource
    • aq.container : filters results by query string of the form objectType_id
  • REST method : GET
  • Request :

http://indiabiodiversity.org/api/search/select?query=sravanthi&aq.object_type=SUser
  • Response :

{
    "queryParams": {
        "isDeleted": false,
            "isShowable": true,
            "query": "sravanthi",
            "aq.object_type": "SUser",
            "max": 12,
            "offset": 0
    },
        "activeFilters": {
            "query": "sravanthi",
            "aq.object_type": "SUser"
        },
        "instanceTotal": 3,
        "instanceList": [
        {
            "id": 1064,
            "object_type": "SUser",
            "title": "Sravanthi",
            "summary": "",
            "containers": []
        },
        {
            "id": 4239,
            "object_type": "SUser",
            "title": "SravanthiY",
            "summary": "",
            "containers": []
        },
        {
            "id": 1184,
            "object_type": "SUser",
            "title": "Sravanthi Mutyala",
            "summary": "I am a software developer working with Strand Life Sciences, Bangalore and currently developing this portal.",
            "containers": []
        }
    ],
        "objectTypes": [
        {
            "name": "SUser",
            "count": 3
        }
    ],
        "uGroups": []
}

nameTerms

  • Path : /api/search/nameTerms
  • Parameters :
    • term : Prefix of the term for autocomplete.
    • field : Field name on which autocomplete should work. Default is "autocomplete"
    • max: limit of number of results. default 5 and at max 10
  • REST method : GET
  • Request :

http://indiabiodiversity.org/api/search/nameTerms?term=man&max=2
  • Response :

[
{
value: "Vitex negundo",
           label: "<b>Man</b> Ching",
           desc: "Vitex negundo",
           icon: "http://indiabiodiversity.org/biodiv/img//Vitex_negundo/Vitex-negundo_gall_th.jpg",
           speciesId: 32833,
           languageName: null,
           category: "Names"
},
{
value: "Manouria emys",
       label: "<b>Man</b>ouria emys",
       desc: "Manouria emys",
       icon: "http://indiabiodiversity.org/biodiv/img/group_icons/speciesGroups/reptiles_32X32.png",
       speciesId: 227671,
       languageName: null,
       category: "Names"
},
{
value: "manilal",
       label: "manilal",
       category: "General"
},
{
value: "manoj",
       label: "manoj",
       category: "General"
}
]