Result ordering and grouping

From Clusterpoint Wiki
Jump to: navigation, search

Result ordering and grouping

Ordering

Currently the Clusterpoint Server has folowing mechanisms of ordering documents in the result set:

  • By numeric value of one or more tags.
  • By relevance, which is calculated when performing a search. This mechanism ensures that documents which better correspond to a search request are returned to the result set first. This mechanism supports customizations. See Relevance ranking for details.
  • By distance - using GPS coordinates (plane and GPS). See Geospatial ordering for details.
  • By string. See Alphabetic Ordering for details.

Related docs for API libraries: XML, PHP

Grouping

If a document element has been defined as a group identificator in the Storage policy, it is possible to set the maximum number of documents in a search result that are returned from one group.
It's usefull when you need to return just few items from each group in resultset. For example if you index web pages then grouping results will allow You to search and group results by domain and return let's say 2 web pages per domain - group.
Related docs for API libraries: XML, PHP